/* ==========================================================================
   wannasek v4 — Indigo & Gold, light + dark
   Cool paper/indigo-dark · serif display · gold type accents on indigo
   surfaces (duo washes) · deep-indigo masthead band with letterpress photo
   ========================================================================== */

/* ---- Fonts (self-hosted, latin subsets) --------------------------------- */

@font-face {
    font-family: 'Newsreader';
    src: url('../fonts/newsreader-roman.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Newsreader';
    src: url('../fonts/newsreader-italic.woff2') format('woff2');
    font-weight: 200 800;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-roman.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrains-mono.woff2') format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ---- Tokens -------------------------------------------------------------- */

:root {
    color-scheme: light dark;

    --bg: #ffffff;
    --ink: #16181e;          /* primary text — cool near-black */
    --secondary: #3f4350;    /* secondary text */
    --muted: #6d7280;        /* meta text — AA on white */
    --faint: #d3d5de;        /* decorative only, never text */
    --hairline: #e6e8f0;     /* cool hairline */
    --panel: #f6f7fb;        /* cool paper panel */
    --accent: #9a6b0d;       /* gold (dark brass) — type accents on light, AA */
    --accent-ink: #6d4a0a;   /* hover state */
    --accent-underline: rgba(154, 107, 13, 0.4);
    --selection: rgba(79, 70, 229, 0.13);

    --band-bg: #1e1b4b;      /* masthead band — deep indigo */
    --band-fg: #eef0fb;
    --band-accent: #d9b34a;  /* gold (bright) — on the band only */
    --duo: #4f46e5;          /* iris indigo — drives all washes/tints */

    --serif: 'Newsreader', 'Iowan Old Style', Palatino, Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --wrap: 1080px;
    --measure: 680px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-scheme="light"]) {
        --bg: #121319;
        --ink: #e8e9f2;
        --secondary: #c2c4d2;
        --muted: #9698a8;
        --faint: #43465a;
        --hairline: #262838;
        --panel: #1a1c26;
        --accent: #dfb54d;       /* gold brightens in the dark */
        --accent-ink: #ecc968;   /* hover lightens on dark */
        --accent-underline: rgba(223, 181, 77, 0.5);
        --selection: rgba(139, 147, 248, 0.28);

        --band-bg: #17152f;      /* stays distinct from --bg */
        --band-fg: #e8e9f2;
        --band-accent: #dfb54d;
        --duo: #8b93f8;          /* washes lighten to periwinkle */
        --masthead-photo-filter: brightness(0.82) saturate(0.95);
        color-scheme: dark;
    }
}

:root[data-scheme="dark"] {
    --bg: #121319;
    --ink: #e8e9f2;
    --secondary: #c2c4d2;
    --muted: #9698a8;
    --faint: #43465a;
    --hairline: #262838;
    --panel: #1a1c26;
    --accent: #dfb54d;       /* gold brightens in the dark */
    --accent-ink: #ecc968;   /* hover lightens on dark */
    --accent-underline: rgba(223, 181, 77, 0.5);
    --selection: rgba(139, 147, 248, 0.28);

    --band-bg: #17152f;      /* stays distinct from --bg */
    --band-fg: #e8e9f2;
    --band-accent: #dfb54d;
    --duo: #8b93f8;          /* washes lighten to periwinkle */
    --masthead-photo-filter: brightness(0.82) saturate(0.95);
    color-scheme: dark;
}

:root[data-scheme="light"] { color-scheme: light; }

/* ---- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--selection); }

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

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

img { max-width: 100%; height: auto; }

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

.measure {
    max-width: var(--measure);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ---- Reading progress (posts, injected by JS) ------------------------------ */

.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: 0 50%;
    z-index: 60;
}

/* ---- Header --------------------------------------------------------------- */

.site-header {
    border-bottom: 1px solid var(--hairline);
    background: var(--bg);
}

.header-wrap {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 64px;
}

.site-wordmark {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 550;
    letter-spacing: -0.01em;
    color: var(--ink);
    white-space: nowrap;
}
.site-wordmark:hover { color: var(--accent-ink); }

.site-nav { flex: 1; }

