:root {
    --bg: #fafafa;
    --text: #2d2d2d;
    --accent: #0066cc;
    --muted: #666;
    --border: #e0e0e0;
    --code-bg: #f4f4f4;
    --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a2e;
        --text: #eaeaea;
        --accent: #64b5f6;
        --muted: #aaa;
        --border: #333;
        --code-bg: #2d2d3e;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 17px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
}

nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover { color: var(--accent); }

/* Hero */
.hero {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--muted);
    font-size: 1.1rem;
}

/* Posts */
.posts h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.post-summary {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.post-summary h3 {
    margin-bottom: 0.3rem;
}

.post-summary h3 a {
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s;
}

.post-summary h3 a:hover { color: var(--accent); }

.post-summary time {
    font-size: 0.85rem;
    color: var(--muted);
}

.post-summary p {
    margin-top: 0.5rem;
    color: var(--muted);
}

/* Single post */
.post header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.post header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.post header time {
    color: var(--muted);
    font-size: 0.9rem;
}

.tags { margin-top: 0.5rem; }
.tag {
    display: inline-block;
    background: var(--code-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--accent);
    margin-right: 0.5rem;
}

.tags-list .tag {
    margin: 0.3rem;
    font-size: 1rem;
}

/* Content */
.content h2, .content h3, .content h4 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.content p { margin-bottom: 1.2rem; }

.content ul, .content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.content li { margin-bottom: 0.4rem; }

.content a {
    color: var(--accent);
    text-decoration: underline;
}

.content code {
    background: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.content pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.2rem;
}

.content pre code {
    background: none;
    padding: 0;
}

.content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin: 1.2rem 0;
    color: var(--muted);
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer a { color: var(--accent); }

/* Responsive */
@media (max-width: 600px) {
    .site-header .container {
        flex-direction: column;
        gap: 0.8rem;
    }
    nav a { margin-left: 1rem; }
    .hero h1 { font-size: 1.7rem; }
}
