/* ══════════════════════════════════════════════════════════════
   Pixel World — Bukunmi Adegbonmire
   ══════════════════════════════════════════════════════════════ */

/* ── palette ───────────────────────────────────────────────────
   Roles, not colours. `bg` is the page, `surface` is what sits on it,
   `line` draws the edges, `text` is what you read. Swapping the theme
   means changing this block and nothing else.
   ────────────────────────────────────────────────────────────── */
:root {
  /* surfaces, darkest first */
  --bg:          #14100B;
  --bg-deep:     #0C0906;
  --surface:     #1F1810;
  --surface-2:   #2A2118;
  --surface-3:   #382C20;

  /* edges */
  --line:        #E3CDA4;
  --line-soft:   #6E5C46;
  --line-faint:  #3A2E22;

  /* type */
  --text:        #F4EAD6;
  --text-soft:   #D6C6A8;
  --text-faint:  #9A8669;
  --on-accent:   #14100B;

  /* accents */
  --gold:        #E8A72C;
  --rust:        #D2764B;
  --rust-soft:   #E39B70;
  --olive:       #8FA35A;
  --olive-lt:    #B6C489;
  --navy:        #2E7BA6;
  --navy-deep:   #0F3550;
  --navy-dark:   #0A2438;
  --sky:         #9FD3E8;
  --sky-mid:     #7FA9C0;

  --hud:  'Silkscreen', ui-monospace, monospace;
  --disp: 'Pixelify Sans', ui-monospace, monospace;
  --body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;

  --parallax: 1;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
button { font: inherit; color: inherit; }

a { color: var(--rust); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--rust-soft); }

:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  display: inline-flex; align-items: center; min-height: 44px; padding: 12px 16px; background: var(--surface-2); color: var(--text);
  font-family: var(--hud); font-size: 11px; letter-spacing: 1px; text-decoration: none;
  transition: top .16s;
}
.skip:focus { top: 8px; color: var(--text); }

.world { position: relative; width: 100%; overflow-x: clip; background: var(--bg); }

/* A 2px dither over everything, so the paper reads as printed rather than flat.
   Fixed attachment keeps the grain still while the page moves over it. */
.world::before {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  background-position: 0 0, 2px 2px;
}

/* ── keyframes ───────────────────────────────────────────────── */
@keyframes idle  { 0%,100% { transform: translateY(0) }    50% { transform: translateY(-6px) } }
@keyframes bob   { 0%,100% { transform: translateY(0) }    50% { transform: translateY(8px) } }
@keyframes smoke { 0% { transform: translate(0,0); opacity: .9 } 100% { transform: translate(-6px,-22px); opacity: 0 } }
@keyframes blink { 0%,92% { opacity: 1 } 96% { opacity: .35 } 100% { opacity: 1 } }

/* ── type primitives ─────────────────────────────────────────── */
.hud {
  font-family: var(--hud);
  font-size: 11px;
  letter-spacing: 1px;
  line-height: 1.2;
}
.hud--sm { font-size: 10px; }
.hud--xs { font-size: 9px; }

.kicker {
  font-family: var(--hud);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--rust-soft);
}
.kicker--gold { color: var(--gold); }

.display {
  margin: 0;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
  color: var(--text);
}
.display--xl { font-size: clamp(38px, 6.6vw, 86px); line-height: .94; }
.display--md { font-size: clamp(26px, 4vw, 40px); }
.display--sm { font-size: clamp(22px, 3.4vw, 32px); line-height: 1.05; }
.display--paper { color: var(--text); }

.body {
  margin: 0; max-width: 52ch;
  font-size: 17px; line-height: 1.6;
  color: var(--text-soft); text-wrap: pretty;
}
.body--wide  { max-width: 56ch; }
.body--wider { max-width: 60ch; }
.body--hint  { font-size: 13px; color: var(--text-faint); }

/* ── layout ──────────────────────────────────────────────────── */
.zone {
  position: relative;
  /* `clip` clips like `hidden` but does not create a scroll container,
     which would break `position: sticky` on the bench previews. */
  overflow: hidden;
  overflow: clip;
  border-bottom: 6px solid var(--line-faint);
  background: var(--bg);
}
.zone--origin,
.zone--estate { background: var(--surface); }
.zone--comms  { background: var(--navy-deep); border-bottom: 0; }

.wrap {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto;
  padding: 72px 24px 80px;
}
.wrap--narrow { max-width: 900px; padding-bottom: 88px; }
.wrap--stack  { display: flex; flex-direction: column; gap: 34px; }
.wrap--gap-lg { gap: 48px; }

.zonehead { display: flex; flex-direction: column; gap: 10px; }
.zonehead--split {
  flex-direction: row; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between; gap: 20px;
}
.zonehead__main { display: flex; flex-direction: column; gap: 10px; }

/* ── texture ─────────────────────────────────────────────────── */
.scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(227,205,164,.05) 0 2px, transparent 2px 9px);
}
.scanlines--dense { background: repeating-linear-gradient(0deg, rgba(227,205,164,.05) 0 2px, transparent 2px 8px); }
.scanlines--light { background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 2px, transparent 2px 6px); }

/* ══ BUTTONS ══════════════════════════════════════════════════ */
.btn {
  min-height: 56px; padding: 16px 26px; cursor: pointer;
  background: var(--surface); border: 4px solid var(--line);
  box-shadow: 6px 6px 0 rgba(0,0,0,.5);
  font-family: var(--hud); font-size: 12px; letter-spacing: 1px;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { transform: translate(-2px,-2px); background: var(--surface-2); box-shadow: 8px 8px 0 rgba(0,0,0,.55); }
.btn:active { transform: translate(2px,2px); box-shadow: 3px 3px 0 rgba(0,0,0,.5); }

.btn--primary {
  background: var(--rust); color: var(--text);
  box-shadow: 6px 6px 0 rgba(0,0,0,.55);
}
.btn--primary:hover { background: var(--rust); box-shadow: 8px 8px 0 rgba(0,0,0,.6); }

.btn--gold { background: var(--gold); border-width: 3px; }
.btn--gold:hover { background: var(--gold); }

.btn--sm { min-height: 48px; padding: 12px 16px; font-size: 10px; box-shadow: 5px 5px 0 rgba(0,0,0,.5); }
.btn--xs { min-height: 44px; padding: 8px 12px; font-size: 10px; align-self: flex-start; box-shadow: none; }
.btn--xs:hover { transform: translate(-1px,-1px); box-shadow: 2px 2px 0 rgba(0,0,0,.5); }


/* ══ WORLD MAP ════════════════════════════════════════════════ */
/* Primary navigation: always on screen, never collapsed. */
.nav {
  position: fixed; right: 16px; bottom: 16px; z-index: 88;
  width: 232px;
  display: flex; flex-direction: column;
  background: var(--surface-2); border: 4px solid var(--line);
  box-shadow: 6px 6px 0 rgba(0,0,0,.32);
  transition: transform .3s ease, opacity .3s ease;
}
.nav.is-away { transform: translateY(160%); opacity: 0; pointer-events: none; }
.nav__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 9px; border-bottom: 3px solid rgba(227,205,164,.25);
}
.nav__title { color: var(--text); letter-spacing: 1.5px; }
.nav__count { color: var(--gold); }

