/* Aditya Raj — "clear the fog" portfolio */
:root {
  --paper: #ECE8DF;
  --paper-2: #E2DDD1;
  --ink: #15171A;
  --graphite: #55585D;
  --rule: rgba(21, 23, 26, .16);
  --signal: #E8461E;
  --night: #0C0E12;
  --star: #E9E6DD;
  --bg: var(--paper);
  --fg: var(--ink);
  --display: "Fraunces", Georgia, serif;
  --text: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 12px 40px -18px rgba(21, 23, 26, .35);
  color-scheme: light;
}
/* dark: the lab at night. Explicit choice wins; otherwise follow the system. */
:root[data-theme="dark"] {
  --paper: #0E1013; --paper-2: #181B20; --ink: #ECE8DF; --graphite: #A2A5AB;
  --rule: rgba(236, 232, 223, .14); --signal: #FF5A2C; --night: #060709;
  --shadow: 0 12px 40px -14px rgba(0, 0, 0, .8); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1013; --paper-2: #181B20; --ink: #ECE8DF; --graphite: #A2A5AB;
    --rule: rgba(236, 232, 223, .14); --signal: #FF5A2C; --night: #060709;
    --shadow: 0 12px 40px -14px rgba(0, 0, 0, .8); color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--text);
  overflow-x: clip;
  transition: background-color .8s var(--ease), color .8s var(--ease);
}
body.is-night { --bg: var(--night); --fg: var(--star); --graphite: #9A9DA3; --rule: rgba(233, 230, 221, .16); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--signal); color: var(--paper); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }
em { font-style: italic; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 200; background: var(--ink); color: var(--paper); padding: 12px 16px; }
.skip-link:focus { top: 16px; }

/* grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* loader */
.loader {
  position: fixed; inset: 0; z-index: 150; background: #15171A; color: #ECE8DF;
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--gutter);
  clip-path: inset(0 0 0 0);
}
.loader__label { margin: 0; opacity: .7; }
.loader__count { margin: 0; font: 300 clamp(96px, 22vw, 340px)/.8 var(--display); font-variation-settings: "opsz" 144; }
.loader__pct { color: var(--signal); }
.no-js .loader, .reduced-motion .loader { display: none; }

/* fog canvas */
.fog { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .close { position: relative; z-index: 1; }

/* nav: floating glass pill */
.nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center;
  padding: 0 var(--gutter); pointer-events: none; transition: transform .7s var(--ease);
}
.nav--hidden { transform: translateY(-150%); }
.nav__pill {
  pointer-events: auto; width: min(100%, 1120px); display: flex; align-items: center; gap: 18px;
  padding: 7px 7px 7px 20px; border-radius: 99px; color: var(--fg);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid var(--rule); box-shadow: var(--shadow);
  transition: background-color .8s var(--ease), border-color .8s;
  view-transition-name: site-nav;
}
.nav__mark { font: 600 20px/1 var(--display); text-decoration: none; display: flex; align-items: flex-end; gap: 3px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); display: inline-block; margin-bottom: 3px; }
.nav__links { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: 14px; font-weight: 500; }
.nav__links a { text-decoration: none; display: block; padding: 7px 12px; border-radius: 99px; transition: background-color .3s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.hud { display: flex; gap: 14px; margin: 0; padding: 7px 12px; border-radius: 99px; white-space: nowrap; font-size: 11.5px; background: color-mix(in srgb, var(--fg) 5%, transparent); }
.hud b { font-weight: 500; color: var(--signal); font-variant-numeric: tabular-nums; }
.nav__k, .theme-toggle {
  flex: none; height: 36px; border-radius: 99px; border: 1px solid var(--rule); background: transparent; color: inherit;
  cursor: pointer; display: grid; place-items: center; transition: background-color .3s, border-color .3s;
}
.nav__k { padding: 0 12px; }
.nav__k kbd { font-size: 11.5px; }
.nav__k:hover, .theme-toggle:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); border-color: var(--fg); }
.theme-toggle { width: 36px; }
.theme-toggle span {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%); transition: transform .7s var(--ease);
}
.theme-toggle[aria-pressed="true"] span { transform: rotate(180deg); }

