
        :root {
            --body-font: 'Source Serif 4', Georgia, 'Times New Roman', serif;
            --heading-font: 'Source Serif 4', Georgia, serif;
            --text: rgba(0,0,0,0.92);
            --text-secondary: #5a544c;
            --text-muted: #8a847d;
            --bg: #f4ede5;
            --bg-alt: #ece5dc;
            --border: rgba(0,0,0,0.08);
            --btn-bg: rgba(0,0,0,0.04);
            --btn-hover: rgba(0,0,0,0.08);
            --tag-bg: #eef4fc;
            --tag-text: #0a6fc0;
            --link: #0066c8;
            --link-hover: #004d99;
        }
        [data-theme='dark'] {
            --text: rgba(235,230,220,0.93);
            --text-secondary: #a89888;
            --text-muted: #7a7068;
            --bg: #1c1a18;
            --bg-alt: #262422;
            --border: rgba(255,255,255,0.07);
            --btn-bg: rgba(255,255,255,0.06);
            --btn-hover: rgba(255,255,255,0.10);
            --tag-bg: #1a2635;
            --tag-text: #7ab8ff;
            --link: #5ba0e0;
            --link-hover: #7ab8ff;
        }
        [data-theme='light'] {
            --body-font: 'Source Serif 4', Georgia, 'Times New Roman', serif;
            --heading-font: 'Source Serif 4', Georgia, serif;
            --text: rgba(0,0,0,0.92);
            --text-secondary: #5a544c;
            --text-muted: #8a847d;
            --bg: #f4ede5;
            --bg-alt: #ece5dc;
            --border: rgba(0,0,0,0.08);
            --btn-bg: rgba(0,0,0,0.04);
            --btn-hover: rgba(0,0,0,0.08);
            --tag-bg: #eef4fc;
            --tag-text: #0a6fc0;
            --link: #0066c8;
            --link-hover: #004d99;
        }
        html.preload, html.preload * { transition: none !important; }
        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
        }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { transition: none !important; animation: none !important; }
        }
        /* Static mode: white bg, no video, no animations, no grain */
        .static-mode .hero-bg video { display: none; }
        .static-mode .hero-bg {
            background: #ffffff;
        }
        .static-mode body::after { display: none; }
        .static-mode body { background-color: #ffffff; }
        .static-mode .hero .eyebrow,
        .static-mode .hero h1,
        .static-mode .hero .blurb,
        .static-mode .hero .links-row { animation: none; }
        .static-mode *, .static-mode *::before, .static-mode *::after {
            transition: none !important;
            animation: none !important;
        }
        html { font-size: 16px; -webkit-font-smoothing: antialiased; }
        @keyframes hero-fade-in {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .hero .eyebrow { animation: hero-fade-in 0.6s ease-out both; }
        .hero h1 { animation: hero-fade-in 0.6s 0.1s ease-out both; }
        .hero .blurb { animation: hero-fade-in 0.6s 0.2s ease-out both; }
        .hero .links-row { animation: hero-fade-in 0.6s 0.3s ease-out both; }
        .hero .links-row a { animation: none; }

        body {
            font-family: var(--body-font);
            color: var(--text);
            background-color: var(--bg);
            line-height: 1.5;
            position: relative;
            min-height: 100vh;
        }
        /* Washi paper grain — fixed overlay */
        body::after {
            content: '';
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 9999;
            opacity: 0.035;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65 0.55' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.6'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
            background-size: 180px 180px;
        }
        [data-theme='dark'] body::after { opacity: 0.05; }
        .container { max-width: 720px; margin: 0 auto; padding: 0 24px; }
        a { color: var(--link); text-decoration: none; }
        a:hover { border-bottom: 1px solid var(--link); }

        /* Navigation */
        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 24px;
            border-bottom: 1px solid var(--border);
            position: relative;
            z-index: 2;
            background: var(--bg);
            width: 100vw;
            margin-left: calc(-50vw + 50%);
            box-sizing: border-box;
        }
        .container nav {
            width: 100vw;
            margin-left: calc(-50vw + 50%);
            padding: 16px 24px;
            box-sizing: border-box;
        }
        nav .logo {
            font-size: 15px;
            font-weight: 600;
            color: var(--text);
            text-decoration: none;
        }
        nav .logo:hover { border-bottom: none; color: var(--link); }
        nav .links { display: flex; gap: 24px; }
        nav .links a {
            font-family: 'Inter', system-ui, sans-serif;
            font-size: 15px;
            font-weight: 500;
            color: var(--text);
            text-decoration: none;
            padding: 4px 0;
            border-bottom: 1.5px solid transparent;
            transition: border-color 0.15s;
        }
        nav .links a:hover { border-bottom-color: var(--text); color: var(--text); }
        nav .links a.lang { font-size: 13px; letter-spacing: 0.05em; }
        .nav-hamburger { display: none; }

        /* Hero */
        .hero {
            position: relative;
            height: 100dvh;
            width: 100vw;
            margin-left: calc(-50vw + 50%);
            margin-top: -52px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            box-sizing: border-box;
            padding: 80px 24px;
            padding-top: 132px;
        }
        .hero > *:not(.hero-bg) {
            position: relative;
            z-index: 1;
            max-width: 720px;
            width: 100%;
        }
        .hero-bg {
            position: absolute;
            inset: 0;
            z-index: 0;
        }
        .hero-bg video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            pointer-events: none;
        }
        .hero .eyebrow {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.125px;
            margin-bottom: 20px;
            text-wrap: balance;
            text-align: center;
            width: 100%;
            text-shadow: 0 1px 12px var(--bg);
        }
        .hero h1 {
            font-family: var(--body-font);
            font-size: 64px;
            font-weight: 700;
            line-height: 1.00;
            letter-spacing: -2.125px;
            color: var(--text);
            margin-bottom: 20px;
            text-wrap: balance;
            text-align: center;
            width: 100%;
            text-shadow: 0 1px 16px var(--bg);
        }
        .hero .blurb {
            font-size: 16px;
            font-weight: 400;
            color: var(--text-secondary);
            line-height: 1.50;
            max-width: 560px;
            text-align: center;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 32px;
            text-shadow: 0 1px 10px var(--bg);
        }
        .hero .links-row {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            justify-content: center;
            margin-top: 32px;
        }
        .hero .links-row a {
            font-family: 'Inter', system-ui, sans-serif;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            font-size: 15px;
            font-weight: 500;
            color: var(--text);
            background: var(--btn-bg);
            border-radius: 4px;
            text-decoration: none;
            transition: background 0.15s;
        }
        .hero .links-row a:hover { background: var(--btn-hover); border-bottom: none; }
        .hero .links-row a.primary {
            background: var(--link);
            color: #ffffff;
        }
        .hero .links-row a.primary:hover { background: var(--link-hover); }

        /* Sections */
        section { padding: 64px 0; }
        section + section { border-top: 1px solid var(--border); }
        section:last-of-type { border-bottom: 1px solid var(--border); }

        h2 {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.125px;
            margin-bottom: 24px;
        }

        /* Projects */
        .project { margin-bottom: 28px; }
        .project:last-child { margin-bottom: 0; }
        .project h3 {
            font-size: 18px;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 4px;
        }
        .project h3 a { color: var(--text); }
        .project h3 a:hover { color: var(--link); border-bottom: none; }
        .project p {
            font-size: 15px;
            font-weight: 400;
            color: var(--text-secondary);
            line-height: 1.50;
            margin-bottom: 6px;
        }
        .project .tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }
        .project .tag {
            display: inline-block;
            font-size: 12px;
            font-weight: 600;
            color: var(--tag-text);
            background: var(--tag-bg);
            padding: 4px 8px;
            border-radius: 9999px;
            letter-spacing: 0.125px;
        }

        /* About */
        .about-text {
            font-size: 16px;
            font-weight: 400;
            color: var(--text);
            line-height: 1.50;
        }
        .about-text p { margin-bottom: 12px; }
        .about-text p:last-child { margin-bottom: 0; }

        /* Topics */
        .topics {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .topics .topic {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-secondary);
            background: var(--bg-alt);
            padding: 6px 14px;
            border-radius: 9999px;
            transition: background 0.15s;
        }
        .topics .topic:hover { background: var(--btn-hover); }

        /* Theme toggle pill */
        .theme-toggle {
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
        }
        .theme-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
        .toggle-track {
            width: 44px;
            height: 22px;
            border-radius: 9999px;
            background: var(--bg-alt);
            border: 1px solid var(--border);
            position: relative;
            display: flex;
            align-items: center;
            transition: inherit;
        }
        .toggle-indicator {
            position: absolute;
            left: 2px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--text);
            transition: inherit;
        }
        [data-theme='dark'] .toggle-indicator {
            left: calc(100% - 18px);
            background: #fcfcfa;
        }

        /* Footer */
        footer {
            padding: 32px 0;
            text-align: center;
            color: var(--text-muted);
            font-size: 14px;
            font-weight: 400;
        }

        @media (max-width: 600px) {
            .hero { padding: 40px 24px; padding-top: 92px; height: 100dvh; margin-top: -42px; }
            .hero h1 { font-size: 40px; letter-spacing: -1.5px; }
            nav {
                flex-wrap: wrap;
                align-items: center;
                gap: 8px;
            }
            nav .logo { flex: 1; }
            nav .links { display: none; }
            nav .links.open {
                display: flex;
                width: 100%;
                flex-direction: column;
                gap: 4px;
                padding: 12px 0 0 0;
                border-top: 1px solid var(--border);
                margin-top: 0;
            }
            nav .links a { font-size: 15px; padding: 8px 0; }
            .theme-toggle {
                padding: 1px;
                order: 2;
            }
            nav .links.open {
                display: flex;
                width: 100%;
                flex-direction: column;
                gap: 4px;
                padding: 12px 0 0 0;
                border-top: 1px solid var(--border);
                margin-top: 0;
                animation: nav-slide-in 0.25s ease-out;
            }
            @keyframes nav-slide-in {
                from { opacity: 0; transform: translateY(-8px); }
                to { opacity: 1; transform: translateY(0); }
            }
            nav .links a { font-size: 15px; padding: 8px 0; }
            .nav-hamburger {
                display: flex;
                align-items: center;
                justify-content: center;
                background: none;
                border: none;
                cursor: pointer;
                padding: 4px;
                order: 3;
            }
            .nav-hamburger span {
                display: block;
                width: 20px;
                height: 1.5px;
                background: var(--text);
                position: relative;
                transition: background 0.2s;
            }
            .nav-hamburger span::before,
            .nav-hamburger span::after {
                content: '';
                position: absolute;
                width: 20px;
                height: 1.5px;
                background: var(--text);
                left: 0;
                transition: transform 0.2s, top 0.2s;
            }
            .nav-hamburger span::before { top: -6px; }
            .nav-hamburger span::after { top: 6px; }
            /* Hamburger → X animation */
            .nav-hamburger.open span { background: transparent; }
            .nav-hamburger.open span::before {
                top: 0;
                transform: rotate(45deg);
            }
            .nav-hamburger.open span::after {
                top: 0;
                transform: rotate(-45deg);
            }
            .toggle-track { width: 32px; height: 16px; }
            .toggle-indicator { width: 10px; height: 10px; left: 2px; }
            [data-theme='dark'] .toggle-indicator { left: calc(100% - 12px); }
            section { padding: 40px 0; }
        }
    