.site-nav .nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav .nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    padding: 4px 0;
}
.site-nav .nav a:hover { color: var(--ink); }
.site-nav .nav-current a {
    color: var(--ink);
    box-shadow: 0 2px 0 0 var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-toggle {
    appearance: none;
    background: none;
    border: none;
    padding: 4px 0;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
}
.search-toggle:hover { color: var(--ink); }

.scheme-toggle {
    appearance: none;
    background: none;
    border: none;
    padding: 6px;
    margin: -6px 0;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.scheme-toggle:hover { color: var(--ink); }
.scheme-toggle .icon-sun { display: none; }
.scheme-toggle .icon-moon { display: block; }
.scheme-dark .scheme-toggle .icon-sun { display: block; }
.scheme-dark .scheme-toggle .icon-moon { display: none; }

.subscribe-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    padding: 6px 14px;
    border: 1px solid var(--hairline);
    border-radius: 6px;
}
.subscribe-link:hover {
    color: var(--accent-ink);
    border-color: var(--accent);
}

/* Mobile nav */

.nav-toggle {
    display: none;
    appearance: none;
    background: none;
    border: none;
    padding: 8px;
    margin: -8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 150ms cubic-bezier(0.25, 1, 0.5, 1), opacity 150ms;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
    transform: translateY(3.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--hairline);
    padding: 8px 24px 16px;
}
.mobile-nav .nav {
    margin: 0;
    padding: 0;
    list-style: none;
}
.mobile-nav .nav a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    border-bottom: 1px solid var(--hairline);
}
.mobile-nav-actions {
    display: flex;
    gap: 24px;
    padding-top: 16px;
}
.mobile-nav-actions a,
.mobile-nav-actions .search-toggle {
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    padding: 0;
}

/* ---- Shared editorial atoms ---------------------------------------------- */

.topic-label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
    background: color-mix(in srgb, var(--duo) 8%, var(--bg));
    padding: 4px 11px;
    border-radius: 999px;
}
.topic-label:hover { color: var(--accent-ink); }

/* ---- Masthead band (home) -------------------------------------------------- */

.masthead {
    background: var(--band-bg);
    overflow: hidden;
}

.masthead-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    position: relative;
}

.masthead-main { padding: 72px 0 68px; }

.site-intro {
    font-family: var(--serif);
    font-size: 40px;
    font-weight: 460;
    letter-spacing: -0.012em;
    color: var(--band-fg);
    max-width: 24ch;
    margin: 0;
    line-height: 1.28;
}
.site-intro .amp {
    font-style: italic;
    font-weight: 420;
    color: var(--band-accent);
}

/* Letterpress photograph — the W mark lives inside the image now.
   Anchored to the content column (not the viewport) so it always sits
   next to the intro text; both edges melt into the solid band. */
.masthead { position: relative; }
.masthead-grid { position: relative; }
.masthead-main { position: relative; z-index: 1; }
.masthead-photo {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 0;
    height: 100%;
    width: min(760px, 66%);
    object-fit: cover;
    object-position: right center;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 32%, #000 68%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 32%, #000 68%, transparent);
    filter: var(--masthead-photo-filter, none);
    pointer-events: none;
    user-select: none;
}

/* ---- Post list (home, tag, author) ---------------------------------------- */

.site-main { min-height: 60vh; }

.post-list {
    margin-top: 0;
    margin-bottom: 8px;
}

.home-template .post-list { margin-top: 32px; }
.tag-template .post-list,
.author-template .post-list { margin-top: 24px; }

.post-row {
    position: relative;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    gap: 12px 24px;
    padding: 36px 0;
    border-bottom: 1px solid var(--hairline);
}
.post-row-date {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 450;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    padding-top: 9px;
    white-space: nowrap;
}
.post-row-main { grid-column: 2; }

.post-row-title {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.012em;
    line-height: 1.2;
}
.post-row-title a {
    color: var(--ink);
    transition: color 150ms cubic-bezier(0.25, 1, 0.5, 1);
}
.post-row-title a::after {
    content: "\2192";
    display: inline-block;
    margin-left: 12px;
    font-family: var(--sans);
    font-size: 0.68em;
    font-weight: 500;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 150ms cubic-bezier(0.25, 1, 0.5, 1),
                transform 150ms cubic-bezier(0.25, 1, 0.5, 1);
    vertical-align: 2px;
}
.post-row:hover .post-row-title a { color: var(--accent-ink); }
.post-row:hover .post-row-title a::after {
    opacity: 1;
    transform: translateX(0);
}

