/* =========================================================================
   Farras Naim — interactive personal site
   Dark-first. Motion is opt-out via prefers-reduced-motion (see end of file).
   ========================================================================= */

/* ---------- TOKENS ---------------------------------------------------- */
:root {
    color-scheme: dark;

    --bg:            #08080b;
    --bg-deep:       #050507;
    --surface:       rgba(255, 255, 255, 0.028);
    --surface-hi:    rgba(255, 255, 255, 0.055);
    --line:          rgba(255, 255, 255, 0.085);
    --line-hi:       rgba(255, 255, 255, 0.16);

    --text:          #ededf0;
    --muted:         #8b8b96;
    --faint:         #7c7c86;   /* 4.84:1 on --bg; was #5c5c66 at 3.03 */

    --accent:        #f04444;
    /* solid fills that carry white text need to be darker than --accent:
       #fff on #f04444 is 3.7:1, on #d32020 it's 5.9:1 (AA) */
    --accent-solid:  #d32020;
    /* mid stop of the hero gradient; needs a darker light-theme override */
    --accent-2:      #ff8a5c;
    --accent-soft:   rgba(240, 68, 68, 0.14);
    --accent-line:   rgba(240, 68, 68, 0.34);
    --accent-glow:   rgba(240, 68, 68, 0.30);

    /* Twitch brand purple. It's a solid fill carrying white text, so the
       contrast that matters (4.6:1, AA) is against the fill rather than the
       page — no light-theme override needed. */
    --twitch:        #9146ff;
    --twitch-glow:   rgba(145, 70, 255, 0.34);

    --shadow-pop:    rgba(0, 0, 0, 0.6);
    --vignette:      rgba(0, 0, 0, 0.4);

    --campus:        #d1893a;
    --campus-soft:   rgba(209, 137, 58, 0.14);
    --campus-line:   rgba(209, 137, 58, 0.34);

    /* land dots need far more contrast than a hairline border */
    --map-dot:       rgba(214, 216, 232, 0.40);

    /* type scale */
    --fs-hero:  clamp(2.6rem, 1.6rem + 4.4vw, 4.6rem);
    --fs-h2:    clamp(1.6rem, 1.25rem + 1.5vw, 2.35rem);
    --fs-h3:    clamp(1.02rem, 0.96rem + 0.3vw, 1.18rem);
    --fs-body:  0.9375rem;
    --fs-sm:    0.875rem;
    --fs-xs:    0.78rem;
    --fs-mono:  0.72rem;

    --shell:    min(100% - 2.5rem, 1180px);
    --radius:   14px;
    --ease:     cubic-bezier(0.22, 1, 0.36, 1);
    --ease-io:  cubic-bezier(0.65, 0, 0.35, 1);

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg:            #fbfbfc;
    --bg-deep:       #f2f2f5;
    --surface:       rgba(10, 10, 20, 0.022);
    --surface-hi:    rgba(10, 10, 20, 0.05);
    --line:          rgba(10, 10, 20, 0.10);
    --line-hi:       rgba(10, 10, 20, 0.2);
    --text:          #16161a;
    --muted:         #63636e;
    --faint:         #6e6e79;   /* 4.87:1 on --bg; was #8e8e99 at 3.13 */
    --accent:        #d32020;
    --accent-2:      #c2410c;   /* 5.0:1 on #fbfbfc; #ff8a5c was 2.2:1 */
    --accent-soft:   rgba(211, 32, 32, 0.09);
    --accent-line:   rgba(211, 32, 32, 0.3);
    --accent-glow:   rgba(211, 32, 32, 0.18);
    --shadow-pop:    rgba(20, 20, 30, 0.22);
    --vignette:      rgba(0, 0, 0, 0.15);
    --campus:        #9a5f18;
    --campus-soft:   rgba(154, 95, 24, 0.1);
    --campus-line:   rgba(154, 95, 24, 0.3);
    --map-dot:       rgba(22, 22, 34, 0.34);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { max-width: 100%; display: block; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}
/* sections receive programmatic focus after a palette jump; they're focus
   targets, not controls, so don't ring the whole section */
[tabindex="-1"]:focus-visible { outline: none; }

.shell { width: var(--shell); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ATMOSPHERE ------------------------------------------------ */
/* Fixed, pointer-events-none layers that sit behind everything. */
.atmos { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

/* No blur filter: the radial gradient's own falloff provides the softness,
   without rasterizing an 80px Gaussian over ~900px layers at first paint. */
.atmos__glow {
    position: absolute;
    width: 70vw; height: 70vw;
    max-width: 900px; max-height: 900px;
    border-radius: 50%;
    opacity: 0.5;
}
.atmos__glow--a { top: -22vw; left: -12vw; background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%); }
.atmos__glow--b { bottom: -28vw; right: -14vw; background: radial-gradient(circle, rgba(90, 60, 200, 0.10) 0%, transparent 60%); }

.atmos__grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, var(--line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line) 1px, transparent 1px);
    background-size: 68px 68px;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

/* Cursor spotlight — desktop pointers only, wired up in JS */
.spotlight {
    position: fixed;
    width: 460px; height: 460px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
    will-change: transform;
}
body.has-pointer .spotlight { opacity: 1; }

/* ---------- NAV ------------------------------------------------------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    width: var(--shell);
    margin-inline: auto;
    padding: 0.7rem 0.9rem;
    margin-top: 0.9rem;
    border: 1px solid transparent;
    border-radius: 100px;
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.nav.is-stuck {
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    border-color: var(--line);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.nav__brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 650; letter-spacing: -0.015em; }
.nav__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent-glow);
    animation: pulse 2.8s var(--ease-io) infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
    50%      { box-shadow: 0 0 0 7px transparent; }
}

.nav__links { display: flex; gap: 0.15rem; }
.nav__link {
    position: relative;
    padding: 0.4rem 0.75rem;
    border-radius: 100px;
    font-size: var(--fs-sm);
    color: var(--muted);
    transition: color 0.25s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--text); }
.nav__link.is-active::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: 100px;
    background: var(--surface-hi);
    z-index: -1;
}

.nav__tools { display: flex; align-items: center; gap: 0.4rem; }

.icon-btn {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-hi); transform: translateY(-2px); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* shown only under 720px, where the nav links are gone and the palette
   becomes the site menu — an unlabeled magnifier reads as search, not menu */
.icon-btn__label { display: none; }
.icon-btn .moon { display: none; }
html[data-theme="light"] .icon-btn .moon { display: block; }
html[data-theme="light"] .icon-btn .sun { display: none; }

/* Language switch. It's an <a>, not a <button>, so the translated page keeps
   its own shareable URL and the control still works with scripting off.
   The glyph is an emoji rather than an SVG, so the .icon-btn svg sizing above
   doesn't reach it — hence its own rule. Emoji fonts are listed first so
   platforms that render regional-indicator pairs as flags do; Windows draws
   them as a lettered tile instead, which still reads as a language marker. */
.icon-btn--lang { text-decoration: none; }
/* desktop shows a two-letter code, mobile the flag — the code reads
   cleanly next to the other icons at full size, while the flag stays
   legible once the toolbar tightens up */
.lang-code {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
}
.lang-flag {
    display: none;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", var(--font-mono);
    font-size: 15px;
    line-height: 1;
    letter-spacing: 0;
}

/* ---------- SECTION CHROME -------------------------------------------- */
section { position: relative; z-index: 2; }

.sec { padding: clamp(3rem, 4.8vw, 4.6rem) 0; }

.sec__head { margin-bottom: clamp(1.5rem, 2.6vw, 2.3rem); max-width: 62ch; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 1rem;
}
.eyebrow::before {
    content: ''; width: 22px; height: 1px; background: var(--accent); opacity: 0.7;
}

.sec__title {
    font-size: var(--fs-h2);
    font-weight: 660;
    letter-spacing: -0.032em;
    line-height: 1.12;
}
.sec__lede { margin-top: 0.9rem; color: var(--muted); max-width: 54ch; }

/* ---------- HERO ------------------------------------------------------ */
.hero {
    /* content-driven, not a full viewport: the first section's heading
       should peek in below the fold instead of a half-empty screen */
    padding: 7.5rem 0 3rem;
    position: relative; z-index: 2;
}

.hero__inner { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
/* wide screens: the copy used to sit in the left half with nothing on the
   right. The avatar moves across, larger, and balances the headline. */
@media (min-width: 1100px) {
    .hero__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4rem; }
    .hero__avatar { order: 2; width: clamp(220px, 20vw, 300px); margin-right: clamp(0px, 3vw, 2.5rem); }
    .hero { padding: 8.5rem 0 3.5rem; }
}

.hero__avatar {
    position: relative;
    width: clamp(132px, 14vw, 180px);
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line-hi);
}
.hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero__avatar::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    box-shadow: inset 0 0 24px var(--vignette);
}