/* Featured post */
.featured { margin-bottom: 16px; }
.featured-card {
    display: block;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}
.featured-card:hover { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.featured-card .label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--link);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.featured-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    text-wrap: balance;
}
.featured-card p {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
}
.featured-card .meta {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Reading list */
.reading-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}
.reading-item:first-child { border-top: 1px solid var(--border); }
.reading-item .type {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--tag-text);
    background: var(--tag-bg);
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}
.reading-item .content { flex: 1; }
.reading-item .content .title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
    line-height: 1.4;
}
.reading-item .content .title a { color: var(--text); }
.reading-item .content .title a:hover { color: var(--link); border-bottom: none; }
.reading-item .content .attribution {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}
.section-more {
    margin-top: 20px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
}
.section-more a { color: var(--text-muted); }
.section-more a:hover { color: var(--link); border-bottom: none; }

/* Bulleted lists inside post bodies (reading page, etc.) */
.post-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 24px;
}
.post-body ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 14px;
    line-height: 1.55;
}
.post-body ul li::before {
    content: '›';
    position: absolute;
    left: 4px;
    top: -2px;
    color: var(--text-muted);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    font-size: 18px;
}

/* Colophon */
.colophon {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.6;
}
.colophon a { color: var(--text-muted); border-bottom: 1px solid transparent; }
.colophon a:hover { color: var(--link); border-bottom-color: var(--link); }
.colophon .sep { margin: 0 6px; color: var(--border); }
