/* =============== CORE ===============*/
/* =========================================================
   MARKETS . MERIDIANS — REDESIGN  v2.0
   "Reserve Edition" — quiet luxury editorial.
   ========================================================= */

:root {
    /* —— PALETTE — Ivory paper, deep ink, oxblood accent —— */
    --paper:        #f3ede2;   /* warm ivory main */
    --paper-2:      #ece4d4;   /* deeper cream */
    --paper-3:      #e3d9c4;   /* parchment surface */
    --ink:          #14131a;   /* deep ink — almost black, slight violet */
    --ink-2:        #2a2832;
    --ink-3:        #56535f;
    --ink-4:        #8a8794;   /* muted text */
    --rule:         rgba(20, 19, 26, 0.14);
    --rule-strong:  rgba(20, 19, 26, 0.42);

    /* Accent — set by tweaks. Default = muted oxblood. */
    --accent:       #7a1620;
    --accent-soft:  rgba(122, 22, 32, 0.10);

    /* —— TYPE —— */
    --font-display: "Instrument Serif", "Cormorant Garamond", "EB Garamond", Georgia, serif;
    --font-sans:    "Geist", -apple-system, "Söhne", "Inter Tight", system-ui, sans-serif;
    --font-mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

    /* —— RHYTHM —— */
    --max:          1440px;
    --gutter:       clamp(20px, 4vw, 56px);
    --col-rule:     1px solid var(--rule);
}

html[data-theme="dark"] {
    --paper:       #0e1015;
    --paper-2:     #14171e;
    --paper-3:     #1b1f28;
    --ink:         #f3ede2;
    --ink-2:       #d8d2c6;
    --ink-3:       #a39e93;
    --ink-4:       #6b6860;
    --rule:        rgba(243, 237, 226, 0.10);
    --rule-strong: rgba(243, 237, 226, 0.35);
    --accent-soft: rgba(196, 110, 92, 0.14);
}

/* —— BASE —— */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "cv11";
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Paper grain — sits BELOW the aura canvas so both are visible */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.045 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    opacity: 0.45;
    mix-blend-mode: multiply;
}
html[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: 0.30; }

a { color: inherit; text-decoration: none; }

/* —— TYPE PRIMITIVES —— */
.display {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    line-height: 0.92;
    letter-spacing: -0.02em;
}
.eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.eyebrow .dot {
    display: inline-block;
    width: 5px; height: 5px;
    background: var(--accent);
    margin: 0 0.7em 1px 0;
    vertical-align: middle;
}
.kicker {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.serif-italic {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
}

/* ====================== TICKER ====================== */
.ticker {
    position: relative;
    z-index: 60;
    height: 34px;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    overflow: hidden;
    display: flex;
    align-items: center;
    isolation: isolate;
}
.ticker-label {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 14px 0 var(--gutter);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--ink);
    height: 100%;
    display: flex; align-items: center; gap: 8px;
}
.ticker-label::before {
    content: "";
    width: 6px; height: 6px;
    background: var(--accent);
    display: inline-block;
}
.ticker-track {
    flex: 1;
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}
.ticker-track-inner {
    display: flex;
    align-items: center;
    gap: 48px;
    padding-left: 24px;
    white-space: nowrap;
    width: max-content;            /* key: percentage in translateX = content width */
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    animation: tickerScroll 90s linear infinite;
}
.ticker-item { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; color: var(--ink-2); }
.ticker-label-short { display: none; }   /* desktop default — show full label */
.ticker-attribution {
    flex: 0 0 auto;
    display: inline-flex; align-items: center;
    color: var(--ink-4, rgba(20,16,12,0.35));
    font-size: 10px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    padding: 0 24px;
    font-style: italic;
}
.ticker-item .sym { color: var(--ink); font-weight: 600; }
.ticker-item .up { color: #2e7d4f; }
.ticker-item .dn { color: var(--accent); }
.ticker-time {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    margin-left: auto;
    padding: 0 var(--gutter) 0 14px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    color: var(--ink-3);
    border-left: 1px solid var(--rule);
    height: 100%;
    display: flex; align-items: center;
}
@keyframes tickerScroll {
    /* Content is rendered 3× in the DOM (see includes/ticker.php).
       Animating to -33.333% scrolls exactly one full set, then loops
       back to identical content → seamless infinite scroll. */
    from { transform: translateX(0); }
    to   { transform: translate3d(-33.333%, 0, 0); }
}

/* ====================== MASTHEAD ====================== */
.masthead {
    position: relative;
    z-index: 50;
    border-bottom: 1px solid var(--rule-strong);
    background: var(--paper);
}
.masthead-meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 14px var(--gutter) 10px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-3);
    border-bottom: 1px solid var(--rule);
}
.masthead-meta .left  { text-align: left; }
.masthead-meta .right { text-align: right; }
.masthead-meta .center {
    display: inline-flex; align-items: center; gap: 12px;
}
.masthead-meta .center::before,
.masthead-meta .center::after {
    content: ""; width: 32px; height: 1px; background: var(--rule-strong);
}
.issue-tag .num { color: var(--ink); font-weight: 600; letter-spacing: 0.18em; }

.masthead-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 22px var(--gutter) 26px;
    gap: 24px;
}
.logo {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    display: inline-flex;
    align-items: baseline;
    gap: 0.12em;
}
.logo .ampersand {
    font-feature-settings: "ss01";
    color: var(--accent);
    font-style: italic;
    transform: translateY(-0.04em);
    display: inline-block;
}
.logo .small {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--ink-3);
    text-transform: uppercase;
    margin-left: 14px;
    align-self: center;
    border-left: 1px solid var(--rule);
    padding-left: 14px;
}
.nav {
    display: inline-flex;
    align-items: center;
    gap: clamp(18px, 3vw, 36px);
    justify-self: center;
}
.nav a {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ink-2);
    position: relative;
    padding: 6px 0;
    transition: color 0.2s;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: -2px;
    width: 4px; height: 4px;
    background: var(--accent);
    transform: translateX(-50%) rotate(45deg);
}
.nav-utility {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    justify-self: end;
}
.search-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--ink-3);
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.search-pill:hover { border-color: var(--ink-3); color: var(--ink); }
.search-pill .kbd {
    border: 1px solid var(--rule);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9.5px;
    letter-spacing: 0.05em;
}
.theme-toggle {
    width: 36px; height: 22px;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    background: transparent;
    position: relative;
    cursor: pointer;
    padding: 0;
}
.theme-toggle::after {
    content: "";
    position: absolute;
    top: 1px; left: 1px;
    width: 18px; height: 18px;
    background: var(--ink);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), background 0.3s;
}
html[data-theme="dark"] .theme-toggle::after {
    transform: translateX(14px);
    background: var(--accent);
}
.cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.cta:hover { background: var(--accent); }
.cta .arr { transition: transform 0.3s; }
.cta:hover .arr { transform: translateX(3px); }

/* ====================== HERO ====================== */
.hero {
    position: relative;
    padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(48px, 6vw, 80px);
    border-bottom: 1px solid var(--rule);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(36px, 6vw, 96px);
    align-items: end;
    max-width: var(--max);
    margin: 0 auto;
}
.hero-headline {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(64px, 9.5vw, 156px);
    line-height: 0.88;
    letter-spacing: -0.025em;
    color: var(--ink);
}
.hero-headline .line { display: block; }
.hero-headline .line-2 {
    /* Unified italic serif across all three lines — same family/style as the
       parent .hero-headline. Only a subtle size step down to mark it as the
       resolution of the phrase. */
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.02em;
    font-size: 0.84em;
    color: var(--ink-2);
}
.hero-headline .amp {
    color: var(--accent);
    font-style: italic;
    margin: 0 0.05em;
}
.hero-side {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-bottom: 8px;
}
.hero-meta-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rule);
}
.hero-meta-row .rule {
    width: 32px; height: 1px; background: var(--ink);
}
.hero-lead {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.35;
    color: var(--ink-2);
    max-width: 480px;
    text-wrap: pretty;
}
.hero-lead .hl {
    font-style: normal;
    font-family: var(--font-sans);
    font-weight: 500;
    background: linear-gradient(transparent 62%, var(--accent-soft) 62%);
    padding: 0 0.1em;
}
.hero-byline {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.hero-byline strong { color: var(--ink); font-weight: 500; }

/* Stats rail */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: var(--max);
    margin: clamp(48px, 6vw, 80px) auto 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.stat {
    padding: 28px 32px;
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stat:last-child { border-right: none; }
.stat-value {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(40px, 4.5vw, 64px);
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.stat-value .suffix {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.32em;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-transform: uppercase;
    transform: translateY(-1.4em);
}
.stat-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.stat-trend {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--ink-4);
}
.stat-trend .up   { color: #2e7d4f; }
.stat-trend .dn   { color: var(--accent); }

/* ====================== SECTION HEADERS ====================== */
.section {
    padding: clamp(64px, 8vw, 120px) var(--gutter);
    max-width: var(--max);
    margin: 0 auto;
}
.section-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 24px;
    padding-bottom: 32px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--rule-strong);
}
.section-head-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(36px, 4.2vw, 60px);
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.section-head-title .num {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.34em;
    color: var(--ink-3);
    letter-spacing: 0.2em;
    margin-right: 18px;
    vertical-align: 0.5em;
}
.section-head-mid {
    align-self: center;
    border-top: 1px solid var(--rule);
    height: 1px;
}
.section-head-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--ink);
    transition: color 0.2s, border-color 0.2s, padding-right 0.3s;
}
.section-head-cta:hover {
    color: var(--accent);
    border-color: var(--accent);
    padding-right: 6px;
}

