/* ==========================================================================
   Portfolio — dark, restrained, technical.
   ========================================================================== */

:root {
    --bg: #09090b;
    --bg-raise: #0e0e11;
    --panel: rgba(255, 255, 255, 0.022);
    --panel-hover: rgba(255, 255, 255, 0.04);
    --line: rgba(255, 255, 255, 0.075);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #ededf0;
    --muted: #a1a1aa;
    --dim: #6b6b76;
    --accent: #6ee7c8;
    --accent-rgb: 110, 231, 200;
    --accent-dim: rgba(110, 231, 200, 0.14);

    --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --radius: 14px;
    --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection { background: var(--accent); color: #04120e; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.mono { font-family: var(--mono); font-feature-settings: "zero" 1; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

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

/* ---------- Background field ---------- */

#field {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(var(--accent-rgb), 0.07), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(120, 140, 255, 0.045), transparent 60%);
}

main, .footer, .nav { position: relative; z-index: 1; }

/* ---------- Navigation ---------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background-color .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
    background: rgba(9, 9, 11, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom-color: var(--line);
}

.nav__inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: -0.01em; }

.brand__mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.02em;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
}

.brand__dot { color: var(--accent); }

.nav__links { display: flex; gap: 4px; }

.nav__links a {
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    transition: color .2s, background-color .2s;
}

.nav__links a:hover,
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active { background: var(--panel-hover); }

.nav__num {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--dim);
    margin-right: 6px;
    vertical-align: 1px;
}

.nav__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

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

.pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5);
    animation: pulse 2.4s infinite;
    flex: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.45); }
    70% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 120px 0 96px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 28px;
}

.eyebrow__line { width: 28px; height: 1px; background: var(--accent); }

.hero__title {
    font-size: clamp(2.5rem, 6.4vw, 5.6rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
    font-weight: 500;
    max-width: 14ch;
    color: #f4f4f5;
}

.hero .wrap { position: relative; }

.hero .hero__panel {
    position: absolute;
    top: 64px;
    right: var(--gutter);
    width: 340px;
    overflow: hidden;
    background: rgba(12, 12, 15, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.term {
    margin: 0;
    padding: 16px 18px 20px;
    min-height: 300px;
    font: 400 12.5px/1.75 var(--mono);
    color: var(--muted);
    white-space: pre;
}

.term .k { color: var(--text); }
.term .s { color: var(--accent); }
.term .n { color: #f0c987; }
.term .p { color: var(--dim); }
.term .cursor { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 1279px) { .hero .hero__panel { display: none; } }

.hero__title .w { display: inline-block; }
.hero__title .w:nth-last-child(-n+2) { color: var(--muted); }

.js .hero__title .w {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(0.28em);
    animation: wordIn 1s var(--ease) forwards;
    animation-delay: calc(120ms + var(--i) * 75ms);
}

@keyframes wordIn { to { opacity: 1; filter: blur(0); transform: none; } }

.hero__intro {
    margin-top: 28px;
    max-width: 58ch;
    font-size: clamp(1.02rem, 1.3vw, 1.18rem);
    color: var(--muted);
    line-height: 1.65;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.hero__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 760px;
    margin-top: 72px;
    border-top: 1px solid var(--line);
}

.metric { padding: 20px 24px 0 0; }
.metric + .metric { padding-left: 24px; border-left: 1px solid var(--line); }

.metric__value {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.metric__label { font-size: 13px; color: var(--dim); line-height: 1.45; margin-top: 4px; }

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dim);
}

.scroll-cue__bar {
    width: 1px;
    height: 36px;
    background: linear-gradient(var(--line-strong), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-cue__bar::after {
    content: "";
    position: absolute;
    left: 0;
    top: -40%;
    width: 1px;
    height: 40%;
    background: var(--accent);
    animation: cue 2.2s var(--ease) infinite;
}

@keyframes cue { to { top: 110%; } }

/* ---------- Buttons ---------- */

.btn {
    --mx: 0px;
    --my: 0px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 500;
    border: 1px solid var(--line-strong);
    cursor: pointer;
    transform: translate(var(--mx), var(--my));
    transition: transform .35s var(--ease), background-color .2s, border-color .2s, color .2s;
    will-change: transform;
}

.btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn--primary {
    background: var(--text);
    color: #0a0a0c;
    border-color: var(--text);
}

.btn--primary:hover { background: #fff; }

.btn--ghost { background: rgba(255,255,255,0.02); color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.24); }

/* ---------- Sections ---------- */

.section { padding: clamp(88px, 12vw, 148px) 0; }

.section__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section__index { color: var(--accent); }
.section__label { color: var(--muted); }

.section__head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line-strong), transparent);
}