.hero__title {
    font-size: var(--fs-hero);
    font-weight: 680;
    letter-spacing: -0.045em;
    line-height: 0.98;
}
.hero__title em {
    font-style: normal;
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* rotating role line */
.hero__role {
    display: flex; align-items: baseline; gap: 0.55rem;
    margin-top: 1.4rem;
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    color: var(--muted);
    letter-spacing: -0.015em;
}
.hero__roleWord {
    color: var(--text);
    font-weight: 560;
    position: relative;
}
.hero__roleWord::after {
    content: '';
    display: inline-block;
    width: 2px; height: 1.05em;
    margin-left: 3px;
    background: var(--accent);
    vertical-align: -0.16em;
    animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.hero__bio { margin-top: 1.7rem; max-width: 46ch; color: var(--muted); }

.hero__facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.chip {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.42rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: var(--fs-xs);
    color: var(--muted);
    background: var(--surface);
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.chip:hover { transform: translateY(-2px); border-color: var(--accent-line); color: var(--text); }
.chip svg {
    width: 13px; height: 13px; flex-shrink: 0;
    fill: none; stroke: var(--accent);
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.hero__cue {
    margin-top: clamp(1.9rem, 4vw, 3rem);
    display: inline-flex; align-items: center; gap: 0.7rem;
    font-size: var(--fs-xs); color: var(--faint);
    font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.hero__cueIcon {
    width: 13px; height: 13px; margin-left: -0.28rem;
    fill: none; stroke: currentColor;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.hero__cueLine {
    width: 46px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent);
    position: relative; overflow: hidden;
}
.hero__cueLine::after {
    content: ''; position: absolute; inset: 0;
    background: var(--accent);
    animation: sweep 2.4s var(--ease-io) infinite;
}
@keyframes sweep { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* ---------- TIMELINE -------------------------------------------------- */
.tl__filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 2.2rem; }
.filter {
    padding: 0.42rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: var(--fs-xs);
    color: var(--muted);
    transition: all 0.28s var(--ease);
}
.filter:hover { border-color: var(--line-hi); color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter__n { margin-left: 0.45rem; font-family: var(--font-mono); font-size: 0.66rem; opacity: 0.7; }

.tl { position: relative; padding-left: 2.1rem; }
/* the spine */
.tl::before {
    content: '';
    position: absolute; left: 7px; top: 6px; bottom: 6px;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--line-hi) 8%, var(--line-hi) 92%, transparent);
}
/* progress overlay driven by scroll */
.tl__progress {
    position: absolute; left: 7px; top: 6px;
    width: 1px; height: 0;
    background: linear-gradient(180deg, var(--accent), var(--campus));
    transition: height 0.15s linear;
}

.tl-item { position: relative; }
.tl-item[hidden] { display: none; }

.tl-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.4rem 1rem;
    width: 100%;
    text-align: left;
    padding: 1.05rem 1.1rem 1.05rem 0;
    border-bottom: 1px solid var(--line);
    transition: padding-left 0.35s var(--ease);
}
.tl-item:last-child .tl-head { border-bottom: 0; }
.tl-head:hover { padding-left: 0.6rem; }

.tl-node {
    position: absolute;
    left: -2.1rem; top: 1.55rem;
    width: 15px; height: 15px;
    display: grid; place-items: center;
    transform: translateX(0.5px);
}
.tl-node::before {
    content: '';
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--bg);
    border: 1.5px solid var(--line-hi);
    transition: all 0.35s var(--ease);
}
.tl-item[data-type="work"] .tl-head:hover ~ .tl-node::before,
.tl-item.is-open[data-type="work"] .tl-node::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-item[data-type="campus"] .tl-head:hover ~ .tl-node::before,
.tl-item[data-type="edu"] .tl-head:hover ~ .tl-node::before,
.tl-item.is-open[data-type="campus"] .tl-node::before,
.tl-item.is-open[data-type="edu"] .tl-node::before { border-color: var(--campus); background: var(--campus); box-shadow: 0 0 0 4px var(--campus-soft); }

.tl-when {
    grid-column: 1;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 0.28rem;
}
.tl-item[data-type="work"] .tl-when { color: var(--accent); }
.tl-item[data-type="campus"] .tl-when,
.tl-item[data-type="edu"] .tl-when { color: var(--campus); }

.tl-what { grid-column: 1; font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.tl-where { grid-column: 1; font-size: var(--fs-sm); color: var(--muted); margin-top: 0.15rem; }

.tl-plus {
    grid-column: 2; grid-row: 1 / span 3;
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    transition: all 0.35s var(--ease);
    flex-shrink: 0;
}
.tl-head:hover .tl-plus { border-color: var(--line-hi); color: var(--text); }
.tl-plus svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.tl-plus .bar { transition: transform 0.4s var(--ease), opacity 0.3s var(--ease); transform-origin: center; }
.tl-item.is-open .tl-plus { transform: rotate(180deg); border-color: var(--accent-line); color: var(--accent); }
.tl-item.is-open .tl-plus .bar--v { opacity: 0; transform: scaleY(0); }

/* grid-template-rows 0fr -> 1fr gives a real auto-height transition.
   The collapsed state is scoped to .js: without scripting there is no way
   to expand, so everything renders open and readable instead. */
.tl-body {
    display: grid;
    transition: grid-template-rows 0.48s var(--ease);
}
.js .tl-body { grid-template-rows: 0fr; }
.tl-item.is-open .tl-body { grid-template-rows: 1fr; }
/* visibility keeps clipped-closed content out of the accessibility tree so
   aria-expanded="false" is true for screen readers; it transitions discretely,
   staying visible through the closing animation and flipping instantly on open */
.tl-body__inner { overflow: hidden; }
.js .tl-body__inner { visibility: hidden; transition: visibility 0.48s; }
.tl-item.is-open .tl-body__inner { visibility: visible; transition: none; }
.tl-body p {
    color: var(--muted);
    padding: 1.1rem 0 0.4rem 0;
    max-width: 76ch;
}
.tl-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.9rem 0 1.5rem; list-style: none; }

/* On wide screens an entry with tags splits into prose + tags so the right
   half of the row isn't left empty. Entries without tags just run wider. */
@media (min-width: 900px) {
    .tl-body__inner:has(.tl-tags) {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
        gap: 0 2.6rem;
        align-items: start;
    }
    .tl-body__inner:has(.tl-tags) p { max-width: none; }
    .tl-body__inner:has(.tl-tags) .tl-tags { padding-top: 1.15rem; align-content: start; }
}
.tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--faint);
    background: var(--surface);
}