.nav__map { position: relative; margin: 7px; background: var(--navy-dark); }
.nav__land {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  aspect-ratio: var(--cols) / var(--rows);
}
.nav__cell { background: transparent; }
.nav__cell.is-land { background: var(--olive); }

.nav__readout {
  margin: 0; padding: 0 9px 6px; color: var(--sky-mid); letter-spacing: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav__expand {
  min-height: 44px; padding: 10px; cursor: pointer; text-align: center;
  background: rgba(227,205,164,.08); border: 0; border-top: 3px solid rgba(227,205,164,.25);
  color: var(--text); font-family: var(--hud); font-size: 9px; letter-spacing: 1.5px;
  transition: background .12s, color .12s;
}
.nav__expand:hover { background: var(--gold); color: var(--text); }

/* ── the map screen ── */
.atlas {
  position: fixed; inset: 0; z-index: 125;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.atlas[hidden] { display: none; }
.atlas__scrim { position: absolute; inset: 0; background: rgba(10,36,56,.9); }

.atlas__panel {
  position: relative; width: min(1080px, 100%); max-height: calc(100svh - 40px);
  display: flex; flex-direction: column;
  background: var(--bg-deep); border: 6px solid var(--line);
  box-shadow: 14px 14px 0 rgba(0,0,0,.45);
  overflow: auto;
}
.atlas__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; background: var(--surface-2); color: var(--gold);
  border-bottom: 4px solid var(--line-faint);
}
.atlas__x {
  cursor: pointer; width: 34px; height: 34px;
  background: var(--rust); border: 3px solid var(--line); color: var(--text);
  font-family: var(--hud); font-size: 12px;
}
.atlas__body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.atlas__viewport {
  position: relative; overflow: hidden;
  background: var(--navy-dark);
  border: 4px solid var(--line);
  box-shadow: inset 0 0 0 2px rgba(227,205,164,.12);
}
.atlas__scene {
  position: relative;
  transform-origin: 50% 50%;
  transition: transform 0s;
}
.atlas__scene.is-flying { transition: transform .76s cubic-bezier(.32,.72,.2,1); }

.atlas__land {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  aspect-ratio: var(--cols) / var(--rows);
  gap: 0;
}
.atlas__cell { background: transparent; }
.atlas__cell.is-land { background: var(--olive); box-shadow: inset 0 0 0 .5px rgba(15,12,10,.35); }

/* ── pins ── */
.pin {
  position: absolute; z-index: 2;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  transform: translate(-50%, -50%);
  background: transparent; border: 0;
  display: grid; place-items: center;
}
.pin__dot {
  width: 10px; height: 10px; background: var(--gold);
  box-shadow: 0 0 0 3px var(--navy-dark), 0 0 0 5px var(--gold);
}
.pin__ring {
  position: absolute; width: 10px; height: 10px; border: 3px solid var(--gold);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0%   { transform: scale(1);   opacity: .9; }
  100% { transform: scale(3.4); opacity: 0; }
}
.pin:hover .pin__dot, .pin:focus-visible .pin__dot { background: var(--surface); box-shadow: 0 0 0 3px var(--bg-deep), 0 0 0 5px var(--surface); }

/* 26px clears WCAG 2.5.8 minimum target size; 44 would swamp a 232px map. */
.pin--sm { width: 26px; height: 26px; }
.pin--sm .pin__dot { width: 5px; height: 5px; box-shadow: 0 0 0 2px var(--navy-dark), 0 0 0 3px var(--gold); }
.pin--sm .pin__ring { width: 5px; height: 5px; border-width: 2px; }
.pin--sm .pin__tip { display: none !important; }

.pin__tip {
  position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px);
  display: none; flex-direction: column; gap: 3px;
  padding: 8px 10px; white-space: nowrap;
  background: var(--surface-2); border: 3px solid var(--gold); text-align: left;
}
.pin:hover .pin__tip, .pin:focus-visible .pin__tip { display: flex; }
.pin__name { font-family: var(--hud); font-size: 10px; letter-spacing: 1px; color: var(--text); }
.pin__note { font-family: var(--body); font-size: 12px; color: var(--sky-mid); }

.atlas__readout { margin: 0; color: var(--sky-mid); letter-spacing: 2px; text-align: center; }

.atlas__zones {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px;
}
.atlas__zone {
  width: 100%; min-height: 44px; padding: 10px 12px; cursor: pointer; text-align: left;
  background: rgba(227,205,164,.06); border: 3px solid rgba(227,205,164,.25);
  color: var(--text);
  font-family: var(--hud); font-size: 10px; letter-spacing: 1px;
  transition: background .12s, border-color .12s, color .12s;
}
.atlas__zone:hover { background: rgba(232,167,44,.16); border-color: var(--gold); color: var(--text); }
.atlas__zone.is-on { border-color: var(--gold); color: var(--gold); }

@media (max-width: 900px) {
  .nav__map .pin { pointer-events: none; }
}

/* On a phone a floating panel sits on top of the page for the whole scroll.
   Docking it to the bottom edge keeps the map permanently available without
   ever covering anything — the page just reserves the height. */
@media (max-width: 760px) {
  .nav.is-away { transform: translateY(100%); }
  .nav {
    right: 0; bottom: 0; left: 0; width: auto;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 6px 10px;
    border: 0; border-top: 4px solid var(--line);
    box-shadow: 0 -6px 0 rgba(0,0,0,.35);
  }
  .nav__head { flex: 0 0 auto; flex-direction: column; align-items: flex-start; gap: 1px; padding: 0; border: 0; }
  .nav__map { flex: 1 1 auto; margin: 0; max-width: 168px; }
  .nav__readout { display: none; }
  .nav__expand {
    flex: 0 0 auto; border: 3px solid var(--line); border-top-width: 3px;
    padding: 10px 12px; background: transparent;
  }
  /* clears the docked bar, so nothing sits permanently under it */
  .world { padding-bottom: 104px; }
}

@media (max-width: 760px) {
  .atlas { padding: 10px; }
  .atlas__body { padding: 12px; gap: 12px; }
  /* Manchester and Monaco are only three cells apart at this scale. Both lead
     to The Collection, so overlapping is harmless — just make them read as two. */
  .atlas .pin { width: 44px; height: 44px; }
  .pin { width: 26px; height: 26px; }
  .pin__dot { width: 7px; height: 7px; box-shadow: 0 0 0 2px var(--navy-dark), 0 0 0 4px var(--gold); }
  .pin__ring { width: 7px; height: 7px; border-width: 2px; }
  .pin__tip { display: none !important; }
}

/* ══ SPAWN · character select ═══════════════════════════════ */
.zone--spawn {
  --accent: var(--gold);
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(72px, 12vh, 128px) clamp(20px, 4vw, 56px) 24px;
}
/* Locked to one screen on the desktop 3-column layout, so switching fighters
   never changes the page's height — a longer bio or quote just wraps inside
   its own box instead of growing the zone (and everything below it). Left as
   min-height only below 1080px, where the columns stack and need the room. */
@media (min-width: 1081px) {
  .zone--spawn { max-height: 100svh; }
}

/* Each character's everyday world, behind the hero and readable vignette. */
.hero__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center 40%;
  image-rendering: pixelated;
  opacity: .64; filter: saturate(1);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
}
.zone--spawn::after {  /* a vignette, not a wall — the scene should read */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(85% 70% at 50% 42%, transparent 35%, rgba(20,16,11,.55) 78%, rgba(20,16,11,.92) 100%),
    linear-gradient(90deg, rgba(20,16,11,.55) 0%, transparent 26%, transparent 74%, rgba(20,16,11,.55) 100%);
}

