/* =========================================================================
   Henry Zisow — site styles
   Paper-white page, navy "blazer" sections, one wide display face for the
   loud parts and mono for the labels. Motion-only layouts hang off
   html.motion, which JS adds once GSAP is loaded and the OS allows motion,
   so the page still reads top-to-bottom without either.
   ========================================================================= */

/* ---------- Fonts (self-hosted latin subsets, one origin) ---------- */
@font-face {
  font-family: 'Archivo Wide';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(../fonts/archivo-wide.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/inter-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/fraunces-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/fraunces-italic.woff2) format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f7f5f0;
  --paper-2: #eeebe3;
  --card: #fffdf8;
  --ink: #12151b;
  --ink-2: #3d424b;
  --ink-3: #62666e;   /* clears 4.5:1 on --paper */
  --line: #d9d5cb;
  --navy: #0c1628;
  --navy-2: #15233d;
  --blue: #3b85c7;
  --blue-ink: #256199;
  --butter: #f3d77a;
  --lav: #c9b8f2;
  --mint: #9fdcc0;
  --coral: #ff8a6b;
  --amber: #ffb347;
  --live: #4ade80;

  --display: 'Archivo Wide', 'Arial Black', Impact, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Fraunces', Georgia, serif;

  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul { list-style: none; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { background: var(--butter); color: var(--ink); }
/* Programmatic focus after an in-page jump shouldn't draw a ring around a whole section. */
[tabindex="-1"]:focus { outline: none; }

.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 400;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Preloader ---------- */
.loader { display: none; }
html.js .loader {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--paper);
  /* Failsafe: if the script never runs, the loader must not trap the page. */
  animation: loader-failsafe 0s linear 6s forwards;
}
@keyframes loader-failsafe { to { visibility: hidden; opacity: 0; } }
.loader-card {
  width: min(420px, 86vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px 16px;
  box-shadow: 0 30px 60px -30px rgba(12, 22, 40, 0.3);
}
.loader-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.loader-live { display: inline-flex; align-items: center; gap: 8px; }
.loader-live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue);
  animation: blink 1s steps(2, start) infinite;
}
.loader-chart {
  display: block;
  width: 100%;
  height: 110px;
  margin: 16px 0 10px;
  background:
    linear-gradient(var(--paper-2) 1px, transparent 1px) 0 0 / 100% 22px;
  border-radius: 8px;
}
.loader-chart polyline {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.loader-foot { color: var(--ink); }
.loader-pct {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
@keyframes blink { to { visibility: hidden; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-brand {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-where {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
  pointer-events: none;
}
.nav-menu {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-menu-close { display: none; }
.nav-menu[aria-expanded="true"] .nav-menu-open { display: none; }
.nav-menu[aria-expanded="true"] .nav-menu-close { display: inline; }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--navy);
  color: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: 40px;
  padding: 110px var(--gutter) 48px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 700ms var(--ease-io);
  overflow-y: auto;
}
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu-links { display: flex; flex-direction: column; }
.menu-links a {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(34px, 6vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out), color 200ms ease;
  transition-delay: calc(var(--i, 0) * 50ms + 200ms);
}
.menu-links a span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding-top: 0.6em;
  opacity: 0.6;
}
.menu.is-open .menu-links a { opacity: 1; transform: none; }
.menu-links a:hover, .menu-links a:focus-visible { color: var(--butter); }
.menu-side { display: grid; gap: 36px; padding-bottom: 12px; }
.menu-group { display: flex; flex-direction: column; gap: 8px; }
.menu-group .mono-label { color: rgba(247, 245, 240, 0.55); margin-bottom: 6px; }
.menu-group a { text-decoration: none; font-size: 17px; }
.menu-group a:hover { color: var(--butter); }
.menu-loc { font-size: 17px; opacity: 0.7; }

/* ---------- Hero ---------- */
.intro { position: relative; }
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px var(--gutter) 80px;
  overflow: hidden;
  background: var(--paper);
}
.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-name {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(60px, 13vw, 204px);
  line-height: 0.86;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--ink);
  user-select: none;
}
.hero-line { display: block; white-space: nowrap; overflow: hidden; padding: 0 0.04em 0.02em; }
.ch {
  display: inline-block;
  transition: transform 500ms var(--ease-out), color 250ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .hero-name .ch:hover { transform: translateY(-7%) rotate(-4deg); color: var(--blue); }
}
.hero-tag {
  position: relative;
  z-index: 2;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: clamp(12px, 1.1vw, 15px);
  letter-spacing: 0.12em;
  color: var(--ink-2);
  text-align: center;
  min-height: 1.6em;
}
.hero-window {
  position: relative;
  z-index: 1;
  width: clamp(220px, 24vw, 360px);
  aspect-ratio: 16 / 10;
  margin-top: 40px;
  border-radius: 16px;
  display: none;
}
html.motion .hero-window { display: block; visibility: hidden; }

.hero-scroll {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-scroll i {
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--ink-3) 50%, transparent 50%) 0 0 / 1px 200%;
  animation: scroll-hint 1.6s var(--ease-io) infinite;
}
@keyframes scroll-hint { from { background-position: 0 100%; } to { background-position: 0 -100%; } }