/* ---------- STORY (the work) ------------------------------------------ */
.story { max-width: 60ch; display: grid; gap: clamp(1.5rem, 3vw, 2.2rem); }
.story__lead { color: var(--text); line-height: 1.8; }

.story__aside { margin-top: 0.7rem; }
.story__toggle {
    display: inline-flex; align-items: center; gap: 0.45rem;
    min-height: 32px; padding: 0.3rem 0.8rem;
    border: 1px solid var(--accent-line); border-radius: 100px;
    background: var(--accent-soft);
    font-family: var(--font-mono); font-size: var(--fs-xs);
    letter-spacing: 0.03em; color: var(--accent);
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.story__toggle:hover { color: var(--text); border-color: var(--line-hi); background: var(--surface-hi); }
.story__aside.is-open .story__toggle { background: transparent; border-color: var(--line); color: var(--muted); }
.story__toggle svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; transition: transform 0.4s var(--ease); }
.story__aside.is-open .story__toggle svg { transform: rotate(45deg); }

/* same 0fr -> 1fr auto-height reveal as the timeline/cards; .js-scoped so the
   asides render open when scripting is off */
.story__more { display: grid; transition: grid-template-rows 0.45s var(--ease); }
.js .story__more { grid-template-rows: 0fr; }
.story__aside.is-open .story__more { grid-template-rows: 1fr; }
.story__more > div { overflow: hidden; }
.js .story__more > div { visibility: hidden; transition: visibility 0.45s; }
.story__aside.is-open .story__more > div { visibility: visible; transition: none; }
.story__more p {
    color: var(--muted); font-size: var(--fs-sm);
    margin-top: 0.75rem; padding: 0.1rem 0 0.1rem 1rem;
    border-left: 2px solid var(--accent-line);
}

