@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=IBM+Plex+Mono:wght@400;500&family=Pathway+Gothic+One&display=swap");

:root {
  color-scheme: dark;

  /* Type scale — 7 levels */
  --t-xs:      0.52rem;                    /* IDs, coords, status tags */
  --t-sm:      0.64rem;                    /* labels, kickers, panel names */
  --t-base:    0.95rem;                    /* body: all readable text */
  --t-nav:     1.0rem;                     /* nav links, mode selectors */
  --t-sub:     1.1rem;                     /* sub-headings, emphasis */
  --t-ident:   3.5rem;                     /* HEAD_ / HEART_ / SHADOW_ */
  --t-display: clamp(5.4rem, 14vw, 11.9rem);   /* TERRESTRIAL title only */

  --bg-top: #070813;
  --bg-mid: #12122a;
  --bg-bottom: #0a0a12;
  --text: rgba(234, 231, 242, 0.88);
  --text-soft: rgba(234, 231, 242, 0.64);
  --text-faint: rgba(234, 231, 242, 0.3);
  --line: rgba(196, 184, 225, 0.16);
  --line-strong: rgba(196, 184, 225, 0.28);
  --accent: rgba(153, 126, 255, 0.88);
  --beacon: #db495a;
  --world-wash:
    radial-gradient(circle at 50% 18%, rgba(116, 95, 194, 0.12), transparent 36%),
    radial-gradient(circle at 50% 89%, rgba(78, 38, 122, 0.06), transparent 28%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 46%, var(--bg-bottom) 100%);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  -webkit-font-smoothing: antialiased;
  transition: background 700ms ease, color 500ms ease;
}

body[data-world="head"] {
  --bg-top: #101c2b;
  --bg-mid: #15263a;
  --bg-bottom: #101c2b;
  --text: rgba(227, 235, 245, 0.9);
  --text-soft: rgba(170, 185, 201, 0.82);
  --text-faint: rgba(128, 148, 168, 0.68);
  --line: rgba(53, 80, 111, 0.28);
  --line-strong: rgba(53, 80, 111, 0.52);
  --accent: rgba(143, 179, 217, 0.9);
  --world-wash:
    radial-gradient(circle at 50% 18%, rgba(27, 49, 74, 0.14), transparent 36%),
    radial-gradient(circle at 50% 88%, rgba(16, 32, 54, 0.18), transparent 42%);
}

body[data-world="heart"] {
  --bg-top: #130811;
  --bg-mid: #1a0a12;
  --bg-bottom: #0f070d;
  --text: rgba(245, 233, 213, 0.92);
  --text-soft: rgba(245, 233, 213, 0.72);
  --text-faint: rgba(245, 233, 213, 0.4);
  --line: rgba(231, 219, 200, 0.22);
  --line-strong: rgba(231, 219, 200, 0.4);
  --accent: rgba(222, 99, 43, 0.98);
  --world-wash:
    radial-gradient(circle at 56% 32%, rgba(88, 24, 58, 0.2), transparent 34%),
    radial-gradient(circle at 80% 62%, rgba(63, 16, 20, 0.3), transparent 38%),
    radial-gradient(circle at 28% 88%, rgba(39, 16, 31, 0.22), transparent 34%);
}

body[data-world="shadow"] {
  --bg-top: #141213;
  --bg-mid: #1d1b1d;
  --bg-bottom: #111010;
  --text: rgba(235, 232, 223, 0.88);
  --text-soft: rgba(235, 232, 223, 0.66);
  --text-faint: rgba(235, 232, 223, 0.32);
  --line: rgba(214, 203, 174, 0.16);
  --line-strong: rgba(214, 203, 174, 0.28);
  --accent: rgba(214, 203, 174, 0.9);
  --world-wash:
    radial-gradient(circle at 50% 18%, rgba(159, 150, 129, 0.09), transparent 36%),
    radial-gradient(circle at 50% 88%, rgba(75, 70, 61, 0.16), transparent 42%);
}

/* Color anchors on sections — each world's content is always its own palette,
   regardless of which world the body is currently set to (for background). */
[data-world="terrestrial"] {
  --text: rgba(234, 231, 242, 0.88);
  --text-soft: rgba(234, 231, 242, 0.64);
  --text-faint: rgba(234, 231, 242, 0.3);
  --line: rgba(196, 184, 225, 0.16);
  --line-strong: rgba(196, 184, 225, 0.28);
  --accent: rgba(153, 126, 255, 0.88);
}
[data-world="head"] {
  --text: rgba(227, 235, 245, 0.9);
  --text-soft: rgba(170, 185, 201, 0.82);
  --text-faint: rgba(128, 148, 168, 0.68);
  --line: rgba(53, 80, 111, 0.28);
  --line-strong: rgba(53, 80, 111, 0.52);
  --accent: rgba(143, 179, 217, 0.9);
}
[data-world="heart"] {
  --text: rgba(245, 233, 213, 0.92);
  --text-soft: rgba(245, 233, 213, 0.72);
  --text-faint: rgba(245, 233, 213, 0.4);
  --line: rgba(231, 219, 200, 0.22);
  --line-strong: rgba(231, 219, 200, 0.4);
  --accent: rgba(222, 99, 43, 0.98);
}
[data-world="shadow"] {
  --text: rgba(235, 232, 223, 0.88);
  --text-soft: rgba(235, 232, 223, 0.66);
  --text-faint: rgba(235, 232, 223, 0.32);
  --line: rgba(214, 203, 174, 0.16);
  --line-strong: rgba(214, 203, 174, 0.28);
  --accent: rgba(214, 203, 174, 0.9);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.site-atmosphere,
.site-vignette,
.site-grain,
.site-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.site-atmosphere {
  z-index: 1;
}

.site-vignette {
  background:
    radial-gradient(circle at 50% 28%, transparent 0%, rgba(6, 7, 19, 0.02) 22%, rgba(6, 7, 19, 0.42) 70%, rgba(2, 2, 6, 0.92) 100%),
    radial-gradient(ellipse at 50% 95%, rgba(2, 2, 6, 0) 0%, rgba(2, 2, 6, 0.14) 36%, rgba(2, 2, 6, 0.42) 66%, rgba(2, 2, 6, 0.74) 100%),
    linear-gradient(180deg, rgba(2, 2, 6, 0) 0%, rgba(2, 2, 6, 0) 72%, rgba(2, 2, 6, 0.24) 88%, rgba(2, 2, 6, 0.48) 100%),
    linear-gradient(90deg, rgba(3, 4, 9, 0.5) 0%, transparent 11%, transparent 89%, rgba(3, 4, 9, 0.5) 100%);
}

.site-grain {
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.site-scanlines {
  opacity: 0.05;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: overlay;
}

.origin-return,
.world-indicator {
  position: fixed;
  top: 1rem;
  z-index: 32;
  display: inline-flex;
  align-items: center;
  min-height: 1.1rem;
  text-decoration: none;
}

.origin-return {
  left: 1.4rem;
}

.origin-return__value {
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.origin-return:hover .origin-return__value {
  color: var(--text);
}

.world-indicator {
  right: 1.4rem;
}

.world-indicator__value,
.threshold-kicker,
.threshold-subtitle,
.signal-label,
.signal-state,
.gateway__text,
.head-tagline,
.head-inline-link,
.head-section__label {
  text-transform: uppercase;
}

.threshold-kicker,
.gateway__text,
.head-section__label {
  color: var(--text-faint);
  font-size: var(--t-sm);
  letter-spacing: 0.28em;
}

.gateway__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 1;
}

.world-indicator__value {
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
}

.world-indicator:hover .world-indicator__value {
  color: var(--text);
}

.transmission {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.threshold {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
}

.threshold-sticky {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
}

.static-scene {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  /* New scenic plate — the left hero tower is baked into this image. */
  background-color: #0a0713;
  background-image: url("static/bg-purple-2x.webp");
  background-image: -webkit-image-set(
    url("static/bg-purple-1x.webp") 1x,
    url("static/bg-purple-2x.webp") 2x);
  background-image: image-set(
    url("static/bg-purple-1x.webp") 1x,
    url("static/bg-purple-2x.webp") 2x);
  background-repeat: no-repeat;
  background-size: cover;
  /* --plate-x lets mobile shift the framing to protect the left baked tower */
  background-position: var(--plate-x, 50%) bottom;
  /* pinned to the baked tower's antenna tip (measured at the 1440×900 ref) */
  --tower-beacon-x: 11.1%;
  --tower-beacon-y: 21.8%;
}

/* z0 — atmosphere over the plate: top darkening for title/nav legibility,
   a soft echo of the plate's horizon glow, and an edge vignette. */
.static-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 32% at 50% 66%,
      rgba(176, 96, 232, 0.12) 0%, rgba(118, 58, 196, 0.05) 36%, transparent 64%),
    linear-gradient(180deg,
      rgba(8, 6, 18, 0.58) 0%, rgba(8, 6, 18, 0.18) 22%, transparent 44%),
    radial-gradient(ellipse 120% 120% at 50% 52%,
      transparent 58%, rgba(4, 3, 12, 0.40) 100%);
}

.sky-stars {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 58%;
  overflow: hidden;
  pointer-events: none;
}

.sky-shooting-star {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  width: 100%;
  height: 58%;
  pointer-events: none;
}

.sky-stars-field {
  position: absolute;
  inset: 0;
}

.twinkle-star {
  position: absolute;
  width: 1.7px;
  height: 1.7px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.62);
}

.twinkle-star-corner {
  animation: twinkle 18s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.03;
    transform: scale(0.92);
  }

  50% {
    opacity: 0.21;
    transform: scale(1.06);
  }
}

/* ─── TERRESTRIAL ATMOSPHERE ─── */

