:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #2563eb;
    --code-bg: #f3f4f6;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111827;
        --text: #e5e7eb;
        --muted: #9ca3af;
        --border: #374151;
        --accent: #60a5fa;
        --code-bg: #1f2937;
    }
}

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

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

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

nav {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

nav a {
    color: var(--accent);
    text-decoration: none;
    margin-right: 1.5rem;
    font-size: 0.9rem;
}

nav a:hover { text-decoration: underline; }
nav .site-title { font-weight: 700; font-size: 1.1rem; }

h1 { font-size: 2rem; margin: 1.5rem 0 1rem; line-height: 1.2; }
h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }

p { margin: 0.75rem 0; }

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

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

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

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

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

th, td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}

th { background: var(--code-bg); font-weight: 600; }

ul, ol { padding-left: 1.5rem; margin: 0.75rem 0; }
li { margin: 0.25rem 0; }

.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.post-list { list-style: none; padding: 0; }
.post-list li { margin: 1rem 0; }
.post-list a { font-size: 1.1rem; font-weight: 500; }
.post-list .desc { color: var(--muted); font-size: 0.9rem; }

footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}