.hero {
  position: relative; z-index: 2;
  width: 100%; max-width: 1360px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(290px, .9fr);
  gap: clamp(16px, 3vw, 44px); align-items: center;
}

/* ── LEFT · this timeline ── */
.hero__intro { display: flex; flex-direction: column; gap: 14px; }
.hero__eyebrow {
  color: var(--accent); letter-spacing: 2.5px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: color .3s ease;
}
.hero__eyebrow::before { content: ''; width: 26px; height: 2px; background: currentColor; }
.hero__name {
  margin: 0;
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(32px, 3.6vw, 58px); line-height: .98; color: var(--text);
}
.hero__class {
  color: var(--text-soft); letter-spacing: 3px;
}
.hero__bio { margin: 4px 0 0; max-width: 42ch; font-size: 16px; line-height: 1.6; color: var(--text-soft); text-wrap: pretty; }
.hero__bio em { color: var(--text); font-style: italic; }
.hero__cta { display: flex; gap: 12px; margin-top: 6px; }
.hero__cta .btn { min-height: 48px; }
.hero__cta .btn span { margin-left: 8px; }
.hero__quote { margin: 6px 0 0; font-size: 12px; letter-spacing: 1px; color: var(--text-faint); font-style: italic; }

/* ── CENTRE · the portal ── */
.hero__portal {
  position: relative; align-self: center; justify-self: center;
  width: min(100%, 460px); aspect-ratio: 1;
  display: grid; place-items: center;
}
.hero__fig, .hero__ghost {
  position: relative; z-index: 1;
  width: auto; height: clamp(260px, 52vh, 560px);
  image-rendering: pixelated;
  filter:
    drop-shadow(1px 0 0 color-mix(in srgb, var(--accent) 60%, transparent))
    drop-shadow(-1px 0 0 color-mix(in srgb, var(--accent) 60%, transparent))
    drop-shadow(0 -1px 0 color-mix(in srgb, var(--accent) 45%, transparent))
    drop-shadow(0 10px 22px rgba(0,0,0,.6));
  transition: filter .3s ease;
}
.hero__ghost {
  position: absolute; z-index: 0; opacity: 0; pointer-events: none;
  filter: saturate(.4) brightness(1.2) drop-shadow(0 0 16px color-mix(in srgb, var(--accent) 45%, transparent));
  transition: opacity .18s ease;
}
.hero__portal.is-glitch .hero__fig { animation: tl-jump .22s steps(2, end) 1; }
@keyframes tl-jump {
  0%   { transform: translateX(-5px); filter: drop-shadow(3px 0 0 #ff3b3b) drop-shadow(-3px 0 0 #3bd6ff); clip-path: inset(0 0 62% 0); }
  33%  { transform: translateX(5px);  clip-path: inset(46% 0 24% 0); }
  66%  { transform: translateX(-2px); clip-path: inset(70% 0 4% 0); }
  100% { transform: none; clip-path: none; }
}

/* ── RIGHT · the readout ── */
.hero__panels { display: flex; flex-direction: column; gap: 14px; }
.hpanel {
  padding: 14px 16px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--line-faint);
  backdrop-filter: blur(2px);
}
.hpanel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line-faint);
}
.hpanel__head .hud { color: var(--text-soft); letter-spacing: 2px; }
.hpanel__lv { color: var(--accent) !important; transition: color .3s ease; }
.hpanel__online { color: var(--olive-lt) !important; display: inline-flex; align-items: center; gap: 6px; }
.hpanel__online i { width: 7px; height: 7px; background: var(--olive-lt); border-radius: 50%; }

.attrs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.attr { display: grid; grid-template-columns: 18px 84px 1fr 26px; align-items: center; gap: 9px; }
.attr__icon { display: grid; place-items: center; color: var(--text-faint); }
.attr__label { font-family: var(--hud); font-size: 8px; letter-spacing: 1px; color: var(--text-faint); }
.attr__track { height: 6px; background: var(--bg-deep); border: 1px solid var(--line-faint); }
.attr__fill { display: block; height: 100%; width: 0; transition: width .4s cubic-bezier(.3,.7,.2,1); }
.attr__num { font-family: var(--hud); font-size: 11px; color: var(--text); text-align: right; }

.profile { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.profile__row { display: grid; grid-template-columns: 58px 1fr; align-items: baseline; gap: 10px; }
.profile__row dt { font-family: var(--hud); font-size: 9px; letter-spacing: 1px; color: var(--text-faint); }
.profile__row dt::after { content: ':'; }
.profile__row dd { margin: 0; font-size: 14px; color: var(--text); }
.profile__row dd.is-live { color: var(--olive-lt); }
.profile__quote { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line-faint); font-size: 12px; font-style: italic; color: var(--text-faint); }

/* ── BOTTOM · select character ── */
.roster {
  position: relative; z-index: 2;
  width: 100%; max-width: 1360px; margin: clamp(20px, 4vh, 48px) auto 0;
  display: flex; flex-direction: column; gap: 10px;
}
.roster__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.roster__head .hud { color: var(--text-soft); letter-spacing: 2px; }
.roster__hint { color: var(--text-faint) !important; font-size: 9px; }

.roster__nav { display: flex; align-items: stretch; gap: 8px; }
.roster__arrow {
  flex: 0 0 auto; width: 30px; cursor: pointer;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--text);
  font-family: var(--disp); font-size: 18px;
  transition: border-color .12s, color .12s;
}
.roster__arrow:hover { border-color: var(--accent); color: var(--accent); }

.roster__row {
  flex: 1 1 auto; min-width: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 8px;
  overflow-x: auto; scrollbar-width: none; padding: 2px;
}
.roster__row::-webkit-scrollbar { display: none; }

.char {
  --accent: var(--gold);
  position: relative; height: 118px; cursor: pointer; overflow: hidden;
  padding: 0; text-align: left;
  background: var(--surface-2); border: 2px solid var(--line-faint);
  transition: border-color .14s, transform .14s;
  opacity: .62;
}
.char__shot { position: absolute; inset: 0; }
.char__shot img {
  width: 100%; height: 100%; object-fit: contain; object-position: 80% bottom;
  image-rendering: pixelated;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
}
.char::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(12,9,6,.9) 100%);
}
.char__num {
  position: absolute; top: 6px; right: 8px; z-index: 2;
  font-family: var(--hud); font-size: 12px; color: var(--text-faint);
}
.char__meta {
  position: absolute; left: 10px; bottom: 8px; right: 10px; z-index: 2;
  display: flex; flex-direction: column; gap: 1px;
}
.char__name { font-family: var(--disp); font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.1; }
.char__tag { font-family: var(--hud); font-size: 7px; letter-spacing: 1px; color: var(--text-faint); }

.char:hover { opacity: .9; transform: translateY(-3px); }
.char.is-on {
  opacity: 1; border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px color-mix(in srgb, var(--accent) 35%, transparent);
}
.char.is-on .char__num { color: var(--accent); }