.terrestrial-atm {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Fog/moisture volumes — very large, very soft, create air between objects */
.ta-vol {
  position: absolute;
  pointer-events: none;
}

.ta-vol--a {
  /* Wide cold fog bank — sits between silhouette and tower */
  left: -15%;
  right: -15%;
  top: 52%;
  height: 32%;
  background: radial-gradient(ellipse at 50% 60%,
    rgba(52, 48, 88, 0.13) 0%,
    rgba(34, 30, 62, 0.06) 45%,
    transparent 72%);
  filter: blur(64px);
  animation: ta-breathe-a 58s ease-in-out infinite;
}

.ta-vol--b {
  /* Warm glow — transmission warmth near tower zone */
  left: 2%;
  width: 44%;
  top: 57%;
  height: 28%;
  background: radial-gradient(ellipse at 38% 55%,
    rgba(72, 50, 22, 0.09) 0%,
    rgba(50, 34, 14, 0.04) 50%,
    transparent 72%);
  filter: blur(72px);
  animation: ta-breathe-b 44s ease-in-out infinite;
  animation-delay: -17s;
}

.ta-vol--c {
  /* Right-side cold atmospheric mass */
  right: -8%;
  width: 46%;
  top: 48%;
  height: 34%;
  background: radial-gradient(ellipse at 62% 50%,
    rgba(28, 36, 66, 0.11) 0%,
    rgba(18, 24, 48, 0.05) 48%,
    transparent 70%);
  filter: blur(80px);
  animation: ta-breathe-c 71s ease-in-out infinite;
  animation-delay: -31s;
}

.ta-vol--d {
  /* Low signal glow — faint transmission haze near implied horizon */
  left: 10%;
  right: 10%;
  bottom: 14%;
  height: 22%;
  background: radial-gradient(ellipse at 50% 80%,
    rgba(60, 44, 100, 0.10) 0%,
    rgba(38, 26, 66, 0.04) 50%,
    transparent 72%);
  filter: blur(56px);
  animation: ta-breathe-a 49s ease-in-out infinite;
  animation-delay: -8s;
}

@keyframes ta-breathe-a {
  0%, 100% { opacity: 1;    transform: scaleX(1)    translateY(0); }
  50%      { opacity: 0.74; transform: scaleX(1.05) translateY(6px); }
}

@keyframes ta-breathe-b {
  0%, 100% { opacity: 0.88; transform: scaleX(1)    translateY(0); }
  50%      { opacity: 1;    transform: scaleX(0.96) translateY(-5px); }
}

@keyframes ta-breathe-c {
  0%, 100% { opacity: 1;    transform: scaleX(1)    translateY(0); }
  40%      { opacity: 0.68; transform: scaleX(1.04) translateY(8px); }
  80%      { opacity: 0.90; transform: scaleX(0.98) translateY(3px); }
}

/* Signal light flicker — 5 variants, assigned per-light with staggered delays */
.ta-fl-a { animation: ta-flicker-a  8.4s ease-in-out infinite; }
.ta-fl-b { animation: ta-flicker-b 11.2s ease-in-out infinite; }
.ta-fl-c { animation: ta-flicker-c  6.8s ease-in-out infinite; }
.ta-fl-d { animation: ta-flicker-d 14.0s ease-in-out infinite; }
.ta-fl-e { animation: ta-flicker-e  9.6s ease-in-out infinite; }

@keyframes ta-flicker-a {
  0%, 100% { opacity: 1;    }
  38%      { opacity: 0.82; }
  72%      { opacity: 0.95; }
}
@keyframes ta-flicker-b {
  0%, 100% { opacity: 0.94; }
  45%      { opacity: 0.68; }
  78%      { opacity: 0.90; }
}
@keyframes ta-flicker-c {
  0%, 100% { opacity: 0.88; }
  22%      { opacity: 1;    }
  58%      { opacity: 0.58; }
  84%      { opacity: 0.92; }
}
@keyframes ta-flicker-d {
  0%, 100% { opacity: 0.96; }
  60%      { opacity: 0.78; }
}
@keyframes ta-flicker-e {
  0%, 100% { opacity: 1;    }
  30%      { opacity: 0.88; }
  65%      { opacity: 0.72; }
  88%      { opacity: 0.94; }
}

/* Distant red tower lights — sparse, subtle blinkers placed over unlit
   towers baked into the plate. Kept small and dim so they never dominate. */
.signal-light {
  position: absolute;
  width: 3.8px;
  height: 3.8px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: #f47585;
  box-shadow:
    0 0 7px rgba(242, 108, 125, 1),
    0 0 16px rgba(242, 108, 125, 0.58),
    0 0 30px rgba(242, 108, 125, 0.27);
  pointer-events: none;
}

.signal-light--sla { animation: distantBlink-a 6.8s ease-in-out infinite; }
.signal-light--slb { animation: distantBlink-b 9.4s ease-in-out infinite; animation-delay: -3.2s; }
.signal-light--slc { animation: distantBlink-c 7.9s ease-in-out infinite; animation-delay: -5.5s; }

@keyframes distantBlink-a { 0%,46%,100%{opacity:.43} 54%,62%{opacity:1} 70%{opacity:.62} }
@keyframes distantBlink-b { 0%,52%,100%{opacity:.36} 60%,68%{opacity:1} 76%{opacity:.55} }
@keyframes distantBlink-c { 0%,60%,100%{opacity:.38} 66%,72%{opacity:1} }

/* ─── ─── ─── ─── ─── ─── ─── ─── ─── */

/* z4 — animated red beacon at the tip of the LEFT tower baked into the plate.
   Positioned in viewport units to land on the tower tip at the desktop
   framing; the mobile crop is corrected in the responsive block. */
.tower-beacon {
  position: absolute;
  left: var(--tower-beacon-x);
  top: var(--tower-beacon-y);
  z-index: 4;
  width: clamp(5px, 0.5vw, 10px);
  height: clamp(5px, 0.5vw, 10px);
  background: var(--beacon);
  border-radius: 999px;
  box-shadow:
    0 0 4px rgba(219, 73, 90, 0.54),
    0 0 11px rgba(219, 73, 90, 0.2),
    0 0 22px rgba(219, 73, 90, 0.1);
  transform: translate(-50%, -50%);
  /* Lonely-infrastructure beacon: one slow, smooth pulse — a distant FAA
     obstruction light, not a flash. No scale, no movement. */
  animation: towerBlink 7.6s ease-in-out infinite;
}

@keyframes towerBlink {
  0%, 48%, 100% { opacity: 0.14; }
  59%, 66%      { opacity: 0.58; }
}

/* Same obstruction-light cadence, with enough peak contrast to survive the
   small rendered size and compositing behavior of mobile Safari. */
@-webkit-keyframes towerBlinkMobile {
  0%, 70%, 90%, 100% { opacity: 0.12; }
  76%, 84%           { opacity: 1; }
}

@keyframes towerBlinkMobile {
  0%, 70%, 90%, 100% { opacity: 0.12; }
  76%, 84%           { opacity: 1; }
}

/* z5 — TERRESTRIAL scene title: lower in the frame, IN FRONT of the baked
   tower, BEHIND the right silhouette (which overlaps its right edge). */
.threshold-scene-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 23%;
  z-index: 5;
  text-align: center;
  pointer-events: none;
}

/* z3 — SKY UI PLANE: the transmission / tuning layer. The signal-descriptor
   tagline, frequency prompt and the HEAD/HEART/SHADOW nav float up in the sky. */
.threshold-sky {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-rows: auto auto 0.58fr auto auto 1.92fr;
  min-height: 100%;
  padding: clamp(0.95rem, 1.55vw, 1.45rem) clamp(1.25rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2.4rem);
  pointer-events: none;
}

.threshold-title {
  margin-left: 0.22em;
  font-family: "Pathway Gothic One", sans-serif;
  font-size: var(--t-display);
  font-weight: 400;
  letter-spacing: 0.24em;
  line-height: 0.8;
  text-transform: uppercase;
  color: rgba(236, 232, 250, 0.61);
  text-shadow:
    0 2px 18px rgba(6, 4, 16, 0.54),
    0 0 62px rgba(122, 72, 184, 0.12);
  /* Ambient signal: an extremely slow, barely-perceptible opacity breath —
     felt more than seen. No movement, no scale, no glow burst. */
  animation: terrestrialSignal 21s ease-in-out 1.8s infinite;
}

@keyframes terrestrialSignal {
  0%, 100% { opacity: 0.9; }
  50%      { opacity: 0.96; }
}

.threshold-subtitle {
  grid-row: 1;
  display: grid;
  gap: 0.48rem;
  justify-self: center;
  margin-top: calc(0.86rem + 24px);
  color: var(--text-soft);
  max-width: 24rem;
  padding-inline: 0.8rem;
  font-size: clamp(0.58rem, 0.78vw, 0.7rem);
  letter-spacing: 0.27em;
  line-height: 1.18;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  opacity: 0.72;
}

.threshold-subtitle__primary,
.threshold-subtitle__motto {
  display: block;
}

.threshold-subtitle__motto {
  font-size: 0.76em;
  letter-spacing: 0.38em;
  opacity: 0.52;
}

.threshold-copy {
  align-self: center;
  display: grid;
  gap: 0.7rem;
  max-width: 36rem;
  margin-inline: auto;
  color: var(--text-faint);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.82rem, 1.2vw, 1.1rem);
  line-height: 1.32;
  text-align: center;
  opacity: 0.6;
}

.threshold-portals {
  grid-row: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.4rem);
  max-width: 68rem;
  width: 100%;
  margin: 0 auto;
}

.portal {
  display: grid;
  justify-items: center;
  gap: 0.42rem;
  min-height: 8.35rem;
  padding: 0.72rem 1.5rem 0.78rem;
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.005), rgba(255, 255, 255, 0.012));
  opacity: 0.68;
  pointer-events: auto;
  transition: opacity 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.portal:hover,
.portal:focus-visible {
  opacity: 1;
  transform: translateY(-0.18rem);
}

.portal-frame {
  display: flex;
  justify-content: space-between;
  width: calc(100% + 2.35rem);
  margin-inline: -1.175rem;
  color: var(--text-faint);
  font-size: var(--t-base);
  transition: color 220ms ease;
}

.portal:hover .portal-frame,
.portal:focus-visible .portal-frame {
  color: var(--text-soft);
}

.portal-dot {
  width: 5px;
  height: 5px;
  margin-bottom: 0.88rem;
  background: var(--beacon);
  border-radius: 999px;
  box-shadow:
    0 0 5px rgba(219, 73, 90, 0.72),
    0 0 14px rgba(219, 73, 90, 0.32),
    0 0 22px rgba(219, 73, 90, 0.16);
  opacity: 0.88;
  transition: box-shadow 220ms ease, transform 220ms ease, opacity 220ms ease;
}

.portal:hover .portal-dot,
.portal:focus-visible .portal-dot {
  opacity: 1;
  transform: scale(1.18);
  box-shadow:
    0 0 8px rgba(219, 73, 90, 0.9),
    0 0 20px rgba(219, 73, 90, 0.42),
    0 0 34px rgba(219, 73, 90, 0.26);
}

.portal-name {
  margin-left: 0.18em;
  font-family: "Pathway Gothic One", sans-serif;
  font-size: var(--t-ident);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portal-sub {
  color: var(--text-soft);
  font-size: var(--t-sm);
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
}

/* Keep the three frequency summaries as single-line labels on tablets. */
@media (min-width: 721px) and (max-width: 1100px) {
  .portal-sub {
    font-size: clamp(0.52rem, 0.8vw, 0.66rem);
    letter-spacing: 0.1em;
    white-space: nowrap;
  }
}

/* z8 — functional UI (ambient signal + coords), legible above the foreground */
.threshold-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  padding: 0 clamp(1.25rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2.4rem);
  pointer-events: none;
}

.threshold-ui > * { pointer-events: auto; }

.threshold-controls {
  position: relative;
  display: grid;
  grid-template-columns: 13.5rem;
  grid-template-rows: auto auto;
  align-items: end;
  row-gap: 0.22rem;
  min-width: 13.5rem;
}

