:root {
    --bg: #0c0c0f;
    --bg-card: linear-gradient(135deg, #16161f 0%, #1a1a24 50%, #14141c 100%);
    --border-card: #2a2a3a;
    --text: #b8b8c8;
    --text-heading: #e8e8f0;
    --text-muted: #6a6a7a;
    --accent: #a78bfa;
    --accent-hover: #c4b5fd;
    --trim: linear-gradient(90deg, transparent, #a78bfa 20%, #38bdf8 50%, #a78bfa 80%, transparent);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

#shader-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
}

body {
    background: transparent;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

h1 {
    color: var(--text-heading);
    margin-bottom: 20px;
    font-size: 2em;
}

.intro {
    margin-bottom: 30px;
    border-left: 2px solid var(--text-muted);
    padding-left: 15px;
}
.intro-hint {
    color: var(--text-muted);
    font-size: 0.85em;
    cursor: pointer;
    user-select: none;
}
.expand-icon {
    transition: transform 0.2s;
    display: inline-block;
    font-size: 0.8em;
}
.intro-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s;
    opacity: 0;
}
.intro-content p {
    margin: 10px 0;
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.5;
    font-family: 'Source Serif 4', Georgia, serif;
}
.intro:hover .intro-content {
    max-height: 200px;
    opacity: 1;
}
.intro:hover .expand-icon { transform: rotate(180deg); }

.post {
    background: var(--bg-card);
    padding: 40px 50px;
    margin-bottom: 40px;
    border-radius: 2px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    border: 1px solid var(--border-card);
    position: relative;
}
.post::before, .post::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: var(--trim);
    opacity: 0.4;
}
.post::before { top: 0; }
.post::after { bottom: 0; }

.post-title-link { text-decoration: none; }
.post-title {
    color: var(--text-heading);
    font-size: 1.5em;
    margin-bottom: 10px;
    transition: color 0.2s;
}
.post-title-link:hover .post-title { color: var(--accent); }

.post-date {
    display: block;
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.post-content, .post-preview {
    color: var(--text);
    font-family: 'Source Serif 4', Georgia, serif;
}
.post-preview { margin-bottom: 15px; }

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
}
.read-more:hover { color: var(--accent-hover); }

.post-content h1, .post-content h2, .post-content h3 {
    color: var(--text-heading);
    margin-top: 20px;
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.post-content h3 { font-size: 1.2em; }
.post-content h4 {
    color: var(--text-heading);
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 1em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.post-content p { margin-bottom: 15px; }
.post-content ul, .post-content ol { margin: 15px 0; padding-left: 25px; }
.post-content li { margin-bottom: 8px; }
.post-content strong { color: var(--text-heading); }
.post-content blockquote {
    margin: 20px 0;
    padding-left: 15px;
    border-left: 2px solid var(--accent);
    font-style: italic;
    color: var(--text-muted);
}
.post-content img { max-width: 100%; height: auto; }
.post-content a { color: var(--accent); }
.post-content a:hover { color: var(--accent-hover); }
.post-content pre {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}
.post-content code { font-family: 'Courier New', monospace; }
.post-content table {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border-collapse: collapse;
}
.post-content th, .post-content td {
    border: 1px solid var(--text-muted);
    padding: 8px 12px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}
header h1 { margin-bottom: 0; }

.other-pages {
    color: var(--text-muted);
    font-size: 0.85em;
}

@media (max-width: 600px) {
    body { padding: 10px; }
    .post { padding: 15px; }
}