/* ── responsive ── */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 14px; justify-items: center; text-align: center; }
  .hero__intro { align-items: center; }
  .hero__bio { text-align: center; }
  .hero__eyebrow::before { display: none; }
  .hero__portal { order: -1; width: min(70%, 320px); }
  .hero__panels { width: min(100%, 460px); }
  .zone--spawn::after {
    background: linear-gradient(180deg, rgba(20,16,11,.7) 0%, rgba(20,16,11,.5) 50%, rgba(20,16,11,.9) 100%);
  }
}
@media (max-width: 760px) {
  .zone--spawn { padding-bottom: 128px; min-height: auto; }  /* clear the docked map bar */
  .hero__name { font-size: clamp(30px, 8vw, 44px); }
  .attr { grid-template-columns: 16px 72px 1fr 24px; gap: 7px; }
  .char { height: 96px; }
  .roster__row { grid-auto-columns: minmax(128px, 1fr); }
  .roster__head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .roster__hint { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__portal.is-glitch .hero__fig { animation: none; }
  .hero__fig, .attr__fill, .hero__bg { transition: none; }
}

/* ══ 2 · ORIGIN ═══════════════════════════════════════════════ */
/* The room is the whole zone now — a full-bleed backdrop behind the
   zonehead copy, one image, four pin hotspots, each opening a modal
   that used to be a separate card. See .pin for the marker itself —
   same component as the world map's yellow squares. */
.zone--origin { min-height: 100svh; }
/* .wrap normally spans the full width to hold a grid of real controls, but
   here it's just a caption box floating over the room — the empty space
   around the text would otherwise sit above the pins and eat their clicks. */
.zone--origin .wrap { pointer-events: none; }
.campus { position: absolute; inset: 0; z-index: 0; margin: 0; pointer-events: none; }
/* True full-bleed cover, edge to edge — the room art is the section's
   background, the way a hero photo would be, not a framed picture on it. */
.campus__scene { position: absolute; inset: 0; pointer-events: none; }
.campus__scene img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; image-rendering: pixelated; }
/* A solid chip, not plain text over the art — the room's colour varies too
   much behind the zonehead for a bare line to stay readable everywhere. */
.campus__hint {
  align-self: flex-start; margin: 0; padding: 8px 12px;
  background: var(--surface-2); border: 3px solid var(--gold); color: var(--text);
}
/* A phone's tall, narrow viewport is nothing like the room's own wide
   aspect ratio — full-bleed `cover` would crop the window and the saxophone
   off screen, and forcing the old 100svh box with `contain` just shrank the
   room to a postage stamp marooned in a tall column of empty space. Below
   1080px, stop pretending it's a background: let it sit in-flow, sized to
   its own aspect ratio, right under the heading. */
@media (max-width: 1080px) {
  .zone--origin { min-height: auto; display: flex; flex-direction: column; }
  .zone--origin .wrap { order: 1; }
  .campus {
    order: 2; position: relative; inset: auto; z-index: auto;
    width: 100%; aspect-ratio: 1920 / 1072;
  }
  .campus__scene img { object-fit: contain; }
}

/* Room pins sit right on the artwork, so keep the ring subtle and the
   target smaller than the map's — the image itself gives them room. */
.campus__scene .pin { width: 56px; height: 56px; pointer-events: auto; }
.campus__scene .pin__dot { width: 16px; height: 16px; box-shadow: 0 0 0 4px var(--navy-dark), 0 0 0 7px var(--gold); }
.campus__scene .pin__ring { width: 16px; height: 16px; border-width: 4px; }
@media (max-width: 760px) {
  .campus__scene .pin { width: 40px; height: 40px; }
  .campus__scene .pin__dot { width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--navy-dark), 0 0 0 5px var(--gold); }
  .campus__scene .pin__ring { width: 12px; height: 12px; border-width: 3px; }
}

/* ── internships (corkboard) ── */
.badges-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px;
}
.badges-grid__card {
  padding: 16px; background: var(--surface); border: 4px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.badges__head { display: flex; align-items: center; gap: 12px; }
.badges__logo {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 34px; height: 34px;
}
.badges-grid__card h3 { margin: 0; font-family: var(--disp); font-size: 22px; font-weight: 600; line-height: 1.1; }
.badges-grid__card .dates { font-family: var(--hud); font-size: 10px; letter-spacing: 1px; color: var(--rust); }
.badges-grid__card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-soft); text-wrap: pretty; }

/* ── certificates (saxophone) ── */
.certs-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.certs-list__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 4px; border-bottom: 2px solid var(--line-faint);
  font-family: var(--disp); font-size: 18px; font-weight: 600;
}
.certs-list__row:last-child { border-bottom: 0; }
.certs-list__year { font-family: var(--hud); font-size: 12px; letter-spacing: 1px; color: var(--rust); }

/* ── terminal readout (laptop) ── */
.term {
  margin: 0; padding: 18px 20px; background: var(--bg-deep);
  font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.9;
  white-space: pre-wrap; overflow-x: auto;
}
.term__prompt { color: var(--text-faint); }
.term__label { color: var(--rust-soft); }
.term__value { color: var(--text); }

/* ══ 3 · COLLECTION ═══════════════════════════════════════════ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px,1fr)); gap: 26px; }

.card { perspective: 1400px; height: clamp(420px, 52vw, 470px); }
/* Sized (and the surrounding padding trimmed) to fit one screen on desktop —
   the same one-screen-per-zone treatment as Spawn and Comms, just reached by
   shrinking the grid instead of a sizing bug. Left alone below 1081px, where
   the grid already reflows and shrinking further would cramp the cards. */
@media (min-width: 1081px) {
  .zone--collection { max-height: 100svh; }
  .zone--collection .wrap { padding-top: 48px; padding-bottom: 32px; }
  .zone--collection .wrap--stack { gap: 20px; }
  .card { height: clamp(220px, 34vh, 320px); }
}
.card__inner {
  position: relative; width: 100%; height: 100%;
  padding: 0; background: transparent; border: 0; cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .58s cubic-bezier(.2,.7,.2,1);
}
.card.is-flipped .card__inner { transform: rotateY(180deg); }

.card__face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 4px solid var(--line); box-shadow: 7px 7px 0 rgba(0,0,0,.5);
}
.card__front { padding: 14px; background: var(--surface); }
.card__back {
  transform: rotateY(180deg);
  gap: 12px; padding: 20px; text-align: left; background: var(--navy-deep);
}

.card__art {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  background: var(--surface-2); border: 3px solid var(--line); display: block;
}
.card__art img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; image-rendering: pixelated;
}
.card__art.is-missing img { display: none; }
.card__art.is-missing {
  background:
    repeating-linear-gradient(45deg, rgba(250,241,222,.06) 0 10px, transparent 10px 20px),
    var(--card-color, var(--bg-deep));
  display: grid; place-items: center; padding: 16px; text-align: center;
}
.card__missing { display: none; font-family: var(--hud); font-size: 9px; letter-spacing: 1px; line-height: 1.9; color: var(--text); }
.card__art.is-missing .card__missing { display: block; }