/* Stickers */
.sticker {
  position: absolute;
  z-index: 3;
  transform: rotate(var(--r, 0deg));
  user-select: none;
  -webkit-user-select: none;
}
html.can-drag .sticker[data-drag] { cursor: grab; touch-action: none; }
html.can-drag .sticker[data-drag].is-dragging { cursor: grabbing; z-index: 6; }
.sticker.is-dragging { filter: drop-shadow(0 22px 22px rgba(12, 22, 40, 0.22)); }

.pill {
  top: 16%;
  left: 4%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--card);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 14px 30px -14px rgba(12, 22, 40, 0.28), 0 1px 0 rgba(0, 0, 0, 0.04);
}
.pill-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(59, 133, 199, 0.55);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(59, 133, 199, 0); } }

.nametag {
  top: 12%;
  right: 4%;
  width: 210px;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 40px -20px rgba(12, 22, 40, 0.35), 0 1px 0 rgba(0, 0, 0, 0.04);
}
.nametag-top {
  background: var(--blue);
  color: #fff;
  text-align: center;
  padding: 10px 10px 8px;
  line-height: 1;
}
.nametag-top b {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 28px;
  letter-spacing: 0.02em;
}
.nametag-top span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.nametag-body {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 46px;
  text-align: center;
  padding: 10px 0 16px;
  color: var(--ink);
  transform: rotate(-4deg);
}

.ticket {
  right: 7%;
  bottom: 13%;
  display: flex;
  width: 270px;
  background: var(--butter);
  border-radius: 12px;
  box-shadow: 0 24px 40px -22px rgba(12, 22, 40, 0.4);
  /* Punched notches top and bottom where the stub tears off. */
  -webkit-mask: radial-gradient(circle 9px at 206px 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 9px at 206px 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 9px at 206px 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 9px at 206px 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket-main { flex: 1; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ticket-kicker, .ticket-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a3d12;
}
.ticket-big {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 19px;
  line-height: 1.05;
  color: var(--ink);
}
.ticket-stub {
  width: 64px;
  border-left: 2px dashed rgba(18, 21, 27, 0.35);
  display: grid;
  place-items: center;
}
.ticket-stub span {
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4a3d12;
}

.keycaps {
  position: absolute;
  z-index: 3;
  left: 7%;
  bottom: 14%;
  width: 170px;
  height: 150px;
}
.keycap {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8 0%, #f1eee6 100%);
  box-shadow:
    0 6px 0 #d7d2c6,
    0 16px 26px -10px rgba(12, 22, 40, 0.35),
    inset 0 1px 0 #fff;
}
.keycap svg { width: 30px; height: 30px; }
.keycap:nth-child(1) { left: 0; top: 0; }
.keycap:nth-child(2) { left: 88px; top: 26px; }
.keycap:nth-child(3) { left: 30px; top: 84px; }

/* ---------- Stage: the About scene ---------- */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--navy);
  color: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: 110px var(--gutter) 64px;
  overflow: hidden;
}
html.motion .stage {
  position: absolute;
  inset: 0;
  z-index: 5;
  min-height: 0;
  clip-path: inset(50% 50% 50% 50% round 16px);
}
html.motion .intro { height: 100vh; height: 100svh; overflow: hidden; }
html.motion .hero { position: absolute; inset: 0; min-height: 0; }

.stage-grid {
  position: absolute;
  inset: 0;
  background: radial-gradient(rgba(247, 245, 240, 0.13) 1px, transparent 1.4px) 0 0 / 24px 24px;
  -webkit-mask: radial-gradient(ellipse at 30% 50%, #000 0%, transparent 75%);
          mask: radial-gradient(ellipse at 30% 50%, #000 0%, transparent 75%);
  pointer-events: none;
}
.stage-copy { position: relative; z-index: 2; grid-column: 1; grid-row: 1; max-width: 760px; }
.stage-photo-slot {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  height: min(76vh, 720px);
  min-height: 360px;
}
.stage-photo {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: var(--navy-2);
}
.stage-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.stage-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(12, 22, 40, 0.45));
  opacity: var(--shade, 1);
  pointer-events: none;
}
.stage-label { color: rgba(247, 245, 240, 0.6); margin-bottom: 28px; display: flex; gap: 12px; }
.stage-label span { color: var(--butter); }
.stage-statement {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 108%;
  font-size: clamp(24px, 3.1vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.015em;
}
.stage-statement em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: normal;
  color: var(--butter);
  letter-spacing: 0;
}
.stage-statement .w { display: inline-block; }
.stage-sub {
  margin-top: 26px;
  max-width: 560px;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.6;
  color: rgba(247, 245, 240, 0.72);
}
.stage-stats {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid rgba(247, 245, 240, 0.16);
  padding-top: 22px;
}
.stage-stats dt {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.stage-stats dd {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 245, 240, 0.6);
  line-height: 1.5;
}