.post-row-excerpt {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 60ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-row-meta {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

/* Front page — lead + three compact (home, first page) */

.front {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    column-gap: 72px;
    padding: 48px 0 12px;
    align-items: start;
}

.front-lead {
    grid-row: 1 / span 3;
    padding-right: 8px;
}

.front-lead-eyebrow {
    margin: 0 0 14px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
}

.front-lead-title {
    margin: 0 0 14px;
    font-family: var(--serif);
    font-size: 52px;
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.06;
}
.front-lead-title a {
    color: var(--ink);
    transition: color 150ms cubic-bezier(0.25, 1, 0.5, 1);
}
.front-lead-title a:hover { color: var(--accent-ink); }

.front-lead-excerpt {
    margin: 0 0 16px;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--secondary);
    max-width: 52ch;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.front-lead-meta {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.front-date {
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.front-item {
    border-top: 1px solid var(--hairline);
    padding: 18px 0;
}
.front-item:first-of-type { border-top: none; padding-top: 6px; }

.front-item .front-date {
    display: block;
    margin-bottom: 6px;
}

.front-item-title {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.front-item-title a {
    color: var(--ink);
    transition: color 150ms cubic-bezier(0.25, 1, 0.5, 1);
}
.front-item-title a:hover { color: var(--accent-ink); }

.post-list-rest .post-row:first-child { border-top: 1px solid var(--hairline); }

/* Topics band (home) */

.topics-band {
    display: flex;
    align-items: baseline;
    gap: 24px;
    flex-wrap: wrap;
    padding: 20px 0 72px;
}
.topics-band-label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}
.topics-band-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* List headers (tag, author, error) */

.list-header { margin: 64px 0 24px; }

.list-eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
}

.list-title {
    margin: 0 0 12px;
    font-family: var(--serif);
    font-size: 44px;
    font-weight: 550;
    letter-spacing: -0.015em;
    line-height: 1.1;
}

.list-description {
    margin: 0;
    font-size: 16px;
    color: var(--secondary);
    max-width: 60ch;
}

.error-wrap { padding: 96px 24px; }

/* Pagination */

.pagination {
    display: flex;
    justify-content: space-between;
    margin: 24px 0;
}
.pagination a {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
}
.pagination a:hover { color: var(--accent-ink); }

/* ---- Post page ------------------------------------------------------------- */

.post-header {
    position: relative;
    overflow: hidden;
    background: color-mix(in srgb, var(--duo) 6%, var(--bg));
    border-bottom: 1px solid color-mix(in srgb, var(--duo) 16%, transparent);
    padding: 72px 0 52px;
    margin-bottom: 48px;
}

.post-header-inner { position: relative; }

.post-glyph {
    position: absolute;
    right: -1%;
    bottom: -34%;
    max-width: 1.15ch;
    overflow: hidden;
    white-space: nowrap;
    font-family: var(--serif);
    font-size: 320px;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
    color: color-mix(in srgb, var(--duo) 10%, transparent);
    pointer-events: none;
    user-select: none;
}

.post-header .topic-label,
.post-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
/* Eyebrow dash retired — the chip carries the eyebrow now */

.post-title {
    margin: 0 0 16px;
    font-family: var(--serif);
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.06;
}

.post-standfirst {
    margin: 0 0 20px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 20px;
    font-weight: 420;
    line-height: 1.5;
    color: var(--secondary);
}

.post-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.meta-sep { color: var(--faint); }

/* Margin TOC (posts, injected by JS) */

.post-toc { display: none; }

@media (min-width: 1200px) {
    .post-toc {
        display: block;
        position: fixed;
        top: 112px;
        left: calc(50vw - 364px - 218px);
        width: 192px;
    }
    .post-toc-label {
        display: block;
        font-family: var(--sans);
        font-size: 11px;
        font-weight: 650;
        letter-spacing: 0.09em;
        text-transform: uppercase;
        color: var(--muted);
        margin-bottom: 10px;
    }
    .post-toc ol {
        list-style: none;
        margin: 0;
        padding: 0;
        border-left: 1px solid var(--hairline);
    }
    .post-toc li { margin: 0; }
    .post-toc a {
        display: block;
        padding: 5px 0 5px 14px;
        font-family: var(--sans);
        font-size: 13px;
        line-height: 1.4;
        color: var(--muted);
        border-left: 2px solid transparent;
        margin-left: -1px;
        transition: color 150ms cubic-bezier(0.25, 1, 0.5, 1),
                    border-color 150ms cubic-bezier(0.25, 1, 0.5, 1);
    }
    .post-toc a:hover { color: var(--ink); }
    .post-toc a.is-current {
        color: var(--accent);
        border-left-color: var(--accent);
    }
}

/* ---- Article content (gh-content) ------------------------------------------ */

.gh-content {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 420;
    line-height: 1.68;
    color: var(--ink);
    padding-bottom: 24px;
}

.gh-content > * + * { margin-top: 24px; }

.gh-content p { margin: 0; }

/* Drop cap — posts only, first non-empty paragraph (class set by JS) */

.gh-content p:empty { display: none; }

.post-template .post-content > p.has-dropcap::first-letter {
    float: left;
    font-family: var(--serif);
    font-size: 3.4em;
    line-height: 0.88;
    font-weight: 500;
    color: var(--accent);
    padding: 5px 10px 0 0;
}

.gh-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-underline);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.gh-content a:hover {
    color: var(--accent-ink);
    text-decoration-color: currentColor;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
    font-family: var(--serif);
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--ink);
}
.gh-content h2 {
    margin-top: 56px;
    font-size: 29px;
    font-weight: 600;
}

.gh-content h3 {
    margin-top: 40px;
    font-size: 23px;
    font-weight: 600;
}
.gh-content h4 {
    margin-top: 32px;
    font-size: 19px;
    font-weight: 650;
}

.gh-content ul,
.gh-content ol {
    padding-left: 28px;
}
.gh-content li { margin-top: 8px; }
.gh-content li::marker { color: var(--accent); }

/* Pull-quote blockquotes — centered editorial set-pieces */

.gh-content blockquote {
    margin: 56px auto;
    padding: 0;
    border: none;
    font-family: var(--serif);
    font-style: italic;
    font-size: 26px;
    font-weight: 450;
    line-height: 1.45;
    letter-spacing: -0.005em;
    color: var(--secondary);
    text-align: center;
    max-width: 32ch;
}
.gh-content blockquote::before {
    content: "\201C";
    display: block;
    font-family: var(--serif);
    font-size: 58px;
    line-height: 0.6;
    font-style: normal;
    color: var(--accent);
    margin-bottom: 20px;
}
.gh-content blockquote p { margin: 0; }
.gh-content blockquote p + p { margin-top: 16px; }

.gh-content hr {
    margin-top: 48px;
    border: none;
    text-align: center;
}
.gh-content hr::after {
    content: "\2733";
    font-size: 15px;
    color: var(--accent);
    opacity: 0.7;
}

.gh-content img {
    border-radius: 6px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.gh-content figcaption {
    margin-top: 10px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

/* Inline code */

.gh-content code {
    font-family: var(--mono);
    font-size: 0.78em;
    font-weight: 450;
    background: var(--panel);
    border: 1px solid var(--hairline);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--ink);
}

/* Code blocks — calm panels, first-class */

.gh-content pre {
    position: relative;
    margin: 32px 0 0;
    background: var(--panel);
    border: 1px solid var(--hairline);
    border-left: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
    border-radius: 6px;
    padding: 16px 20px;
    overflow-x: auto;
    max-height: 560px;
    overflow-y: auto;
}

.gh-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 13.5px;
    line-height: 1.65;
    font-weight: 420;
    display: block;
}

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

.code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    appearance: none;
    border: 1px solid var(--hairline);
    background: var(--bg);
    border-radius: 4px;
    padding: 4px 10px;
    font-family: var(--sans);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    opacity: 0;
    transition: opacity 150ms cubic-bezier(0.25, 1, 0.5, 1);
}
.gh-content pre:hover .code-copy { opacity: 1; }
.code-copy:hover { color: var(--accent-ink); border-color: var(--accent); }