.card__meta { display: flex; align-items: center; gap: 12px; padding-top: 14px; }
.card__stripe { flex: 0 0 auto; width: 8px; height: 38px; border: 2px solid var(--line); }
.card__names { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.card__label { font-family: var(--disp); font-size: 20px; font-weight: 600; line-height: 1.05; color: var(--text); }
.card__tier  { font-family: var(--hud); font-size: 9px; letter-spacing: 1px; color: var(--rust-soft); }
.card__index { font-family: var(--hud); font-size: 10px; letter-spacing: 1px; color: var(--text-faint); }

.card__backhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__backhead .l { font-family: var(--hud); font-size: 9px; letter-spacing: 1px; color: var(--gold); }
.card__backhead .r { font-family: var(--hud); font-size: 9px; letter-spacing: 1px; color: var(--sky-mid); }
.card__title { font-family: var(--disp); font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--text); }
.card__body  { flex: 1; font-size: 15px; line-height: 1.6; color: var(--text); text-wrap: pretty; overflow: auto; }
.card__tag {
  align-self: flex-start; display: inline-flex; align-items: center;
  text-decoration: none; border: 3px solid var(--gold);
}
.card__tag-label {
  padding: 6px 9px; background: var(--gold); color: var(--text);
  font-family: var(--hud); font-size: 9px; letter-spacing: 1px;
}
.card__tag-value {
  padding: 6px 10px; color: var(--gold);
  font-family: var(--hud); font-size: 10px; letter-spacing: 1px;
}
.card__tag--link:hover { border-color: var(--text); }
.card__tag--link:hover .card__tag-label { background: var(--surface); }
.card__tag--link:hover .card__tag-value { color: var(--text); }

.card__flipback { font-family: var(--hud); font-size: 9px; letter-spacing: 1px; color: var(--sky); }

/* ── locked slot ── */
.card--locked { cursor: default; }
.card__front--static {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 14px; background: var(--surface-2);
  border: 4px dashed rgba(0,0,0,.65); box-shadow: 7px 7px 0 rgba(0,0,0,.4);
}
.card__art--locked {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  background:
    repeating-linear-gradient(45deg, rgba(227,205,164,.05) 0 8px, transparent 8px 16px),
    var(--surface-2);
  border: 3px dashed rgba(0,0,0,.6);
}
.card__teaser { font-family: var(--hud); font-size: 10px; letter-spacing: 1px; color: var(--text-faint); }

.padlock { display: flex; flex-direction: column; align-items: center; position: relative; }
.padlock__shackle {
  width: 34px; height: 20px;
  border: 6px solid var(--text-faint); border-bottom: 0;
}
.padlock__body { width: 54px; height: 38px; background: var(--text-faint); }
.padlock__keyhole {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  width: 8px; height: 14px; background: var(--surface);
}

.card--locked .card__stripe { background: rgba(0,0,0,.55); border-color: rgba(0,0,0,.65); }
.card--locked .card__label { color: var(--text-faint); }
.card--locked .card__meta { padding-top: 12px; }


/* ══ 4 · WORKSHOP ═════════════════════════════════════════════ */
.bench {
  display: flex; flex-direction: column; gap: 24px; padding: 24px;
  background: var(--surface-2); border: 4px solid var(--line);
  box-shadow: 10px 10px 0 rgba(0,0,0,.5);
}
.bench__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 12px; border-bottom: 4px solid var(--line); padding-bottom: 16px;
}
.bench__id { display: flex; flex-direction: column; gap: 6px; }
.bench__role { color: var(--rust-soft); }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 3px solid var(--line); }
.chip--live { background: var(--olive); color: var(--text); }
.chip__dot { width: 8px; height: 8px; background: var(--gold); }

.bench__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 28px; }
.bench__prose { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.bench__shots { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

@media (min-width: 901px) {
  .bench__grid { grid-template-columns: 1.55fr 1fr; align-items: start; }
  .bench__shots { position: sticky; top: 20px; }
}

.field { display: flex; flex-direction: column; gap: 12px; }
.field__label { color: var(--rust); margin-bottom: -4px; }
.field p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-soft); text-wrap: pretty; }
.field p strong { font-weight: 600; color: var(--text); }

/* the line that lands the section */
.punch {
  padding: 12px 14px;
  background: var(--bg-deep);
  border-left: 6px solid var(--rust);
}

.ticks {
  margin: 0; padding-left: 20px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 16px; line-height: 1.6; color: var(--text-soft);
}
.ticks--defs { gap: 12px; }
.ticks--defs strong { font-weight: 600; color: var(--text); }
.ticks li::marker { color: var(--rust); }

/* pull-quote: the one-line promise each bench is built around */
.promise {
  margin: 4px 0 0; padding: 16px 18px;
  background: var(--bg-deep); color: var(--text);
  border-left: 6px solid var(--gold);
  box-shadow: 6px 6px 0 rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 10px;
}
.promise figcaption { color: var(--gold); }
.promise blockquote {
  margin: 0;
  font-family: var(--disp); font-size: 20px; font-weight: 600;
  line-height: 1.35; color: var(--text); text-wrap: pretty;
}

/* ── live site preview ─────────────────────────────────────────── */
.preview { margin: 0; }

.preview__link {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface-2); border: 4px solid var(--line);
  box-shadow: 8px 8px 0 rgba(0,0,0,.5);
  transition: transform .12s, box-shadow .12s;
}
.preview__link:hover { transform: translate(-3px,-3px); box-shadow: 11px 11px 0 rgba(0,0,0,.55); }
.preview__link:active { transform: translate(1px,1px); box-shadow: 5px 5px 0 rgba(0,0,0,.55); }

.preview__chrome { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.preview__lights { display: flex; gap: 6px; flex: 0 0 auto; }
.preview__lights span { width: 10px; height: 10px; }
.preview__lights span:nth-child(1) { background: var(--rust); }
.preview__lights span:nth-child(2) { background: var(--gold); }
.preview__lights span:nth-child(3) { background: var(--olive); }

.preview__url {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; background: var(--surface-3); border: 2px solid var(--line-faint);
}
.preview__lock { font-size: 9px; line-height: 1; filter: grayscale(1); opacity: .8; }
.preview__host {
  font-family: var(--hud); font-size: 10px; letter-spacing: .5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.preview__go { flex: 0 0 auto; display: flex; color: var(--text-faint); }

.preview__shot { position: relative; display: block; overflow: hidden; background: var(--bg-deep); }
.preview__shot img { width: 100%; height: auto; display: block; }

.preview__hover {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(15,53,80,.72); color: var(--text);
  opacity: 0; transition: opacity .16s;
}
.preview__link:hover .preview__hover,
.preview__link:focus-visible .preview__hover { opacity: 1; }
.preview__cta { font-family: var(--hud); font-size: 12px; letter-spacing: 1px; }

.preview__shot.is-missing {
  display: grid; place-items: center; min-height: 200px; padding: 20px; text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(227,205,164,.07) 0 8px, transparent 8px 16px),
    var(--bg-deep);
}
.preview__missing { font-family: var(--hud); font-size: 9px; letter-spacing: 1px; line-height: 2; color: var(--text); }


.note { padding: 16px; background: var(--surface); border: 4px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.note p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-soft); }

/* ── image slots ─────────────────────────────────────────────── */
.slot { position: relative; width: 100%; height: var(--slot-h, 200px); overflow: hidden; background: var(--bg-deep); }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot--contain img { object-fit: contain; background: var(--surface); }
.slot.is-empty img { display: none; }
.slot__ph { display: none; }
.slot.is-empty .slot__ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  position: absolute; inset: 0; padding: 16px; text-align: center; color: var(--text);
  background:
    repeating-linear-gradient(45deg, rgba(227,205,164,.07) 0 8px, transparent 8px 16px),
    var(--bg-deep);
  box-shadow: inset 0 0 0 3px rgba(227,205,164,.25);
}
.slot__path { font-family: var(--hud); font-size: 9px; letter-spacing: .5px; color: var(--text-faint); opacity: .75; }