.myradio-launch {
  grid-row: 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 13.5rem;
  min-height: 0;
  margin-top: 0.38rem;
  padding-top: 0.44rem;
  border-top: 1px solid rgba(196, 184, 225, 0.18);
  color: var(--text-faint);
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  line-height: normal;
  text-transform: uppercase;
  opacity: 1;
  white-space: nowrap;
  animation: myradio-launch-reveal 360ms ease-out;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.myradio-launch[hidden] {
  display: none;
}

@keyframes myradio-launch-reveal {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.myradio-launch:hover,
.myradio-launch:focus-visible {
  color: var(--text);
  text-shadow: 0 0 12px rgba(196, 184, 225, 0.32);
}

.myradio-launch .signal-label {
  color: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}

.myradio-launch__tower {
  display: none;
}

.myradio-launch__tower path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.myradio-launch__beacon {
  fill: var(--beacon);
  filter: drop-shadow(0 0 0.16rem rgba(219, 73, 90, 0.7));
  animation: myradio-launch-beacon 2.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes myradio-launch-beacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

@media (prefers-reduced-motion: reduce) {
  .myradio-launch__beacon {
    animation: none;
  }
}

.threshold-version {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 3vw, 2.4rem);
  z-index: 13;
  margin: 0;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 0.48rem;
  letter-spacing: 0.24em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 12px rgba(4, 3, 12, 0.96);
  white-space: nowrap;
}

/* z6 — right human silhouette overlay. The figure and grass share one
   near-black foreground value so the lower body feels rooted in the field. */
.scene-figure {
  position: absolute;
  right: 9%;
  bottom: 7.5%;
  height: min(470px, calc(100svh - 250px));
  width: auto;
  z-index: 6;
  filter: brightness(0) invert(4%) drop-shadow(-2px 0 7px rgba(0, 0, 0, 0.34));
  transform: translateY(10%);
  pointer-events: none;
}

/* z7 — grass strip grounds the silhouette's feet */
.scene-grass {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 102%;
  min-width: 1100px;
  z-index: 7;
  transform: translate(-50%, 10%);
  filter: brightness(0) invert(4%);
  pointer-events: none;
}

/* ── Staggered lettering fade-in (preserved motion language) ── */
@media (prefers-reduced-motion: no-preference) {
  .threshold-subtitle,
  .threshold-scene-title,
  .threshold-frequency-label,
  .threshold-portals,
  .threshold-ui {
    opacity: 0;
    animation: heroRise 1100ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  }

  .threshold-subtitle        { animation-delay: 240ms; }
  .threshold-scene-title     { animation-delay: 480ms; }
  .threshold-frequency-label { animation-delay: 760ms; }
  .threshold-portals         { animation-delay: 900ms; }
  .threshold-ui              { animation-delay: 1120ms; }

  @keyframes heroRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

.signal-button {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 13.5rem;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  opacity: 1;
  text-align: left;
  text-shadow:
    0 1px 12px rgba(4, 3, 12, 0.96),
    0 0 20px rgba(4, 3, 12, 0.55);
}

.signal-button:hover,
.signal-button:focus-visible,
.signal-button.is-playing {
  opacity: 1;
  background: transparent;
  box-shadow: none;
}

.signal-button:focus-visible { outline: 1px solid rgba(219, 73, 90, 0.78); outline-offset: 0.2rem; }

.signal-icon {
  display: none;
}

.signal-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: var(--text-soft);
  color: var(--text-faint);
}

/* Signal icon state machine */
.signal-play-icon,
.signal-pause-icon {
  opacity: 0;
  transition: opacity 80ms ease;
}

/* A touch screen has no hover state: play/pause must always read as a button. */
.signal-bars { opacity: 0; }
.signal-button:not(.is-playing) .signal-play-icon { opacity: 1; }
.signal-button.is-playing .signal-pause-icon { opacity: 1; }

/* Playing: animate bars */
.signal-button.is-playing .signal-bar {
  transform-box: fill-box;
  transform-origin: center;
}

.signal-button.is-playing .signal-bar:nth-child(1) {
  animation: signalBarDance 0.72s ease-in-out infinite alternate;
}

.signal-button.is-playing .signal-bar:nth-child(2) {
  animation: signalBarDance 0.55s ease-in-out infinite alternate 0.18s;
}

.signal-button.is-playing .signal-bar:nth-child(3) {
  animation: signalBarDance 0.88s ease-in-out infinite alternate 0.34s;
}

@keyframes signalBarDance {
  0%   { transform: scaleY(0.32); }
  100% { transform: scaleY(1.48); }
}

.signal-text {
  display: grid;
  justify-items: start;
  gap: 0.22rem;
  min-width: 0;
}

.signal-state { white-space: nowrap; }

.signal-button .signal-label {
  color: var(--text-faint);
  font-size: var(--t-sm);
  letter-spacing: 0.18em;
}

.signal-button .signal-state {
  color: var(--text-faint);
  font-size: var(--t-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.descent-link__label,
.descent-link__meta {
  color: var(--text-faint);
  font-size: var(--t-sm);
  letter-spacing: 0.22em;
}

.threshold-prompt {
  position: relative;
  z-index: 14;
  display: grid;
  justify-items: end;
  width: 13.5rem;
  gap: 0.22rem;
  text-align: right;
  text-shadow:
    0 1px 12px rgba(4, 3, 12, 0.96),
    0 0 20px rgba(4, 3, 12, 0.55);
}

.threshold-frequency-label {
  grid-row: 4;
  justify-self: center;
  text-align: center;
  color: var(--text);
  font-size: var(--t-sm);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 0.18rem;
}

.threshold-coords,
.threshold-region {
  color: var(--text-faint);
  font-size: var(--t-sm);
  letter-spacing: 0.18em;
}

.threshold-region {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: var(--t-xs);
}

.threshold-publication-links {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  gap: 0.9rem;
  margin-top: 0.38rem;
  padding-top: 0.44rem;
  border-top: 1px solid rgba(196, 184, 225, 0.18);
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.threshold-publication-links a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.threshold-publication-links a + a::before {
  content: "·";
  margin-right: 0.9rem;
  color: rgba(196, 184, 225, 0.32);
}

.threshold-publication-links a:hover,
.threshold-publication-links a:focus-visible {
  color: var(--text);
  text-shadow: 0 0 12px rgba(196, 184, 225, 0.32);
}

.threshold-publication-links a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.threshold-broadcast {
  margin-top: 0.5rem;
  color: var(--text-faint);
  font-size: var(--t-xs);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.6;
}

.gateway {
  position: relative;
  overflow: hidden;
  height: 5.5rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 28%, black 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 28%, black 72%, transparent 100%);
}

.gateway-sentinel {
  height: 0;
  overflow: hidden;
}

.gateway--head,
.gateway--heart,
.gateway--shadow {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 3.2rem;
  -webkit-mask-image: none;
  mask-image: none;
  background: rgba(10, 16, 26, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(53, 80, 111, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.gateway--head::after,
.gateway--heart::after,
.gateway--shadow::after {
  display: none;
}

.gateway--head .gateway__text,
.gateway--heart .gateway__text,
.gateway--shadow .gateway__text {
  transition: opacity 280ms ease;
}

.gateway--head.is-stuck .gateway__text,
.gateway--heart.is-stuck .gateway__text,
.gateway--shadow.is-stuck .gateway__text {
  opacity: 0;
  pointer-events: none;
}

.gateway__nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.4rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease, visibility 280ms ease;
  z-index: 2;
}

.gateway.is-stuck .gateway__nav {
  opacity: 1;
  visibility: visible;
}

.gateway__current {
  color: rgba(190, 204, 222, 0.72);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gateway__station-name {
  display: inline-flex;
  align-items: baseline;
}

.gateway__station-cursor {
  display: inline-block;
  width: 0.7ch;
  opacity: 1;
  animation: headCursorBlink 1.2s steps(1, end) infinite;
}

.gateway__return {
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 180ms ease;
  white-space: nowrap;
}

.gateway__return:hover {
  color: var(--text);
}

.gateway__forward {
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 180ms ease;
  white-space: nowrap;
}

.gateway__forward:hover {
  color: var(--text);
}

.gateway__static {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0.65;
  mix-blend-mode: screen;
}

.world {
  position: relative;
  min-height: 100vh;
  padding: 4rem 0 5rem;
}

.world::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--world-wash),
    linear-gradient(180deg, rgba(255, 255, 255, 0.008) 0%, transparent 20%, transparent 80%, rgba(255, 255, 255, 0.008) 100%);
  pointer-events: none;
}

.world-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 2.4rem, 78rem);
  margin: 0 auto;
}

.world-stage {
  position: relative;
  padding: 2.4rem 1.8rem 1.8rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(10, 11, 21, 0.4));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 30px 80px rgba(0, 0, 0, 0.18);
}

.world--head {
  padding-top: 0;
  min-height: auto;
}

.world > .world-shell {
  padding-top: 3rem;
}

.world-stage--head {
  border-color: rgba(53, 80, 111, 0.4);
  background: #101c2b;
  padding: 2.9rem 2.6rem 2.8rem;
}

.world--head .world-shell {
  width: min(100% - 3rem, 94rem);
  --signal-datum-x: 11.9rem;
}


.head-environment {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.head-environment__coords {
  position: absolute;
}

.head-environment__coords {
  color: rgba(53, 80, 111, 0.45);
  font-size: var(--t-xs);
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.head-environment__coords--top {
  top: 0.8rem;
  left: 1rem;
}

.head-environment__coords--bottom {
  right: 1rem;
  bottom: 0.8rem;
}

.head-page {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.6rem;
  min-height: 46rem;
}

/* ─── HEAD — Signal dossier redesign ─── */

.head-signal-frame {
  position: relative;
  --head-track-dot-size: 16px;
  --head-track-label-col: 4.8rem;
  --head-signal-left-gap: 1.3rem;
  --head-signal-right-gap: 3.25rem;
  --head-content-start: 0.2rem;
  --head-track-col: calc(var(--head-track-label-col) + var(--head-signal-left-gap) + var(--head-track-dot-size));
  --head-signal-spine-x: calc(var(--head-track-col) - (var(--head-track-dot-size) / 2));
  display: grid;
  grid-template-columns: var(--head-track-col) minmax(0, 1fr);
  gap: var(--head-signal-right-gap);
  align-items: start;
}

.head-signal-frame::before {
  display: none;
}

.head-track {
  position: sticky;
  top: calc(3.8rem + 1.25rem);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  padding: 0.15rem 0 0.4rem;
}

.head-track__menu {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2.45rem;
  min-height: 0;
  padding-bottom: 0.4rem;
}

.head-track__line {
  position: absolute;
  top: 0.1rem;
  bottom: 0.55rem;
  right: 0.5rem;
  width: 1px;
  transform: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(154, 170, 191, 0.3), rgba(118, 133, 153, 0.22)),
    linear-gradient(180deg, transparent 0 13px, rgba(255, 255, 255, 0.08) 13px 14px);
  background-size: 100% 100%, 100% 13px;
  pointer-events: none;
}

.head-track__node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--head-signal-left-gap);
  min-height: 1.2rem;
  padding-right: 0;
  border: 0;
  background: transparent;
  color: rgba(214, 223, 236, 0.76);
  cursor: pointer;
  text-decoration: none;
  transition: color 160ms ease;
}

.head-track__label {
  color: rgba(214, 223, 236, 0.72);
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(0.62rem, 0.68vw, 0.72rem);
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
  max-width: var(--head-track-label-col);
  line-height: 1.35;
}

.head-track__dot {
  position: relative;
  flex: 0 0 auto;
  width: var(--head-track-dot-size);
  height: var(--head-track-dot-size);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.head-track__dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #122034;
  box-shadow: 0 0 0 1px rgba(201, 212, 226, 0.36);
  z-index: 0;
}

.head-track__dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background 160ms ease, box-shadow 160ms ease;
  z-index: 1;
}

.head-track__node.is-active,
.head-track__node:hover,
.head-track__node:focus-visible {
  color: rgba(226, 235, 247, 0.92);
}

.head-track__node.is-active .head-track__label {
  color: rgba(226, 235, 247, 0.92);
  text-shadow: 0 0 12px rgba(170, 190, 214, 0.12);
}

.head-track__node.is-active .head-track__dot,
.head-track__node:hover .head-track__dot,
.head-track__node:focus-visible .head-track__dot {
  box-shadow: 0 0 0 7px rgba(170, 190, 214, 0.045);
}

.head-track__node.is-active .head-track__dot::before,
.head-track__node:hover .head-track__dot::before,
.head-track__node:focus-visible .head-track__dot::before {
  box-shadow: 0 0 0 1px rgba(214, 226, 242, 0.62);
}

.head-track__node.is-active .head-track__dot::after {
  background: var(--beacon);
  box-shadow:
    0 0 4px rgba(219, 73, 90, 0.54),
    0 0 11px rgba(219, 73, 90, 0.2),
    0 0 22px rgba(219, 73, 90, 0.1);
  animation: head-beacon-breathe 4.8s ease-in-out infinite;
}

.head-track__node.is-passed .head-track__dot::after {
  background: transparent;
  box-shadow: none;
}

@keyframes headSignalBlink {
  0%,
  45%,
  100% {
    opacity: 0.95;
  }

  55% {
    opacity: 0.78;
  }
}

@keyframes headCursorBlink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.head-main {
  display: grid;
  gap: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.head-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  z-index: 0;
}

.head-main::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='480' viewBox='0 0 640 480'%3E%3Cg fill='none' stroke='%2393a7be' stroke-opacity='0.18' stroke-width='1'%3E%3Cpath d='M502 44c-44 8-71 28-90 57-18 28-29 63-63 83-35 20-89 25-125 51-26 19-46 46-65 86'/%3E%3Cpath d='M535 63c-41 7-68 24-87 49-24 33-35 71-74 94-35 21-82 26-117 49-29 18-52 46-74 88'/%3E%3Cpath d='M562 84c-37 6-63 21-84 43-28 30-44 74-87 99-36 21-78 25-113 44-32 17-59 45-86 92'/%3E%3Cpath d='M591 108c-34 5-60 19-81 39-31 28-51 72-94 94-38 19-77 21-111 39-34 19-62 47-90 98'/%3E%3Cpath d='M613 136c-30 4-55 17-76 36-34 30-57 70-102 90-38 17-75 18-108 34-35 18-64 49-93 104'/%3E%3Cpath d='M82 308c20-22 44-38 74-47 29-9 61-11 88-24 32-15 56-43 78-73 18-24 38-44 69-57'/%3E%3Cpath d='M64 339c22-23 48-39 78-49 31-9 61-10 89-22 35-15 60-43 82-74 18-26 40-47 72-61'/%3E%3Cpath d='M44 372c25-25 52-42 85-52 30-9 60-9 88-20 38-15 64-42 87-74 20-27 44-50 77-66'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: top right;
  background-size: min(44rem, 62%) auto;
}

.head-panels {
  position: relative;
  min-height: 31rem;
  padding-top: 0;
  padding-left: var(--head-content-start);
  z-index: 1;
  transition: min-height 180ms ease;
}

.head-panels::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(190, 214, 241, 0.08), rgba(190, 214, 241, 0.02) 38%, rgba(190, 214, 241, 0.09) 100%),
    repeating-linear-gradient(
      180deg,
      rgba(198, 218, 244, 0.06) 0,
      rgba(198, 218, 244, 0.06) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.05) 48%, transparent 100%);
  background-size: 100% 100%, 100% 4px, 100% 100%;
  background-position: 0 0, 0 0, 0 0;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 90ms ease;
}

.head-panels.is-switching::before {
  opacity: 0.18;
  animation: head-retune-pulse 180ms steps(2, end) both;
}

@keyframes head-retune-pulse {
  0% {
    opacity: 0;
    background-position: 0 0, 0 -10px, 0 0;
  }
  35% {
    opacity: 0.16;
    background-position: 0 0, 0 9px, 0 0;
  }
  62% {
    opacity: 0.08;
    background-position: 0 0, 0 -4px, 0 0;
  }
  100% {
    opacity: 0.18;
    background-position: 0 0, 0 6px, 0 0;
  }
}

.head-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.35rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0s linear 180ms;
}

.head-panel.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    visibility 0s linear 0s;
}

.head-panels.is-switching .head-panel.is-active {
  filter: brightness(0.985) saturate(0.94);
}

.head-hero__copy {
  max-width: 50ch;
  margin-top: 0;
  color: rgba(214, 223, 236, 0.72);
  font-size: clamp(0.84rem, 0.88vw, 0.92rem);
  line-height: 1.92;
}

#head-bio {
  min-height: clamp(31rem, 44vw, 39rem);
}

.head-bio-intro {
  max-width: 44rem;
  margin: 0 0 0.35rem;
  color: rgba(232, 239, 248, 0.82);
  font-size: clamp(0.96rem, 1.02vw, 1.06rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.32;
}

.head-section-block {
  display: block;
  padding-top: 2.1rem;
}

.head-section-block__body {
  display: grid;
  gap: 0.95rem;
  max-width: 46rem;
  position: relative;
  z-index: 2;
}

#head-projects .head-section-block__body {
  max-width: none;
}

#head-timeline .head-section-block__body {
  max-width: none;
}

#head-disciplines .head-section-block__body {
  max-width: none;
}

#head-systems .head-section-block__body {
  max-width: none;
}

#head-bio .head-section-block__body {
  max-width: 64rem;
}

#head-bio .head-hero__copy {
  max-width: 70ch;
}

.head-bio-registry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.5rem;
  max-width: 48rem;
  margin-top: 0.3rem;
}