/* Ghost cards minimal support */

.kg-width-wide { max-width: 900px; margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: none; }

.kg-bookmark-card a { text-decoration: none; }
.kg-bookmark-container {
    display: flex;
    border: 1px solid var(--hairline);
    border-radius: 6px;
    overflow: hidden;
    color: var(--ink);
}
.kg-bookmark-content { padding: 16px; font-family: var(--sans); }
.kg-bookmark-title { font-size: 15px; font-weight: 600; }
.kg-bookmark-description {
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kg-bookmark-metadata { font-size: 13px; color: var(--muted); margin-top: 12px; }
.kg-bookmark-icon { width: 16px; height: 16px; margin-right: 8px; vertical-align: middle; }
.kg-bookmark-thumbnail { max-width: 200px; }
.kg-bookmark-thumbnail img { height: 100%; object-fit: cover; border-radius: 0; }

.kg-button-card, .kg-callout-card {
    font-family: var(--sans);
    font-size: 15px;
}
.kg-callout-card {
    display: flex;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 16px 20px;
}

/* Post footer + signature */

.post-footer {
    padding-top: 16px;
    padding-bottom: 72px;
}

.post-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 8px 0 28px;
}
.post-signature-rule {
    width: 44px;
    height: 1px;
    background: var(--accent);
    opacity: 0.55;
}
.post-signature-mark {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 550;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

/* ---- Speaking page talk list -------------------------------------------------- */

.gh-content .talks { margin-top: 32px; }

.gh-content .talk {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--hairline);
}
.gh-content .talk:first-of-type { border-top: 1px solid var(--hairline); }