/* ====================== LEAD DISPATCH ====================== */
.lead {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(36px, 5vw, 72px);
    align-items: center;
}
.lead-figure {
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--paper-3);
    overflow: hidden;
}
.lead-figure img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.02);
}
.lead-figure-tag {
    position: absolute;
    top: 18px; left: 18px;
    padding: 8px 12px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 8px;
}
.lead-figure-tag::before {
    content: "";
    width: 6px; height: 6px; background: var(--accent);
}
.lead-figure-caption {
    position: absolute;
    bottom: 18px; left: 18px; right: 18px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(243, 237, 226, 0.86);
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.lead-body { display: flex; flex-direction: column; gap: 24px; }
.lead-meta {
    display: flex; align-items: center; gap: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.lead-meta .loc { color: var(--accent); font-weight: 500; }
.lead-meta .sep { width: 4px; height: 4px; background: var(--ink-4); transform: rotate(45deg); }
.lead-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(34px, 4.6vw, 64px);
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-wrap: balance;
}
.lead-title .it { font-style: italic; }
.lead-deck {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink-2);
    max-width: 56ch;
    font-weight: 400;
}
.lead-byline {
    display: flex; align-items: center; gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.lead-byline .author { color: var(--ink); font-weight: 500; }
.lead-byline .read {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 3px;
    transition: color 0.2s, padding-right 0.3s, border-color 0.2s;
}
.lead-byline .read:hover {
    color: var(--accent);
    border-color: var(--accent);
    padding-right: 6px;
}

/* ====================== DISPATCHES GRID ====================== */
.dispatches {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
}
.dispatch {
    padding: 32px 28px 36px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    transition: background 0.3s;
    cursor: pointer;
}
.dispatch:nth-child(3n) { border-right: none; }
.dispatch:hover { background: var(--paper-2); }
.dispatch-num {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.24em;
    color: var(--ink-4);
}
.dispatch:hover .dispatch-num { color: var(--accent); }
.dispatch-figure {
    aspect-ratio: 4 / 3;
    background: var(--paper-3);
    overflow: hidden;
    margin: 4px 0 8px;
}
.dispatch-figure img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(0.9);
    transition: transform 0.7s cubic-bezier(0.2, 1, 0.3, 1), filter 0.5s;
}
.dispatch:hover .dispatch-figure img {
    transform: scale(1.04);
    filter: saturate(1.05);
}
.dispatch-meta {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.dispatch-meta .loc { color: var(--accent); }
.dispatch-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 27px;
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--ink);
    text-wrap: balance;
    transition: color 0.2s;
}
.dispatch:hover .dispatch-title { color: var(--accent); }
.dispatch-deck {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-3);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dispatch-foot {
    margin-top: auto;
    padding-top: 16px;
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.dispatch-foot .read {
    color: var(--ink);
    display: inline-flex; align-items: center; gap: 6px;
}
.dispatch:hover .dispatch-foot .read .arr { transform: translateX(4px); }
.dispatch-foot .arr { transition: transform 0.3s; }

/* Text-only dispatch variant */
.dispatch-no-img .dispatch-figure { display: none; }
.dispatch-no-img {
    background:
        linear-gradient(135deg, var(--accent-soft) 0%, transparent 50%);
    border-top: 2px solid var(--accent);
}
.dispatch-no-img .dispatch-title { font-size: 30px; }

/* ====================== TRIPTYCH: TRAVEL / PROJECTS / RESEARCH ====================== */
.triptych {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
    background: var(--paper-2);
}
.tile {
    padding: clamp(40px, 4.5vw, 64px);
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-height: 380px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
    cursor: pointer;
}
.tile:last-child { border-right: none; }
.tile:hover { background: var(--paper); }
.tile-num {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent);
}
.tile-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 4.2vw, 64px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.tile-title .it { font-style: italic; }
.tile-deck {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-3);
    max-width: 38ch;
    margin-bottom: auto;
}
.tile-cta {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    display: inline-flex; align-items: center; gap: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--ink);
    align-self: flex-start;
    transition: color 0.2s, border-color 0.2s, padding-right 0.3s;
}
.tile:hover .tile-cta { color: var(--accent); border-color: var(--accent); padding-right: 8px; }

/* Tile decoration — subtle SVG meridian */
.tile-decor {
    position: absolute;
    right: -40px; bottom: -40px;
    width: 220px; height: 220px;
    opacity: 0.07;
    pointer-events: none;
}

