:root {
    --bg: #1a1a1a;
    --bg-secondary: #242424;
    --text: #e0e0e0;
    --text-muted: #999;
    --accent: #f0a500;
    --accent-hover: #ffbe3d;
    --code-bg: #2d2d2d;
    --border: #333;
}

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

html {
    font-size: 18px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    padding: 2rem 1rem;
}

.site-header {
    max-width: 42rem;
    margin: 0 auto 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.site-brand {
    text-decoration: none;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: 1.2rem;
    font-weight: 700;
}

.site-brand:hover {
    text-decoration: none;
}

.site-brand-name {
    color: var(--accent);
}

.site-brand-tld {
    color: var(--text-muted);
}

.site-brand:hover .site-brand-name {
    color: var(--accent-hover);
}

.nav-toggle {
    display: none;
}

.nav-burger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent);
}

.site-nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .site-header {
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-burger {
        display: block;
    }

    .site-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding-top: 1rem;
        align-items: flex-start;
    }

    .nav-toggle:checked ~ .site-nav {
        display: flex;
    }
}

main {
    max-width: 42rem;
    margin: 0 auto;
}

h1 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

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

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

.article-list {
    list-style: none;
    margin-top: 1.5rem;
}

.article-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}

.article-list-title {
    font-size: 1.05rem;
    font-weight: 500;
}

.article-list-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.article-list-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-header-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.reading-time {
    color: var(--text-muted);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background: var(--bg-secondary);
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

article header time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    color: var(--accent);
    margin-top: 1.8rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.article-body pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.article-body code {
    background: var(--code-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

.article-body pre code {
    background: none;
    padding: 0;
}

/* Syntax highlighting (Chroma CSS classes) */
.chroma { background: var(--code-bg); color: #c8c8c8; }

/* Keywords */
.chroma .k, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr { color: #f0a500; }

/* Keyword types */
.chroma .kt { color: #cca050; }

/* Built-in constants & keyword constants */
.chroma .kc, .chroma .nb { color: #d4944c; }

/* Strings & literals */
.chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl,
.chroma .s2, .chroma .sh, .chroma .si, .chroma .sx, .chroma .sr,
.chroma .s1, .chroma .ss { color: #e8a862; }

/* Numbers */
.chroma .m, .chroma .mi, .chroma .mf, .chroma .mh, .chroma .mo,
.chroma .mb, .chroma .il { color: #d4944c; }

/* Comments */
.chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs,
.chroma .cp, .chroma .cpf { color: #666; font-style: italic; }

/* Functions */
.chroma .nf, .chroma .fm { color: #e0e0e0; }

/* Types / Classes / Decorators / Tags */
.chroma .nc, .chroma .no, .chroma .nd, .chroma .ni, .chroma .ne,
.chroma .nt { color: #cca050; }

/* Operators & punctuation */
.chroma .o, .chroma .p { color: #888; }

/* Names / variables / identifiers */
.chroma .n, .chroma .na, .chroma .nl, .chroma .nn, .chroma .nx,
.chroma .py, .chroma .nv, .chroma .vc, .chroma .vg, .chroma .vi,
.chroma .vm { color: #c8c8c8; }

/* Generic (diff output, etc.) */
.chroma .gd { color: #d4944c; }
.chroma .gi { color: #f0a500; }
.chroma .ge { font-style: italic; }
.chroma .gs { font-weight: bold; }

.article-body img {
    max-width: 100%;
    border-radius: 4px;
}

.article-body .anchor {
    position: absolute;
    right: 100%;
    padding-right: 0.3rem;
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.article-body h2:hover .anchor,
.article-body h3:hover .anchor,
.article-body h4:hover .anchor {
    opacity: 1;
}

.article-body .anchor:hover {
    color: var(--accent);
    text-decoration: none;
}

.legal-section:first-of-type {
    margin-top: 1.5rem;
}

.legal-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.legal-section h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.legal-section p {
    margin-bottom: 0.5rem;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-prose p {
    color: var(--text-muted);
}

.legal-prose strong {
    color: var(--text);
}

.about {
    margin-bottom: 1.5rem;
}

.about-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.contact {
    margin-bottom: 2rem;
}

.contact h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.footer {
    max-width: 42rem;
    margin: 2rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