.gh-content .talk-year {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.06em;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    padding-top: 5px;
}

.gh-content .talk-main > * { margin: 0; }

.gh-content .talk-conf {
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 0 0 4px;
}

.gh-content .talk-meta {
    font-family: var(--sans);
    font-size: 13.5px;
    color: var(--muted);
}

.gh-content .talk-note {
    font-family: var(--serif);
    font-style: italic;
    font-size: 16px;
    color: var(--muted);
    margin-top: 6px;
}

@media (max-width: 860px) {
    .gh-content .talk { grid-template-columns: 64px 1fr; gap: 16px; }
}

/* Read next hand-off */

.read-next { margin-top: 36px; }

.read-next-card {
    display: block;
    background: color-mix(in srgb, var(--duo) 4%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--duo) 18%, transparent);
    border-radius: 8px;
    padding: 22px 26px;
    transition: border-color 150ms cubic-bezier(0.25, 1, 0.5, 1);
}
.read-next-card:hover { border-color: var(--accent); }

.read-next-eyebrow {
    display: block;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.read-next-title {
    display: block;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 6px;
    transition: color 150ms cubic-bezier(0.25, 1, 0.5, 1);
}
.read-next-card:hover .read-next-title { color: var(--accent-ink); }

.read-next-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--sans);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--muted);
    margin-bottom: 10px;
}

.read-next-meta {
    display: block;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ---- Archive ---------------------------------------------------------------- */

.archive-list {
    margin: 40px 0 80px;
}

.archive-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--hairline);
}

.archive-date {
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    padding-top: 4px;
    white-space: nowrap;
}
.archive-year {
    font-family: var(--serif);
    font-size: 44px;
    font-weight: 550;
    letter-spacing: -0.015em;
    line-height: 1;
    color: var(--ink);
    padding: 40px 0 16px;
    border-bottom: 1px solid var(--hairline);
}
.archive-year:first-child { padding-top: 8px; }

.archive-title {
    margin: 0;
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 550;
    letter-spacing: -0.008em;
    line-height: 1.3;
}
.archive-title a { color: var(--ink); }
.archive-title a:hover { color: var(--accent-ink); }

.archive-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 6px;
}

.archive .post-header { margin-bottom: 0; }