.head-bio-registry p {
  color: rgba(167, 181, 201, 0.6);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.head-bio-portrait {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  bottom: 3.8rem;
  left: clamp(27rem, 43%, 35rem);
  transform: none;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.9;
  mix-blend-mode: normal;
  filter: none;
  transition: opacity 180ms ease;
}

.head-main:not(.is-bio-active) .head-bio-portrait {
  opacity: 0;
}

.head-bio-portrait::before {
  display: none;
}

.head-bio-portrait::after {
  display: none;
}

.head-bio-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right top;
  transform: scale(0.82) translateX(7%) translateY(-6%);
  transform-origin: right top;
}

.head-panels {
  position: relative;
  z-index: 2;
}

.head-projects-placeholder {
  display: grid;
  gap: 0.9rem;
  max-width: 52rem;
  padding: 1.35rem 1.5rem 1.45rem;
  border: 1px solid rgba(121, 145, 173, 0.18);
  background:
    linear-gradient(180deg, rgba(18, 31, 50, 0.34), rgba(10, 19, 33, 0.2));
}

.head-projects-placeholder__status {
  color: rgba(92, 150, 226, 0.72);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.head-projects-placeholder__copy {
  max-width: 58ch;
  color: rgba(214, 223, 236, 0.76);
  font-size: clamp(0.88rem, 0.92vw, 0.98rem);
  line-height: 1.76;
}

.head-projects-placeholder__queue {
  list-style: none;
  display: grid;
  gap: 0.3rem;
  margin: 0.2rem 0 0;
  padding: 0;
}

.head-projects-placeholder__queue li {
  color: rgba(167, 181, 201, 0.6);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes head-beacon-breathe {
  0%, 100% {
    opacity: 0.14;
    box-shadow:
      0 0 4px rgba(219, 73, 90, 0.54),
      0 0 11px rgba(219, 73, 90, 0.2),
      0 0 22px rgba(219, 73, 90, 0.1);
  }

  59%, 66% {
    opacity: 0.58;
    box-shadow:
      0 0 5px rgba(219, 73, 90, 0.62),
      0 0 13px rgba(219, 73, 90, 0.24),
      0 0 26px rgba(219, 73, 90, 0.12);
  }
}

.head-section-block__title {
  color: rgba(236, 242, 251, 0.94);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(1.06rem, 1.16vw, 1.22rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#head-projects .head-section-block__title {
  margin-bottom: 1.5rem;
}

.head-section-block__title--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.head-timeline-list {
  display: grid;
  gap: 1.5rem;
  max-width: 40rem;
}

.head-timeline-entry {
  display: grid;
  gap: 0.14rem;
  padding: 0.2rem 0;
  border-top: 0;
}

.head-timeline-entry:first-child {
  border-top: 0;
  padding-top: 0;
}

.head-timeline-entry__log {
  color: rgba(118, 171, 233, 0.74);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.head-timeline-entry__range {
  color: rgba(206, 216, 229, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.head-timeline-entry h3,
.head-system-card h3,
.head-discipline-card h3 {
  color: rgba(92, 150, 226, 0.76);
  font-size: clamp(0.94rem, 0.96vw, 1rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.head-timeline-entry h3 {
  color: rgba(242, 246, 252, 0.96);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(2.1rem, 3.1vw, 3rem);
  letter-spacing: 0.03em;
  line-height: 0.98;
}

.head-timeline-entry__summary {
  max-width: 34ch;
  color: rgba(225, 233, 242, 0.88);
  font-size: clamp(0.94rem, 1vw, 1.08rem);
  line-height: 1.48;
}

.head-project-browser {
  display: grid;
  grid-template-columns: minmax(14.5rem, 18.75rem) minmax(0, 1.72fr) minmax(12.5rem, 0.88fr);
  gap: 2.4rem;
  max-width: 100%;
  align-items: start;
}

.head-project-browser__lead {
  max-width: 48ch;
  color: rgba(214, 223, 236, 0.72);
  font-size: clamp(0.86rem, 0.9vw, 0.94rem);
  line-height: 1.72;
}

.head-project-index-shell {
  display: grid;
  gap: 0.55rem;
}

.head-project-index__eyebrow {
  color: rgba(118, 171, 233, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.head-project-index {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(121, 145, 173, 0.16);
}

.head-project-index__item {
  display: grid;
  gap: 0.16rem;
  justify-items: start;
  position: relative;
  padding: 0.85rem 2.35rem 0.9rem 0;
  border: 0;
  border-bottom: 1px solid rgba(121, 145, 173, 0.16);
  background: transparent;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.head-project-index__code {
  color: rgba(118, 171, 233, 0.72);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.head-project-index__range {
  color: rgba(206, 216, 229, 0.68);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.head-project-index__name {
  color: rgba(236, 242, 251, 0.94);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(1.12rem, 1.22vw, 1.3rem);
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.head-project-index__item.is-active .head-project-index__code,
.head-project-index__item:hover .head-project-index__code,
.head-project-index__item:focus-visible .head-project-index__code {
  color: rgba(236, 242, 251, 0.92);
}

.head-project-index__item.is-active .head-project-index__name,
.head-project-index__item:hover .head-project-index__name,
.head-project-index__item:focus-visible .head-project-index__name {
  color: rgba(92, 150, 226, 0.9);
}

.head-project-index__item.is-active {
  border-bottom-color: rgba(118, 171, 233, 0.48);
  background: transparent;
}

.head-project-index__item.is-active::before {
  content: "";
  position: absolute;
  top: 0.62rem;
  bottom: 0.62rem;
  left: -0.35rem;
  width: 1px;
  background: rgba(212, 223, 238, 0.58);
}

.head-project-detail-shell {
  grid-column: 2 / 4;
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 0 0 0 1.65rem;
  border: 0;
  border-left: 1px solid rgba(121, 145, 173, 0.12);
  background: none;
  overflow: visible;
}

.head-project-detail {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(12rem, 0.92fr);
  column-gap: 2.4rem;
  align-content: start;
  gap: 0.78rem;
  padding: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: none;
}

.head-project-detail:not(.is-active) {
  display: none;
}

.head-project-detail__code,
.head-project-detail h3,
.head-project-detail__section {
  grid-column: 1;
}

.head-project-detail__code,
.head-project-detail__label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.head-project-detail__code {
  color: rgba(118, 171, 233, 0.72);
}

.head-project-detail h3 {
  color: rgba(236, 242, 251, 0.96);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(2.25rem, 3vw, 3.15rem);
  letter-spacing: 0.03em;
  line-height: 0.98;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.head-project-detail__section {
  display: grid;
  gap: 0.48rem;
  max-width: 78ch;
}

.head-project-detail__list {
  display: grid;
  gap: 0.18rem;
  margin: -0.1rem 0 0.28rem;
  padding: 0 0 0 1.1rem;
  color: rgba(214, 223, 236, 0.8);
  font-size: clamp(0.84rem, 0.88vw, 0.92rem);
  line-height: 1.58;
}

.head-project-detail__list li {
  margin: 0;
}

.head-project-detail__section + .head-project-detail__section {
  margin-top: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(121, 145, 173, 0.14);
}

.head-project-detail__label {
  color: rgba(118, 171, 233, 0.66);
  letter-spacing: 0.18em;
  font-weight: 600;
}

.head-project-detail__section p:last-child,
.head-project-detail__meta-grid > div > p:last-child,
.head-project-detail__section p:not(.head-project-detail__label) {
  color: rgba(214, 223, 236, 0.8);
  font-size: clamp(0.84rem, 0.88vw, 0.92rem);
  line-height: 1.58;
}

.head-project-detail__meta-grid {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 6;
  align-self: start;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 0;
  padding-top: 0.15rem;
  padding-left: 1.55rem;
  border-top: 0;
  border-left: 1px solid rgba(121, 145, 173, 0.12);
}

.head-project-detail__meta-grid > div {
  display: grid;
  gap: 0.38rem;
  padding: 0 0 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(121, 145, 173, 0.14);
}

.head-project-detail__meta-grid > div:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.head-project-detail__meta-grid > div:nth-child(4) > p:last-child {
  color: rgba(236, 242, 251, 0.9);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(1rem, 1.05vw, 1.08rem);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.head-timeline-browser {
  grid-template-columns: minmax(14.5rem, 18.75rem) minmax(0, 1.72fr) minmax(12.5rem, 0.88fr);
}

.head-timeline-browser .head-project-detail-shell {
  grid-column: 2 / 4;
  padding-left: 1.65rem;
}

.head-timeline-browser .head-project-index__name {
  line-height: 1.12;
}

.head-timeline-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(12rem, 0.92fr);
  column-gap: 2.4rem;
  align-content: start;
  gap: 0.78rem;
  max-width: none;
}

.head-timeline-detail .head-project-detail__code {
  display: block;
  margin-bottom: 0.45rem;
}

.head-timeline-detail__range {
  grid-column: 1;
  color: rgba(206, 216, 229, 0.68);
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin: -0.12rem 0 0.45rem;
}

.head-timeline-detail h3 {
  grid-column: 1;
  margin-bottom: 1.1rem;
}

.head-timeline-detail .head-project-detail__section {
  grid-column: 1;
  max-width: 62ch;
}

.head-timeline-artifacts > div {
  display: grid;
  gap: 0.34rem;
}

.head-timeline-artifacts > div > p:last-child {
  color: rgba(214, 223, 236, 0.82);
  font-size: clamp(0.84rem, 0.88vw, 0.92rem);
  line-height: 1.58;
}

.head-project-index__item:focus-visible {
  outline: 1px solid rgba(118, 171, 233, 0.5);
  outline-offset: -1px;
}

.head-systems-panel,
.head-discipline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  max-width: 60rem;
  border-top: 1px solid rgba(121, 145, 173, 0.16);
  border-bottom: 1px solid rgba(121, 145, 173, 0.16);
}

.head-discipline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: none;
}

.head-system-card,
.head-discipline-card {
  min-height: 100%;
  padding: 1.7rem 2rem 1.8rem;
  border-right: 1px solid rgba(121, 145, 173, 0.16);
  border-top: 1px solid rgba(121, 145, 173, 0.16);
}

.head-systems-panel > :nth-child(-n + 2) {
  border-top: 0;
}

.head-discipline-grid > :nth-child(-n + 3) {
  border-top: 0;
}

.head-systems-panel > :nth-child(2n) {
  border-right: 0;
}

.head-discipline-grid > :nth-child(3n) {
  border-right: 0;
}

.head-system-card p,
.head-discipline-card li,
.head-contact-links a,
.head-contact-links__note,
.head-contact-panel__support li {
  color: rgba(214, 223, 236, 0.78);
  font-size: clamp(0.88rem, 0.92vw, 0.98rem);
  line-height: 1.68;
}

.head-system-card__meta {
  list-style: none;
  display: grid;
  gap: 0.24rem;
  margin: 0.88rem 0 0;
  padding: 0;
}

.head-system-card__meta li {
  color: rgba(167, 181, 201, 0.58);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.head-system-card__status {
  display: inline-block;
  margin-top: 1.1rem;
  color: #7fddb7;
  font-size: var(--t-xs);
  letter-spacing: 0.18em;
  font-family: "IBM Plex Mono", monospace;
}

.head-system-card a {
  display: inline-block;
  margin-top: 1.02rem;
  color: rgba(202, 214, 231, 0.56);
  font-size: var(--t-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

.head-discipline-card__icon {
  margin-bottom: 1rem;
  color: rgba(220, 229, 243, 0.58);
  font-size: 1.35rem;
  line-height: 1;
}

.head-discipline-card ul {
  list-style: none;
  display: grid;
  gap: 0.18rem;
  margin: 0.86rem 0 0;
  padding: 0;
}

.head-discipline-card li {
  font-size: clamp(0.84rem, 0.88vw, 0.92rem);
  line-height: 1.58;
}

.head-section-block--contact .head-section-block__body {
  max-width: none;
}

.head-contact-station__descriptor {
  color: rgba(118, 171, 233, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: -0.05rem 0 1.05rem;
}

.head-contact-station {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(14.5rem, 0.86fr);
  gap: 2.55rem;
  align-items: start;
}

.head-contact-station__main {
  display: grid;
  gap: 1.55rem;
}

.head-contact-station__identity-row {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(13rem, 0.92fr);
  gap: 2rem;
  padding: 1.35rem 0 1.5rem;
  border-top: 1px solid rgba(121, 145, 173, 0.16);
  border-bottom: 1px solid rgba(121, 145, 173, 0.16);
}

.head-contact-station__identity,
.head-contact-station__location,
.head-contact-station__response-block,
.head-contact-station__rail-group {
  display: grid;
  gap: 0.42rem;
}

.head-contact-station__label,
.head-contact-station__connect-label {
  color: rgba(118, 171, 233, 0.62);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.head-contact-station__primary,
.head-contact-station__secondary {
  color: rgba(236, 242, 251, 0.95);
  text-decoration: none;
}

.head-contact-station__primary {
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(2.05rem, 2.55vw, 2.65rem);
  letter-spacing: 0.03em;
  line-height: 1;
  margin-top: 0.2rem;
}

.head-contact-station__secondary {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(1.1rem, 1.2vw, 1.3rem);
  line-height: 1.4;
  margin-top: 0.15rem;
}

.head-contact-station__primary:hover,
.head-contact-station__secondary:hover {
  color: rgba(236, 242, 251, 0.98);
}

.head-contact-station__copy {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.head-contact-station__copy p,
.head-contact-station__rail-copy,
.head-contact-station__notice p,
.head-contact-station__service-list li,
.head-contact-station__value {
  color: rgba(214, 223, 236, 0.8);
  font-size: clamp(0.84rem, 0.88vw, 0.92rem);
  line-height: 1.58;
}

.head-contact-station__copy p,
.head-contact-station__notice p {
  color: rgba(167, 181, 201, 0.66);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.head-contact-station__copy--small {
  margin-top: 0.75rem;
}

.head-contact-station__location {
  align-content: start;
  gap: 1.2rem;
}

.head-contact-station__protocol {
  display: grid;
  gap: 0.75rem;
}

.head-contact-terminal {
  min-height: 8.95rem;
  padding: 1.2rem 1.2rem 1.35rem;
  border: 1px solid rgba(121, 145, 173, 0.22);
  background:
    linear-gradient(180deg, rgba(17, 30, 48, 0.58), rgba(12, 23, 37, 0.28)),
    rgba(9, 17, 28, 0.32);
}

.head-contact-terminal__title,
.head-contact-terminal__prompt,
.head-contact-terminal__cursor {
  font-family: "IBM Plex Mono", monospace;
}

.head-contact-terminal__title {
  color: rgba(118, 171, 233, 0.88);
  font-size: clamp(0.95rem, 1vw, 1.02rem);
  letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
}

.head-contact-terminal__prompt {
  color: rgba(167, 181, 201, 0.52);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.head-contact-terminal__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.head-contact-terminal__input {
  width: 100%;
  min-height: 4.35rem;
  margin-top: 0.95rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(214, 223, 236, 0.86);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.94rem;
  line-height: 1.58;
  resize: none;
  outline: none;
}

.head-contact-terminal__input::placeholder {
  color: rgba(167, 181, 201, 0.4);
}

.head-contact-terminal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 0.6rem;
}

.head-contact-terminal__button {
  border: 1px solid rgba(121, 145, 173, 0.24);
  background: rgba(14, 24, 38, 0.42);
  color: rgba(118, 171, 233, 0.9);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem 0.5rem;
  cursor: pointer;
}

.head-contact-terminal__button:hover,
.head-contact-terminal__button:focus-visible {
  color: rgba(236, 242, 251, 0.96);
  border-color: rgba(118, 171, 233, 0.5);
  outline: none;
}

.head-contact-station__response-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding-top: 1.45rem;
  border-top: 1px solid rgba(121, 145, 173, 0.16);
}

.head-contact-station__response-block {
  min-width: 0;
}

.head-contact-station__response-block:first-child {
  padding-right: 2rem;
  border-right: 1px solid rgba(121, 145, 173, 0.12);
}

.head-contact-station__response-block:last-child {
  padding-left: 2rem;
}

.head-contact-station__response-time {
  color: rgba(236, 242, 251, 0.9);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(1.9rem, 2.2vw, 2.2rem);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-top: 0.45rem;
}

.head-contact-station__response-sub {
  color: rgba(118, 171, 233, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.05rem;
}

.head-contact-station__rail {
  display: grid;
  gap: 0;
  padding-left: 1.55rem;
  border-left: 1px solid rgba(121, 145, 173, 0.12);
}

.head-contact-station__rail-group {
  padding: 0 0 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(121, 145, 173, 0.14);
}

.head-contact-station__rail-group:last-of-type {
  margin-bottom: 0;
}

.head-contact-station__status {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(127, 217, 167, 0.95);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(1rem, 1.05vw, 1.08rem);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.head-contact-station__status-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: #42b981;
  box-shadow: 0 0 0 1px rgba(66, 185, 129, 0.1);
  flex: 0 0 auto;
}

.head-contact-station__service-list {
  list-style: none;
  display: grid;
  gap: 0.42rem;
  margin: 0.15rem 0 0;
  padding: 0;
}

.head-contact-station__service-list li::before {
  content: "\2192";
  color: rgba(214, 223, 236, 0.72);
  margin-right: 0.72rem;
}

.head-contact-station__connect-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.15rem;
}

.head-contact-station__notice {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 1rem 1.1rem 0.95rem;
  border: 1px solid rgba(121, 145, 173, 0.16);
}

.head-contact-station__notice p {
  letter-spacing: 0.06em;
}

.head-system-card a:hover {
  color: rgba(236, 242, 251, 0.96);
}

/* ─── Module identity system ─── */

.head-module {
  padding: 2rem 2.2rem;
  border: 1px solid rgba(53, 80, 111, 0.42);
  background: #15263a;
}

.head-mod-header {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.8rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(53, 80, 111, 0.22);
}

.head-mod-id {
  color: rgba(53, 80, 111, 0.85);
  font-size: var(--t-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.head-mod-name {
  color: rgba(170, 185, 201, 0.82);
  font-size: var(--t-sm);
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.head-local-nav {
  position: sticky;
  top: 3.2rem;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 2rem;
  padding: 1.4rem 0 1.6rem;
  border-bottom: 1px solid rgba(53, 80, 111, 0.28);
  background: linear-gradient(180deg, rgba(16, 28, 43, 0.99), rgba(16, 28, 43, 0.95));
  backdrop-filter: blur(12px);
}

.head-local-nav__brand {
  display: grid;
  gap: 0.32rem;
  color: var(--accent);
  text-decoration: none;
}

.head-local-nav__title {
  display: inline-flex;
  align-items: center;
  font-family: "Pathway Gothic One", sans-serif;
  font-size: var(--t-ident);
  letter-spacing: 0.12em;
  line-height: 0.84;
  text-transform: uppercase;
}

.head-local-nav__class {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--t-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(128, 148, 168, 0.5);
}

.head-local-nav__links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 1.6rem;
  min-width: 0;
  padding-bottom: 0.55rem;
}

.head-local-nav__links a {
  position: relative;
  color: var(--accent);
  font-size: var(--t-nav);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
  white-space: nowrap;
  transition: opacity 180ms ease;
}

.head-local-nav__links a.is-active,
.head-local-nav__links a:hover {
  opacity: 1;
}

.head-local-nav__links a::after {
  content: "_";
  position: absolute;
  right: -0.55em;
  opacity: 0;
  transition: opacity 150ms ease;
}

.head-local-nav__links a:hover::after,
.head-local-nav__links a.is-active::after {
  opacity: 1;
}


.head-cursor {
  animation: blinkCursor 1.1s steps(1) infinite;
  text-shadow: 0 0 10px rgba(143, 179, 217, 0.28);
}

@keyframes blinkCursor {
  0%, 50% {
    opacity: 1;
  }

  51%, 100% {
    opacity: 0.15;
  }
}

.head-tagline {
  margin-top: 0;
  color: var(--accent);
  font-size: var(--t-base);
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.head-intro {
  max-width: 44rem;
  margin-top: 1.45rem;
  color: var(--text);
  font-size: var(--t-sub);
  line-height: 2.0;
}

.head-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-top: 2.1rem;
}

.head-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-width: 11.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(53, 80, 111, 0.4);
  color: var(--accent);
  background: rgba(21, 38, 58, 0.3);
  transition: border-color 180ms ease, background 180ms ease;
}

.head-cta:hover {
  border-color: rgba(143, 179, 217, 0.3);
  background: rgba(27, 49, 74, 0.5);
}

.head-cta span {
  letter-spacing: 0.08em;
}

.head-cta--github svg {
  color: var(--text);
}


.head-section,
.head-contact-strip {
  padding-top: 1.8rem;
  border-top: 1px solid rgba(53, 80, 111, 0.18);
}

.head-section__label {
  margin-bottom: 1.3rem;
  color: var(--accent);
  font-size: var(--t-base);
  letter-spacing: 0.18em;
}

.head-bio-card {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.head-bio-card__portrait {
  min-height: 12rem;
  background:
    linear-gradient(180deg, rgba(53, 80, 111, 0.12), rgba(53, 80, 111, 0.04)),
    radial-gradient(circle at 40% 30%, rgba(170, 205, 245, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(16, 28, 44, 1), rgba(21, 38, 58, 1));
  box-shadow: inset 0 0 0 1px rgba(53, 80, 111, 0.22);
}

.head-bio-card__copy,
.head-project-line p,
.head-resume-box p,
.head-contact-strip p,
.head-work-item p {
  color: var(--text);
  font-size: var(--t-base);
  line-height: 2.0;
}

.head-inline-link {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--accent);
  font-size: var(--t-base);
  letter-spacing: 0.08em;
}

.head-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
}

.head-work-list,
.head-project-list {
  display: grid;
  gap: 1.35rem;
}

.head-work-item,
.head-project-line,
.head-resume-box {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  background: none;
}

.head-work-item {
  grid-template-columns: 10rem minmax(0, 1fr);
  align-items: start;
}

.head-work-item + .head-work-item,
.head-project-line + .head-project-line {
  padding-top: 1.35rem;
  border-top: 1px solid rgba(53, 80, 111, 0.16);
}

.head-work-item__thumb {
  min-height: 6.4rem;
  box-shadow: inset 0 0 0 1px rgba(53, 80, 111, 0.22);
}

.head-work-item__thumb--wave {
  background:
    radial-gradient(circle at center, rgba(100, 158, 218, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(13, 22, 36, 1), rgba(10, 17, 28, 1));
}

.head-work-item__thumb--stars {
  background:
    radial-gradient(circle at 50% 50%, rgba(170, 205, 245, 0.13), transparent 35%),
    linear-gradient(180deg, rgba(16, 26, 40, 1), rgba(12, 20, 32, 1));
}

.head-work-item__thumb--grid {
  background:
    linear-gradient(180deg, rgba(27, 49, 74, 0.32), transparent 45%),
    linear-gradient(90deg, rgba(53, 80, 111, 0.1) 0, transparent 1px),
    linear-gradient(180deg, rgba(53, 80, 111, 0.1) 0, transparent 1px),
    linear-gradient(180deg, rgba(13, 22, 34, 1), rgba(11, 18, 28, 1));
  background-size: auto, 1rem 100%, 100% 1rem, auto;
}

.head-work-item h3,
.head-project-line h3,
.head-contact-strip h3 {
  color: var(--accent);
  text-transform: uppercase;
}

.head-work-item h3,
.head-project-line h3 {
  font-size: var(--t-sub);
  letter-spacing: 0.08em;
}

.head-cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.6rem;
}

.head-cap {
  padding: 0.25rem 0;
  color: var(--text);
  font-size: var(--t-base);
  letter-spacing: 0.08em;
}

.head-cap-note {
  margin-top: 1.4rem;
  color: var(--text-soft);
}

.head-resume-box {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.head-resume-box__icon {
  color: var(--accent);
  opacity: 0.82;
}

.head-contact-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0 0;
  background: none;
}

.head-contact-strip h3 {
  margin-top: 0.2rem;
  font-family: "Pathway Gothic One", sans-serif;
  font-size: var(--t-ident);
  letter-spacing: 0.08em;
}



/* ─── HEAD — Hero Grid ─── */

.head-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 2.2rem;
  align-items: start;
}

.head-hero-label {
  color: rgba(128, 148, 168, 0.7);
  font-size: var(--t-sm);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.head-hero-ident {
  color: var(--accent);
  font-size: var(--t-base);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.head-hero-copy {
  color: var(--text-soft);
  font-size: var(--t-base);
  line-height: 2.0;
}

.head-signal-list {
  list-style: none;
  display: grid;
  gap: 0.58rem;
}

.head-signal-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: var(--t-base);
  letter-spacing: 0.05em;
}

.head-signal-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(143, 179, 217, 0.5);
  box-shadow: 0 0 5px rgba(143, 179, 217, 0.22);
}

/* ─── HEAD — Cards ─── */

.head-card {
  padding: 2rem 2.2rem;
  border: 1px solid rgba(53, 80, 111, 0.42);
  background: #15263a;
}

/* ─── HEAD — Bio Card ─── */

.head-bio-grid {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.head-bio-portrait {
  aspect-ratio: 3 / 4;
  background: none;
  box-shadow: none;
}

.head-bio-body {
  display: grid;
  gap: 1rem;
}

.head-bio-body p {
  color: var(--text);
  font-size: var(--t-base);
  line-height: 2.0;
}

/* ─── HEAD — Systems Card ─── */

.head-systems-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(53, 80, 111, 0.35);
  border: 1px solid rgba(53, 80, 111, 0.35);
}

.head-sys-module {
  padding: 1.6rem 1.8rem 1.4rem;
  background: #1b314a;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 2px solid rgba(53, 80, 111, 0.45);
}

.head-sys-id {
  color: rgba(128, 148, 168, 0.48);
  font-size: var(--t-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.head-sys-name {
  color: rgba(227, 235, 245, 0.86);
  font-size: var(--t-base);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.head-sys-desc {
  color: var(--text-soft);
  font-size: var(--t-base);
  line-height: 1.88;
  margin-top: 0.3rem;
}

.head-sys-status {
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: var(--t-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.head-sys-status--active {
  color: var(--accent);
}

.head-sys-status--build {
  color: rgba(143, 179, 217, 0.55);
}

.head-sys-status--core {
  color: rgba(128, 148, 168, 0.48);
}

/* ─── HEAD — Projects Table ─── */

.head-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

.head-proj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-base);
}

.head-proj-table th {
  text-align: left;
  color: rgba(128, 148, 168, 0.68);
  font-size: var(--t-xs);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 0 1.4rem 1rem 0;
  border-bottom: 1px solid rgba(53, 80, 111, 0.4);
  font-weight: 400;
}

.head-proj-table td {
  padding: 0.88rem 1.4rem 0.88rem 0;
  color: var(--text);
  border-bottom: 1px solid rgba(53, 80, 111, 0.15);
  vertical-align: top;
  line-height: 1.6;
}

.head-proj-table td:first-child {
  color: rgba(128, 148, 168, 0.55);
  font-size: var(--t-base);
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.head-proj-table td:nth-child(2) {
  color: rgba(196, 217, 241, 0.82);
  white-space: nowrap;
}

.head-proj-table td:nth-child(4) {
  color: var(--text-soft);
  white-space: nowrap;
}

.head-tbl-status {
  display: inline-block;
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.16em 0.48em;
}

.head-tbl-status--active {
  color: rgba(196, 217, 241, 0.9);
  border: 1px solid rgba(53, 80, 111, 0.5);
}

.head-tbl-status--build {
  color: rgba(143, 179, 217, 0.6);
  border: 1px solid rgba(53, 80, 111, 0.3);
}

.head-tbl-status--archive {
  color: rgba(128, 148, 168, 0.45);
  border: 1px solid rgba(53, 80, 111, 0.18);
}

/* ─── HEAD — Terminal Links ─── */

.head-term-link {
  display: inline-block;
  color: rgba(143, 179, 217, 0.55);
  font-size: var(--t-base);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.head-term-link:hover {
  color: rgba(196, 217, 241, 0.9);
}

.head-term-link--hi {
  color: rgba(143, 179, 217, 0.78);
  font-size: var(--t-base);
}

/* ─── HEAD — Resume Card ─── */

.head-resume-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 1.4rem;
}

.head-resume-heading {
  color: rgba(128, 148, 168, 0.65);
  font-size: var(--t-sm);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.head-skill-list {
  list-style: none;
  display: grid;
  gap: 0.52rem;
}

.head-skill-list li {
  color: var(--text);
  font-size: var(--t-base);
  line-height: 1.5;
  padding-left: 0.9rem;
  position: relative;
}

.head-skill-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: rgba(53, 80, 111, 0.7);
}

/* ─── HEAD — Mode Button ─── */

.head-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(53, 80, 111, 0.5);
  color: var(--accent);
  font-size: var(--t-sm);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: rgba(27, 49, 74, 0.4);
  transition: background 160ms ease, border-color 160ms ease;
}

.head-mode-btn:hover {
  background: rgba(27, 49, 74, 0.72);
  border-color: rgba(143, 179, 217, 0.35);
}

/* ─── HEAD — Contact Card ─── */

.head-contact-copy {
  color: var(--text);
  font-size: var(--t-base);
  line-height: 1.92;
  margin-bottom: 1.2rem;
}

/* ─── HEAD — Lower Row ─── */

.head-lower-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(53, 80, 111, 0.35);
  border: 1px solid rgba(53, 80, 111, 0.35);
  margin-top: 2rem;
}

.head-lower-card {
  padding: 1.6rem 1.8rem;
  background: #15263a;
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  border-top: 2px solid rgba(53, 80, 111, 0.45);
}

.head-panel-header {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(53, 80, 111, 0.18);
}

.head-panel-id {
  color: rgba(53, 80, 111, 0.85);
  font-size: var(--t-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.head-panel-name {
  color: rgba(170, 185, 201, 0.78);
  font-size: var(--t-sm);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* ─── HEAD — Quick Access ─── */

.head-shortcuts {
  list-style: none;
  display: grid;
  gap: 0.52rem;
}

.head-shortcuts li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.head-shortcuts a {
  color: var(--text-soft);
  font-size: var(--t-base);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 140ms ease;
}

.head-shortcuts a:hover {
  color: var(--accent);
}

.head-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  border: 1px solid rgba(53, 80, 111, 0.5);
  color: rgba(170, 185, 201, 0.6);
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--t-sm);
  font-style: normal;
}

/* ─── HEAD — Recent Output ─── */

.head-output-list {
  list-style: none;
  display: grid;
  gap: 0.62rem;
}

.head-output-item {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  font-size: var(--t-base);
}

.head-output-type {
  flex-shrink: 0;
  color: rgba(128, 148, 168, 0.55);
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  min-width: 4.2rem;
}

/* ─── HEAD — Node Map ─── */

.head-nodemap__root {
  color: rgba(196, 217, 241, 0.82);
  font-size: var(--t-base);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.head-nodemap__list {
  list-style: none;
  display: grid;
  gap: 0.28rem;
}

.head-nodemap__list li {
  color: var(--text-soft);
  font-size: var(--t-base);
  letter-spacing: 0.06em;
}

/* ─── HEAD — Terminal ─── */

.head-terminal {
  display: grid;
  gap: 0.38rem;
}

.head-terminal p {
  color: rgba(170, 185, 201, 0.55);
  font-size: var(--t-base);
  letter-spacing: 0.07em;
  line-height: 1.5;
}

.head-term-prompt {
  color: rgba(196, 217, 241, 0.78) !important;
  margin-top: 0.3rem;
}

.world-title {
  margin-left: 0.18em;
  font-family: "Pathway Gothic One", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
}

.world-header {
  padding-bottom: 1.6rem;
  display: grid;
  gap: 0.8rem;
}

.world--heart .world-shell,
.world--shadow .world-shell {
  padding-top: 3rem;
}

.world--heart {
  min-height: 100svh;
  padding: 0.7rem 0 0.85rem;
}

.world--heart > .world-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100svh - 1.55rem);
  padding-top: 0.3rem;
}

.world--heart .world-header {
  gap: 0.32rem;
  padding-bottom: 0.45rem;
}

.world--heart .world-stage,
.world--shadow .world-stage {
  padding: 2rem;
}

.world--shadow .world-title {
  font-size: var(--t-ident);
  letter-spacing: 0.14em;
}

.world--shadow .world-dek,
.world-lead {
  color: var(--text-soft);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  line-height: 1.65;
}

.world--shadow .world-stage {
  display: grid;
  gap: 1.4rem;
}

.world--shadow .world-nav,
.world--shadow .world-panels {
  display: grid;
  gap: 1rem;
}

.world--shadow .world-nav__button {
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  font-size: var(--t-nav);
  letter-spacing: 0.06em;
}

.world--shadow .world-panel {
  display: none;
  gap: 1rem;
}

.world--shadow .world-panel.is-active {
  display: grid;
}

.world-stage--heart {
  height: calc(100svh - 4.8rem);
  max-height: calc(100svh - 4.8rem);
  min-height: 0;
  padding: 0;
  border: 0;
  background:
    radial-gradient(circle at 56% 42%, rgba(102, 20, 60, 0.14), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(60, 13, 28, 0.18), transparent 36%),
    radial-gradient(circle at 34% 88%, rgba(38, 9, 26, 0.12), transparent 34%);
  box-shadow: none;
  overflow: hidden;
}

.world--heart .world-shell {
  width: min(100% - 1rem, 97rem);
}

.heart-layout {
  position: relative;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 12.4rem minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(10, 5, 10, 0.98) 0%, rgba(10, 5, 10, 0.98) 12.4rem, rgba(15, 7, 14, 0.28) 12.4rem, rgba(17, 8, 15, 0.1) 46%, rgba(17, 8, 15, 0.04) 100%);
}

.heart-layout::before {
  content: "";
  position: absolute;
  inset: 0 0 0 12.4rem;
  background:
    radial-gradient(circle at 36% 56%, rgba(82, 18, 46, 0.2), transparent 26%),
    radial-gradient(circle at 64% 40%, rgba(56, 13, 31, 0.18), transparent 33%),
    radial-gradient(circle at 82% 54%, rgba(35, 10, 21, 0.12), transparent 31%),
    linear-gradient(90deg, rgba(20, 8, 18, 0.08) 0%, rgba(20, 8, 18, 0.015) 24%, transparent 70%);
  pointer-events: none;
}

.heart-rail {
  --heart-signal-right: calc(-1.87rem + ((1.12rem - 1px) / 2));
  --heart-rail-pad-right: 1.15rem;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 0.38rem;
  padding: 0.92rem 1.15rem 0.78rem 1.45rem;
}

.heart-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: calc(var(--heart-signal-right) + var(--heart-rail-pad-right));
  width: 1px;
  background: rgba(236, 229, 214, 0.82);
  pointer-events: none;
}

.heart-rail::after {
  content: none;
}

.heart-rail__crest {
  position: relative;
  width: 2.55rem;
  aspect-ratio: 400 / 397;
}

.heart-rail__crest::before {
  content: none;
}

.heart-rail__crest img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.9;
  mix-blend-mode: normal;
}

.heart-rail__track {
  position: relative;
  display: grid;
  align-content: start;
  grid-auto-rows: min-content;
  gap: 1.62rem;
  margin-top: 2.66rem;
  padding: 0;
}

.heart-rail__track::before {
  content: none;
}

.heart-rail__station {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  min-height: 0;
  padding: 0.04rem 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: default;
}

.heart-rail__label {
  color: rgba(245, 233, 213, 0.88);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(0.94rem, 1vw, 1.12rem);
  line-height: 0.72;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.heart-rail__dot {
  position: absolute;
  top: 50%;
  right: -1.87rem;
  transform: translateY(-50%);
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 999px;
  border: 1px solid rgba(236, 229, 214, 0.85);
  background: rgba(11, 5, 10, 0.98);
}

.heart-rail__station.is-active .heart-rail__label,
.heart-rail__manifesto {
  color: var(--accent);
}

.heart-rail__station.is-active .heart-rail__dot {
  border-color: var(--accent);
  background:
    radial-gradient(circle at 50% 50%, rgba(240, 178, 100, 0.92) 0 24%, var(--accent) 25% 100%);
  box-shadow: 0 0 18px rgba(222, 99, 43, 0.28);
}

.heart-rail__station[disabled] {
  opacity: 1;
}

.heart-rail__station[disabled] .heart-rail__label {
  color: rgba(245, 233, 213, 0.8);
}

.heart-rail__manifesto {
  max-width: 7rem;
  font-family: "Pathway Gothic One", sans-serif;
  font-size: 0.84rem;
  line-height: 1.04;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.heart-rail__social {
  display: flex;
  align-items: center;
  gap: 0.82rem;
}

.heart-rail__social-link {
  color: rgba(245, 233, 213, 0.88);
  transition: color 180ms ease, transform 180ms ease;
}

.heart-rail__social-link svg {
  display: block;
  width: 1.28rem;
  height: 1.28rem;
}

.heart-rail__social-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.heart-panels {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.heart-panel--origin {
  position: relative;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  align-items: start;
  column-gap: 1.7rem;
  row-gap: 0.34rem;
  padding: 0.34rem 0.8rem 0.48rem 2.5rem;
  overflow: hidden;
}

.heart-panel--origin::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 26% 62%, rgba(80, 16, 46, 0.12), transparent 28%),
    radial-gradient(circle at 78% 30%, rgba(49, 10, 24, 0.1), transparent 36%),
    linear-gradient(90deg, rgba(18, 9, 16, 0.22) 0%, rgba(18, 9, 16, 0.08) 22%, rgba(18, 9, 16, 0) 48%);
  pointer-events: none;
}

.heart-origin__copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 0.28rem;
  padding-top: 0.08rem;
  max-width: 28rem;
  min-height: 0;
}

.heart-origin__ident {
  color: rgba(244, 233, 213, 0.62);
  font-size: clamp(0.62rem, 0.62vw, 0.7rem);
  letter-spacing: 0.26em;
  line-height: 1;
  margin-bottom: 0.28rem;
  text-transform: uppercase;
}

.heart-origin__title {
  color: var(--text);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(2.45rem, 2.75vw, 3.45rem);
  line-height: 0.88;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  max-width: none;
  white-space: nowrap;
}

.heart-origin__rule {
  display: none;
}

.path-station__header {
  grid-column: 1;
  grid-row: 1;
}

.path-station__chapter-rail-shell {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  min-width: 0;
  padding-top: 0;
  margin-bottom: 0.72rem;
}

.path-chapter-rail {
  --path-signal-x: 0px;
  --path-signal-band-width: 100%;
  display: flex;
  position: relative;
  align-items: flex-start;
  gap: 0.64rem;
  min-width: 0;
  padding: 0 0 1.02rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  isolation: isolate;
}

.path-chapter-rail::-webkit-scrollbar {
  display: none;
}

.path-chapter-rail__button {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(232, 226, 218, 0.34);
  cursor: pointer;
  transition: color 180ms ease, opacity 180ms ease, text-shadow 220ms ease;
}

.path-chapter-rail__label {
  display: block;
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(0.84rem, 0.88vw, 1.02rem);
  letter-spacing: 0.1em;
  line-height: 0.84;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.74;
}

.path-chapter-rail__divider {
  flex: 0 0 auto;
  align-self: center;
  margin-top: 0.1rem;
  width: 0.18rem;
  height: 0.18rem;
  border-radius: 999px;
  background: rgba(245, 233, 213, 0.22);
}

.path-chapter-rail__button:hover,
.path-chapter-rail__button:focus-visible,
.path-chapter-rail__button.is-preview {
  color: rgba(241, 229, 211, 0.66);
  text-shadow: 0 0 10px rgba(214, 123, 62, 0.14);
  outline: none;
}

.path-chapter-rail__button.is-active {
  color: rgba(247, 237, 221, 0.9);
  text-shadow:
    0 0 11px rgba(217, 131, 70, 0.18),
    0 0 22px rgba(217, 131, 70, 0.08);
}

.path-chapter-rail__signal {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--path-signal-band-width);
  height: 0.82rem;
  pointer-events: none;
  z-index: 1;
}

.path-chapter-rail__band {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(236, 229, 214, 0.18);
}

.path-chapter-rail__pulse {
  position: absolute;
  top: -1px;
  left: var(--path-signal-x);
  width: 6.25rem;
  height: 3px;
  opacity: 0;
  transform: translateX(-50%) scaleX(0.68);
  transform-origin: center;
  background: linear-gradient(
    90deg,
    rgba(214, 123, 62, 0) 0%,
    rgba(214, 123, 62, 0.08) 20%,
    rgba(245, 198, 131, 0.72) 50%,
    rgba(214, 123, 62, 0.08) 80%,
    rgba(214, 123, 62, 0) 100%
  );
  filter: blur(0.4px);
  transition:
    left 190ms cubic-bezier(0.22, 0.88, 0.3, 1.08),
    opacity 170ms ease,
    transform 220ms cubic-bezier(0.22, 0.88, 0.3, 1);
}

.path-chapter-rail__marker {
  position: absolute;
  top: 0.2rem;
  left: var(--path-signal-x);
  width: 0.8rem;
  height: 0.48rem;
  opacity: 0;
  transform: translateX(-50%);
  transition:
    left 190ms cubic-bezier(0.22, 0.88, 0.3, 1.08),
    opacity 140ms ease,
    filter 180ms ease;
}

.path-chapter-rail__marker::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  background: linear-gradient(
    180deg,
    rgba(247, 221, 169, 0.96) 0%,
    rgba(220, 124, 53, 0.94) 100%
  );
  box-shadow:
    0 0 10px rgba(220, 124, 53, 0.2),
    0 0 18px rgba(220, 124, 53, 0.08);
}

.path-chapter-rail.has-signal .path-chapter-rail__marker {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(230, 146, 74, 0.22));
}

.path-chapter-rail.is-tuning .path-chapter-rail__pulse {
  opacity: 0.95;
  transform: translateX(-50%) scaleX(1);
  animation: path-signal-shimmer 220ms linear 1;
}

.path-chapter-rail.is-tuning .path-chapter-rail__band {
  background: rgba(236, 229, 214, 0.24);
}

@keyframes path-signal-shimmer {
  0% {
    opacity: 0.18;
    transform: translateX(-50%) scaleX(0.6);
  }
  55% {
    opacity: 0.98;
    transform: translateX(-50%) scaleX(1);
  }
  100% {
    opacity: 0.22;
    transform: translateX(-50%) scaleX(0.78);
  }
}

.path-station__content-shell {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 2 / 4;
  display: grid;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border-top: 1px solid rgba(236, 229, 214, 0.22);
  padding-top: 0.28rem;
  overflow: hidden;
}

.path-panel {
  display: none;
  grid-template-columns: minmax(0, 33.6rem) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  align-self: stretch;
  gap: 0;
  height: 100%;
  min-height: 0;
}

.path-panel.is-active {
  display: grid;
}

.path-panel__copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 0.46rem 1.45rem 0.4rem 0;
  min-height: 0;
}

.path-panel__kicker {
  color: var(--accent);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

.path-panel__title {
  color: rgba(245, 233, 213, 0.98);
  font-family: "Pathway Gothic One", sans-serif;
  font-size: clamp(1.64rem, 1.55vw, 2.08rem);
  letter-spacing: 0.08em;
  line-height: 0.92;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
}

#path-default .path-panel__title {
  color: rgba(244, 233, 213, 0.94);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.2rem, 1.16vw, 1.48rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.01em;
  line-height: 1.08;
  margin-top: 0.42rem;
  text-transform: none;
  max-width: 26rem;
  white-space: normal;
}

#path-default .path-panel__rule {
  display: none;
}

.path-panel__rule {
  width: 2.35rem;
  height: 1px;
  background: rgba(222, 99, 43, 0.92);
}

.path-panel__body {
  display: grid;
  gap: 0.48rem;
  max-width: 25.9rem;
  color: rgba(244, 233, 213, 0.96);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.31rem, 1.1vw, 1.62rem);
  line-height: 1.2;
}

.path-panel__body p {
  margin: 0;
}

#path-default .path-panel__body p:first-child {
  margin-bottom: 0.32rem;
}

#path-default .path-panel__body p:nth-child(2) {
  margin-bottom: 0.46rem;
}

#path-default .path-panel__body p:nth-child(3) {
  margin-top: 0.08rem;
  margin-bottom: 0.42rem;
}

#path-default .path-panel__body p:nth-child(4) {
  margin-top: 0.1rem;
}

.path-panel__artifact {
  position: relative;
  min-width: 0;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  border-left: 1px solid rgba(236, 229, 214, 0.18);
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 18%, rgba(130, 67, 39, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(10, 5, 9, 0.42), rgba(6, 3, 6, 0.7));
}

.path-panel__artifact::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 4, 7, 0.02) 0%, rgba(8, 4, 7, 0.12) 100%),
    radial-gradient(circle at 74% 34%, rgba(240, 146, 83, 0.08), transparent 18%);
  pointer-events: none;
}

.path-panel__artifact img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) contrast(1.02) saturate(0.92);
}

.path-panel__artifact--default img {
  object-position: 52% 48%;
}

.path-panel__artifact--sweet-vine img {
  object-position: 38% 46%;
}

.path-panel__artifact--looking-star img {
  object-position: 58% 36%;
}

.path-panel__artifact--solo img {
  object-position: 46% 58%;
}

.path-panel__artifact--wooden-revolt img {
  object-position: 62% 52%;
}

.path-panel__artifact--jackie-greene img {
  object-position: 60% 40%;
}

.panel-kicker,
.card-label {
  color: var(--text-faint);
  font-size: var(--t-sm);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.panel-quote,
.panel-list p {
  color: var(--text-soft);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .world--heart .world-shell {
    width: min(100% - 0.7rem, 97rem);
  }

  .heart-layout {
    grid-template-columns: 11.2rem minmax(0, 1fr);
  }

  .heart-rail {
    padding-inline: 1.3rem;
  }

  .heart-rail__track::before {
    right: -1.31rem;
  }

  .heart-rail__dot {
    right: -1.87rem;
  }

  .heart-panel--origin {
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    padding: 0.78rem 0.7rem 0.78rem 2.3rem;
    column-gap: 1.8rem;
  }

  .heart-origin__title {
    font-size: clamp(3.9rem, 6.25vw, 5.5rem);
  }

  .heart-origin__copy {
    gap: 0.82rem;
    max-width: 18rem;
    min-height: 0;
  }

  .path-chapter-rail {
    gap: 0.74rem;
  }

  .path-chapter-rail__label {
    font-size: clamp(0.96rem, 1vw, 1.16rem);
  }

  .path-panel {
    grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
  }

  .path-panel__copy {
    padding-right: 1rem;
  }

  .path-panel__title {
    font-size: clamp(1.48rem, 2vw, 1.84rem);
    white-space: normal;
  }

  .path-panel__body {
    font-size: clamp(1.26rem, 1.16vw, 1.54rem);
    max-width: 22rem;
  }

  .threshold-portals {
    gap: 1rem;
    max-width: 42rem;
  }

  .portal {
    min-height: 7rem;
  }

  .world-shell {
    width: min(100% - 2rem, 48rem);
  }

  .head-hero-grid,
  .head-bio-grid {
    grid-template-columns: 1fr;
  }

  .head-hero-grid {
    gap: 1.4rem;
  }

  .head-systems-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .head-resume-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .head-lower-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .head-signal-frame {
    --head-track-label-col: 4.6rem;
    --head-signal-left-gap: 1.15rem;
    --head-signal-right-gap: 2.85rem;
    --head-content-start: 0.1rem;
  }

  .head-track {
    min-height: 0;
    padding: 0.1rem 0 0;
    top: calc(3.6rem + 1rem);
  }

  .head-track__menu {
    gap: 2rem;
  }

  .head-track__line {
    top: 0.05rem;
    bottom: 0.45rem;
    right: 0.5rem;
  }

  .head-track__label {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
  }

  .head-panels {
    min-height: 29rem;
  }

  .head-experience-item,
  .head-contact-panel {
    grid-template-columns: 1fr;
  }

  .head-systems-panel,
  .head-discipline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .head-contact-links {
    padding: 1.25rem 1.5rem 1.4rem;
  }

  .head-contact-station {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .head-contact-station__identity-row {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .head-contact-station__rail {
    padding-left: 0;
    padding-top: 1rem;
    border-left: 0;
    border-top: 1px solid rgba(121, 145, 173, 0.16);
  }

  .head-project-browser {
    grid-template-columns: minmax(8.9rem, 10.4rem) minmax(0, 1fr);
    gap: 1.35rem;
  }

  .head-timeline-browser {
    grid-template-columns: minmax(8.9rem, 10.4rem) minmax(0, 1fr);
  }

  .head-project-detail-shell {
    grid-column: 2;
    min-height: 0;
    padding: 0 0 0 1rem;
  }

  .head-project-detail {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .head-project-detail__eyebrow,
  .head-project-detail__code,
  .head-project-detail h3,
  .head-project-detail__section,
  .head-project-detail__meta-grid {
    grid-column: 1;
  }

  .head-project-detail__meta-grid {
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem 1.5rem;
    margin-top: 0.3rem;
    padding-top: 1rem;
    padding-left: 0;
    border-top: 1px solid rgba(121, 145, 173, 0.16);
    border-left: 0;
  }

  .head-project-detail__meta-grid > div {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .head-timeline-detail {
    grid-template-columns: 1fr;
  }

  .head-timeline-detail__range,
  .head-timeline-detail h3,
  .head-timeline-detail .head-project-detail__section,
  .head-timeline-artifacts {
    grid-column: 1;
  }

  .head-timeline-artifacts {
    margin-top: 0.6rem;
  }

  .head-timeline-artifacts > div > p:last-child {
    color: rgba(214, 223, 236, 0.82);
  }

  .head-contact-panel__resume {
    padding: 1.25rem 1.5rem 1.1rem;
    border-right: 0;
    border-bottom: 1px solid rgba(121, 145, 173, 0.16);
  }

  .head-systems-panel > :nth-child(2n),
  .head-discipline-grid > :nth-child(2n) {
    border-right: 0;
  }

  .head-discipline-grid > :nth-child(-n + 3) {
    border-top: 1px solid rgba(121, 145, 173, 0.16);
  }

  .head-discipline-grid > :nth-child(-n + 2) {
    border-top: 0;
  }

  .head-bio-portrait {
    top: 0.75rem;
    right: 0.75rem;
    bottom: 3.2rem;
    left: 46%;
    opacity: 1;
  }

  .threshold-ui,
  .threshold-prompt {
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .heart-layout {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .heart-rail {
    gap: 1.4rem;
    border-right: 0;
    border-bottom: 1px solid rgba(236, 229, 214, 0.5);
    padding-bottom: 1.4rem;
  }

  .heart-rail__track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1rem;
    padding: 0;
  }

  .heart-rail__track::before,
  .heart-rail__dot,
  .heart-rail__manifesto,
  .heart-rail__social {
    display: none;
  }

  .heart-panel--origin {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding: 2rem 1.1rem 1.4rem;
    gap: 1rem;
    min-height: auto;
  }

  .heart-origin__copy {
    gap: 0.72rem;
  }

  .heart-origin__title {
    font-size: clamp(3.45rem, 17vw, 4.75rem);
  }

  .path-station__header {
    grid-column: 1;
    grid-row: 1;
  }

  .path-station__chapter-rail-shell {
    grid-column: 1;
    grid-row: 2;
    padding-top: 0;
  }

  .path-chapter-rail {
    gap: 0.7rem;
    margin: 0 -0.1rem;
    padding: 0 0.1rem 0.25rem;
  }

  .path-chapter-rail__label {
    font-size: 1rem;
    letter-spacing: 0.12em;
  }

  .path-chapter-rail__divider {
    width: 0.18rem;
    height: 0.18rem;
  }

  .path-station__content-shell {
    grid-row: 3;
    padding-top: 0.9rem;
  }

  .path-panel {
    grid-template-columns: 1fr;
  }

  .path-panel__copy {
    gap: 0.82rem;
    padding: 0.95rem 0 1rem;
  }

  .path-panel__title {
    font-size: clamp(2.55rem, 12vw, 3.6rem);
    white-space: normal;
  }

  .path-panel__body {
    max-width: none;
    font-size: clamp(1.22rem, 5.2vw, 1.56rem);
    gap: 0.82rem;
  }

  .path-panel__artifact {
    height: 19rem;
    border-left: 0;
    border-top: 1px solid rgba(236, 229, 214, 0.18);
  }

}

@media (max-width: 720px) {
  .head-contact-station__descriptor {
    margin-bottom: 0.9rem;
  }

  .head-contact-station__response-strip {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .head-contact-station__response-block:first-child {
    padding-right: 0;
    padding-bottom: 1rem;
    border-right: 0;
    border-bottom: 1px solid rgba(121, 145, 173, 0.12);
  }

  .head-contact-station__response-block:last-child {
    padding-left: 0;
  }

  .head-contact-station__primary {
    font-size: clamp(1.52rem, 7vw, 2.1rem);
  }

  .head-contact-station__secondary {
    font-size: clamp(0.98rem, 4.7vw, 1.16rem);
  }

  .head-contact-terminal {
    min-height: 8rem;
    padding: 1rem;
  }

  .head-project-browser {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .head-timeline-browser {
    grid-template-columns: 1fr;
  }

  .head-project-index {
    border-bottom: 1px solid rgba(121, 145, 173, 0.16);
  }

  .head-project-detail-shell {
    border-top: 0;
    border-left: 0;
    overflow: visible;
  }

  .head-project-detail {
    padding: 0.1rem 0 0.2rem;
  }

  .head-project-detail__meta-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .head-timeline-artifacts {
    gap: 0.8rem;
  }

  .head-signal-frame::before {
    display: none;
  }

  .world {
    padding-bottom: 7rem;
  }

  .world > .world-shell {
    padding-top: 1rem;
  }

  .gateway--head,
  .gateway--heart,
  .gateway--shadow {
    position: fixed;
    top: auto;
    right: 0.7rem;
    bottom: calc(0.7rem + env(safe-area-inset-bottom));
    left: 0.7rem;
    height: 3.6rem;
    border: 1px solid rgba(91, 117, 150, 0.34);
    border-bottom: 1px solid rgba(91, 117, 150, 0.34);
    border-radius: 0.95rem;
    background: rgba(8, 12, 20, 0.92);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .gateway--head::after,
  .gateway--heart::after,
  .gateway--shadow::after {
    display: none;
  }

  body[data-world="head"] #gateway-head,
  body[data-world="heart"] #gateway-heart,
  body[data-world="shadow"] #gateway-shadow {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .gateway__text {
    opacity: 0;
    pointer-events: none;
  }

  .gateway__nav {
    opacity: 1;
    visibility: visible;
    padding: 0 1rem;
    gap: 0.6rem;
  }

  .head-signal-frame {
    --head-track-label-col: 3.65rem;
    --head-signal-left-gap: 0.95rem;
    --head-signal-right-gap: 1.2rem;
    --head-content-start: 0;
  }

  .head-track {
    min-height: 0;
    padding: 0.05rem 0 0;
    top: calc(3.6rem + 0.9rem);
  }

  .head-track__menu {
    gap: 1.9rem;
  }

  .head-track__line {
    top: 0;
    bottom: 0;
    right: 0.4rem;
  }

  .head-track__label {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }

  .head-track__dot {
    --head-track-dot-size: 13px;
  }

  .head-track__line {
    right: -1.2rem;
  }

  .head-main {
    gap: 0;
  }

  #head-bio {
    min-height: 0;
  }

  .head-bio-portrait {
    display: none;
  }

  .head-main::before,
  .head-main::before {
    display: none;
  }

  .head-panels {
    min-height: 0;
    padding-left: 0;
  }

  .head-bio-intro,
  .head-section-block__title {
    line-height: 1.4;
  }

  .head-bio-registry {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .head-panel {
    position: relative;
    inset: auto;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .head-panel.is-active {
    display: block;
  }

  .head-hero__title {
    font-size: clamp(4.4rem, 22vw, 6.6rem);
    letter-spacing: 0.14em;
  }

  .head-hero__roles,
  .head-hero__layer,
  .head-section-block__title {
    line-height: 1.4;
  }

  .head-systems-panel,
  .head-discipline-grid {
    grid-template-columns: 1fr;
  }

  .head-system-card,
  .head-discipline-card {
    padding: 1.15rem 0.9rem 1.2rem;
    border-right: 0;
  }

  .head-discipline-grid > :nth-child(-n + 2),
  .head-discipline-grid > :nth-child(-n + 3) {
    border-top: 1px solid rgba(121, 145, 173, 0.16);
  }

  .head-discipline-grid > :first-child {
    border-top: 0;
  }

  .head-contact-panel__resume,
  .head-contact-links {
    padding-inline: 0.9rem;
  }

  .head-footer-bar {
    flex-direction: column;
    gap: 0.55rem;
  }

  .gateway__current {
    flex: 1;
    text-align: center;
    letter-spacing: 0.22em;
  }

  .gateway__return,
  .gateway__forward {
    font-size: 0.64rem;
    letter-spacing: 0.18em;
  }

  .threshold {
    min-height: 100svh;
  }

  /* Keep the hero a single fixed viewport on mobile so the plate fills it
     cleanly and the baked-tower beacon stays locked to the tower. */
  .threshold-sticky {
    position: relative;
    height: 100svh;
    min-height: 100svh;
  }

  .static-scene {
    min-height: 100svh;
    height: 100svh;
    /* shift framing left so the baked tower survives the portrait crop */
    --plate-x: 13%;
    /* Re-pin the animated beacon to that tower after the portrait crop. */
    --tower-beacon-x: 18.5%;
    --tower-beacon-y: 21.8%;
  }

  .tower-beacon {
    display: block;
    z-index: 22;
    width: 6px;
    height: 6px;
    transform: translate3d(-50%, -50%, 0);
    will-change: opacity;
    -webkit-animation: towerBlinkMobile 4.8s linear infinite;
    animation: towerBlinkMobile 4.8s linear infinite;
  }

  /* ─── Mobile: TERRESTRIAL hidden — sky becomes the frequency selector ─── */

  .threshold-scene-title { display: none; }

  /* the baked tower carries the scene; figure/grass would crowd the cards */
  .scene-figure,
  .scene-grass { display: none; }

  /* beacon re-pinned to the tower at the mobile (left-shifted) crop */
  /* Sky cluster: flex column, raised above the ambient plate/beacon */
  .threshold-sky {
    top: 0;
    right: 0;
    bottom: calc(11.5rem + env(safe-area-inset-bottom));
    left: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    text-align: center;
    padding: 2.4rem 1.6rem 0;
  }

  .threshold-subtitle {
    grid-row: auto;
    max-width: 15.5rem;
    padding-inline: 0;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    line-height: 1.24;
    margin: 0.4rem 0 1.3rem;
  }

  .threshold-subtitle__motto {
    letter-spacing: 0.3em;
  }

  /* Frequency label becomes primary instruction */
  .threshold-frequency-label {
    grid-row: auto;
    font-size: var(--t-base);
    letter-spacing: 0.24em;
    margin-bottom: 0.8rem;
  }

  /* ─── Portals: full-width stacked tap targets ─── */
  .threshold-portals {
    grid-row: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, minmax(0, 1fr));
    flex: 1 1 auto;
    gap: 0.6rem;
    width: 100%;
    max-width: 100%;
    max-height: 22rem;
    min-height: 0;
    margin: 0;
  }

  .portal {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    row-gap: 0.2rem;
    min-height: 0;
    padding: clamp(0.55rem, 1.6svh, 1rem);
    overflow: hidden;
    opacity: 1;
    border: 1px solid rgba(196, 184, 225, 0.26);
    background: rgba(255, 255, 255, 0.05);
  }

  .portal:hover,
  .portal:focus-visible {
    transform: none;
    opacity: 1;
  }

  /* Hide decorative corner frames on mobile */
  .portal-frame {
    display: none;
  }

  .portal-dot {
    display: none;
  }

  .portal-name {
    grid-column: 1;
    grid-row: 1;
    font-size: var(--t-ident);
    letter-spacing: 0.12em;
    margin-left: 0;
    line-height: 1;
  }

  .portal-sub {
    grid-column: 1;
    grid-row: 2;
    font-size: clamp(0.58rem, 2.75vw, 0.72rem);
    text-align: center;
    letter-spacing: 0.055em;
    line-height: 1.4;
    opacity: 0.72;
    text-transform: uppercase;
    white-space: nowrap;
  }

  /* Footer: stays pinned to the bottom, centered column */
  .threshold-ui {
    z-index: 21;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0 1.6rem calc(2.6rem + env(safe-area-inset-bottom));
  }

  .threshold-controls {
    justify-content: center;
  }

  .signal-button {
    text-align: center;
  }

  .signal-text {
    justify-items: center;
  }

  .myradio-launch {
    justify-content: center;
  }

  .threshold-version {
    bottom: calc(0.9rem + env(safe-area-inset-bottom));
  }

  .threshold-prompt {
    justify-items: center;
    text-align: center;
  }

  .threshold-publication-links {
    justify-content: center;
  }

  .signal-light {
    display: none;
  }

  .world {
    padding: 3rem 0 4rem;
  }

  .world--head {
    padding-top: 0;
  }

  .world-stage {
    padding: 1.2rem;
  }

  /* ─── HEAD_ mobile layout ─── */

  /* Stage padding: desktop 2.4rem sides → 1.2rem */
  .world-stage--head {
    padding: 1.4rem 1.2rem 1.8rem;
  }

  /* Module and card: desktop 2.2rem sides → 1.2rem */
  .head-module,
  .head-card {
    padding: 1.2rem 1.2rem;
  }

  /* Sys-module: desktop 1.8rem sides → 1rem */
  .head-sys-module {
    padding: 0.9rem 1rem 0.85rem;
  }

  /* Mod header tighter */
  .head-mod-header {
    margin-bottom: 1.2rem;
  }

  /* Nav: collapse to single column, links below brand */
  .head-local-nav {
    position: relative;
    top: 0;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    align-items: start;
  }

  /* Nav links: wrap, smaller type, tighter gaps */
  .head-local-nav__links {
    flex-wrap: wrap;
    justify-content: start;
    gap: 0.6rem 1rem;
    padding-bottom: 0;
  }

  .head-local-nav__links a {
    font-size: var(--t-sm);
    letter-spacing: 0.14em;
  }

  /* All module grids: single column */
  .head-hero-grid,
  .head-bio-grid,
  .head-systems-grid,
  .head-resume-grid,
  .head-lower-row {
    grid-template-columns: 1fr;
  }

  /* Text overflow protection */
  .head-hero-ident,
  .head-hero-copy,
  .head-sys-name,
  .head-sys-desc,
  .head-resume-heading {
    overflow-wrap: break-word;
  }

  /* Lower panels: remove tall min-height, reduce padding */
  .head-lower-card {
    min-height: auto;
    padding: 1.1rem 1.1rem;
  }

  /* Projects table: hide DESCRIPTION and UPDATED at mobile,
     keep ID / PROJECT / STATUS readable */
  .head-proj-table th:nth-child(3),
  .head-proj-table td:nth-child(3),
  .head-proj-table th:nth-child(4),
  .head-proj-table td:nth-child(4) {
    display: none;
  }

  .head-proj-table td,
  .head-proj-table th {
    padding-right: 0.9rem;
  }

  /* Resume: tighter column gaps */
  .head-resume-grid {
    gap: 1rem;
  }

}

@media (max-width: 860px) {
  .head-project-browser {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .head-project-index {
    border-bottom: 1px solid rgba(121, 145, 173, 0.16);
  }

  .head-project-detail-shell {
    grid-column: auto;
    min-height: 0;
    border-top: 0;
    overflow: visible;
  }

  .head-project-detail {
    position: static;
    display: none;
    padding: 0.1rem 0 0.2rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .head-project-detail.is-active {
    display: grid;
  }

  .head-project-detail__meta-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}


/* ─── 380px: squeeze nav links and fix TERRESTRIAL label ─── */
@media (max-width: 380px) {
  /* Nav links: all five fit on one row at 0.54rem */
  .head-local-nav__links {
    gap: 0.4rem 0.65rem;
  }

  .head-local-nav__links a {
    font-size: 0.54rem;
    letter-spacing: 0.08em;
  }

  /* TERRESTRIAL frequency label: no-wrap to prevent mid-bracket break */
  .threshold-frequency-label {
    white-space: nowrap;
    font-size: var(--t-sm);
    letter-spacing: 0.18em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .threshold-title,
  .twinkle-star-corner,
  .signal-light,
  .head-cursor,
  .signal-bar {
    -webkit-animation: none;
    animation: none;
  }

  body {
    transition: none;
  }
}