/* ====================== ARCHIVE STRIP ====================== */
.archive {
    padding: clamp(64px, 8vw, 120px) var(--gutter);
    max-width: var(--max);
    margin: 0 auto;
}
.archive-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: clamp(36px, 5vw, 80px);
}
.archive-side h3 {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 44px;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}
.archive-side p {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-3);
    max-width: 30ch;
    margin: 0 0 28px;
}
.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-row {
    display: grid;
    grid-template-columns: 60px 100px 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 18px 0;
    border-top: 1px solid var(--rule);
    font-family: var(--font-sans);
    transition: padding-left 0.3s, background 0.3s;
    cursor: pointer;
}
.archive-row:last-child { border-bottom: 1px solid var(--rule); }
.archive-row:hover { padding-left: 12px; }
.archive-row .num {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--ink-4);
}
.archive-row .date {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.archive-row .ttl {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.archive-row:hover .ttl { color: var(--accent); }
.archive-row .ttl .it { font-style: italic; }
.archive-row .loc {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    justify-self: end;
}

/* ====================== FOOTER ====================== */
footer {
    border-top: 1px solid var(--rule-strong);
    background: var(--paper);
    padding: clamp(56px, 6vw, 96px) var(--gutter) 32px;
}
.footer-grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 56px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--rule);
}
.footer-mark {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 48px;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 18px;
}
.footer-mark .amp { color: var(--accent); }
.footer-desc {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-3);
    max-width: 38ch;
}
.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 7px 0; }
.footer-col a {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--ink);
    transition: color 0.2s, padding-left 0.2s;
}
.footer-col a:hover { color: var(--accent); padding-left: 4px; }
.footer-coda {
    max-width: var(--max);
    margin: 0 auto;
    padding-top: 24px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 24px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.footer-coda .legal { display: inline-flex; gap: 18px; }
.footer-coda .legal a:hover { color: var(--accent); }

/* ====================== RESPONSIVE ====================== */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: none; }
    .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--rule); }
    .lead { grid-template-columns: 1fr; }
    .lead-figure { aspect-ratio: 16/10; }
    .dispatches { grid-template-columns: repeat(2, 1fr); }
    .dispatch:nth-child(3n) { border-right: 1px solid var(--rule); }
    .dispatch:nth-child(2n) { border-right: none; }
    .triptych { grid-template-columns: 1fr; }
    .tile { border-right: none; border-bottom: 1px solid var(--rule); }
    .archive-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 720px) {
    .masthead-meta { display: none; }
    .masthead-nav { grid-template-columns: 1fr auto; gap: 16px; }
    .nav { display: none; }
    .logo .small { display: none; }
    .search-pill .kbd { display: none; }
    .cta { padding: 8px 12px; font-size: 11px; }
    .hero-headline { font-size: clamp(48px, 14vw, 88px); }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .section-head { grid-template-columns: 1fr; gap: 12px; }
    .section-head-mid { display: none; }
    .dispatches { grid-template-columns: 1fr; }
    .dispatch { border-right: none !important; }
    .archive-row { grid-template-columns: 50px 1fr; gap: 12px; }
    .archive-row .date, .archive-row .loc { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-coda { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ====================== UTILITIES ====================== */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.in {
    opacity: 1;
    transform: translateY(0);
}
/* Mobile + touch: skip the fade-in entirely. IntersectionObserver can
   misfire on tall mobile sections, leaving content invisible. Better to
   just show everything immediately than risk a blank page. */
@media (max-width: 720px), (hover: none) {
    .fade-up { opacity: 1 !important; transform: none !important; }
}

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


/* =============== TRAVEL ===============*/
/* ─────────── TRAVEL PAGE ─────────── */

.travel-hero {
    padding: clamp(48px, 6vw, 88px) var(--gutter) 0;
    border-bottom: 1px solid var(--rule);
    position: relative;
}
.travel-hero-grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(36px, 5vw, 80px);
    align-items: end;
}
.travel-hero-left { display: flex; flex-direction: column; gap: 28px; }
.travel-headline {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(64px, 9vw, 142px);
    line-height: 0.88;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0;
}
.travel-headline .line { display: block; }
.travel-headline .line-2 {
    font-style: normal;
    font-family: var(--font-sans);
    font-weight: 300;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    font-size: 0.72em;
    color: var(--ink-2);
}
.travel-headline .amp {
    color: var(--accent);
    font-style: italic;
    margin: 0 0.05em;
}
.travel-lead {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(20px, 1.9vw, 26px);
    line-height: 1.4;
    color: var(--ink-2);
    max-width: 48ch;
    margin: 0;
    text-wrap: pretty;
}
.travel-lead .hl {
    font-style: normal;
    font-family: var(--font-sans);
    font-weight: 500;
    background: linear-gradient(transparent 60%, var(--accent-soft) 60%);
    padding: 0 0.1em;
}
.travel-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 16px;
    padding: 24px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.travel-stats > div {
    display: flex; flex-direction: column;
    padding-right: 24px;
    border-right: 1px solid var(--rule);
}
.travel-stats > div:last-child { border-right: none; }
.travel-stats .big {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(36px, 3.4vw, 48px);
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.travel-stats .big small {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.34em;
    color: var(--accent);
    letter-spacing: 0.12em;
    margin-left: 4px;
    vertical-align: 0.4em;
}
.travel-stats .lbl {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-top: 8px;
}

.travel-hero-figure {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: var(--paper-3);
    margin: 0;
}
.travel-hero-figure img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.04);
}
.travel-hero-figure figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 28px 24px 22px;
    background: linear-gradient(180deg, transparent 0%, rgba(20,19,26,0.78) 100%);
    color: rgba(243, 237, 226, 0.92);
    display: flex; justify-content: space-between; align-items: flex-end;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.travel-hero-figure .tag {
    border-left: 2px solid var(--accent);
    padding-left: 10px;
    color: #fff;
    font-weight: 500;
}

/* ─────────── HORIZON SKYLINE ─────────── */
.travel-horizon {
    margin-top: clamp(40px, 5vw, 72px);
    height: 120px;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
    display: flex;
    align-items: flex-end;
}
.travel-horizon .horizon-svg {
    flex: 0 0 auto;
    height: 100%;
    width: 100%;
    color: var(--ink);
    opacity: 0.30;
}
html[data-theme="dark"] .travel-horizon .horizon-svg { opacity: 0.42; }
.travel-horizon .horizon-markers circle {
    color: var(--accent);
    fill: var(--accent);
    transform-origin: center;
    transform-box: fill-box;
    animation: horizonPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 6px var(--accent));
}
.travel-horizon .horizon-markers circle:nth-child(2) { animation-delay: 0.7s; }
.travel-horizon .horizon-markers circle:nth-child(3) { animation-delay: 1.4s; }
.travel-horizon .horizon-markers circle:nth-child(4) { animation-delay: 2.1s; }
.travel-horizon .horizon-markers circle:nth-child(5) { animation-delay: 2.8s; }
@keyframes horizonPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 1.0; transform: scale(1.5); }
}

/* ─────────── LOGBOOK GRID ─────────── */
.logbook {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}
.log {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.log figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    background: var(--paper-3);
}
.log figure img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.02);
    transition: transform 0.8s cubic-bezier(0.2,1,0.3,1), filter 0.5s;
}
.log:hover figure img {
    transform: scale(1.04);
    filter: saturate(1.05);
}
.log .log-loc {
    position: absolute;
    top: 14px; left: 14px;
    padding: 6px 10px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.log-body {
    padding: 18px 4px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.log-meta {
    display: flex; align-items: center;
    gap: 10px; flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.log-meta .loc { color: var(--accent); }
.log-meta .sep {
    width: 4px; height: 4px;
    background: var(--ink-4);
    transform: rotate(45deg);
}
.log h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0;
    transition: color 0.2s;
    text-wrap: balance;
}
.log:hover h3 { color: var(--accent); }
.log h3 .it { font-style: italic; }
.log p {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-3);
    margin: 0;
}

/* Frame variants */
.log-wide   { grid-column: span 4; }
.log-wide   figure { aspect-ratio: 16/9; }
.log-wide   h3 { font-size: 36px; }

.log-tall   { grid-column: span 2; }
.log-tall   figure { aspect-ratio: 3/4; }

.log-square { grid-column: span 2; }
.log-square figure { aspect-ratio: 1/1; }

.log-std    { grid-column: span 3; }
.log-std    figure { aspect-ratio: 4/3; }

.log-text   { grid-column: span 2;
              padding: 28px;
              background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 80%);
              border-top: 2px solid var(--accent);
              align-self: stretch; }
.log-text .log-body { padding: 0; }
.log-text h3 { font-size: 26px; }
.log-text .log-read {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 4px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, padding-right 0.3s;
}
.log-text:hover .log-read { color: var(--accent); border-color: var(--accent); padding-right: 6px; }

/* ─────────── MAP STRIP ─────────── */
.map-strip {
    padding: clamp(64px, 8vw, 120px) var(--gutter);
    background: var(--paper-2);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    position: relative;
}
.map-strip-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(36px, 5vw, 80px);
    align-items: center;
}
.map-strip-text { display: flex; flex-direction: column; gap: 18px; }
.map-strip-text .tile-num {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent);
}
.map-strip-text .tile-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(36px, 4vw, 56px);
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.map-strip-deck {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-3);
    max-width: 42ch;
    margin: 0;
}
.map-strip-figure svg {
    width: 100%;
    height: auto;
    color: var(--ink);
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
    .travel-hero-grid { grid-template-columns: 1fr; }
    .travel-hero-figure { aspect-ratio: 16/10; }
    .travel-stats { grid-template-columns: repeat(2, 1fr); }
    .travel-stats > div:nth-child(2) { border-right: none; }

    .logbook { grid-template-columns: repeat(4, 1fr); }
    .log-wide   { grid-column: span 4; }
    .log-tall   { grid-column: span 2; }
    .log-square { grid-column: span 2; }
    .log-std    { grid-column: span 2; }
    .log-text   { grid-column: span 4; }

    .map-strip-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .travel-headline { font-size: clamp(48px, 14vw, 80px); }
    .travel-stats { grid-template-columns: 1fr 1fr; }
    .travel-stats > div { padding-right: 12px; }

    .logbook { grid-template-columns: 1fr; gap: 36px; }
    .log-wide, .log-tall, .log-square, .log-std, .log-text { grid-column: span 1; }
    .log-wide h3 { font-size: 28px; }

    .travel-horizon { display: none; }
}


/* =============== PROJECTS ===============*/
/* ─────────── PROJECTS PAGE ─────────── */