/* theme switch: circular reveal (only during the switch, so page transitions keep their crossfade) */
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-theme::view-transition-group(site-nav) { animation: none; }
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .35s var(--ease) both vt-out; }
::view-transition-new(root) { animation: .6s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }

/* command palette */
.palette { border: 0; padding: 0; background: transparent; width: min(640px, calc(100vw - 32px)); margin: 14vh auto auto; color: var(--fg); overflow: visible; }
.palette::backdrop { background: color-mix(in srgb, var(--paper) 40%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.palette[open] .palette__box { animation: pal-in .45s var(--ease); }
@keyframes pal-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.palette__box {
  background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--rule); border-radius: 20px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); overflow: hidden;
}
.palette__search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.palette__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 20%, transparent); }
.palette__search input { flex: 1; min-width: 0; border: 0; background: none; color: inherit; font: 400 19px/1.3 var(--text); outline: none; }
.palette__search kbd { padding: 3px 7px; border: 1px solid var(--rule); border-radius: 6px; color: var(--graphite); }
.palette__list { list-style: none; margin: 0; padding: 8px; max-height: min(52vh, 440px); overflow-y: auto; overscroll-behavior: contain; }
.palette__group { padding: 10px 12px 6px; color: var(--graphite); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; }
.palette__item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 12px; border-radius: 12px; cursor: pointer; }
.palette__item .mono { color: var(--graphite); font-size: 11.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette__item[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.palette__item[aria-selected="true"] .mono { color: color-mix(in srgb, var(--paper) 65%, transparent); }
.palette__empty { padding: 24px 12px; color: var(--graphite); }
.palette__foot { display: flex; gap: 18px; margin: 0; padding: 10px 18px; border-top: 1px solid var(--rule); color: var(--graphite); font-size: 11px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300; margin: 0; padding: 10px 16px; border-radius: 99px;
  background: var(--ink); color: var(--paper); transform: translate(-50%, 160%); opacity: 0; visibility: hidden;
  transition: transform .6s var(--ease), opacity .3s, visibility 0s .6s; pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .6s var(--ease), opacity .3s; }
@media (pointer: coarse) { .palette__foot { display: none; } }

/* kinetic name: each letter's weight follows the nearest explorer */
.hero__name .ch { display: inline-block; font-weight: 300; }

/* shared */
section { padding: clamp(96px, 16vh, 180px) var(--gutter); }
.eyebrow { margin: 0 0 28px; color: var(--graphite); text-transform: uppercase; letter-spacing: .12em; font-size: 11.5px; }
.display { font: 350 clamp(44px, 7.2vw, 120px)/.98 var(--display); font-variation-settings: "opsz" 144; letter-spacing: -.025em; margin: 0; }
.display em, .paper__title em, .orbit__title em, .close__lead em { font-weight: 300; color: var(--signal); }
.reveal > div { padding-bottom: .16em; margin-bottom: -.16em; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 99px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500; font-size: 15px;
  transition: background .3s;
}
.btn:hover { background: var(--signal); }
.btn--light { background: var(--star); color: var(--night); }
.link-arrow { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* hero */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 120px; padding-bottom: 0; }
.hero__kicker { display: flex; align-items: center; gap: 10px; text-wrap: balance; margin: 0 0 2vh; color: var(--graphite); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgba(232, 70, 30, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(232, 70, 30, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 70, 30, 0); } }
.hero__name { margin: 0; font: 300 clamp(96px, 21vw, 360px)/.82 var(--display); font-variation-settings: "opsz" 144, "SOFT" 30; letter-spacing: -.045em; }
.hero__line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__line--2 { padding-left: 18vw; }
.hero__line em { color: var(--signal); font-weight: 300; }
.hero__foot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: end; margin: 4vh 0 5vh; }
.hero__lede { font: 400 clamp(20px, 1.9vw, 28px)/1.35 var(--display); margin: 0; max-width: 30ch; text-wrap: pretty; }
.hero__hint { color: var(--graphite); margin: 0; justify-self: end; }
.marquee { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow: hidden; margin: 0 calc(var(--gutter) * -1); padding: 14px 0; }
.marquee__track { display: flex; width: max-content; }
.marquee__track span { font: italic 300 clamp(22px, 2.6vw, 38px)/1 var(--display); padding: 0 28px; white-space: nowrap; display: flex; align-items: center; gap: 56px; }
.marquee__track span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); margin-left: 28px; }

