:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --link: #0066cc;
    --code-bg: #f4f4f4;
    --quote-border: #ddd;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --text: #e0e0e0;
        --link: #4da6ff;
        --code-bg: #2d2d2d;
        --quote-border: #444;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.75;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.2rem;
    background-color: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}

nav { margin-bottom: 3rem; font-size: 0.9rem; }
nav a { color: var(--text); text-decoration: none; opacity: 0.6; }
nav a:hover { opacity: 1; text-decoration: underline; }

h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.index-h1 { font-size: 3rem; margin-bottom: 3rem; letter-spacing: -0.03em; }

main { font-size: 1.125rem; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

ul.post-list { padding: 0; list-style: none; }
.post-item { margin-bottom: 1.5rem; }
.post-link { font-size: 1.25rem; font-weight: 600; display: block; }

img { max-width: 100%; height: auto; border-radius: 8px; }
code { background: var(--code-bg); padding: 0.2em 0.4em; border-radius: 4px; font-size: 85%; font-family: ui-monospace, monospace; }
pre { background: var(--code-bg); padding: 1rem; overflow-x: auto; border-radius: 8px; }
blockquote { border-left: 4px solid var(--quote-border); margin: 1.5rem 0; padding-left: 1rem; font-style: italic; opacity: 0.8; }
hr { border: 0; border-top: 1px solid var(--quote-border); margin: 3rem 0; }
footer { opacity: 0.5; font-size: 0.8rem; margin-top: 4rem; }