.proj-hero {
    padding: clamp(48px, 6vw, 88px) var(--gutter);
    border-bottom: 1px solid var(--rule);
}
.proj-hero-grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    gap: clamp(36px, 5vw, 80px);
    align-items: end;
}
.proj-hero-left { display: flex; flex-direction: column; gap: 24px; }
.proj-headline {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(60px, 8vw, 132px);
    line-height: 0.92;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0;
}
.proj-headline .line { display: block; }
.proj-headline .it { font-style: italic; }
.proj-headline .line-2 {
    color: var(--accent);
}
.proj-headline .line-mono {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.22em;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
    line-height: 1.4;
    margin-top: 18px;
    font-weight: 500;
}
.proj-lead {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(20px, 1.9vw, 26px);
    line-height: 1.4;
    color: var(--ink-2);
    max-width: 52ch;
    margin: 0;
}
.proj-lead .hl {
    font-style: normal;
    font-family: var(--font-sans);
    font-weight: 500;
    background: linear-gradient(transparent 60%, var(--accent-soft) 60%);
    padding: 0 0.1em;
}

/* Terminal-style readout panel */
.readout {
    background: #14110d;                 /* always dark — stylistic console panel */
    color: rgba(243, 237, 226, 0.92);
    padding: 22px 24px 24px;
    font-family: var(--font-mono);
    position: relative;
    border: 1px solid rgba(243, 237, 226, 0.08);
}
html[data-theme="dark"] .readout {
    background: #050507;                 /* deeper than page bg in dark mode */
    border-color: rgba(243, 237, 226, 0.12);
}
.readout-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(243, 237, 226, 0.62);
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(243, 237, 226, 0.14);
}
.readout-blink {
    width: 8px; height: 8px;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: blinkSoft 1.4s ease-in-out infinite;
}
@keyframes blinkSoft { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.readout-time { margin-left: auto; color: rgba(243, 237, 226, 0.92); font-weight: 500; }

.readout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    margin: 0;
}
.readout-grid > div { display: flex; flex-direction: column; gap: 4px; }
.readout-grid dt {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(243, 237, 226, 0.5);
    margin: 0;
}
.readout-grid dd {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 500;
    color: #f3ede2;
    margin: 0;
    display: flex; align-items: baseline; gap: 6px;
}
.readout-grid dd small {
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 500;
}

/* ─────────── TAB BAR ─────────── */
.proj-tabs-section { padding: clamp(56px, 6vw, 96px) var(--gutter); }
.proj-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule-strong);
    margin-bottom: clamp(40px, 5vw, 64px);
}
.proj-tab {
    appearance: none;
    background: transparent;
    border: none;
    border-right: 1px solid var(--rule);
    padding: 22px 24px 22px;
    text-align: left;
    cursor: pointer;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "num   name    status"
        ".     sub     .";
    gap: 4px 16px;
    transition: background 0.25s ease, color 0.25s ease;
    color: var(--ink-3);
    font-family: var(--font-sans);
    position: relative;
}
.proj-tab:last-child { border-right: none; }
.proj-tab:hover { background: var(--paper-2); color: var(--ink); }
.proj-tab.active { color: var(--ink); background: var(--paper-2); }
.proj-tab.active::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -1px;
    height: 2px; background: var(--accent);
}
.proj-tab .tab-num {
    grid-area: num;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--ink-4);
    text-transform: uppercase;
    align-self: start;
    padding-top: 2px;
}
.proj-tab.active .tab-num { color: var(--accent); }
.proj-tab .tab-name {
    grid-area: name;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 26px;
    line-height: 1.1;
    color: inherit;
    letter-spacing: -0.01em;
}
.proj-tab .tab-sub {
    grid-area: sub;
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--ink-3);
    line-height: 1.4;
}
.proj-tab .tab-status {
    grid-area: status;
    align-self: start;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
    display: inline-flex; align-items: center; gap: 6px;
}
.proj-tab.active .tab-status { color: var(--ink-2); }
.dot-pulse {
    width: 7px; height: 7px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 6px #4ade80;
    animation: blinkSoft 1.4s ease-in-out infinite;
}
.status-beta {
    color: var(--accent);
}
.status-archive {
    color: var(--ink-4);
}

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: panelIn 0.4s ease both; }
@keyframes panelIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─────────── SHIPS PANEL ─────────── */
.ships-stage { display: flex; flex-direction: column; gap: 28px; }
.ships-stage-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    flex-wrap: wrap;
}
.ships-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(32px, 3.6vw, 48px);
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 8px 0 0;
    color: var(--ink);
}
.ships-stage-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-btn {
    appearance: none;
    border: 1px solid var(--rule);
    background: transparent;
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.filter-btn.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

.map-stage {
    position: relative;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    overflow: hidden;
    aspect-ratio: 2 / 1;
}
.world-map {
    width: 100%;
    height: 100%;
    color: var(--ink);
    display: block;
}
.vessel {
    transition: transform 0.4s ease;
}
.vessel circle {
    animation: vesselPulse 2.5s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}
@keyframes vesselPulse {
    0%, 100% { opacity: 0.0; transform: scale(0.6); }
    50%      { opacity: 1.0; transform: scale(1.6); }
}

.map-panel {
    position: absolute;
    left: 24px; bottom: 24px;
    max-width: 380px;
    background: rgba(20, 19, 26, 0.92);
    color: rgba(243, 237, 226, 0.96);
    padding: 18px 22px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: var(--font-mono);
}
.map-panel-head {
    display: flex; flex-direction: column; gap: 2px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(243, 237, 226, 0.14);
}
.map-panel-title {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(243, 237, 226, 0.5);
}
.map-panel-id {
    font-size: 14px;
    font-weight: 500;
    color: #f3ede2;
}
.map-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    margin: 0;
}
.map-panel-grid > div { display: flex; flex-direction: column; gap: 2px; }
.map-panel-grid dt {
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(243, 237, 226, 0.5);
    margin: 0;
}
.map-panel-grid dd {
    font-size: 12px;
    color: #f3ede2;
    margin: 0;
}

.vessel-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 28px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.vessel-stats > div {
    padding: 0 24px;
    border-right: 1px solid var(--rule);
    display: flex; flex-direction: column; gap: 6px;
}
.vessel-stats > div:last-child { border-right: none; }
.vessel-stats > div:first-child { padding-left: 0; }
.vessel-stats .big {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(36px, 3.4vw, 48px);
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.vessel-stats .lbl {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.vessel-stats .trend {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    color: var(--ink-4);
}
.vessel-stats .trend.up { color: #2e7d4f; }
.vessel-stats .trend.dn { color: var(--accent); }

/* ─────────── LABS GRID ─────────── */
.lab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.lab {
    padding: 36px 36px 32px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    display: flex; flex-direction: column; gap: 16px;
}
.lab:nth-child(2n) { border-right: none; }
.lab:nth-last-child(-n+2) { border-bottom: none; }
.lab-head {
    display: flex; justify-content: space-between; align-items: center;
}
.lab-no {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}
.lab-status {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
    display: inline-flex; align-items: center; gap: 7px;
}
.lab-status.status-live { color: var(--ink-2); }
.lab-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(28px, 2.6vw, 36px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0;
}
.lab-title .it { font-style: italic; }
.lab-deck {
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink-3);
    margin: 0;
}
.lab-chart {
    height: 120px;
    background: var(--paper-2);
    padding: 12px;
    color: var(--ink);
}
.lab-chart svg { width: 100%; height: 100%; }
.lab-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 8px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--rule);
}
.lab-stats > div {
    padding-right: 16px;
    border-right: 1px solid var(--rule);
    display: flex; flex-direction: column; gap: 4px;
}
.lab-stats > div:last-child { border-right: none; }
.lab-stats dt {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin: 0;
}
.lab-stats dd {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
    display: flex; align-items: baseline; gap: 6px;
}
.lab-stats dd small {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--accent);
}
.lab-open {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 4px;
    padding-top: 12px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, padding-right 0.3s;
}
.lab:hover .lab-open { color: var(--accent); border-color: var(--accent); padding-right: 8px; }
.lab-research {
    background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 70%);
}

/* ─────────── PROJECTS GRID ─────────── */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.proj-card {
    padding: 28px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    display: flex; flex-direction: column; gap: 12px;
    cursor: pointer;
    transition: background 0.25s ease;
    min-height: 220px;
}
.proj-card:nth-child(3n) { border-right: none; }
.proj-card:nth-last-child(-n+3) { border-bottom: none; }
.proj-card:hover { background: var(--paper-2); }
.proj-card .proj-no {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}
.proj-card h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.1;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.01em;
}
.proj-card h3 .it { font-style: italic; }
.proj-card p {
    font-family: var(--font-sans);
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink-3);
    margin: 0;
}
.proj-card .proj-meta {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-4);
    padding-top: 14px;
    border-top: 1px solid var(--rule);
}