/* ---------- BATTLESTATION --------------------------------------------- */
.rig { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }

.rig__stage {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(ellipse 60% 50% at 50% 22%, var(--accent-soft), transparent 70%),
        var(--surface);
    overflow: hidden;
    aspect-ratio: 16 / 10;
}
.rig__svg { width: 100%; height: 100%; display: block; }

.rig-part { cursor: pointer; }
.rig-part .body { transition: opacity 0.35s var(--ease), transform 0.45s var(--ease); transform-box: fill-box; transform-origin: center; }
.rig-part:hover .body, .rig-part.is-active .body { opacity: 1; }
.rig-part .body { opacity: 0.62; }
.rig-part.is-active .body { transform: translateY(-3px); }

/* a transparent disc under each dot: the painted dot is 10 units across,
   a 4px tap target on a phone. r=56 gives ~42px there; the closest pair of
   hotspots sits 76 units apart, so no disc covers a neighbour's dot.
   fill: transparent (not none) keeps it hit-testable. */
.hot-hit { fill: transparent; stroke: none; }
.hot {
    r: 5;
    fill: var(--accent);
    stroke: var(--bg);
    stroke-width: 2;
    cursor: pointer;
    transition: r 0.3s var(--ease);
}
.hot-ring { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.rig-part:not(.is-active) .hot-ring { animation: hotpulse 2.6s var(--ease-io) infinite; }
/* scale instead of the CSS r property — r isn't animatable everywhere, and
   the ring already has transform-box: fill-box. stroke-width shrinks in step
   so the painted ring stays a hairline instead of thickening as it grows. */
@keyframes hotpulse {
    0%   { opacity: 0.65; transform: scale(1); stroke-width: 1.2; }
    70%  { opacity: 0;    transform: scale(3); stroke-width: 0.4; }
    100% { opacity: 0;    transform: scale(3); stroke-width: 0.4; }
}
.rig-part:hover .hot, .rig-part.is-active .hot { r: 7; }

.rig__panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: clamp(1.2rem, 2.2vw, 1.8rem);
    min-height: 300px;
}
.rig__hint { color: var(--faint); font-size: var(--fs-sm); }
.rig__card { position: absolute; inset: clamp(1.2rem, 2.2vw, 1.8rem); opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), transform 0.45s var(--ease); transform: translateY(10px); }
.rig__card.is-shown { opacity: 1; visibility: visible; transform: none; position: static; }
.rig__kicker { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.rig__name { font-size: var(--fs-h3); font-weight: 620; letter-spacing: -0.02em; margin: 0.5rem 0 0.15rem; }
.rig__spec { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--faint); }
.rig__why { margin-top: 1rem; color: var(--muted); font-size: var(--fs-sm); }
.rig__why strong { color: var(--text); font-weight: 560; }