/* ── cutaway: the rooms, from outside ─────────────────────────── */
.cutaway {
  position: relative;
  padding: 8px 0 20px;
  /* A faint isometric grid in the page's own palette — enough to read as a
     space the rooms sit in, without a dark slab interrupting the paper. */
  background-image:
    repeating-linear-gradient(60deg,  rgba(227,205,164,.05) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(-60deg, rgba(227,205,164,.05) 0 1px, transparent 1px 38px);
  -webkit-mask-image: radial-gradient(115% 85% at 50% 46%, #000 40%, transparent 100%);
  mask-image: radial-gradient(115% 85% at 50% 46%, #000 40%, transparent 100%);
}

.cutaway__stage {
  position: relative; z-index: 1;
  max-width: 940px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  align-items: end;
}

.room {
  position: relative; display: block; padding: 0; cursor: pointer;
  background: transparent; border: 0;
  transition: transform .18s ease, filter .18s ease;
  will-change: transform;
}
.room img { width: 100%; height: auto; image-rendering: pixelated; }

/* Both rooms sit at full strength until one is opened; then the other steps back. */
.room { transition: filter .2s ease, transform .18s ease; }
.cutaway.has-open .room:not(.is-on) { filter: saturate(.2) opacity(.45); }
.cutaway.has-open .room:not(.is-on):hover,
.cutaway.has-open .room:not(.is-on):focus-visible { filter: saturate(.7) opacity(.85); }
.room:hover { transform: translateY(-3px); }

.room__plate {
  position: absolute; left: 50%; bottom: 2%;
  transform: translate(-50%, 0);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 14px; white-space: nowrap;
  background: var(--surface); border: 3px solid var(--line-soft);
  box-shadow: 3px 3px 0 rgba(0,0,0,.45);
  transition: border-color .18s ease, background .18s ease;
}
.room__name {
  font-family: var(--hud); font-size: 10px; letter-spacing: 1.5px; color: var(--text);
}
/* Always on, not just on hover/open — closed rooms need to say "click me"
   on their own, since nothing is expanded by default any more. */
.room__state {
  font-family: var(--hud); font-size: 8px; letter-spacing: 1px; color: var(--text-soft);
}
.room.is-on .room__plate { border-color: var(--text); background: var(--gold); }
.room.is-on .room__state { color: var(--text); }
.room:not(.is-on):hover .room__plate { border-color: var(--text); }

/* ── debris falling out of each room ── */
.motes { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.mote {
  position: absolute; left: var(--x); top: 62%;
  width: var(--size); height: var(--size);
  opacity: 0;
  animation: fall var(--dur) linear var(--delay) infinite;
}
.motes--revnce .mote { background: var(--line-soft); }    /* paper and receipts */
.motes--lemuel .mote { background: var(--navy); }         /* packets of data */

@keyframes fall {
  0%   { opacity: 0;  transform: translate(0, 0); }
  12%  { opacity: .85; }
  100% { opacity: 0;  transform: translate(var(--drift), 190px); }
}

@media (max-width: 860px) {
  .cutaway { padding: 4px 0 16px; }
  .cutaway__stage { grid-template-columns: 1fr 1fr; gap: 4px; max-width: 100%; }
  /* At this size an overlaid plate crowds the art, so stack it underneath. */
  .room { display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .room__plate {
    position: static; transform: none;
    padding: 6px 10px;
  }
  .room__name { font-size: 9px; letter-spacing: 1px; }
  .room__state { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .motes { display: none; }
}

/* ══ 5 · THE DESK ═════════════════════════════════════════════ */
.zone--desk { background: var(--surface); }

.desk {
  display: grid; gap: 22px;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas: "writing side";
  align-items: start;
}
.panel--writing { grid-area: writing; }
.desk__side { grid-area: side; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.panel {
  /* Without this, the contribution graph's min-width propagates up through the
     grid and drags every panel past the viewport. */
  min-width: 0;
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
  background: var(--surface); border: 4px solid var(--line);
  box-shadow: 8px 8px 0 rgba(0,0,0,.5);
  opacity: 0; transform: translateY(12px);
  transition: opacity .45s ease, transform .45s ease;
}
.desk .panel:nth-child(2) { transition-delay: 90ms; }
.desk .panel--thoughts { transition-delay: 45ms; }
.desk .panel--gallery { transition-delay: 180ms; }
#desk.is-lit .panel, #desk.is-lit .panel--thoughts { opacity: 1; transform: none; }

.panel__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px;
  padding-bottom: 10px; border-bottom: 4px solid var(--line);
}
.panel__title { margin: 0; letter-spacing: 1.5px; color: var(--text); }
.panel__empty {
  grid-column: 1 / -1;
  margin: 0; padding: 20px 0; text-align: center;
  font-size: 14px; line-height: 1.9; color: var(--text-faint);
}
.panel__note { margin: 0; color: var(--text-faint); }

/* ── thoughts: a chat thread ─────────────────────────────────── */
.panel--thoughts {
  grid-area: writing; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  opacity: 0; transform: translateY(12px);
  transition: opacity .45s ease, transform .45s ease;
}

/* ══ iPhone 17 Pro Max mockup ═════════════════════════════════
   Drawn in the site's own blocky, hard-edged palette rather than a
   photoreal render — buttons and the Dynamic Island are pure decoration;
   only the screen content (the thread) is real and interactive. */
.iphone { width: 100%; display: flex; justify-content: center; padding: 4px 0 2px; }

.iphone__frame {
  position: relative;
  width: min(430px, 90%);
  aspect-ratio: 9 / 19.5;
  padding: 9px;
  background: linear-gradient(155deg, var(--surface-3) 0%, var(--bg-deep) 55%, var(--surface-2) 100%);
  border: 2px solid var(--line);
  border-radius: 46px;
  box-shadow: 8px 8px 0 rgba(0,0,0,.5);
}

.iphone__btn { position: absolute; background: var(--line-soft); border-radius: 1px; }
.iphone__btn--action   { left: -3px; top: 16%;   width: 3px; height: 24px; }
.iphone__btn--vol-up   { left: -3px; top: 23.5%; width: 3px; height: 38px; }
.iphone__btn--vol-down { left: -3px; top: 33.5%; width: 3px; height: 38px; }
.iphone__btn--power    { right: -3px; top: 20%;  width: 3px; height: 48px; }
.iphone__btn--camctl   { right: -3px; top: 30.5%; width: 3px; height: 20px; }

.iphone__screen {
  position: relative; width: 100%; height: 100%;
  background: var(--bg-deep);
  border-radius: 38px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.7);
}

.iphone__statusbar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 22px 2px;
  font-family: var(--hud); font-size: 10px; letter-spacing: .5px; color: var(--text);
}
.iphone__glyphs { display: flex; align-items: center; gap: 4px; }
.iphone__signal, .iphone__wifi, .iphone__battery { display: block; }
.iphone__signal {
  width: 13px; height: 8px;
  background:
    linear-gradient(var(--text) 0 0) 0 4px    / 2px 4px no-repeat,
    linear-gradient(var(--text) 0 0) 3.5px 2px / 2px 6px no-repeat,
    linear-gradient(var(--text) 0 0) 7px 0    / 2px 8px no-repeat,
    linear-gradient(var(--text) 0 0) 10.5px -1px / 2px 9px no-repeat;
}
.iphone__wifi {
  width: 12px; height: 8px;
  background:
    linear-gradient(var(--text) 0 0) 0 6px   / 2px 2px no-repeat,
    linear-gradient(var(--text) 0 0) 3px 3px / 2px 2px no-repeat,
    linear-gradient(var(--text) 0 0) 6px 0   / 2px 2px no-repeat;
}
.iphone__battery {
  width: 20px; height: 10px; box-sizing: border-box;
  border: 1px solid var(--text); border-radius: 2px; padding: 1px;
}
.iphone__battery::before { content: ''; display: block; width: 78%; height: 100%; background: var(--text); border-radius: 1px; }

.iphone__island {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 32%; height: 20px; background: #000; border-radius: 11px; z-index: 3;
}

.iphone__nav {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px 9px; border-bottom: 1px solid var(--line-faint);
}
.iphone__back { font-family: var(--disp); font-size: 20px; line-height: 1; color: var(--sent, #2E7BF6); }
.iphone__contact {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  margin-right: 14px; /* balance the back chevron so the name reads centred */
}
.iphone__avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-soft);
  display: grid; place-items: center;
  font-family: var(--disp); font-size: 12px; font-weight: 600;
}
.iphone__contactname { font-size: 9px; letter-spacing: 1px; color: var(--text-soft); }

.thread {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  margin: 0; padding: 12px 12px 10px; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: none;
}
.thread::-webkit-scrollbar { display: none; }

/* a date rule, like the ones in a real thread */
.thread__day {
  align-self: center; margin: 12px 0 4px;
  color: var(--text-faint); letter-spacing: 1.5px;
}
.thread__day:first-child { margin-top: 2px; }

/* one burst of bubbles from one moment; they hug together */
.thread__burst {
  align-self: flex-end; max-width: min(88%, 520px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
}

.bubble {
  padding: 9px 14px;
  background: var(--sent, #2E7BF6);
  color: #fff;
  font-size: 15px; line-height: 1.4; text-align: left;
  border-radius: 18px;
}
/* iMessage tail: only the last bubble of a burst gets the pointed corner */
.thread__burst .bubble:last-child { border-bottom-right-radius: 5px; }
.thread__burst .bubble + .bubble { border-top-right-radius: 5px; }

/* link-preview card, quoted under the lead-in bubble */
.preview-card {
  margin-top: 4px; width: 100%;
  display: flex; flex-direction: column; overflow: hidden;
  text-decoration: none; color: inherit;
  background: var(--surface-2);
  border: 1px solid var(--line-faint);
  border-radius: 16px;
  transition: border-color .14s, transform .14s;
}
a.preview-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.preview-card--dead { opacity: .55; }

.preview-card__shot { display: block; background: var(--bg-deep); }
.preview-card__shot img { display: block; width: 100%; height: auto; }

.preview-card__body { display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; }
.preview-card__title {
  font-family: var(--body); font-size: 14px; font-weight: 600; line-height: 1.3;
  color: var(--text);
}
.preview-card__label {
  font-family: var(--hud); font-size: 8px; letter-spacing: 1px; color: var(--text-faint);
}

/* decorative composer, pinned below the scrolling thread */
.thread__composer {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-top: 1px solid var(--line-faint);
}
.thread__field {
  flex: 1; padding: 9px 14px;
  border: 1px solid var(--line-soft); border-radius: 18px;
  font-size: 14px; color: var(--text-faint);
}
.thread__send {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sent, #2E7BF6); color: #fff;
}

.iphone__home {
  flex: 0 0 auto; align-self: center;
  width: 34%; height: 4px; margin: 6px 0 8px;
  background: var(--text-faint); border-radius: 2px; opacity: .6;
}

@media (max-width: 480px) {
  .iphone__frame { width: min(320px, 88vw); }
}

/* ── listening ── */
.music__status { color: var(--text-faint); }

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

/* Two tiles get too cramped to read a handle on a small phone. */
@media (max-width: 480px) {
  .profiles { grid-template-columns: 1fr; }
}

.profile {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  min-height: 68px; padding: 14px; text-decoration: none;
  background: var(--surface-2); border: 3px solid var(--line); color: inherit;
  transition: transform .12s, box-shadow .12s, background .12s;
}
a.profile:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 rgba(0,0,0,.55); background: var(--surface); }
.profile--flat { opacity: .55; border-style: dashed; }

.profile__mark { flex: 0 0 auto; display: grid; place-items: center; }
.profile__mark svg { display: block; }

.profile__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile__service {
  font-family: var(--disp); font-size: 17px; font-weight: 600; line-height: 1.1; color: var(--text);
}
.profile__handle {
  font-family: var(--hud); font-size: 9px; letter-spacing: .5px; color: var(--text-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile__go { flex: 0 0 auto; margin-left: auto; display: flex; color: var(--text-faint); }
a.profile:hover .profile__go { color: var(--rust); }

/* ── commits ── */
.contrib__total { color: var(--text-faint); }
.contrib__chart { min-width: 0; display: flex; flex-direction: column; gap: 5px; }

/* Both rows share one column count, so labels stay over their weeks however
   wide the panel is. Nothing here has a fixed size — the graph fits, always. */
.contrib__months {
  display: grid; grid-template-columns: repeat(var(--weeks, 53), minmax(0, 1fr)); gap: 2px;
  font-family: var(--hud); font-size: 8px; letter-spacing: .5px; color: var(--text-faint);
  /* labels sit over their week and are allowed to run on; clipped at the edge
     so a trailing month name cannot widen the panel */
  overflow: hidden;
}
.contrib__month { white-space: nowrap; overflow: visible; }

.contrib__grid {
  display: grid; grid-template-columns: repeat(var(--weeks, 53), minmax(0, 1fr));
  grid-template-rows: repeat(7, auto); grid-auto-flow: column;
  gap: 2px;
}
.contrib__day { aspect-ratio: 1; border: 1px solid rgba(227,205,164,.07); }
.contrib__day--pad { visibility: hidden; border: 0; }
.contrib__day--l0 { background: rgba(227,205,164,.06); }
.contrib__day--l1 { background: #C7D19A; }
.contrib__day--l2 { background: #93A365; }
.contrib__day--l3 { background: #6E7C46; }
.contrib__day--l4 { background: var(--olive); }

.contrib__legend { display: flex; align-items: center; gap: 4px; color: var(--text-faint); }
.contrib__legend .hud { margin: 0 4px; }
.contrib__legend .contrib__day { width: 11px; aspect-ratio: 1; }

.contrib__foot { display: flex; }
.contrib__link {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 4px 0;
  text-decoration: none; color: var(--text-soft);
}
.contrib__link:hover { color: var(--rust); }

/* ── gallery ── */
/* A treasure chest, not a grid, on the panel itself — blocky pixel-art
   iconography instead of a smooth file icon, in keeping with the rest of
   the site's discovery/unlock language. Click it and the real grid pops
   up in a modal. */
.chest {
  position: relative; display: block; width: 100%; max-width: 200px;
  aspect-ratio: 5 / 4; margin: 10px auto 40px; padding: 0;
  background: transparent; border: 0; cursor: pointer;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.4));
  transition: transform .16s ease, filter .16s ease;
}
.chest__svg { display: block; width: 100%; height: 100%; }
.chest:hover, .chest:focus-visible {
  transform: translateY(-3px);
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.45));
}
.chest__label {
  position: absolute; left: 0; right: 0; bottom: -30px;
  text-align: center; color: var(--text-soft); letter-spacing: 1px;
}

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shot {
  padding: 0; cursor: pointer; overflow: hidden; aspect-ratio: 1;
  background: var(--bg-deep); border: 3px solid var(--line);
  transition: transform .12s, box-shadow .12s;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 rgba(0,0,0,.6); }

.lightbox { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox__scrim { position: absolute; inset: 0; background: rgba(15,53,80,.88); }
.lightbox__panel {
  position: relative; max-width: min(1000px, 100%); max-height: calc(100svh - 40px);
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px; background: var(--surface); border: 6px solid var(--line);
  box-shadow: 14px 14px 0 rgba(0,0,0,.35);
}
.lightbox__panel img { max-width: 100%; max-height: calc(100svh - 140px); object-fit: contain; }
.lightbox__x {
  position: absolute; right: -6px; top: -6px; z-index: 2;
  width: 32px; height: 32px; cursor: pointer;
  background: var(--rust); border: 3px solid var(--line); color: var(--text);
  font-family: var(--hud); font-size: 12px;
}
.lightbox__caption { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-soft); }

/* ══ 6 · COMMS / OUTRO ════════════════════════════════════════ */
.zone--comms { background: var(--bg-deep); border-bottom: 0; border-top: 2px dashed var(--line-soft); }
.outro { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto; padding: 72px 24px 28px; text-align: center; }
.outro__head { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.outro__title { margin: 0; font-family: var(--disp); font-size: clamp(40px, 6vw, 72px); line-height: 1.1; font-weight: 700; color: var(--text); }
.outro__dot { color: var(--gold); }
.outro__intro { max-width: 48ch; margin: 0; color: var(--text-soft); font-size: 16px; line-height: 1.7; }
.outro__clock { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-faint); letter-spacing: 1px; }
.outro__clock-place::after { content: '\00b7'; margin-left: 8px; }
#outro-clock-time { font-variant-numeric: tabular-nums; color: var(--text-soft); }
.outro__channels { padding: 30px 0 20px; }
.outro__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; }
.outro__link { width: 48px; height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 48px; padding: 10px; background: var(--surface-2); border: 2px solid var(--line-soft); box-shadow: 3px 3px 0 var(--line-faint); color: var(--text); font-family: var(--hud); font-size: 11px; line-height: 1.4; text-decoration: none; cursor: pointer; }
.outro__link:hover { background: var(--surface-3); border-color: var(--gold); color: var(--gold); }
.outro__mark { display: inline-flex; color: var(--gold); }
.outro__closing { padding: 36px 0 24px; }
.outro__quote { margin: 0 0 28px; font-style: italic; font-size: clamp(17px, 2.5vw, 22px); line-height: 1.6; color: var(--text-soft); }
.outro__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; border-top: 1px dashed var(--line-soft); padding-top: 20px; color: var(--text-soft); }
.outro__foot p { margin: 0; line-height: 1.8; }
@media (max-width: 540px) {
  .outro { padding: 48px 20px 24px; }
  .outro__list { gap: 12px; }

  .outro__foot { flex-direction: column; justify-content: center; }
}

/* ══ MODAL ════════════════════════════════════════════════════ */
.modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__scrim { position: absolute; inset: 0; background: rgba(15,53,80,.82); }
.modal__panel {
  position: relative; width: min(720px, 100%);
  background: var(--surface); border: 6px solid var(--line); box-shadow: 14px 14px 0 rgba(0,0,0,.35);
  max-height: calc(100svh - 40px); overflow: auto;
}
.modal__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; background: var(--surface-2); color: var(--gold); }
.modal__x {
  cursor: pointer; width: 32px; height: 32px;
  background: var(--rust); border: 3px solid var(--line); color: var(--text);
  font-family: var(--hud); font-size: 12px;
}
.modal--wide .modal__panel { width: min(880px, 100%); }
.modal__body--flush { padding: 0; }
.sheet { width: 100%; height: auto; display: block; }

.modal__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cred { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.cred__row {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; background: var(--surface-2); border: 3px solid var(--line);
}
.cred dt { color: var(--rust-soft); letter-spacing: 1px; }
.cred dd { margin: 0; font-family: var(--disp); font-size: 22px; font-weight: 600; line-height: 1.15; }

.modal__note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-soft); }

/* ══ RESPONSIVE ═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .desk { grid-template-columns: 1fr; grid-template-areas: "writing" "side"; }

  /* Collapsed, the map is a floating control — keep it small so it covers as
     little of the page behind it as possible. */
  .map:not(.is-open) { width: auto; }
  .map:not(.is-open) .map__title { display: none; }
  .map:not(.is-open) .map__counter { margin-left: 2px; }
}

@media (max-width: 620px) {
  .wrap { padding: 56px 18px 64px; }

  .bench { padding: 18px; }
  .zonehead--split { align-items: flex-start; }
}

/* ══ REDUCED MOTION ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ── ambient idle motion (killed by the reduced-motion block above) ── */
.prompt { animation: bob 1.8s steps(2,end) infinite; }

/* ══ THOUGHT PAGE (thought.html) ══════════════════════════════ */
.pagebody { background: var(--bg); }

.piece {
  max-width: 680px; margin: 0 auto; padding: 40px 24px 80px;
  display: flex; flex-direction: column; gap: 22px;
}

.piece__back {
  align-self: flex-start;
  font-family: var(--hud); font-size: 10px; letter-spacing: 1px;
  color: var(--text-faint); text-decoration: none;
}
.piece__back:hover { color: var(--gold); }

.piece__head { display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; border-bottom: 3px solid var(--line-faint); }
.piece__kicker { color: var(--rust-soft); letter-spacing: 2px; }
.piece__title {
  margin: 0; font-family: var(--disp); font-weight: 700;
  font-size: clamp(28px, 5vw, 44px); line-height: 1.05; color: var(--text);
}
.piece__dek { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text-soft); text-wrap: pretty; }
.piece__date { color: var(--text-faint); letter-spacing: 1px; }