/* ─────────── RESEARCH PAPERS ─────────── */
.paper-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--rule);
}
.paper {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 36px;
    padding: 36px 0;
    border-bottom: 1px solid var(--rule);
    transition: padding-left 0.3s ease;
    cursor: pointer;
}
.paper:hover { padding-left: 12px; background: var(--paper-2); }
.paper-no {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    padding-top: 4px;
}
.paper-body { display: flex; flex-direction: column; gap: 14px; }
.paper-meta {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.paper-meta .sep {
    width: 4px; height: 4px;
    background: var(--ink-4);
    transform: rotate(45deg);
}
.paper h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.1;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.01em;
    text-wrap: balance;
    max-width: 64ch;
}
.paper:hover h3 { color: var(--accent); }
.paper p {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-3);
    margin: 0;
    max-width: 64ch;
}
.paper-foot {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.paper-foot .paper-read {
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 3px;
    transition: color 0.2s, border-color 0.2s, padding-right 0.3s;
}
.paper:hover .paper-foot .paper-read {
    color: var(--accent);
    border-color: var(--accent);
    padding-right: 6px;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
    .proj-hero-grid { grid-template-columns: 1fr; }
    .proj-tabs { grid-template-columns: repeat(2, 1fr); }
    .proj-tab:nth-child(2) { border-right: none; }
    .proj-tab:nth-child(1), .proj-tab:nth-child(2) { border-bottom: 1px solid var(--rule); }

    .lab-grid { grid-template-columns: 1fr; }
    .lab { border-right: none; }
    .lab:nth-last-child(-n+1) { border-bottom: none; }
    .lab:nth-last-child(-n+2):not(:last-child) { border-bottom: 1px solid var(--rule); }

    .proj-grid { grid-template-columns: 1fr 1fr; }
    .proj-card:nth-child(3n) { border-right: 1px solid var(--rule); }
    .proj-card:nth-child(2n) { border-right: none; }
    .proj-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--rule); }
    .proj-card:nth-last-child(-n+2) { border-bottom: none; }

    .vessel-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .vessel-stats > div { padding: 0 16px; border-right: none; }
    .map-panel { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

@media (max-width: 720px) {
    .proj-headline { font-size: clamp(48px, 14vw, 80px); }
    .proj-tabs { grid-template-columns: 1fr; }
    .proj-tab { border-right: none; border-bottom: 1px solid var(--rule); }
    .proj-grid { grid-template-columns: 1fr; }
    .proj-card { border-right: none !important; }
    .paper { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
    .paper:hover { padding-left: 0; }
    .map-stage { aspect-ratio: 4 / 3; }
    .map-panel { font-size: 10px; }
    .map-panel-grid { grid-template-columns: 1fr; gap: 8px; }
    .readout-grid { grid-template-columns: 1fr; }
}


/* =============== POST DETAIL ===============*/
/* post detail */
.reading-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: transparent;
    z-index: 80;
    pointer-events: none;
}
.reading-progress-bar {
    height: 100%;
    background: var(--accent);
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.1s linear;
}

/* Breadcrumb */
.post-crumb {
    border-bottom: 1px solid var(--rule);
    padding: 16px var(--gutter);
}
.post-crumb-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.post-crumb a { color: var(--ink-3); transition: color 0.2s; }
.post-crumb a:hover { color: var(--accent); }
.post-crumb .sep { color: var(--ink-4); }
.post-crumb .cur { color: var(--ink); font-weight: 500; }

/* ─────────── POST HEADER ─────────── */
.post-detail {
    padding: clamp(40px, 5vw, 72px) var(--gutter) 0;
}
.post-head {
    max-width: 1100px;
    margin: 0 auto clamp(48px, 6vw, 80px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.post-head-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.post-head-meta .kicker {
    color: var(--accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}
.post-head-meta .kicker .dot {
    width: 6px; height: 6px;
    background: var(--accent);
    display: inline-block;
}
.post-head-meta .sep {
    width: 4px; height: 4px;
    background: var(--ink-4);
    transform: rotate(45deg);
}
.post-head-meta .post-meta-loc {
    color: var(--accent);
    font-weight: 500;
}

.post-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 5.6vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0;
    text-wrap: balance;
    max-width: 22ch;
}
.post-title .it { font-style: italic; }

.post-deck {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.4;
    color: var(--ink-2);
    margin: 0;
    max-width: 38ch;
    text-wrap: pretty;
}

/* Byline strip */
.post-byline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    flex-wrap: wrap;
}
.post-byline-author {
    display: flex;
    align-items: center;
    gap: 14px;
}
.byline-mark {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.post-byline .author {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.02em;
}
.post-byline .role {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-top: 2px;
}
.post-share {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    gap: 8px;
}
.post-share a {
    width: 38px; height: 38px;
    border: 1px solid var(--rule);
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}
.post-share a:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* ─────────── HERO FIGURE ─────────── */
.post-hero-figure {
    max-width: 1280px;
    margin: 0 auto clamp(56px, 7vw, 96px);
    padding: 0 var(--gutter);
    position: relative;
}
.post-hero-figure img {
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
    display: block;
    background: var(--paper-3);
    filter: saturate(0.94) contrast(1.04);
}
.post-hero-figure figcaption {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.post-hero-figure figcaption .tag {
    color: var(--ink);
    font-weight: 500;
    border-left: 2px solid var(--accent);
    padding-left: 10px;
}

/* ─────────── POST GRID (TOC + BODY) ─────────── */
.post-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(40px, 6vw, 88px);
    align-items: start;
}

/* Sticky rail */
.post-rail {
    position: sticky;
    top: 80px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 36px;
}
.post-rail-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rule);
}
.post-rail-block:last-child { border-bottom: none; }
.rail-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-4);
}
.rail-toc {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    counter-reset: toc;
}
.rail-toc li a {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 10px;
    align-items: baseline;
    font-family: var(--font-sans);
    font-size: 13.5px;
    line-height: 1.35;
    color: var(--ink-3);
    transition: color 0.2s;
    padding-left: 0;
}
.rail-toc li a span:first-of-type,
.rail-toc li a {
    font-family: var(--font-mono);
}
.rail-toc li a span {
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: inherit;
}
.rail-toc li a:hover { color: var(--ink); }
.rail-toc li a.active {
    color: var(--ink);
    font-weight: 500;
}
.rail-toc li a.active::before {
    content: "";
    width: 3px;
    height: 22px;
    background: var(--accent);
    position: absolute;
    margin-left: -14px;
}
.rail-toc li { position: relative; }

.rail-facts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}
.rail-facts > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rail-facts dt {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin: 0;
}
.rail-facts dd {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 28px;
    line-height: 1;
    color: var(--ink);
    margin: 0;
    display: flex; align-items: baseline; gap: 8px;
    letter-spacing: -0.02em;
}
.rail-facts dd small {
    font-family: var(--font-mono);
    font-size: 10px;
    font-style: normal;
    color: var(--accent);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rail-tags {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-wrap: wrap;
    gap: 6px;
}
.rail-tags li {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-2);
    padding: 5px 10px;
    border: 1px solid var(--rule);
    cursor: pointer;
    transition: all 0.2s;
}
.rail-tags li:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ─────────── ARTICLE BODY ─────────── */
.post-body {
    max-width: 720px;
    font-family: "Newsreader", var(--font-display), Georgia, serif;
    color: var(--ink-2);
    font-size: 19px;
    line-height: 1.65;
    font-weight: 400;
}
.post-body section {
    margin-bottom: 56px;
    scroll-margin-top: 120px;
}
.post-body h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.1;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin: 0 0 24px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
    display: flex;
    align-items: baseline;
    gap: 18px;
}
.post-body h2 .num {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-transform: uppercase;
    font-style: normal;
}
.post-body p { margin: 0 0 22px; text-wrap: pretty; }

/* Lede + dropcap */
.post-body p.lede {
    font-size: 21px;
    line-height: 1.6;
    color: var(--ink);
}
.dropcap {
    float: left;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 88px;
    line-height: 0.85;
    color: var(--accent);
    margin: 6px 12px 0 0;
    font-weight: 400;
}