.rig__list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.6rem; }
.rig__listBtn {
    font-size: var(--fs-xs); color: var(--muted);
    padding: 0.34rem 0.7rem;
    border: 1px solid var(--line); border-radius: 100px;
    transition: all 0.25s var(--ease);
}
.rig__listBtn:hover { color: var(--text); border-color: var(--line-hi); }
.rig__listBtn.is-active { background: var(--accent-solid); border-color: var(--accent-solid); color: #fff; }

/* ---------- TRAVEL ---------------------------------------------------- */
.trip { display: grid; grid-template-columns: 1fr; gap: 1.5rem; position: relative; }

.trip__mapWrap {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    aspect-ratio: 2 / 1;
}
.trip__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.pin {
    position: absolute;
    width: 26px; height: 26px;
    margin: -13px 0 0 -13px;
    display: grid; place-items: center;
    border-radius: 50%;
    z-index: 2;
}
.pin__dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--bg), 0 0 12px var(--accent-glow);
    transition: transform 0.35s var(--ease);
}
.pin::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0;
    animation: ping 3s var(--ease-io) infinite;
}
@keyframes ping {
    0%   { opacity: 0.6; transform: scale(0.35); }
    70%  { opacity: 0;   transform: scale(1); }
    100% { opacity: 0;   transform: scale(1); }
}
.pin:hover .pin__dot, .pin.is-active .pin__dot { transform: scale(1.55); }
/* pins stack in DOM order, so a later neighbour (Ho Chi Minh City is added
   last) paints over an earlier pin's hover label — lift the engaged pin */
.pin:hover, .pin:focus-visible, .pin.is-active { z-index: 3; }
/* home pin reads as "not a trip" — tracks the text colour so it stays
   visible in both themes rather than being hard-coded white */
.pin.is-home .pin__dot {
    background: var(--text);
    box-shadow: 0 0 0 2px var(--bg), 0 0 14px color-mix(in srgb, var(--text) 55%, transparent);
}
.pin.is-home::after { border-color: var(--text); }