/* ---------- Generic sections ---------- */
.section {
  position: relative;
  padding: clamp(100px, 15vh, 170px) var(--gutter) clamp(60px, 10vh, 110px);
  /* Entrance states (tilts, offsets) must never widen the page. */
  overflow-x: hidden;
  overflow-x: clip;
}
.sec-head { max-width: 1280px; margin: 0 auto; }
.sec-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--blue-ink);
  margin-bottom: 14px;
}
.sec-num::before { content: '('; }
.sec-num::after { content: ')'; }
.sec-title {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(42px, 8.6vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.sec-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: normal;
  text-transform: none;
  color: var(--blue);
  letter-spacing: 0;
}
.sec-title .split-word { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.sec-title .split-char { display: inline-block; }
.sec-sub {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: clamp(13px, 1.05vw, 15px);
  letter-spacing: 0.06em;
  color: var(--ink-3);
  min-height: 1.6em;
}

/* ---------- Projects terminal ---------- */
.term {
  max-width: 1200px;
  margin: clamp(40px, 6vw, 72px) auto 0;
  background: linear-gradient(180deg, #161c29 0%, #0d121c 100%);
  border: 1px solid #252d3e;
  border-radius: 24px;
  padding: 14px;
  color: #e8e6df;
  box-shadow:
    0 50px 90px -40px rgba(12, 22, 40, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform-origin: 50% 50%;
}
.term-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a93a4;
}
.term-brand { color: var(--amber); font-weight: 500; }
.term-brand b { font-weight: 500; background: var(--amber); color: #0b0f17; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }
.term-title { text-align: center; color: #c9ced8; }
.term-clock { text-align: right; font-variant-numeric: tabular-nums; }
.term-tape {
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background: #070a10;
  border-bottom: 1px solid #1b2231;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #aab2c0;
  white-space: nowrap;
}
.term-tape-track {
  display: inline-flex;
  gap: 44px;
  padding: 9px 0 9px 22px;
  animation: tape 36s linear infinite;
}
.term-tape-track b { color: var(--amber); font-weight: 500; margin-right: 6px; }
@keyframes tape { to { transform: translateX(-50%); } }

.term-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  min-height: 500px;
  background: radial-gradient(ellipse at 60% 30%, #0e1626 0%, #06090f 70%);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
/* CRT scanlines */
.term-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.term-list {
  border-right: 1px solid #1b2231;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}
.term-list-head, .term-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 42px 58px;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
}
.term-list-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5f687a;
  padding-bottom: 10px;
  border-bottom: 1px solid #1b2231;
}
.term-row {
  width: 100%;
  min-height: 54px;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed #1a2130;
  font-family: var(--mono);
  font-size: 13px;
  text-align: left;
  color: #c9cdd6;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.term-row:hover { background: #111827; }
.term-row:focus-visible { outline-offset: -3px; }
.tr-tkr { color: var(--amber); font-weight: 500; }
.tr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-yr { color: #7c8597; }
.tr-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--live);
}
.tr-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tr-auto { color: #67e8f9; }
.term-row[aria-selected="true"] { background: var(--amber); color: #0b0f17; }
.term-row[aria-selected="true"] .tr-tkr,
.term-row[aria-selected="true"] .tr-yr,
.term-row[aria-selected="true"] .tr-status { color: #0b0f17; }

.term-panels { position: relative; min-width: 0; }
.term-panel { padding: 26px clamp(20px, 3vw, 36px) 30px; }
.term-panel + .term-panel { border-top: 1px solid #1b2231; }
html.js .term-panel:not(.is-active) { display: none; }
html.js .term-panel + .term-panel { border-top: 0; }
.term-panel:focus-visible { outline-offset: -4px; }
.tp-head {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7c8597;
}
.tp-tkr { color: var(--amber); }
.tp-yr { margin-left: auto; }
.tp-name {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 115%;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fbfaf6;
}
.tp-note {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--live);
}
.tp-lead { margin-top: 16px; font-size: 17px; line-height: 1.55; color: #f0eee8; max-width: 62ch; }
.tp-desc { margin-top: 12px; font-size: 14.5px; line-height: 1.7; color: #98a0ad; max-width: 68ch; }
.tp-stack { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tp-stack .mono-label { color: #6d7688; font-size: 10px; }
.tp-stack ul { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-stack li {
  font-family: var(--mono);
  font-size: 11px;
  color: #c4c9d3;
  padding: 3px 9px;
  border: 1px solid #283044;
  border-radius: 5px;
}
.tp-keys { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.fkey {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 8px;
  background: #1a2130;
  border: 1px solid #2b3446;
  border-bottom-width: 4px;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #e8e6df;
  transition: transform 120ms ease, border-bottom-width 120ms ease, background 160ms ease;
}
.fkey kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--amber);
  color: #0b0f17;
}
.fkey-primary { background: var(--amber); border-color: #c98a2e; color: #0b0f17; }
.fkey-primary kbd { background: #0b0f17; color: var(--amber); }
.fkey:hover { transform: translateY(2px); border-bottom-width: 2px; }
.fkey:not(.fkey-primary):hover { background: #222a3b; }
.term-foot {
  display: flex;
  gap: 24px;
  padding: 12px 10px 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b7383;
}
.term-ready { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--live); }
.term-ready i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.2s steps(2, start) infinite; }

/* ---------- Graveyard ---------- */
.graveyard-sec { padding-bottom: 40px; }
.yard {
  max-width: 1100px;
  margin: 56px auto 0;
  overflow: hidden;
  padding: 40px 20px 0;
  position: relative;
}
.yard::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--ink);
}
.graveyard {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-end;
  justify-content: center;
}
.grave {
  --tilt: -1.5deg;
  --stone: #dedcd5;
  --stone-top: #e8e6df;
  --stone-bot: #cfccc3;
  position: relative;
  width: 260px;
  min-height: 262px;
  margin-bottom: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--stone);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--stone-top) 0%, var(--stone) 46%, var(--stone-bot) 100%);
  background-blend-mode: soft-light, normal;
  border: 1px solid #bdbab0;
  border-radius: 130px 130px 6px 6px;
  box-shadow: 0 10px 18px -10px rgba(0, 0, 0, 0.2);
  padding: 58px 26px 30px;
  cursor: pointer;
  transform: rotate(var(--tilt));
  transform-origin: 50% 100%;
  transition: border-color 200ms ease;
}
.grave:nth-child(even) { --tilt: 1.3deg; min-height: 244px; }
.grave::before {
  content: '';
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 120px 120px 4px 4px;
  pointer-events: none;
}
.grave::after {
  content: '';
  position: absolute;
  left: -11px; right: -11px; bottom: -13px;
  height: 13px;
  background: linear-gradient(180deg, var(--stone) 0%, var(--stone-bot) 100%);
  border: 1px solid #bdbab0;
  border-radius: 2px;
}
.grave:hover, .grave:focus-visible { border-color: var(--ink-3); }
.grave h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.grave-dates {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.grave-rule { width: 26px; height: 1px; background: rgba(0, 0, 0, 0.18); margin: 14px 0; }
.grave-epitaph {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 24ch;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ---------- Marquee bands ---------- */
.bands {
  position: relative;
  padding: clamp(70px, 10vw, 130px) 0;
  overflow: hidden;
}
.band {
  width: 112vw;
  margin-left: -6vw;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(22px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.band-a { background: var(--navy); color: var(--paper); transform: rotate(-3deg); position: relative; z-index: 2; }
.band-b { background: var(--butter); color: var(--ink); transform: rotate(2deg); margin-top: -10px; }
.band-track {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 0;
  animation: tape 40s linear infinite;
}
.band-b .band-track { animation-direction: reverse; animation-duration: 48s; }
.band-track i { font-style: normal; color: var(--blue); }
.band-b .band-track i { color: var(--ink); font-size: 0.5em; }

/* ---------- Leadership badges ---------- */
.lead { position: relative; padding: clamp(80px, 12vh, 140px) var(--gutter); overflow-x: hidden; overflow-x: clip; }
.lead-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 40px 32px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}
.lead-intro { grid-column: 1 / -1; margin-bottom: 8px; }
.lead-intro .sec-title { font-size: clamp(32px, 6vw, 96px); }

.badge {
  position: relative;
  padding-top: 118px;
  transform-origin: 50% 0;
}
.badge-strap {
  position: absolute;
  top: 0;
  left: 50%;
  width: 44px;
  height: 132px;
  transform: translateX(-50%);
  background: var(--badge);
  color: var(--badge-ink);
  overflow: hidden;
  box-shadow: inset 6px 0 8px -6px rgba(0, 0, 0, 0.25), inset -6px 0 8px -6px rgba(0, 0, 0, 0.25);
}
.badge-strap span {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  white-space: nowrap;
  margin: 0 auto;
  line-height: 44px;
  opacity: 0.85;
}
.badge-clip {
  position: absolute;
  top: 104px;
  left: 50%;
  width: 62px;
  height: 30px;
  transform: translateX(-50%);
  z-index: 2;
  border-radius: 7px 7px 12px 12px;
  background: linear-gradient(180deg, #e3e6ea 0%, #a9afb8 55%, #8d939d 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 #fff;
}
.badge-clip::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -9px;
  width: 22px; height: 16px;
  transform: translateX(-50%);
  border: 3px solid #a3a9b2;
  border-top: 0;
  border-radius: 0 0 9px 9px;
}
.badge-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 34px 60px -32px rgba(12, 22, 40, 0.4), 0 2px 0 rgba(0, 0, 0, 0.03);
}
.badge-head {
  position: relative;
  background: var(--badge);
  color: var(--badge-ink);
  padding: 40px 24px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
}
.badge-head::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 54px;
  height: 9px;
  transform: translateX(-50%);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.badge-kind, .badge-no {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
}
.badge-no { text-align: right; }
.badge-org {
  grid-column: 1 / -1;
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 25px;
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.badge-role { grid-column: 1 / -1; margin-top: 8px; font-size: 14px; font-weight: 500; line-height: 1.4; opacity: 0.9; }
.badge-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 24px;
  border-bottom: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.badge-points { padding: 16px 24px 4px; }
.badge-points li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.badge-points li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 7px; height: 1.5px;
  background: var(--ink-3);
}
.badge-bar {
  height: 30px;
  margin: 10px 24px 20px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px,
    var(--ink) 8px 11px, transparent 11px 12px, var(--ink) 12px 13px, transparent 13px 17px);
  opacity: 0.75;
}

/* Horizontal mode: JS sets html.lead-h on wide screens with motion allowed. */
html.lead-h .lead { height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
html.lead-h .lead-track {
  display: flex;
  align-items: center;
  gap: 52px;
  height: 100%;
  max-width: none;
  margin: 0;
  width: max-content;
  padding: 0 10vw 0 var(--gutter);
}
html.lead-h .lead-intro { width: min(660px, 46vw); flex: none; margin: 0 40px 0 0; }
html.lead-h .lead-intro .sec-title { font-size: clamp(40px, 4.1vw, 72px); }
html.lead-h .badge { width: 350px; flex: none; padding-top: 0; margin-top: 8vh; }
html.lead-h .badge-strap { top: auto; bottom: 100%; height: 60vh; margin-bottom: -14px; }
html.lead-h .badge-clip { top: -16px; }

/* ---------- The record ---------- */
.rec-block {
  max-width: 1280px;
  margin: clamp(56px, 8vw, 96px) auto 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
}
.rec-label { padding-top: 22px; color: var(--ink); }
.rec-rows { border-bottom: 1px solid var(--line); }
.school, .award, .activity {
  position: relative;
  border-top: 1px solid var(--line);
  isolation: isolate;
}
/* Hover: a highlighter wipes in from the left. */
.award::before, .activity::before, .school::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hl, var(--butter));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 500ms var(--ease-out);
}
.school { --hl: #e3eefa; }
.activity { --hl: #ece5fb; }
@media (hover: hover) {
  .award:hover::before, .activity:hover::before, .school:hover::before { transform: scaleX(1); }
}
.school {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  padding: 26px 14px;
}
.school-name {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 115%;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.school-role { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-2); margin-top: 4px; }
.school-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  white-space: nowrap;
}
.school-extra { grid-column: 1 / -1; margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.school-extra .mono-label { display: block; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
}
.award {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 32px;
  gap: 20px;
  align-items: start;
  padding: 24px 14px;
}
.award-year {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 112%;
  font-size: 22px;
  line-height: 1.2;
  color: var(--blue-ink);
}
.award-title { font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.award-desc { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; max-width: 62ch; }
.award-mark { font-size: 20px; color: var(--ink-3); text-align: right; transition: transform 500ms var(--ease-out), color 200ms; }
.award:hover .award-mark { transform: rotate(144deg) scale(1.2); color: var(--ink); }
.activity {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 110px;
  gap: 20px;
  align-items: baseline;
  padding: 18px 14px;
  font-size: 15.5px;
}
.activity-role { font-weight: 600; }
.activity-org { color: var(--ink-2); }
.activity-date { font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; text-align: right; }
.rec-actions { max-width: 1280px; margin: 56px auto 0; display: flex; justify-content: flex-end; }

.btn-ink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 200ms ease, transform 300ms var(--ease-out);
}
.btn-ink svg { width: 15px; height: 15px; transition: transform 300ms var(--ease-out); }
.btn-ink:hover { background: var(--blue-ink); }
.btn-ink:hover svg { transform: translate(2px, -2px); }

/* ---------- Pad controller ---------- */
.pad-device {
  max-width: 1000px;
  margin: clamp(40px, 6vw, 72px) auto 0;
  background: linear-gradient(180deg, #1b2335 0%, #0e1526 100%);
  border: 1px solid #28324a;
  border-radius: 28px;
  padding: clamp(14px, 2vw, 24px);
  box-shadow: 0 50px 90px -40px rgba(12, 22, 40, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #e3e6ec;
}
.pad-top { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(14px, 2vw, 22px); }
.pad-brand {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #fff;
}
.pad-lcd {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: #0b1a12;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7cf0a6;
  text-shadow: 0 0 8px rgba(124, 240, 166, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pad-sound {
  flex: none;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #33405c;
  background: #172036;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.pad-sound[aria-pressed="false"] { color: #7c8597; }
.pads {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 14px);
}
.pad {
  --glow: #4c9bea;
  position: relative;
  aspect-ratio: 1.15;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #2c3750;
  border-top: 2px solid color-mix(in srgb, var(--glow) 55%, #2c3750);
  background: linear-gradient(180deg, #232d42 0%, #1a2234 100%);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.35), 0 0 0 rgba(0, 0, 0, 0);
  text-align: left;
  font-size: clamp(11.5px, 1.15vw, 14px);
  font-weight: 600;
  line-height: 1.25;
  color: #dfe3ea;
  cursor: pointer;
  transition: background 380ms ease, box-shadow 380ms ease, color 200ms ease, transform 120ms ease;
}
.pad[data-cat="interest"] { --glow: #b9a2ff; }
.pad[data-cat="hobby"] { --glow: #ffd166; }
.pad kbd {
  position: absolute;
  top: 9px;
  right: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: #6f7a90;
}
.pad:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--glow) 22%, #232d42) 0%, #1a2234 100%); }
.pad.is-hit {
  background: var(--glow);
  color: #0b0f17;
  transform: translateY(2px);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 0 28px color-mix(in srgb, var(--glow) 80%, transparent), 0 0 70px color-mix(in srgb, var(--glow) 40%, transparent);
  transition-duration: 40ms;
}
.pad.is-hit kbd { color: rgba(11, 15, 23, 0.6); }
.pad.is-glow {
  background: color-mix(in srgb, var(--glow) 70%, #1a2234);
  color: #0b0f17;
  transition-duration: 60ms;
}
.pad-legend {
  display: flex;
  gap: 22px;
  margin-top: clamp(14px, 2vw, 20px);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a93a6;
}
.pad-legend span { display: inline-flex; align-items: center; gap: 8px; }
.pad-legend i { width: 10px; height: 10px; border-radius: 3px; }
.lg-skill { background: #4c9bea; }
.lg-interest { background: #b9a2ff; }
.lg-hobby { background: #ffd166; }

/* ---------- Contact envelope ---------- */
/* The letter sits in normal flow and sizes everything; the envelope body
   overlaps its blank bottom edge. That open state is the static layout —
   the scroll scene starts it tucked inside and pulls it out. */
.contact { position: relative; padding: clamp(90px, 13vh, 150px) var(--gutter); }
.contact-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 40px;
}
html.env-anim .contact { height: 100vh; height: 100svh; padding-top: 70px; padding-bottom: 20px; display: flex; align-items: center; }
html.env-anim .contact-inner { width: 100%; }
.contact-head .sec-title { font-size: clamp(48px, 6.6vw, 124px); }
.envelope-wrap {
  position: relative;
  width: min(520px, 100%);
  margin: 0 auto;
}
.letter {
  position: relative;
  z-index: 2;
  width: 91%;
  margin: 0 auto;
  padding: 22px 24px 60px;
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 10px 30px -14px rgba(12, 22, 40, 0.35);
}
.letter-name {
  margin-top: 6px;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 115%;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.contact-list { margin-top: 14px; display: flex; flex-direction: column; }
.contact-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 40px;
  border-top: 1px dashed var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: padding 300ms var(--ease-out), color 200ms;
}
a.contact-row:hover { padding-left: 6px; color: var(--blue-ink); }
.contact-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact-value { font-family: var(--mono); font-size: 13px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-row-email .contact-value:hover { color: var(--blue-ink); }
.contact-arrow { color: var(--ink-3); transition: transform 300ms var(--ease-out); }
a.contact-row:hover .contact-arrow { transform: translate(2px, -2px); color: inherit; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms, border-color 160ms;
}
.copy-btn svg { width: 12px; height: 12px; }
.copy-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.copy-btn.copied { color: var(--blue-ink); border-color: var(--blue); }

.env-body {
  position: relative;
  aspect-ratio: 1.45;
  margin-top: -64px;
}
.env-back {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #e3d4b6;
  border-radius: 10px;
  box-shadow: 0 40px 70px -40px rgba(12, 22, 40, 0.55);
}
/* Front: everything but the top triangle, with the side folds shaded in. */
.env-front {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 10px;
  background:
    linear-gradient(to top right, transparent 49.7%, rgba(0, 0, 0, 0.06) 50%) left bottom / 50.2% 100% no-repeat,
    linear-gradient(to top left, transparent 49.7%, rgba(0, 0, 0, 0.06) 50%) right bottom / 50.2% 100% no-repeat,
    #efe3cb;
  clip-path: polygon(0 0, 50% 62%, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.env-stamp {
  position: absolute;
  right: 6%;
  bottom: 12%;
  width: 58px;
  height: 70px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 19px;
  /* Perforated edge: a solid centre unioned with a grid of holes. */
  -webkit-mask:
    linear-gradient(#000 0 0) center / calc(100% - 9px) calc(100% - 9px) no-repeat,
    radial-gradient(circle 3px, transparent 97%, #000) -4.5px -4.5px / 9px 9px;
          mask:
    linear-gradient(#000 0 0) center / calc(100% - 9px) calc(100% - 9px) no-repeat,
    radial-gradient(circle 3px, transparent 97%, #000) -4.5px -4.5px / 9px 9px;
  transform: rotate(4deg);
}
.env-post {
  position: absolute;
  right: 20%;
  bottom: 20%;
  padding: 10px 12px;
  border: 2px solid rgba(37, 97, 153, 0.5);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(37, 97, 153, 0.75);
  transform: rotate(-12deg);
  white-space: nowrap;
}
.env-flap {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 62%;
  z-index: 1;
  transform-origin: 50% 0;
  transform: perspective(1400px) rotateX(180deg);
  background: linear-gradient(180deg, #e7d8bb, #d9c6a1);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
html.env-anim .env-flap { transform: none; z-index: 4; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: var(--navy);
  color: var(--paper);
  padding: clamp(64px, 9vw, 100px) var(--gutter) 0;
  overflow: hidden;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-col .mono-label { color: rgba(247, 245, 240, 0.5); margin-bottom: 8px; }
.footer-col a { text-decoration: none; font-size: 15px; color: rgba(247, 245, 240, 0.86); transition: color 160ms; }
.footer-col a:hover { color: var(--butter); }
.footer-col a.footer-email {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--butter);
  border-bottom: 1px solid currentColor;
}
.footer-bar {
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: 18px;
  border-top: 1px solid rgba(247, 245, 240, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 245, 240, 0.55);
}
.footer-bar a { text-decoration: none; }
.footer-bar a:hover { color: var(--paper); }
.footer-giant {
  margin: clamp(20px, 3vw, 36px) calc(var(--gutter) * -0.4) 0;
  display: flex;
  justify-content: center;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 10.4vw;
  line-height: 0.8;
  padding-bottom: 0.04em;
  letter-spacing: -0.03em;
  white-space: nowrap;
  user-select: none;
}
.fg-outline { color: transparent; -webkit-text-stroke: 1.5px rgba(247, 245, 240, 0.5); }
.fg-fill { color: var(--paper); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 22, 40, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}
.modal-overlay.open { opacity: 1; visibility: visible; transition: opacity 220ms ease, visibility 0s linear 0s; }
.modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: 0 40px 80px -30px rgba(12, 22, 40, 0.5);
  transform: translateY(16px) scale(0.98);
  transition: transform 300ms var(--ease-out);
}
.modal-overlay.open .modal { transform: none; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  transition: transform 300ms var(--ease-out), color 160ms;
}
.modal-close:hover { transform: rotate(90deg); color: var(--ink); }
.modal-close svg { width: 14px; height: 14px; }
.modal-body { padding: 30px; }
.modal-year { margin-bottom: 12px; }
.modal h3 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  padding-right: 40px;
}
.modal-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.modal-tags span {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
}
.modal-desc { font-size: 15px; color: var(--ink-2); line-height: 1.65; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Custom cursor (fine pointers, motion allowed) ---------- */
.cursor { display: none; }
html.has-cursor .cursor {
  display: grid;
  place-items: center;
  position: fixed;
  left: 0; top: 0;
  z-index: 250;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  transition: width 300ms var(--ease-out), height 300ms var(--ease-out), margin 300ms var(--ease-out), opacity 200ms;
  will-change: transform;
}
html.has-cursor .cursor.is-label { width: 66px; height: 66px; margin: -33px 0 0 -33px; }
html.has-cursor .cursor.is-hidden { opacity: 0; }
.cursor span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000;
  opacity: 0;
  transition: opacity 200ms;
}
.cursor.is-label span { opacity: 1; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1240px) and (min-width: 861px) {
  .nametag { width: 168px; top: 9%; right: 3%; }
  .nametag-top b { font-size: 22px; }
  .nametag-body { font-size: 36px; padding: 6px 0 12px; }
  .pill { top: 13%; }
}

@media (max-width: 1100px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .rec-block { grid-template-columns: 1fr; gap: 6px; }
  .rec-label { padding-top: 0; }
  .stage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
}

@media (max-width: 899px) {
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-where { display: none; }
  .menu { grid-template-columns: 1fr; align-items: start; align-content: space-between; }

  /* Hero: fewer, smaller stickers */
  .pill { top: 92px; left: 0; right: 0; margin: 0 auto; width: max-content; --r: -3deg; font-size: 10.5px; padding: 8px 14px; }
  .nametag { top: auto; bottom: 9%; right: 5%; width: 150px; }
  .nametag-top b { font-size: 20px; }
  .nametag-body { font-size: 32px; padding: 6px 0 10px; }
  .ticket { right: auto; left: 5%; bottom: 10%; width: 210px; -webkit-mask: none; mask: none; }
  .ticket-stub { width: 46px; }
  .ticket-big { font-size: 15px; }
  .keycaps { display: none; }
  .hero-tag { max-width: 30ch; line-height: 1.7; }
  .hero-window { margin-top: 30px; width: min(300px, 70vw); }
  .hero-scroll { display: none; }

  /* About: photo becomes the backdrop */
  .stage { grid-template-columns: 1fr; padding-top: 96px; align-content: center; }
  .stage-photo-slot { position: absolute; inset: 0; height: auto; min-height: 0; grid-column: auto; grid-row: auto; }
  .stage-photo { border-radius: 0; }
  .stage-photo::after { background: linear-gradient(180deg, rgba(12, 22, 40, 0.55) 0%, rgba(12, 22, 40, 0.86) 45%, rgba(12, 22, 40, 0.94) 100%); }
  .stage-copy { grid-column: 1; }
  .stage-stats { margin-top: 30px; }

  /* Terminal stacks */
  .term { border-radius: 18px; padding: 10px; }
  .term-top { grid-template-columns: 1fr auto; }
  .term-title { display: none; }
  .term-body { grid-template-columns: 1fr; min-height: 0; }
  .term-list { border-right: 0; border-bottom: 1px solid #1b2231; padding: 4px 0; }
  .term-list-head { display: none; }
  .term-row { grid-template-columns: 50px minmax(0, 1fr) 54px; min-height: 46px; padding: 0 12px; }
  .tr-yr { display: none; }
  .term-foot span:nth-child(-n+2) { display: none; }

  .yard { padding: 30px 0 0; }
  .graveyard { gap: 22px; flex-wrap: nowrap; }
  .grave { width: 158px; min-height: 200px; padding: 40px 12px 20px; border-radius: 80px 80px 5px 5px; }
  .grave:nth-child(even) { min-height: 188px; }
  .grave::before { inset: 8px; border-radius: 72px 72px 3px 3px; }
  .grave::after { left: -8px; right: -8px; }
  .grave h3 { font-size: 14px; }
  .grave-rule { margin: 10px 0; }
  .grave-epitaph { font-size: 12px; }

  .school { grid-template-columns: 1fr; }
  .school-meta { flex-direction: row; gap: 14px; align-items: flex-start; }
  .award { grid-template-columns: 1fr; gap: 8px; }
  .award-mark { display: none; }
  .activity { grid-template-columns: 1fr auto; gap: 2px 14px; }
  .activity-org { grid-column: 1; grid-row: 2; }
  .activity-date { grid-column: 2; grid-row: 1; }
  .rec-actions { justify-content: stretch; }
  .rec-actions .btn-ink { width: 100%; justify-content: center; }

  .pads { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pad { aspect-ratio: 1.6; padding: 10px; }
  .pad-top { flex-wrap: wrap; }
  .pad-lcd { order: 3; flex-basis: 100%; }
  .pad-sound { margin-left: auto; }
}

@media (max-width: 860px) and (max-height: 760px) {
  .stage { padding-top: 76px; padding-bottom: 28px; }
  .stage-label { margin-bottom: 14px; }
  .stage-statement { font-size: 21px; }
  .stage-sub { margin-top: 14px; font-size: 13.5px; line-height: 1.5; }
  .stage-stats { margin-top: 18px; padding-top: 14px; gap: 14px; }
  .stage-stats dt { font-size: 22px; }
}

@media (max-width: 640px) {
  .letter { padding: 20px 16px 56px; width: 94%; }
  .contact-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; }
  .copy-btn-label { display: none; }
  .copy-btn { padding: 6px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-col:first-child { grid-column: 1 / -1; }
  .footer-bar { flex-direction: column; gap: 6px; }
  .term-foot { display: none; }
  .stage-sub { font-size: 14.5px; }
  .tp-lead { font-size: 15.5px; }
}

@media (max-width: 400px) {
  .nav-brand { font-size: 14px; }
  .ticket { width: 180px; }
  .ticket-kicker, .ticket-sub { font-size: 8.5px; }
  .nametag { width: 128px; }
}

/* Touch devices latch :hover after a tap — keep things from staying nudged. */
@media (hover: none) {
  a.contact-row:hover { padding-left: 0; }
  .fkey:hover { transform: none; border-bottom-width: 4px; }
}

/* Motion is decoration here — drop it when the OS asks. */
@media (prefers-reduced-motion: reduce) {
  .term-tape-track, .band-track, .hero-scroll i, .pill-dot, .loader-live i, .term-ready i { animation: none; }
  .menu, .menu-links a { transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