.post-body em { font-style: italic; color: var(--ink); }
.post-body strong { font-weight: 600; color: var(--ink); }
.post-body a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--accent);
    transition: color 0.2s;
}
.post-body a:hover { color: var(--accent); }

/* Pull quote */
.pull-quote {
    margin: 36px 0 36px -24px;
    padding: 0 0 0 24px;
    border-left: 3px solid var(--accent);
}
.pull-quote p {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(24px, 2.4vw, 30px);
    line-height: 1.3;
    color: var(--ink);
    margin: 0;
    text-wrap: balance;
}

/* Callout box (definition, editor's note, etc.) */
.callout {
    background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 80%);
    border-top: 2px solid var(--accent);
    padding: 22px 24px;
    margin: 36px 0;
}
.callout-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
    display: inline-block;
    margin-bottom: 10px;
}
.callout p {
    font-family: var(--font-sans);
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--ink);
    margin: 0;
}
.callout-note {
    background: var(--paper-2);
    border-top-color: var(--ink-3);
}
.callout-note .callout-label { color: var(--ink-3); }

/* Charts inside body */
.post-chart {
    margin: 40px 0;
    padding: 0;
}
.chart-frame {
    border: 1px solid var(--rule);
    padding: 18px;
    background: var(--paper);
    color: var(--ink);
    aspect-ratio: 19/8;
}
.chart-frame svg {
    width: 100%;
    height: 100%;
    display: block;
}
.post-chart figcaption {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.55;
    letter-spacing: 0.1em;
    color: var(--ink-3);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 14px;
}
.post-chart figcaption .num {
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}
.post-chart figcaption .src {
    margin-left: auto;
    color: var(--ink-4);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.18em;
}

/* Foot of article */
.post-foot {
    margin-top: 72px;
    padding-top: 32px;
    border-top: 1px solid var(--rule-strong);
}
.post-foot-rule {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-4);
    margin-bottom: 32px;
}
.post-foot-meta {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: start;
}
.post-foot-meta p {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-3);
    margin: 8px 0 0;
}
.post-foot-share {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.post-foot-share a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 3px;
    transition: color 0.2s, border-color 0.2s, padding-right 0.3s;
}
.post-foot-share a:hover { color: var(--accent); border-color: var(--accent); padding-right: 6px; }

/* ─────────── GALLERY ─────────── */
.post-gallery {
    margin: clamp(64px, 8vw, 120px) auto 0;
    padding: clamp(40px, 5vw, 72px) var(--gutter);
    max-width: 1280px;
    border-top: 1px solid var(--rule);
}
.post-gallery-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.post-gallery-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
}
.post-gallery-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.post-gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}
.gallery-frame {
    position: relative;
    overflow: hidden;
    background: var(--paper-3);
    cursor: zoom-in;
}
.gallery-frame img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.04);
    transition: transform 0.7s cubic-bezier(0.2,1,0.3,1), filter 0.5s;
}
.gallery-frame:hover img { transform: scale(1.05); filter: saturate(1.06); }
.gallery-frame .frame-no {
    position: absolute;
    top: 10px; left: 10px;
    padding: 4px 8px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.gallery-frame[data-aspect="wide"]   { grid-column: span 4; aspect-ratio: 16/9; }
.gallery-frame[data-aspect="square"] { grid-column: span 2; aspect-ratio: 1/1; }
.gallery-frame[data-aspect="tall"]   { grid-column: span 2; aspect-ratio: 3/4; }

/* ─────────── RELATED ─────────── */
.post-related {
    margin: 0 auto;
    padding: clamp(48px, 6vw, 88px) var(--gutter);
    max-width: 1280px;
    border-top: 1px solid var(--rule);
}
.post-related-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule-strong);
    margin-bottom: 32px;
}
.post-related-head h3 {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
}
.post-related-head .serif-italic { font-style: italic; }

.post-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}
.rel-card {
    padding: 28px 24px 32px;
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
    transition: background 0.25s ease;
}
.rel-card:last-child { border-right: none; }
.rel-card:first-child { padding-left: 0; }
.rel-card:hover { background: var(--paper-2); }
.rel-card .rel-no {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent);
}
.rel-card .rel-meta {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.rel-card .rel-meta .loc { color: var(--accent); }
.rel-card h4 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0;
    text-wrap: balance;
}
.rel-card:hover h4 { color: var(--accent); }
.rel-card .rel-read {
    margin-top: auto;
    padding-top: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 4px;
    align-self: flex-start;
    transition: color 0.2s, border-color 0.2s, padding-right 0.3s;
}
.rel-card:hover .rel-read {
    color: var(--accent);
    border-color: var(--accent);
    padding-right: 6px;
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
    .post-grid { grid-template-columns: 1fr; }
    .post-rail {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 24px;
        padding-bottom: 32px;
        border-bottom: 1px solid var(--rule);
    }
    .post-rail-block { flex: 1 1 220px; min-width: 200px; border-bottom: none; }
    .post-related-grid { grid-template-columns: 1fr 1fr; }
    .rel-card:nth-child(2) { border-right: none; }
    .rel-card:nth-child(3) {
        grid-column: span 2;
        border-top: 1px solid var(--rule);
        padding-top: 28px;
        margin-top: 0;
        padding-left: 0;
    }

    .post-gallery-grid { grid-template-columns: repeat(4, 1fr); }
    .gallery-frame[data-aspect="wide"]   { grid-column: span 4; }
    .gallery-frame[data-aspect="square"],
    .gallery-frame[data-aspect="tall"]   { grid-column: span 2; }
}

@media (max-width: 720px) {
    .post-title { font-size: clamp(34px, 9vw, 52px); }
    .post-byline { gap: 12px; }
    .post-foot-meta { grid-template-columns: 1fr; }
    .post-foot-share { align-items: flex-start; }
    .post-related-grid { grid-template-columns: 1fr; }
    .rel-card { border-right: none; border-bottom: 1px solid var(--rule); padding-left: 0 !important; }
    .rel-card:last-child { border-bottom: none; }
    .post-gallery-grid { grid-template-columns: 1fr; }
    .gallery-frame[data-aspect="wide"],
    .gallery-frame[data-aspect="square"],
    .gallery-frame[data-aspect="tall"]   { grid-column: span 1; aspect-ratio: 4/3; }
    .pull-quote { margin-left: 0; }
    .dropcap { font-size: 64px; }
}


/* =============== AURA + DARK-MODE BACKDROPS ===============*/
html { background: var(--paper); }
body { background: transparent !important; }

/* Font-smoothing — dark backgrounds make serifs look ghosted with subpixel
   antialiasing. Force greyscale AA on dark, subpixel on light. */
html[data-theme="dark"] body,
html[data-theme="dark"] {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
html:not([data-theme="dark"]) body {
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

#aura-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: var(--aura-opacity, 0.82);
    transition: opacity 0.6s ease;
}

html[data-theme="dark"] #aura-canvas {
    opacity: calc(var(--aura-opacity, 0.82) * 1.0);
}


/* (z-index for body::before now set inline above — keep this slot for future use) */


body { background: transparent !important; }


html { background: var(--paper, #f3ede2); transition: background 0.4s; }
html[data-theme="dark"] { background: var(--paper, #0e1015); }


.masthead,
.ticker,
.triptych,
footer {
    background: color-mix(in oklch, var(--paper) 88%, transparent);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}


html[data-theme="dark"] .masthead,
html[data-theme="dark"] .ticker,
html[data-theme="dark"] footer {
    background: color-mix(in oklch, var(--paper) 96%, transparent);
}
html[data-theme="dark"] .hero,
html[data-theme="dark"] .section,
html[data-theme="dark"] .archive,
html[data-theme="dark"] .triptych,
html[data-theme="dark"] .travel-hero,
html[data-theme="dark"] .map-strip,
html[data-theme="dark"] .proj-hero,
html[data-theme="dark"] .proj-tabs-section,
html[data-theme="dark"] .post-detail,
html[data-theme="dark"] .post-crumb,
html[data-theme="dark"] .post-gallery,
html[data-theme="dark"] .post-related {
    background: color-mix(in oklch, var(--paper) 94%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
}


/* =============== CONTACT FORM + LEGAL PAGES ===============*/
.contact-form {
    display: flex; flex-direction: column;
    gap: 22px;
    margin: 24px 0 48px;
}
.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
@media (max-width: 720px) { .contact-row { grid-template-columns: 1fr; } }

.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.contact-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.contact-label small {
    color: var(--ink-4);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.1em;
    font-size: 10px;
    margin-left: 4px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--rule-strong);
    padding: 12px 0 10px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 22px;
    color: var(--ink);
    transition: border-color 0.2s;
    resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-bottom-color: var(--accent);
}
.contact-form textarea {
    font-family: var(--font-sans);
    font-style: normal;
    font-size: 16px;
    line-height: 1.55;
    border: 1px solid var(--rule-strong);
    padding: 14px 16px;
    min-height: 160px;
}
.contact-form textarea:focus { border-color: var(--accent); }
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--ink-4);
    font-style: italic;
}
.contact-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
}
.contact-note {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
}

/* H3 in the post body — used by legal/contact long-form */
.post-body h3 {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink);
    margin: 32px 0 12px;
    text-transform: uppercase;
}
.post-body h4 {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--ink-2);
    margin: 24px 0 10px;
    text-transform: uppercase;
}
.post-body ul, .post-body ol {
    margin: 0 0 22px;
    padding-left: 1.4em;
}
.post-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}
.post-body blockquote:not(.pull-quote) {
    border-left: 3px solid var(--rule-strong);
    margin: 24px 0;
    padding: 4px 0 4px 22px;
    color: var(--ink-3);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 20px;
    line-height: 1.5;
}