.pin__label {
    position: absolute; top: -8px; left: 50%;
    transform: translate(-50%, -100%) translateY(4px);
    padding: 0.2rem 0.5rem;
    background: var(--bg-deep);
    border: 1px solid var(--line-hi);
    border-radius: 5px;
    font-size: 0.68rem; white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.pin:hover .pin__label, .pin:focus-visible .pin__label { opacity: 1; transform: translate(-50%, -100%) translateY(0); }

.trip__meta { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 0.4rem; }
.trip__hint {
    margin-top: 0.7rem;
    font-family: var(--font-mono); font-size: var(--fs-mono);
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.stat__n { font-size: 1.6rem; font-weight: 640; letter-spacing: -0.03em; }
.stat__l { font-size: var(--fs-xs); color: var(--faint); font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* journey card — no photos; the itinerary is the content */
.trip__card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: clamp(1.3rem, 2.6vw, 2.1rem);
    display: grid;
    gap: clamp(1.2rem, 2.4vw, 2rem);
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.trip__card.is-shown { opacity: 1; transform: none; }
.trip__close { display: none; }

/* Wide screens: the card floats over the map beside the pin that opened it
   (JS picks the emptier side), so picking a trip never means scrolling
   down to read it. Below 940px the map is too small to cover, so the card
   stays in flow under it. */
@media (min-width: 940px) {
    .trip__card {
        position: absolute; z-index: 5;
        width: min(390px, 40%);
        grid-template-columns: 1fr;
        gap: 1.1rem;
        padding: 1.4rem 1.5rem 1.5rem;
        background: color-mix(in srgb, var(--bg) 92%, transparent);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-color: var(--line-hi);
        box-shadow: 0 20px 60px var(--shadow-pop);
        overflow-y: auto;
        visibility: hidden;
        transform: translateY(8px) scale(0.98);
        transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0s 0.3s;
    }
    .trip__card.is-shown { visibility: visible; transition-delay: 0s; }
    .trip__note { max-width: none; }
    .trip__card .trip__place { font-size: 1.7rem; }
    .trip__close {
        display: inline-flex; align-items: center; justify-content: center;
        position: absolute; top: 0.8rem; right: 0.8rem;
        width: 30px; height: 30px;
        border: 1px solid var(--line); border-radius: 50%;
        color: var(--faint); font-size: 0.8rem; line-height: 1;
        background: var(--surface);
        transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
    }
    .trip__close:hover { color: var(--text); border-color: var(--line-hi); }
}

.trip__when {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.trip__place { font-size: var(--fs-h2); font-weight: 640; letter-spacing: -0.03em; line-height: 1.1; }
.trip__place span { color: var(--muted); font-weight: 400; font-size: 0.5em; letter-spacing: -0.01em; display: block; margin-top: 0.35rem; }
.trip__note { color: var(--muted); font-size: var(--fs-sm); margin-top: 0.9rem; max-width: 42ch; }

/* the route: a vertical line threaded through each leg */
.route { list-style: none; position: relative; padding-left: 1.4rem; }
.route::before {
    content: '';
    position: absolute; left: 3px; top: 0.9rem; bottom: 0.9rem;
    width: 1px;
    background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent));
}
.route__leg {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.1rem 0.9rem;
    padding: 0.75rem 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
}
.route__leg + .route__leg { border-top: 1px solid var(--line); }
.route__node {
    position: absolute;
    left: -1.4rem; top: 1.05rem;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--bg);
    border: 1.5px solid var(--accent);
}
.route__d { grid-column: 1; color: var(--faint); }
.route__t { grid-column: 2; grid-row: 1; color: var(--faint); text-align: right; }
.route__r { grid-column: 1 / -1; color: var(--text); letter-spacing: 0.06em; font-size: 0.84rem; }
.route__f { grid-column: 1 / -1; color: var(--muted); opacity: 0.8; }
.route__none { color: var(--faint); font-size: var(--fs-sm); font-style: italic; }

/* ---------- OFF HOURS ------------------------------------------------- */
/* Capped at three rather than auto-fit: on a wide screen auto-fit went to four
   columns, which stranded the fifth card alone on its own row. Three also gives
   the copy a more comfortable measure. */
.hours { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
@media (max-width: 900px) { .hours { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .hours { grid-template-columns: 1fr; } }

.card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1.4rem;
    text-align: left;
    overflow: hidden;
    transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s var(--ease);
}
.card::before {
    /* pointer-tracked sheen, coordinates set from JS */
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 65%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
}
.card { cursor: pointer; }
.card.is-open { cursor: default; }
.card:hover { transform: translateY(-4px); border-color: var(--line-hi); }
.card:hover::before { opacity: 1; }

/* the actual toggle control; the surrounding div carries the card chrome */
.card__head { display: block; width: 100%; text-align: left; }

.card__icon { font-size: 1.35rem; line-height: 1; margin-bottom: 0.9rem; display: block; }
.card__title { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; }
.card__desc { color: var(--muted); font-size: var(--fs-sm); margin-top: 0.4rem; }
.card__more {
    display: grid;
    transition: grid-template-rows 0.45s var(--ease);
}
.js .card__more { grid-template-rows: 0fr; }
.card.is-open .card__more { grid-template-rows: 1fr; }
/* same discrete-visibility trick as .tl-body__inner, same .js scoping */
.card__more > div { overflow: hidden; }
.js .card__more > div { visibility: hidden; transition: visibility 0.45s; }
.card.is-open .card__more > div { visibility: visible; transition: none; }
.card__more p { color: var(--faint); font-size: var(--fs-sm); padding-top: 0.85rem; }
.card__cue { margin-top: 0.9rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.card:hover .card__cue { color: var(--accent); }
.card__cue svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2.2; transition: transform 0.4s var(--ease); }
.card.is-open .card__cue svg { transform: rotate(45deg); }

/* ---------- POSTMORTEM DIALOG ----------------------------------------- */
/* Opened from the tinkering card. Same native <dialog> contract as the
   palette: Tab containment, inert background, Escape, focus restore. */
.pm__open {
    margin-top: 1rem;
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.42rem 0.9rem;
    border: 1px solid var(--line); border-radius: 100px;
    font-family: var(--font-mono); font-size: 0.66rem;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.pm__open:hover { color: var(--text); border-color: var(--line-hi); }
.pm__open svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.2; }

.pm {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    max-width: none; max-height: none;
    margin: 0; border: 0; padding: clamp(0.8rem, 4vh, 2.6rem) 1rem;
    background: transparent;
    justify-items: center; align-items: start;
}
.pm[open] { display: grid; }
/* engines without <dialog> have no UA rule for the closed state */
.pm:not([open]) { display: none; }
.pm::backdrop {
    background: rgba(5, 5, 7, 0.72);
    background: color-mix(in srgb, var(--bg-deep, #050507) 72%, transparent);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}
.pm__box {
    position: relative;
    width: min(100%, 730px);
    max-height: 100%;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.4rem, 3.4vw, 2.4rem);
    color: var(--text);
    box-shadow: 0 30px 80px -20px var(--shadow-pop);
}
.pm__close {
    position: absolute; top: 0.9rem; right: 0.9rem;
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--line); color: var(--faint);
    display: grid; place-items: center; font-size: 0.8rem; line-height: 1;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.pm__close:hover { color: var(--text); border-color: var(--line-hi); }
.pm__title { font-size: var(--fs-h2); font-weight: 660; letter-spacing: -0.03em; line-height: 1.12; margin: 0.5rem 0 0.9rem; }
.pm__lede { color: var(--muted); font-size: var(--fs-sm); max-width: 56ch; }

.pm__stats { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1.6rem 0 0.4rem; }

.pm__inc { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.2rem; }
.pm__incT { font-weight: 640; letter-spacing: -0.015em; }
.pm__row { display: grid; grid-template-columns: 8.6rem 1fr; gap: 0.35rem 1.1rem; margin-top: 0.75rem; font-size: var(--fs-sm); }
.pm__k {
    font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--accent); padding-top: 0.28rem;
}
.pm__v { color: var(--muted); }

.pm__note {
    margin-top: 1.9rem; padding: 1.1rem 1.25rem;
    border: 1px solid var(--line); border-radius: 10px;
    background: var(--surface);
    font-size: var(--fs-sm); color: var(--muted);
}
.pm__note b { color: var(--text); font-weight: 620; }
.pm__repo {
    display: inline-block; margin-top: 1.3rem;
    font-family: var(--font-mono); font-size: 0.66rem;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
    border-bottom: 1px solid var(--accent-line); padding-bottom: 2px;
}
.pm__repo:hover { border-color: var(--accent); }

/* Without scripting (or without <dialog>) the modal can never open, so the
   content renders inline at the end of the page instead of vanishing. */
html:not(.js) .pm, html:not(.js) .pm:not([open]),
.pm[data-inline], .pm[data-inline]:not([open]) {
    display: block; position: static;
    width: auto; height: auto; max-height: none;
    padding: 0; margin: 2rem auto; border: 0;
}
html:not(.js) .pm__open, .pm[data-inline] .pm__close { display: none; }
html:not(.js) .pm__box, .pm[data-inline] .pm__box {
    width: var(--shell); max-height: none; overflow: visible; box-shadow: none;
}

/* ---------- CONNECT --------------------------------------------------- */
.connect { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; }

.live {
    border: 1px solid var(--accent-line);
    border-radius: var(--radius);
    background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface);
    padding: clamp(1.4rem, 2.6vw, 2rem);
}
.live__badge {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-family: var(--font-mono); font-size: var(--fs-mono);
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
    margin-bottom: 0.9rem;
}
.live__badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
.live__ttl { font-size: var(--fs-h3); font-weight: 620; letter-spacing: -0.02em; }
.live__desc { color: var(--muted); font-size: var(--fs-sm); margin: 0.5rem 0 1.3rem; }
.live__btns { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.62rem 1.05rem;
    border-radius: 100px;
    font-size: var(--fs-sm); font-weight: 560;
    border: 1px solid var(--line);
    transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--accent-solid); border-color: var(--accent-solid); color: #fff; }
.btn--solid:hover { box-shadow: 0 8px 26px var(--accent-glow); }
/* platform-coloured rather than site-accent — the button reads as Twitch */
.btn--twitch { background: var(--twitch); border-color: var(--twitch); color: #fff; }
.btn--twitch:hover { box-shadow: 0 8px 26px var(--twitch-glow); }
.btn--ghost:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.btn svg {
    width: 16px; height: 16px; flex-shrink: 0;
    fill: none; stroke: currentColor;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.links { display: grid; gap: 0.5rem; }
.linkRow {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 0.9rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    transition: transform 0.32s var(--ease), border-color 0.32s var(--ease), background 0.32s var(--ease);
}
.linkRow:hover { transform: translateX(5px); border-color: var(--accent-line); background: var(--surface-hi); }
.linkRow svg.brand { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); flex-shrink: 0; }
.linkRow__t { font-size: var(--fs-sm); font-weight: 540; }
.linkRow__h { font-size: var(--fs-xs); color: var(--faint); }
.linkRow__go { margin-left: auto; color: var(--faint); transition: transform 0.32s var(--ease), color 0.32s var(--ease); }
.linkRow:hover .linkRow__go { transform: translate(3px, -3px); color: var(--accent); }
.linkRow__go svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ---------- COMMAND PALETTE ------------------------------------------- */
/* A native <dialog> in the top layer. The dialog itself is stretched into a
   full-viewport, transparent positioning surface (so outside-clicks hit it),
   and the scrim lives on ::backdrop. */
.cmdk {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    max-width: none; max-height: none;
    margin: 0; border: 0; padding: clamp(4rem, 14vh, 9rem) 1rem 1rem;
    background: transparent;
    justify-items: center; align-items: start;
}
.cmdk[open] { display: grid; }
/* engines without <dialog> have no UA rule hiding the closed state; without
   this the palette would render permanently there as a stray overlay */
.cmdk:not([open]) { display: none; }
.cmdk::backdrop {
    background: rgba(5, 5, 7, 0.62); /* engines without color-mix() */
    /* the var() fallback value keeps this declaration valid in engines whose
       ::backdrop can't see custom properties (else it computes to transparent) */
    background: color-mix(in srgb, var(--bg-deep, #050507) 62%, transparent);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.cmdk__box {
    width: min(100%, 560px);
    border: 1px solid var(--line-hi);
    border-radius: 15px;
    background: var(--bg);
    box-shadow: 0 24px 70px var(--shadow-pop);
    overflow: hidden;
}
.cmdk[open] .cmdk__box { animation: cmdkIn 0.34s var(--ease); }
@keyframes cmdkIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
}

.cmdk__input {
    width: 100%;
    padding: 1.05rem 1.2rem;
    border: 0; border-bottom: 1px solid var(--line);
    background: transparent; color: var(--text);
    font-size: 1rem; outline: none;
}
.cmdk__input::placeholder { color: var(--faint); }

.cmdk__list { max-height: 46vh; overflow-y: auto; padding: 0.45rem; }
.cmdk__item {
    display: flex; align-items: center; gap: 0.8rem;
    width: 100%; text-align: left;
    padding: 0.68rem 0.8rem;
    border-radius: 9px;
    color: var(--muted);
    font-size: var(--fs-sm);
}
.cmdk__item[aria-selected="true"] { background: var(--surface-hi); color: var(--text); }
.cmdk__item i { font-style: normal; width: 18px; text-align: center; opacity: 0.75; }
.cmdk__item small { margin-left: auto; font-family: var(--font-mono); font-size: 0.64rem; color: var(--faint); }
.cmdk__empty { padding: 1.6rem; text-align: center; color: var(--faint); font-size: var(--fs-sm); }

/* ---------- FOOTER ---------------------------------------------------- */
.foot {
    border-top: 1px solid var(--line);
    padding: 2.6rem 0 3.2rem;
    display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
    font-size: var(--fs-xs); color: var(--faint);
    position: relative; z-index: 2;
}
.foot__hint { display: inline-flex; align-items: center; gap: 0.42rem; }
/* sits on its own line under the credit; italic marks it as a formal
   statement rather than part of the page voice */
.foot__note {
    flex-basis: 100%;
    margin-top: 0.35rem;
    font-style: italic;
    opacity: 0.75;
}
.foot__hint svg {
    width: 13px; height: 13px;
    fill: none; stroke: currentColor;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- REVEAL ----------------------------------------------------
   Scoped to .js (set by the inline head script) so that with scripting
   off nothing is ever left hidden. */
.js .rv { opacity: 0; transform: translateY(18px); }
.js .rv.is-in { animation: rise 0.75s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- RESPONSIVE ------------------------------------------------ */
@media (max-width: 940px) {
    .rig { grid-template-columns: 1fr; }
    .connect { grid-template-columns: 1fr; }
    .trip__card { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    :root { --shell: min(100% - 1.6rem, 1180px); }
    .nav { padding: 0.55rem 0.6rem; }
    .nav__links { display: none; }
    #cmdkOpen {
        width: auto;
        display: inline-flex; align-items: center; gap: 0.4rem;
        padding: 0 0.8rem;
        border-radius: 100px;
    }
    .icon-btn__label { display: inline; font-size: var(--fs-xs); }
    /* the hint explains an unlabelled magnifier; at this width the button
       carries a visible "menu" label already, so it explains nothing */
    .foot__hint { display: none; }
    .lang-code { display: none; }
    .lang-flag { display: block; }
    /* 8.6rem of label against ~180px of value is not a two-column layout */
    .pm__row { grid-template-columns: 1fr; gap: 0.1rem; }
    .pm__k { padding-top: 0; }
    .pm__stats { gap: 1.1rem 1.4rem; }
    .hero { min-height: auto; padding: 6.5rem 0 2rem; }
    .tl { padding-left: 1.7rem; }
    .tl-node { left: -1.7rem; }
    .tl-body p { padding-right: 0; }
    .trip__mapWrap { aspect-ratio: 3 / 2.2; }
    .rig__panel { min-height: 0; }
    .rig__card { position: static; }
}

/* ---------- REDUCED MOTION --------------------------------------------
   prefers-reduced-motion is a comfort setting (vestibular), not a taste
   one, so it is honoured. This block pairs with HONOR_REDUCED_MOTION in
   app.js: the CSS stops declarative animation, the flag the scripted
   kind. Change both or neither. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .js .rv { opacity: 1; transform: none; }
    .spotlight { display: none; }
    .tl-body, .card__more, .story__more { transition: none; }
}

/* ---------- PRINT ------------------------------------------------------
   Un-hide the reveal-on-scroll blocks (unscrolled sections would print
   blank) and force light colors so dark-theme text isn't white-on-white. */
@media print {
    :root {
        --bg: #fff; --bg-deep: #fff;
        --text: #111; --muted: #444; --faint: #555;
        --line: rgba(0, 0, 0, 0.15); --line-hi: rgba(0, 0, 0, 0.3);
    }
    .js .rv { opacity: 1 !important; transform: none !important; animation: none !important; }
    .atmos, .spotlight, .nav, .cmdk { display: none !important; }
    .hero { min-height: auto; }
    /* printers drop backgrounds: un-clip the gradient headline and re-ink
       labels whose color relies on a painted fill behind them */
    .hero__title em { background: none; -webkit-text-fill-color: currentColor; color: #111; }
    .btn--solid, .btn--twitch, .filter[aria-pressed="true"], .rig__listBtn.is-active {
        color: #111 !important; border-color: #333 !important;
    }
}