/* now */
.now__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 6vw; align-items: start; }
.now__body { padding-top: 1.2vw; max-width: 54ch; }
.now__role { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 24px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.now__role span:nth-child(2) { color: var(--signal); }
.now__body p:not(.now__role) { margin: 0 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.chips li { padding: 6px 12px; border: 1px solid var(--ink); border-radius: 99px; background: var(--paper); }

/* papers */
.papers { padding-top: 0; }
.paper { border-top: 1px solid var(--rule); padding: 44px 0 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); column-gap: 5vw; }
.paper__status { grid-row: span 3; color: var(--graphite); margin: 6px 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tag { border: 1px solid var(--rule); padding: 3px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; color: var(--fg); }
.tag--live { background: var(--signal); border-color: var(--signal); color: var(--paper); }
.paper__title { margin: 0 0 18px; font: 350 clamp(28px, 3.3vw, 52px)/1.06 var(--display); letter-spacing: -.015em; font-variation-settings: "opsz" 96; }
.paper__body { margin: 0; max-width: 60ch; color: var(--graphite); }
.paper__body strong { color: var(--fg); }
.axes { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 6px; align-items: flex-end; height: 64px; }
.axes li { width: 22px; height: calc(var(--v) * 100%); background: var(--ink); transform-origin: bottom; }
.axes li:nth-child(4) { background: var(--signal); }

/* orbit (climax) */
.orbit { padding: 0; height: 100svh; position: relative; background: var(--night); color: var(--star); transition: background-color .8s; }
.orbit__stage { position: relative; height: 100svh; overflow: hidden; }
.orbit__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit__head { position: absolute; top: clamp(88px, 13vh, 130px); left: var(--gutter); z-index: 2; }
.orbit .eyebrow { color: #9A9DA3; }
.orbit__title { margin: 0; font: 300 clamp(44px, 6.4vw, 108px)/.95 var(--display); letter-spacing: -.03em; font-variation-settings: "opsz" 144; max-width: 9ch; }
.orbit__horizon { margin: 22px 0 0; color: #9A9DA3; }
.orbit__horizon b { color: var(--star); font: 300 44px/1 var(--display); font-variant-numeric: tabular-nums; margin: 0 4px; }
.orbit__steps { position: absolute; right: var(--gutter); bottom: clamp(64px, 12vh, 120px); width: min(380px, 34vw); list-style: none; margin: 0; padding: 0; z-index: 2; }
.orbit__step { position: absolute; bottom: 0; left: 0; right: 0; }
.orbit__step p { font: 400 clamp(20px, 1.8vw, 26px)/1.3 var(--display); margin: 10px 0 20px; }
.orbit__step > span { display: inline-block; padding: 3px 10px; border: 1px solid currentColor; border-radius: 99px; text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
.orbit__legend { position: absolute; left: var(--gutter); bottom: clamp(64px, 12vh, 120px); list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; z-index: 2; color: #B9BBC0; }
.orbit__legend i { display: inline-block; width: 22px; height: 2px; vertical-align: middle; margin-right: 10px; }
.orbit__note { position: absolute; left: var(--gutter); bottom: 24px; margin: 0; color: #8E9197; font-size: 11px; z-index: 2; }
.truth { background: #E9E6DD; } .mlp { color: #7FA7FF; background: #7FA7FF; } .pinn { color: #E9C46A; background: #E9C46A; } .piwm { color: #FF6A3D; background: #FF6A3D; }
.orbit__step > .mlp, .orbit__step > .pinn, .orbit__step > .piwm { background: none; }
.orbit__step > span:not([class*=" "]) { color: var(--star); }

/* reward hacking */
.hack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 5vw; align-items: center; }
.hack__text p { max-width: 50ch; margin: 28px 0 32px; color: var(--graphite); }
.hack__fig { margin: 0; border: 1px solid var(--rule); border-radius: 18px; padding: 24px; background: color-mix(in srgb, var(--paper) 80%, transparent); backdrop-filter: blur(2px); }
.hack__svg { width: 100%; overflow: visible; }
.hack__hill { fill: none; stroke: var(--ink); stroke-width: 2; }
.hack__flagpole { stroke: var(--ink); stroke-width: 2; }
.hack__flag { fill: var(--signal); }
.hack__car { fill: var(--signal); }
.hack__car circle { fill: var(--ink); }
.hack__fig figcaption { display: flex; justify-content: space-between; margin-top: 12px; color: var(--graphite); }
.hack__fig b { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }

/* log */
.log__list { list-style: none; padding: 0; margin: 48px 0 0; }
.log__row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 3fr) auto; align-items: baseline; gap: 4vw; padding: 26px 0; border-top: 1px solid var(--rule); transition: background .4s; }
.log__row:last-child { border-bottom: 1px solid var(--rule); }
.log__stat { font: 300 clamp(56px, 7vw, 112px)/.9 var(--display); letter-spacing: -.04em; font-variation-settings: "opsz" 144; }
.log__stat sup { font-size: .32em; vertical-align: top; position: relative; top: .3em; margin-left: 2px; color: var(--signal); }
.log__stat--word { font-style: italic; color: var(--signal); }
.log__what { font-size: clamp(17px, 1.4vw, 21px); max-width: 52ch; }
.log__yr { color: var(--graphite); }
.log__split { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; margin-top: clamp(80px, 12vh, 140px); }
.sub { font: italic 350 clamp(32px, 3.4vw, 52px)/1 var(--display); margin: 0 0 24px; }
.edu div { padding: 18px 0; border-top: 1px solid var(--rule); }
.edu dt { font-weight: 600; }
.edu dd { margin: 4px 0 0; color: var(--graphite); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.skills div { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.skills dt { color: var(--signal); }
.skills dd { margin: 0; font-size: 13px; }

/* notes */
.notes__head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
.notes__head .eyebrow { grid-column: 1 / -1; }
.notes__list { list-style: none; padding: 0; margin: 48px 0 0; }
.note { display: grid; grid-template-columns: 140px minmax(0, 1.4fr) minmax(0, 1fr); gap: 4vw; align-items: baseline; padding: 28px 0; border-top: 1px solid var(--rule); text-decoration: none; transition: padding .5s var(--ease); }
.notes__list li:last-child .note { border-bottom: 1px solid var(--rule); }
.note:hover { padding-left: 16px; }
.note__date { color: var(--graphite); }
.note__title { font: 350 clamp(26px, 2.8vw, 42px)/1.05 var(--display); letter-spacing: -.015em; }
.note:hover .note__title { color: var(--signal); }
.note__sum { color: var(--graphite); font-size: 15px; }

/* close */
.close { padding: clamp(110px, 18vh, 200px) var(--gutter) 24px; overflow: hidden; }
.close__u { color: var(--signal); font-weight: 500; }
.close__lead { font: 300 clamp(36px, 5vw, 80px)/1.02 var(--display); letter-spacing: -.025em; margin: 0 0 40px; max-width: 18ch; font-variation-settings: "opsz" 144; }
.btn--big { font-size: clamp(16px, 1.6vw, 22px); padding: 18px 30px; }
.close__links { display: flex; flex-wrap: wrap; gap: 12px 32px; list-style: none; padding: 0; margin: 40px 0 0; font-size: 14px; }
.close__links a { text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 3px; }
.close__links a:hover { border-color: var(--signal); color: var(--signal); }
.close__word { font: 300 clamp(80px, 19.5vw, 360px)/.8 var(--display); letter-spacing: -.05em; margin: 10vh 0 0; padding-bottom: .24em; white-space: nowrap; font-variation-settings: "opsz" 144; }
.close__fine { color: var(--graphite); margin: 24px 0 0; }

/* portrait: the author, resolved from fog */
.close__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 6vw; align-items: end; }
.portrait { margin: 0; justify-self: end; width: min(100%, 340px); cursor: pointer; outline-offset: 8px; }
.portrait__frame { position: relative; aspect-ratio: 346 / 450; }
.portrait__canvas, .portrait__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait__img { object-fit: cover; border-radius: 18px; opacity: 0; filter: grayscale(1) contrast(1.05); transform: scale(.97); transition: opacity .6s var(--ease), transform .8s var(--ease), filter .8s; }
.portrait__canvas { transition: opacity .6s var(--ease); }
.portrait.is-resolved:hover .portrait__img, .portrait.is-photo .portrait__img { opacity: 1; transform: none; filter: grayscale(0); }
.portrait.is-resolved:hover .portrait__canvas, .portrait.is-photo .portrait__canvas { opacity: 0; }
.portrait figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--graphite); font-size: 11px; }
.portrait__k { color: var(--signal); }
.reduced-motion .portrait__img { opacity: 1; filter: none; transform: none; }
.reduced-motion .portrait__canvas { display: none; }

/* blog byline avatar */
.byline { text-decoration: none; display: flex; align-items: center; gap: 12px; margin: 40px 0 18px; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; filter: grayscale(1); transition: filter .5s; border: 1px solid var(--rule); }
.byline:hover img { filter: none; }
.byline__who { display: grid; line-height: 1.25; }
.byline__who strong { font-weight: 600; font-size: 15px; }
.byline__who span { color: var(--graphite); }

/* mobile */
@media (max-width: 860px) {
  .nav { top: 10px; padding: 0 12px; }
  .nav__pill { gap: 6px; padding: 5px 5px 5px 14px; }
  .nav__links { gap: 0; font-size: 13px; }
  .nav__links a { padding: 0 8px; min-height: 44px; display: flex; align-items: center; }
  .nav__mark { min-height: 44px; align-items: center; padding-right: 4px; }
  .nav__k, .theme-toggle { width: 44px; height: 44px; }
  .close__links a { display: inline-block; padding: 12px 0; }
  .chips li { padding: 8px 14px; }
  .nav__links .opt { display: none; }
  .hud { display: none; }
  .nav__k kbd { display: none; }
  .nav__k { padding: 0; }
  .nav__k::before { content: ""; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; box-shadow: 5px 5px 0 -3.5px currentColor; transform: translate(-1px, -1px); }
  .palette { margin-top: 10vh; }
  .hero__line--2 { padding-left: 12vw; }
  .hero__foot, .now__grid, .paper, .hack, .log__split { grid-template-columns: minmax(0, 1fr); }
  .hero__hint { justify-self: start; }
  .paper__status { flex-direction: row; grid-row: auto; margin-bottom: 18px; }
  .orbit__head { top: 76px; }
  .orbit__title { font-size: 40px; }
  .orbit__horizon { margin-top: 10px; }
  .orbit__horizon b { font-size: 30px; }
  .orbit__steps { left: var(--gutter); right: var(--gutter); width: auto; bottom: 44px; }
  .orbit__step p { font-size: 19px; margin-bottom: 14px; }
  .orbit__legend { top: 76px; bottom: auto; left: auto; right: var(--gutter); font-size: 10.5px; }
  .orbit__note { bottom: 14px; font-size: 10px; }
  .log__row { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; }
  .log__stat { font-size: 52px; }
  .log__yr { display: none; }
  .note { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .notes__head { grid-template-columns: minmax(0, 1fr); }
  .close__word { font-size: 21vw; }
  .close__grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { justify-self: start; width: min(72%, 260px); order: -1; }
  .btn--big { font-size: 15px; padding: 16px 22px; max-width: 100%; overflow-wrap: anywhere; }
}

@media (max-width: 370px) {
  .nav__pill { padding-left: 10px; }
  .nav__links a { padding: 0 6px; font-size: 12.5px; }
  .nav__k, .theme-toggle { width: 40px; }
}

/* reduced motion: final states, no loader */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .orbit { height: auto; }
  .orbit__stage { height: auto; min-height: 100svh; padding-bottom: 40px; }
  .orbit__steps { position: relative; right: auto; bottom: auto; width: auto; margin: 52vh var(--gutter) 0; display: grid; gap: 8px; }
  .orbit__step { position: relative; }
}