/* =============== TIKTOK EMBED (locally hosted) =============== *
 * Editorial 9:16 video card. No third-party requests — the file
 * is served from posts/. A "Watch on TikTok" link points to the
 * original for the reader who wants the comment thread + the rest.
 * ============================================================== */
.tiktok-embed {
    margin: 40px auto;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* Sit in the column with a bit of editorial breathing room */
}

/* Float variant — drop `class="tiktok-embed tiktok-side"` in source
   to pull it to the right of the body copy at desktop widths. */
@media (min-width: 1100px) {
    .tiktok-embed.tiktok-side {
        float: right;
        margin: 12px -120px 28px 36px;
        max-width: 280px;
    }
}

/* The frame itself — 9:16 portrait, deep ink border, soft inner shadow.
   Hover reveals a subtle accent ring for interactivity hint. */
.tt-frame {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: var(--ink);
    border: 1px solid var(--rule-strong);
    cursor: pointer;
    transition: border-color 0.3s, transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}
.tt-frame:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.tt-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--ink);
}

/* Big editorial play button, only visible until the user interacts */
.tt-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    border: 1px solid rgba(243, 237, 226, 0.55);
    border-radius: 50%;
    background: rgba(20, 19, 26, 0.55);
    color: var(--paper);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    padding-left: 4px; /* visually center the triangle */
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s, background 0.3s;
    z-index: 2;
}
.tt-frame:hover .tt-play {
    background: var(--accent);
    border-color: var(--accent);
    transform: translate(-50%, -50%) scale(1.05);
}
/* When the video starts playing, the controls take over and we hide ours */
.tt-frame video:not([paused]) ~ .tt-play,
.tt-frame.playing .tt-play {
    opacity: 0;
}

/* Tiny corner stamp — quietly signals format + that the file is mirrored */
.tt-corner {
    position: absolute;
    top: 10px; left: 10px;
    padding: 4px 8px;
    background: rgba(20, 19, 26, 0.78);
    color: rgba(243, 237, 226, 0.88);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
}

/* Caption strip — attribution + link, all in editorial typography */
.tt-caption {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.tt-mark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    font-weight: 500;
}
.tt-mark svg {
    color: var(--accent);
}
.tt-author {
    color: var(--ink-2);
    font-weight: 500;
}
.tt-link {
    margin-left: auto;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 3px;
    transition: color 0.2s, border-color 0.2s, padding-right 0.3s;
}
.tt-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    padding-right: 6px;
}

@media (max-width: 720px) {
    .tiktok-embed { max-width: 100%; margin: 32px 0; }
    .tiktok-embed.tiktok-side { float: none; margin: 32px 0; max-width: 100%; }
}

/* ──────────────────────────────────────────────────────────
   ⌘K Search modal — Reserve Edition
   ────────────────────────────────────────────────────────── */
.search-modal {
    position: fixed; inset: 0;
    background: rgba(20, 16, 12, 0.55);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    display: none; align-items: flex-start; justify-content: center;
    z-index: 1000; padding: 12vh 24px 24px;
    animation: searchFadeIn 0.18s ease both;
}
.search-modal.is-open { display: flex; }
@keyframes searchFadeIn { from { opacity: 0; } to { opacity: 1; } }