.piece__body { display: flex; flex-direction: column; gap: 18px; }
.piece__h {
  margin: 14px 0 0; font-family: var(--disp); font-weight: 600;
  font-size: 22px; line-height: 1.2; color: var(--text);
}
.piece__p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--text-soft); text-wrap: pretty; }
.piece__p strong { color: var(--text); font-weight: 600; }
.piece__p a, .piece__list a { color: var(--rust-soft); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.piece__p a:hover, .piece__list a:hover { color: var(--gold); }

.piece__list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.6; color: var(--text-soft); }
.piece__list li::marker { color: var(--rust-soft); }

.piece__quote {
  margin: 8px 0; padding: 14px 18px;
  border-left: 4px solid var(--gold); background: var(--surface);
}
.piece__quote blockquote { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text); font-style: italic; text-wrap: pretty; }
.piece__quote figcaption { margin-top: 6px; font-family: var(--hud); font-size: 9px; letter-spacing: 1px; color: var(--text-faint); }

.piece__code {
  margin: 0; padding: 14px 16px; overflow-x: auto;
  background: var(--bg-deep); border: 1px solid var(--line-faint);
  font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.6; color: var(--text-soft);
}

.piece__foot { margin-top: 16px; padding-top: 16px; border-top: 3px solid var(--line-faint); }
.piece__miss { margin: 0; font-size: 17px; color: var(--text-soft); }