.section__title {
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
    font-weight: 500;
}

.section__lede { color: var(--muted); max-width: 52ch; font-size: 1.05rem; }

/* ---------- Spotlight panels ---------- */

.spot {
    --sx: -999px;
    --sy: -999px;
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    isolation: isolate;
}

.spot::before,
.spot::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
}

/* soft fill */
.spot::before {
    background: radial-gradient(380px circle at var(--sx) var(--sy), rgba(255,255,255,0.045), transparent 60%);
}

/* border glow */
.spot::after {
    padding: 1px;
    background: radial-gradient(260px circle at var(--sx) var(--sy), rgba(var(--accent-rgb), 0.55), transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}

/* ---------- About ---------- */

.about {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(32px, 6vw, 88px);
}

.about__body p { color: var(--muted); font-size: 1.06rem; }
.about__body p + p { margin-top: 18px; }
.about__body p:first-child { color: var(--text); }

.facts { margin-top: 36px; border-top: 1px solid var(--line); }

.facts__row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
}

.facts__row dt { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 2px; }

.principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 72px;
}

.principle { padding: 28px; }
.principle__num { font-size: 12px; color: var(--accent); }
.principle h3 { font-size: 1.12rem; font-weight: 500; letter-spacing: -0.015em; margin: 36px 0 10px; }
.principle p { color: var(--muted); font-size: 14.5px; }

/* ---------- Results ---------- */

.results__intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.cases { display: grid; gap: 0; counter-reset: case; }

.case {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(24px, 4vw, 64px);
    padding: 56px 0;
    border-top: 1px solid var(--line);
}

.case:last-child { border-bottom: 1px solid var(--line); }

.case__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 100px;
    align-self: start;
}

.case__index {
    font-feature-settings: normal;
    font-size: 52px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
    margin-bottom: 14px;
}

.case--featured .case__index { -webkit-text-stroke-color: rgba(var(--accent-rgb), 0.7); }

.case__period { font-size: 12px; color: var(--accent); letter-spacing: 0.04em; }
.case__role { font-size: 14px; color: var(--muted); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    background: var(--accent-dim);
    margin-bottom: 18px;
}

.case__title {
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.case__summary { color: var(--muted); margin-top: 16px; max-width: 64ch; font-size: 1.04rem; }

.case__metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 32px;
}

.case__metric { padding: 20px; }
.case__metric dt { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.case__metric dd { font-size: 13px; color: var(--dim); line-height: 1.45; margin-top: 4px; }

.milestones {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 32px;
    position: relative;
}

.milestone { padding: 22px; }
.milestone__tag {
    display: inline-block;
    font-size: 11px;
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 6px;
    padding: 2px 8px;
}
.milestone h4 { font-size: 1rem; font-weight: 500; margin: 18px 0 8px; letter-spacing: -0.01em; }
.milestone p { font-size: 14px; color: var(--muted); }

.points { margin-top: 28px; display: grid; gap: 14px; max-width: 70ch; }

.points li {
    position: relative;
    padding-left: 28px;
    color: var(--muted);
}

.points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 14px;
    height: 1px;
    background: var(--accent);
}

.capabilities {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.capability { padding: 22px 24px; }
.capability h4 { font-size: 0.98rem; font-weight: 500; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.capability h4::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); flex: none; }
.capability p { font-size: 14px; color: var(--muted); margin-top: 8px; }

.case__outcome {
    margin-top: 32px;
    padding: 18px 0 0;
    border-top: 1px dashed var(--line-strong);
    color: var(--text);
    max-width: 72ch;
}

.case__outcome .mono {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--dim);
    margin-bottom: 6px;
}

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

.tags li {
    font-size: 11.5px;
    color: var(--muted);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.015);
}

/* ---------- Diagram ---------- */

.diagram { margin: 32px 0 12px; overflow: hidden; }

.diagram__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: var(--dim);
}

.diagram__dots { display: inline-flex; gap: 6px; }
.diagram__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.diagram__live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); }

.diagram__scroll { overflow: hidden; }
.diagram__svg { display: block; width: 100%; height: auto; padding: 12px 8px 4px; }