.search-panel {
    width: 100%; max-width: 640px;
    background: var(--paper, #f4eee4);
    border: 1px solid var(--rule-strong, rgba(20,16,12,0.18));
    border-radius: 8px;
    box-shadow: 0 30px 80px -20px rgba(20,16,12,0.45), 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden; display: flex; flex-direction: column;
    max-height: 70vh;
    animation: searchPanelIn 0.22s cubic-bezier(.2,.7,.3,1.2) both;
}
@keyframes searchPanelIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

.search-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-bottom: 1px solid var(--rule, rgba(20,16,12,0.10));
}
.search-input {
    flex: 1; border: 0; background: transparent; outline: none;
    font: 400 18px/1.4 var(--font-serif, 'Newsreader', Georgia, serif);
    color: var(--ink, #1a1410); padding: 4px 0;
}
.search-input::placeholder { color: var(--ink-muted, rgba(20,16,12,0.42)); font-style: italic; }
.search-close {
    border: 1px solid var(--rule-strong, rgba(20,16,12,0.18));
    background: transparent; color: var(--ink-muted, rgba(20,16,12,0.55));
    font: 500 11px/1 var(--font-mono, 'JetBrains Mono', monospace);
    padding: 6px 8px; border-radius: 4px; cursor: pointer;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.search-close:hover { color: var(--ink, #1a1410); border-color: var(--ink, #1a1410); }

.search-empty {
    padding: 28px 20px; text-align: center;
    color: var(--ink-muted, rgba(20,16,12,0.55));
    font: italic 14px/1.5 var(--font-serif, 'Newsreader', Georgia, serif);
}

.search-results { overflow-y: auto; flex: 1; }
.search-result {
    display: grid; grid-template-columns: 64px 1fr auto;
    grid-template-areas: 'type title meta' 'type excerpt excerpt';
    gap: 4px 14px; padding: 14px 18px;
    border-bottom: 1px solid var(--rule, rgba(20,16,12,0.07));
    color: inherit; text-decoration: none;
    transition: background-color 0.1s ease;
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover, .search-result.is-active {
    background: rgba(127, 29, 29, 0.06); /* faint oxblood */
}
.search-result .sr-type {
    grid-area: type;
    font: 500 10px/1.4 var(--font-mono, 'JetBrains Mono', monospace);
    color: var(--accent, #7f1d1d);
    letter-spacing: 0.08em; text-transform: uppercase;
    padding-top: 3px;
}
.search-result .sr-title {
    grid-area: title;
    font: 500 15px/1.3 var(--font-serif, 'Newsreader', Georgia, serif);
    color: var(--ink, #1a1410);
}
.search-result .sr-meta {
    grid-area: meta;
    font: 400 11px/1.4 var(--font-mono, 'JetBrains Mono', monospace);
    color: var(--ink-muted, rgba(20,16,12,0.50));
    white-space: nowrap;
}
.search-result .sr-excerpt {
    grid-area: excerpt;
    font: 400 13px/1.4 var(--font-serif, 'Newsreader', Georgia, serif);
    color: var(--ink-muted, rgba(20,16,12,0.62));
    margin-top: 2px;
}

.search-foot {
    padding: 10px 16px;
    border-top: 1px solid var(--rule, rgba(20,16,12,0.07));
    font: 400 11px/1.4 var(--font-mono, 'JetBrains Mono', monospace);
    color: var(--ink-muted, rgba(20,16,12,0.45));
    text-align: center;
    letter-spacing: 0.02em;
}

/* Dark theme tweaks */
[data-theme="dark"] .search-panel {
    background: #1a1814;
    border-color: rgba(255,255,255,0.10);
}
[data-theme="dark"] .search-modal { background: rgba(0,0,0,0.65); }
[data-theme="dark"] .search-result:hover,
[data-theme="dark"] .search-result.is-active { background: rgba(255,255,255,0.04); }

@media (max-width: 600px) {
    .search-modal { padding: 4vh 12px 12px; }
    .search-panel { max-height: 85vh; }
    .search-result { grid-template-columns: 1fr auto; grid-template-areas: 'type meta' 'title title' 'excerpt excerpt'; gap: 2px 8px; }
    .search-result .sr-type { padding-top: 0; }
}

/* ──────────────────────────────────────────────────────────
   Mobile nav (burger + slide-down menu) — Reserve Edition
   ────────────────────────────────────────────────────────── */
.nav-burger {
    display: none;
    width: 44px; height: 44px;
    border: 1px solid var(--rule-strong, rgba(20,16,12,0.18));
    background: transparent;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    position: relative;
}
.nav-burger span {
    position: absolute; left: 12px; right: 12px; height: 1.5px;
    background: var(--ink, #1a1410);
    transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}
.nav-burger span:nth-child(1) { top: 14px; }
.nav-burger span:nth-child(2) { top: 21px; }
.nav-burger span:nth-child(3) { top: 28px; }
.nav-burger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.mobile-nav {
    position: fixed; inset: 0;
    background: var(--paper, #f4eee4);
    z-index: 9999;
    padding: 28px 28px 32px;
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    -webkit-overflow-scrolling: touch;
}
.mobile-nav::before {
    content: "";
    display: block;
    height: env(safe-area-inset-top, 0);
}
.mobile-nav-close {
    position: absolute; top: calc(16px + env(safe-area-inset-top, 0)); right: 18px;
    width: 44px; height: 44px;
    border: 1px solid var(--rule-strong, rgba(20,16,12,0.18));
    background: transparent; border-radius: 6px;
    font-size: 26px; line-height: 1;
    color: var(--ink, #1a1410);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0; padding-bottom: 4px;
}
.mobile-nav-close:hover { background: rgba(20,16,12,0.04); }
.mobile-nav.is-open { opacity: 1; transform: none; }
.mobile-nav nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a {
    display: block;
    padding: 16px 4px;
    font: 400 28px/1.2 var(--font-serif, 'Newsreader', Georgia, serif);
    color: var(--ink, #1a1410);
    text-decoration: none;
    border-bottom: 1px solid var(--rule, rgba(20,16,12,0.08));
}
.mobile-nav a.active { color: var(--accent, #7f1d1d); font-style: italic; }
.mobile-nav a.muted {
    font-size: 14px;
    color: var(--ink-muted, rgba(20,16,12,0.55));
    border-bottom: 0;
    padding: 8px 4px;
}
.mobile-nav-rule {
    display: block;
    height: 1px; background: var(--rule-strong, rgba(20,16,12,0.18));
    margin: 24px 0 8px;
}
[data-theme="dark"] .mobile-nav { background: #1a1814; }

/* ──────────────────────────────────────────────────────────
   Mobile / touch refinements
   ────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    /* No burger, no overlay — mobile uses an inline horizontal nav-row */
    .nav-burger, .mobile-nav { display: none !important; }
    .nav { display: none !important; }     /* hide the in-masthead nav on mobile */

    .nav-utility { gap: 8px; }
    .nav-utility .cta { display: none; }
    .search-pill { padding: 0; width: 44px; height: 44px; justify-content: center; }
    .search-pill > span:not(.kbd) { display: none; }
    .search-pill::before {
        content: "⌕"; font-size: 18px; line-height: 1;
        color: var(--ink-2, rgba(20,16,12,0.62));
    }
    /* Keep the editorial pill shape on mobile — masthead padding already
       gives ≥44px vertical tap area via parent. */
    .theme-toggle {
        width: 40px; height: 22px;
        min-width: 0; min-height: 0;
    }
    /* Hide the clock on mobile — ticker needs the room */
    .ticker-time { display: none !important; }
    /* Show the short label on mobile, hide the long one */
    .ticker-label-full  { display: none; }
    .ticker-label-short { display: inline; }
    /* Override redundant in space-between layout — removed */
    .masthead-nav { padding: 14px 18px; grid-template-columns: 1fr auto; }

    /* Order in .site-top: masthead first, then ticker, then nav-mobile-row */
    .site-top .masthead         { order: 1; }
    .site-top .ticker           { order: 2; }
    .site-top .nav-mobile-row   { order: 3; }
}

/* Mobile inline nav row — horizontal-scroll fallback if items overflow */
.nav-mobile-row { display: none; }
@media (max-width: 720px) {
    .nav-mobile-row {
        display: flex;
        justify-content: space-between;       /* spread 5 items across width */
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px 12px;
        background: var(--paper);
        border-bottom: 1px solid var(--rule, rgba(20,16,12,0.10));
        scrollbar-width: none;
    }
    .nav-mobile-row::-webkit-scrollbar { display: none; }
    .nav-mobile-row a {
        flex: 0 0 auto;
        padding: 6px 6px;
        font-family: var(--font-sans);
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--ink-2);
        text-decoration: none;
        position: relative;
    }
    .nav-mobile-row a.active { color: var(--ink); }
    .nav-mobile-row a.active::after {
        content: "";
        position: absolute;
        left: 50%; bottom: 0;
        width: 4px; height: 4px;
        background: var(--accent);
        transform: translateX(-50%) rotate(45deg);
    }

    /* Hero typography breathing room */
    .hero { padding-left: 18px; padding-right: 18px; }
    .hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero-headline { font-size: clamp(40px, 13vw, 72px); line-height: 1.04; }
    .hero-side { max-width: 100%; }
    .hero-lead { font-size: 17px; line-height: 1.55; }

    /* Section padding */
    .section { padding-left: 18px; padding-right: 18px; }

    /* Projects tabs — horizontal scroll instead of cramped grid */
    .proj-tabs {
        display: flex; flex-wrap: nowrap; overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 8px; padding-bottom: 8px;
        margin-left: -18px; margin-right: -18px;
        padding-left: 18px; padding-right: 18px;
    }
    .proj-tab {
        flex: 0 0 78%; scroll-snap-align: start;
        min-height: 88px;
    }

    /* Map height — full viewport feel on phone */
    /* Map breaks out of section padding to sit edge-to-edge — centered
       visually on mobile, no perceived offset from asymmetric chrome */
    .map-stage {
        height: 60vh !important;
        min-height: 360px;
        margin-left: -18px;
        margin-right: -18px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    /* Travel hero — drop the sticky JP typewriter into flow */
    .travel-hero { grid-template-columns: 1fr !important; }
    .jp-typewriter, .jp-vertical {
        position: static !important;
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
        font-size: 18px !important;
        margin: 24px 0;
    }

    /* Post detail — collapse rail */
    .post-detail { grid-template-columns: 1fr !important; }
    .post-rail { display: none; }

    /* Tickers — let them breathe */
    .ticker { height: 30px; font-size: 11px; }
    .ticker-label {
        padding: 0 10px;
        font-size: 9px;
        letter-spacing: 0.18em;
        gap: 6px;
    }
    /* On mobile: ticker sits BELOW the masthead-nav (visual order swap) */
    .site-top { display: flex; flex-direction: column; }
    .site-top .ticker { order: 2; }
    .site-top .masthead { order: 1; }
    /* Faster scroll on mobile so it's clearly moving */
    .ticker-track-inner { animation-duration: 120s; }
    .ticker-item { gap: 6px; padding: 0 14px; }

    /* Forms */
    input, textarea, select, button { font-size: 16px; } /* prevents iOS zoom */
}

/* ──────────────────────────────────────────────────────────
   Touch-device: disable hover-only chrome (crosshair etc.)
   ────────────────────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor, .crosshair { display: none !important; }
    body { cursor: auto !important; }
}

/* ──────────────────────────────────────────────────────────
   Contact captcha — small editorial math check
   ────────────────────────────────────────────────────────── */
.contact-captcha .contact-captcha-row {
    display: flex; align-items: center; gap: 12px;
    margin-top: 6px;
}
.contact-captcha-img {
    height: 40px; width: 120px;
    border: 1px solid var(--rule-strong, rgba(20,16,12,0.18));
    border-radius: 4px;
    background: var(--ink, #1a1410);
    image-rendering: -webkit-optimize-contrast;
    flex-shrink: 0;
}
.contact-captcha input[type="number"] {
    width: 100px;
    flex-shrink: 0;
    -moz-appearance: textfield;
}
.contact-captcha input[type="number"]::-webkit-outer-spin-button,
.contact-captcha input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