/* ---- CV timeline (About page) ---------------------------------------------- */

.gh-content .cv-list {
    list-style: none;
    padding: 0;
    margin: 28px 0 8px;
}
.gh-content .cv-list li { margin-top: 0; }

.cv-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 4px 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--hairline);
}
.cv-item:first-child { border-top: 1px solid var(--hairline); }

.cv-when {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 450;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    padding-top: 6px;
}

.cv-role {
    display: block;
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.008em;
    line-height: 1.3;
    color: var(--ink);
}

.cv-org {
    display: block;
    font-size: 14px;
    color: var(--secondary);
    margin-top: 2px;
}

.cv-note {
    display: block;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--muted);
    margin-top: 6px;
}

@media (max-width: 720px) {
    .cv-item { grid-template-columns: 1fr; gap: 2px; }
    .cv-when { padding-top: 0; }
}

/* ---- Footer ------------------------------------------------------------------ */

.site-footer {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border-top: 1px solid var(--hairline);
    padding: 48px 0 28px;
}

.footer-glyph {
    position: absolute;
    right: -30px;
    bottom: -110px;
    font-family: var(--serif);
    font-size: 360px;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
    color: color-mix(in srgb, var(--duo) 7%, transparent);
    pointer-events: none;
    user-select: none;
}

.footer-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 36px;
}

.footer-col-label {
    margin: 0 0 12px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.footer-col > a {
    display: block;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary);
    padding: 4px 0;
}
.footer-col > a:hover { color: var(--accent-ink); }

.footer-lower {
    position: relative;
    border-top: 1px solid var(--hairline);
    padding-top: 20px;
}

.footer-brand {
    margin: 0;
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 550;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.footer-desc {
    margin: 6px 0 0;
    font-size: 13.5px;
    color: var(--muted);
    max-width: 52ch;
}

.footer-copy {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}


/* ---- Responsive ---------------------------------------------------------------- */

@media (max-width: 860px) {
    .site-nav { display: none; }
    .search-toggle { display: none; }
    .subscribe-link { display: none; }
    .nav-toggle { display: flex; }
    .mobile-nav.is-open { display: block; }

    .masthead-main { padding: 44px 0 40px; }
    .masthead-photo { display: none; }
    .site-intro {
        font-size: 25px;
        max-width: none;
    }

    .front {
        grid-template-columns: 1fr;
        column-gap: 0;
        padding: 32px 0 4px;
    }
    .front-lead { grid-row: auto; padding-right: 0; margin-bottom: 8px; }
    .front-lead-title { font-size: 28px; }
    .front-item:first-of-type { border-top: 1px solid var(--hairline); padding-top: 18px; margin-top: 10px; }

    .home-template .post-list { margin-top: 20px; }

    .post-row,
    .archive-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 26px 0;
    }
    .post-row-main { grid-column: 1; }

    .post-row-date { padding-top: 0; }
    .archive-date { padding-top: 0; }

    .post-row-title { font-size: 22px; }
    .post-row-title a::after { display: none; }

    .home-template .post-row:first-child { padding: 30px 0; }
    .home-template .post-row:first-child .post-row-title { font-size: 27px; }
    .home-template .post-row:first-child .post-row-excerpt { font-size: 15px; }

    .post-header { padding: 44px 0 36px; margin-bottom: 32px; }
    .post-glyph { font-size: 180px; bottom: -22%; }
    .post-title { font-size: 31px; }
    .post-standfirst { font-size: 18px; }

    .list-header { margin-top: 40px; }
    .list-title { font-size: 32px; }

    .gh-content {
        font-size: 17.5px;
    }
    .gh-content h2 { font-size: 24px; margin-top: 44px; }
    .gh-content h3 { font-size: 20px; margin-top: 32px; }
    .gh-content pre { padding: 12px 14px; }
    .gh-content pre code { font-size: 12.5px; }
    .gh-content blockquote { font-size: 20px; padding-left: 28px; }
    .gh-content blockquote::before { font-size: 52px; top: -12px; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-bottom: 28px;
    }
    .footer-glyph { font-size: 220px; bottom: -60px; }
    .archive-year { font-size: 34px; padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