.dg-node rect { fill: #111115; stroke: var(--line-strong); stroke-width: 1; transition: stroke .3s, fill .3s; }
.dg-node:hover rect { stroke: rgba(var(--accent-rgb), 0.7); fill: #121716; }
.dg-node--core rect { stroke: rgba(var(--accent-rgb), 0.45); }
.dg-node .dg-ghost { fill: #0c0c0f; }
.dg-title { fill: var(--text); font: 500 15px var(--sans); letter-spacing: -0.01em; }
.dg-sub { fill: var(--dim); font: 400 11.5px var(--mono); }
.dg-label { fill: var(--muted); font: 400 11px var(--mono); }
.dg-arrow { fill: rgba(var(--accent-rgb), 0.8); }

.dg-edge {
    fill: none;
    stroke: rgba(var(--accent-rgb), 0.55);
    stroke-width: 1.2;
    stroke-dasharray: 4 6;
    animation: flow 1.6s linear infinite;
}

.dg-edge--alt { animation-duration: 2.3s; animation-direction: reverse; }

@keyframes flow { to { stroke-dashoffset: -20; } }

.diagram__caption { padding: 0 16px 14px; font-size: 11.5px; color: var(--dim); }

/* ---------- Stack ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }

.filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 13.5px;
    cursor: pointer;
    transition: color .2s, border-color .2s, background-color .2s;
}

.filter span { font-size: 11px; color: var(--dim); }
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter.is-active { color: #0a0a0c; background: var(--text); border-color: var(--text); }
.filter.is-active span { color: #52525b; }

.techs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    perspective: 1200px;
}

.tech {
    --rx: 0deg;
    --ry: 0deg;
    --lift: 0px;
    --gx: 50%;
    --gy: 50%;
    --glare: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    min-height: 92px;
    padding: 16px 18px;
    text-align: left;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
    cursor: pointer;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(var(--lift));
    transition: transform .25s var(--ease), border-color .25s, background-color .25s, opacity .3s;
    will-change: transform;
}

.tech:hover { border-color: rgba(var(--accent-rgb), 0.35); }
.tech:active { transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(-6px); }

.tech__glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: var(--glare);
    background: radial-gradient(220px circle at var(--gx) var(--gy), rgba(255,255,255,0.09), transparent 65%);
    transition: opacity .3s;
}

.tech__name {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--text);
}

.tech__summary {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--dim);
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tech.is-hidden { display: none; }

.tech.is-entering { animation: techIn .45s var(--ease) both; }
@keyframes techIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* burst particles */
/* Fixed and clipped to the viewport, so particles can never widen the page (mobile). */
.burst-layer {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 60;
    pointer-events: none;
}

.burst {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 15px;
    line-height: 1;
    white-space: nowrap;
    will-change: transform, opacity;
    user-select: none;
}

.burst--text {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--accent);
    font-weight: 500;
}

/* ---------- Contact ---------- */

.contact__title {
    font-size: clamp(2.2rem, 5.6vw, 4.6rem);
    line-height: 1.03;
    letter-spacing: -0.045em;
    font-weight: 500;
    margin-bottom: 24px;
}

.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

#copy-email.is-copied { background: var(--accent); border-color: var(--accent); }

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

.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; }

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--dim);
}

.footer__secret { color: var(--dim); transition: color .2s; }
.footer__secret:hover { color: var(--accent); }

/* ---------- Reveal ---------- */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: var(--d, 0ms);
}

.js [data-reveal].is-visible { opacity: 1; transform: none; }

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

@media (max-width: 1024px) {
    .techs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .case__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .nav__links { display: none; }
    .about { grid-template-columns: 1fr; }
    .principles { grid-template-columns: 1fr; margin-top: 48px; }
    .case { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 44px 0; }
    .case__meta { position: static; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
    .case__index { font-size: 36px; margin: 0 6px 0 0; }
    .milestones { grid-template-columns: 1fr; }
    .capabilities { grid-template-columns: 1fr; }
    .techs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .diagram__svg { min-width: 640px; }
    .diagram__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
    .diagram__caption { padding-top: 10px; border-top: 1px solid var(--line); }
}

@media (max-width: 560px) {
    .hero { padding-top: 104px; }
    .hero__metrics { grid-template-columns: 1fr; margin-top: 48px; }
    .metric, .metric + .metric { padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--line); }
    .facts__row { grid-template-columns: 1fr; gap: 2px; }
    .case__metrics { grid-template-columns: 1fr 1fr; }
    .tech { min-height: 84px; padding: 14px; }
    .tech__name { font-size: 15px; }
    .tech__summary { white-space: normal; }
    .scroll-cue { display: none; }
    .nav__meta span:not(.pulse) { display: none; }
}

@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 [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Status pages ---------- */

.status-page { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 96px 0; }
.status-page .section__lede { margin-top: 20px; }
.status-page__id { margin-top: 16px; font-size: 12px; color: var(--dim); }

@media (max-height: 940px) { .scroll-cue { display: none; } }

.case__content { min-width: 0; }
