/* ============================================================================
   EVENT HORIZON — MISSION CONTROL  ·  styles.css
   Michael Mehrdadi portfolio · revamp/ split layout (eng review D14)

   LAYER MAP (fixed overlay stack)
   ┌─ z-[100] navbar (liquid glass)      ┌─ z-[60] side tick nav
   ├─ z-50    HUD frame + progress      ├─ z-40  custom cursor
   ├─ z-10    content sections
   ├─ -z-10   grain + hairline texture
   ├─ -z-20   #webgl-canvas (black hole)
   └─ -z-30   void base + vignette

   PALETTE — "Blueshift / Redshift" (gravitational Doppler story):
   light approaching the singularity shifts blue; receding shifts amber.
   ========================================================================= */

:root {
  --void:      #04040a;
  --ink:       #e8eaf2;
  --blueshift: #4fd8ff;
  --redshift:  #ff9e64;
  --nebula:    #8b7cff;
  --horizon:   rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------------------------- base --- */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  overscroll-behavior-x: none;
  -webkit-tap-highlight-color: transparent;
}

section[id] { scroll-margin-top: calc(4.5rem + env(safe-area-inset-top)); }

::selection { background: rgba(79, 216, 255, 0.25); color: #fff; }

/* Visible keyboard focus everywhere (a11y — eng review T9) */
:focus-visible {
  outline: 2px solid var(--blueshift);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link: visually hidden until focused */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--void);
  border: 1px solid var(--blueshift);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* Screen-reader-only utility (ticker fallback list, name label) */
.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;
}

/* ------------------------------------------------- backgrounds & HUD --- */

/* WebGL fallback (eng review failure-mode F1): when THREE is unavailable the
   body gets .no-webgl and this gradient stands in for the accretion disk.   */
.no-webgl #webgl-canvas { display: none; }
.no-webgl .bg-fallback {
  opacity: 1;
}
.cosmic-shade {
  position: fixed;
  inset: 0;
  z-index: -15;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 4, 10, 0.72), rgba(4, 4, 10, 0.25) 40%, transparent 70%),
    linear-gradient(0deg, rgba(4, 4, 10, 0.8), transparent 65%);
}
.bg-fallback {
  position: fixed;
  inset: 0;
  z-index: -25;
  opacity: 1;
  transition: opacity 1s ease;
  background:
    radial-gradient(ellipse 38% 30% at 72% 30%, rgba(255, 158, 100, 0.12), transparent 65%),
    radial-gradient(ellipse 65% 38% at 64% 38%, rgba(106, 174, 255, 0.13), transparent 65%),
    radial-gradient(ellipse 50% 35% at 90% 65%, rgba(139, 124, 255, 0.07), transparent 70%);
}

/* Static film grain — SVG turbulence tile, 3% opacity (D9: cheap, no JS) */
.grain {
  position: fixed;
  inset: -50%;
  z-index: -10;
  width: 200%;
  height: 200%;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.03;
}

/* Scroll progress — 1px blueshift line across the top of the HUD frame */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 110;
  transform-origin: 0 0;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--blueshift), var(--nebula));
  pointer-events: none;
}

/* HUD corner readouts (mono micro-labels inside the frame) */
.hud-label {
  position: fixed;
  z-index: 50;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.28);
  pointer-events: none;
  text-transform: uppercase;
}

/* --------------------------------------------------- liquid glass nav --- */
/* Ported from the proven current implementation. The SVG displacement filter
   (#nav-glass) is ONLY safe on the fixed navbar + buttons — never on
   absolutely-positioned cards (documented constraint).                      */

.glass-nav { display: flex; background: transparent; }

.site-brand .site-monogram {
  display: block;
  flex-shrink: 0;
  width: 70.4px;
  height: 32px;
  object-fit: contain;
}

.glass-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7),
              inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
}

.glass-nav::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  filter: url(#nav-glass);
  -webkit-filter: url(#nav-glass);
  overflow: hidden;
  isolation: isolate;
}

.glass-nav-content { position: relative; z-index: 3; }

/* Liquid glass buttons (same filter family, tighter ripple) */
.glass-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  background: transparent;
  border: none;
  outline-color: var(--blueshift);
  z-index: 0;
}
.glass-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7),
              inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
  background-color: rgba(255, 255, 255, 0.1);
}
.glass-btn::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  filter: url(#btn-glass);
  -webkit-filter: url(#btn-glass);
  overflow: hidden;
  isolation: isolate;
}
.glass-btn > * { position: relative; z-index: 1; }

/* ------------------------------------------------ glass card (budget) --- */
/* D9/T7 BLUR BUDGET MECHANISM: base class carries NO backdrop-filter.
   main.js toggles .glass-on while a card is within ±1 viewport, keeping
   ≤3 large blur surfaces active. Navbar is the one always-on surface.      */

.glass-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid var(--horizon);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
              inset 0 1px 1px rgba(255, 255, 255, 0.12);
}
.glass-card.glass-on {
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* Corner plus markers (HUD motif, reused from current quote card) */
.corner-plus::before,
.corner-plus::after { display: none; }
.plus-mark {
  position: absolute;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.3s ease;
}
.glass-card:hover .plus-mark { color: rgba(255, 255, 255, 0.6); }

/* ------------------------------------------------ mobile bottom sheet --- */
/* The native details element keeps navigation available without JS. main.js
   adds focus management, scroll lock, backdrop dismissal, and swipe-down. */

.site-header { overflow: visible; }
.site-header .glass-nav-content { padding-top: env(safe-area-inset-top); }
.sheet-open .site-header { z-index: 220; }
.sheet-open { overflow: hidden; }

.mobile-sheet > summary {
  list-style: none;
  cursor: pointer;
}
.mobile-sheet > summary::-webkit-details-marker { display: none; }
.mobile-sheet-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  border: 0;
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  touch-action: manipulation;
  transition: color 160ms ease, background-color 160ms ease;
}
.mobile-sheet-trigger:active,
.mobile-sheet[open] .mobile-sheet-trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100dvh;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}

.mobile-sheet .mnav-panel {
  --sheet-drag-y: 0px;
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: min(100%, 540px);
  max-height: min(82svh, 680px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px max(12px, env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  color: var(--ink);
  background: rgba(20, 20, 27, 0.97);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.08);
  transform: translate(-50%, calc(100% + 24px + var(--sheet-drag-y)));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 340ms cubic-bezier(0.32, 0.72, 0, 1), opacity 200ms ease, visibility 0s linear 340ms;
}
.mobile-sheet[open] .mobile-sheet-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.mobile-sheet[open] .mnav-panel {
  transform: translate(-50%, var(--sheet-drag-y));
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.mobile-sheet .mnav-panel.is-dragging { transition: none; }

.mobile-sheet-grab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  touch-action: none;
  cursor: grab;
}
.mobile-sheet-grab span {
  width: 38px;
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
}
.mobile-sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 4px 8px 14px;
}
.mobile-sheet-heading p {
  margin: 0 0 2px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}
.mobile-sheet-heading h2 {
  margin: 0;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}
.mobile-sheet-heading button {
  min-width: 54px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  color: var(--blueshift);
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  touch-action: manipulation;
}
.mobile-sheet-heading button:active { background: rgba(79, 216, 255, 0.1); }

.mobile-sheet-options {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}
.sheet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  padding: 9px 14px;
  color: #fff;
  touch-action: manipulation;
}
.sheet-option + .sheet-option { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.sheet-option > span { min-width: 0; }
.sheet-option strong,
.sheet-option small { display: block; }
.sheet-option strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}
.sheet-option small {
  margin-top: 2px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.46);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sheet-option b {
  flex: none;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 255, 255, 0.28);
}
.sheet-option:active { background: rgba(255, 255, 255, 0.08); }
.mobile-sheet-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 52px;
  margin-top: 10px;
  border: 1px solid rgba(79, 216, 255, 0.2);
  border-radius: 16px;
  color: var(--blueshift);
  background: rgba(79, 216, 255, 0.08);
  font-size: 15px;
  font-weight: 600;
  touch-action: manipulation;
}
.mobile-sheet-action:active { background: rgba(79, 216, 255, 0.15); }

/* If JavaScript is blocked, details remains a conventional disclosure menu.
   The first summary stays visible, so the menu can always be closed again. */
html:not(.has-js) .mobile-sheet-backdrop,
html:not(.has-js) .mobile-sheet-grab,
html:not(.has-js) .mobile-sheet-heading button { display: none; }
html:not(.has-js) .mobile-sheet .mnav-panel {
  top: calc(64px + env(safe-area-inset-top));
  right: 12px;
  bottom: auto;
  left: 12px;
  width: auto;
  max-height: calc(100svh - 84px - env(safe-area-inset-top));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  padding: 14px;
  transform: none;
}
html:not(.has-js) .mobile-sheet[open] .mnav-panel {
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
html:not(.has-js) .mobile-sheet-heading { padding: 0 4px 12px; }

/* ------------------------------------------------------------- hero --- */

.hero-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.02em;
  /* Sized so MEHRDADI (8 wide Unbounded glyphs) fits its column at every
     breakpoint; white-space keeps the letter-split spans from wrapping
     mid-word (user-reported: the L broke to a new line). */
  /* min 2rem: MEHRDADI (8 glyphs ≈ 8em) must fit a 320px viewport minus
     px-6 padding (272px usable) — 2rem × 8 ≈ 256px. */
  font-size: clamp(2rem, 6.8vw, 7.5rem);
  white-space: nowrap;
  text-shadow: 0 0 80px rgba(79, 216, 255, 0.18);
}
/* Per-letter spans injected by JS (no-JS visitors see the plain text) */
.hero-name .ch { display: inline-block; will-change: transform; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blueshift);
}

/* Scroll cue chevron bounce */
@keyframes cueDrift {
  0%, 100% { translate: 0 0; opacity: 0.5; }
  50%      { translate: 0 6px; opacity: 1; }
}
.scroll-cue { animation: cueDrift 2.2s ease-in-out infinite; }

/* Telemetry card rows */
.telemetry-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  font-family: 'IBM Plex Mono', monospace;
}
.telemetry-row:last-child { border-bottom: none; }
.telemetry-key   { font-size: 10px; letter-spacing: 0.18em; color: rgba(255,255,255,0.38); text-transform: uppercase; }
.telemetry-value { font-size: 12px; color: var(--ink); text-align: right; }

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}
.pulse-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 9999px;
  background: var(--blueshift);
  animation: pulseDot 2s ease-in-out infinite;
}

/* -------------------------------------------------------- sections --- */

.section-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}
.section-eyebrow b { color: var(--blueshift); font-weight: 500; }

h2.display {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Capability card index labels (C-01 … C-06) */
.cap-index {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.25);
}

/* Placeholder module box (P3 replaces with live widgets) */
.module-pending {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
}

/* ----------------------------------------------------- skills ticker --- */
/* Two opposing marquee rows. CSS-only motion; hover pauses; offscreen pause
   is applied by main.js via animation-play-state (D9). aria-hidden rows are
   backed by a .sr-only static list for SR/SEO.                              */

/* Background lives on .ticker (solid band, user-reported readability);
   the edge-fade mask sits on .ticker-mask so it fades the WORDS, not the
   band itself. */
.ticker-mask {
  overflow: hidden;
  /* Readability: words fade in/out at the edges instead of hard-clipping —
     the eye reads the bright center band. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.ticker-row {
  display: flex;
  gap: 2.75rem;
  width: max-content;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);   /* was 0.26 — texture; now legible text */
  animation: tickerLeft 70s linear infinite;  /* slower = trackable words */
}
.ticker-row.reverse { animation-name: tickerRight; }
.ticker:hover .ticker-row,
.ticker-row.paused { animation-play-state: paused; }
/* Doppler pairing: leftward row blueshifts, rightward row redshifts */
.ticker-sep { color: rgba(79, 216, 255, 0.45); }
.ticker-row.reverse .ticker-sep { color: rgba(255, 158, 100, 0.45); }

@keyframes tickerLeft  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tickerRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ------------------------------------------------------ mission log --- */

/* Central trajectory line (P4 animates the probe + dash flow) */
.trajectory {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-0.5px);
  background: linear-gradient(180deg,
    transparent,
    rgba(79, 216, 255, 0.35) 8%,
    rgba(139, 124, 255, 0.25) 55%,
    rgba(255, 158, 100, 0.3) 92%,
    transparent);
}

/* Ghosted station index numerals — parallax target (P4) */
.ghost-index {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: clamp(5rem, 14vw, 11rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.04);  /* slightly quieter under text */
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.05); /* keeps the shape crisp */
  user-select: none;
  pointer-events: none;
}

.station-designation {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);   /* was 0.38 — eyebrow now scannable */
  text-transform: uppercase;
}
/* "Log rail" anchor: a Doppler dash marks where each entry begins —
   scannability without extra markup (odd=blueshift, even=redshift). */
.station-designation::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 0.6rem;
  vertical-align: middle;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--blueshift), transparent);
}
.station:nth-child(even) .station-designation::before {
  background: linear-gradient(90deg, var(--redshift), transparent);
}

.station-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: text-shadow 0.25s ease;
}
/* Gravitational-lensing aberration: ONLY when touching the title itself —
   whole-station hover was blurring the title while reading the description. */
.station-title:hover {
  text-shadow: -1.5px 0 0 rgba(79, 216, 255, 0.5), 1.5px 0 0 rgba(255, 158, 100, 0.45);
}

.tag-chip {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;                    /* was 9px */
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid;
  text-transform: uppercase;
}
/* Doppler spectrum chips — each tag gets its own stop (blue → violet →
   rose → amber); odd stations run blue-first, even run amber-first, so the
   per-station polarity story survives while every chip pops individually. */
.tag-blue   { border-color: rgba(79, 216, 255, 0.32);  background: rgba(79, 216, 255, 0.09);  color: var(--blueshift); box-shadow: 0 0 14px -4px rgba(79, 216, 255, 0.45); }
.tag-violet { border-color: rgba(139, 124, 255, 0.34); background: rgba(139, 124, 255, 0.1);  color: #a99bff;          box-shadow: 0 0 14px -4px rgba(139, 124, 255, 0.45); }
.tag-rose   { border-color: rgba(232, 148, 129, 0.34); background: rgba(232, 148, 129, 0.1);  color: #efa28d;          box-shadow: 0 0 14px -4px rgba(232, 148, 129, 0.4); }
.tag-amber  { border-color: rgba(255, 158, 100, 0.32); background: rgba(255, 158, 100, 0.09); color: var(--redshift);  box-shadow: 0 0 14px -4px rgba(255, 158, 100, 0.4); }

/* HUD data slate behind each station's text (user-reported: copy was hard
   to read straight over the starfield). Solid rgba — NO backdrop-filter,
   so the blur budget (≤3 surfaces) is untouched. The leading-edge accent
   keeps the odd/even Doppler alternation. */
.station-data {
  background: linear-gradient(165deg, rgba(13, 16, 28, 0.82), rgba(6, 7, 14, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.35rem 1.4rem 1.25rem;
  box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s ease;
}
@media (min-width: 768px) {
  .station-data { padding: 1.6rem 1.75rem 1.5rem; }
}
.station-data::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 14%; bottom: 14%;
  width: 2px;
  border-radius: 9999px;
  background: linear-gradient(180deg, transparent, rgba(79, 216, 255, 0.65), transparent);
}
.station:nth-child(even) .station-data::before {
  background: linear-gradient(180deg, transparent, rgba(255, 158, 100, 0.6), transparent);
}
.station:hover .station-data { border-color: rgba(255, 255, 255, 0.18); }

/* Holo-viewport: screenshot in an HUD frame with scanline + uplink overlay.
   Uniform 16/10 frame + cover (user-reported: mixed sizes read as dim and
   uncentered); full opacity, top-anchored crop, gentle lift on hover. */
.holo {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0a0a12;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  box-shadow: 0 16px 50px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.holo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 1;
  transition: transform 0.5s ease;
}
.station:hover .holo img { transform: scale(1.025); }

/* L-bracket corners */
.holo .bracket {
  position: absolute;
  width: 14px; height: 14px;
  border-color: rgba(255, 255, 255, 0.4);
  border-style: solid;
  border-width: 0;
  z-index: 3;
}
.holo .bracket.tl { top: 6px; left: 6px; border-top-width: 1px; border-left-width: 1px; }
.holo .bracket.tr { top: 6px; right: 6px; border-top-width: 1px; border-right-width: 1px; }
.holo .bracket.bl { bottom: 6px; left: 6px; border-bottom-width: 1px; border-left-width: 1px; }
.holo .bracket.br { bottom: 6px; right: 6px; border-bottom-width: 1px; border-right-width: 1px; }

/* Scanline sweep on hover */
.holo .scanline {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(79, 216, 255, 0.14) 50%, transparent 100%);
  background-size: 100% 220%;
  background-position: 0 -120%;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.station:hover .holo .scanline {
  opacity: 1;
  animation: scanSweep 1.6s ease-in-out infinite;
}
@keyframes scanSweep {
  from { background-position: 0 -120%; }
  to   { background-position: 0 120%; }
}

/* Uplink overlay (links open the live project) */
.holo .uplink {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: linear-gradient(180deg, transparent 55%, rgba(4, 4, 10, 0.85));
  opacity: 0;
  transition: opacity 0.3s ease;
  text-transform: uppercase;
}
.station:hover .holo .uplink,
.holo .uplink:focus-visible { opacity: 1; }

.station:hover .holo {
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.85),
              0 0 50px rgba(79, 216, 255, 0.12);
}

/* Station entrance (basic IO reveal now; P4 upgrades to scrub) */
.station { transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.station.pre { opacity: 0; translate: 0 36px; }

.archive-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(255, 158, 100, 0.4);
  color: var(--redshift);
  border-radius: 2px;
}

/* -------------------------------------------------------- flight log --- */
/* Strict two-column rhythm (user-reported mess): fixed mono date rail left,
   content right, node pinned to the rail between them.
   DOPPLER TIMELINE: the present approaches (blueshift), the past recedes
   (redshift) — each entry is tinted by its depth in time via --fl, and the
   rail runs blue → nebula → amber like the Mission Log trajectory.         */

.flight-rail::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 1px;
  background: linear-gradient(180deg,
    transparent,
    rgba(79, 216, 255, 0.5) 6%,
    rgba(139, 124, 255, 0.38) 50%,
    rgba(255, 158, 100, 0.45) 94%,
    transparent);
}

/* Per-entry Doppler tint (top = now = blue · bottom = past = amber) */
.flight-entry:nth-child(1) { --fl: #4fd8ff; --fl-soft: rgba(79, 216, 255, 0.08);  --fl-glow: rgba(79, 216, 255, 0.5); }
.flight-entry:nth-child(2) { --fl: #66c0ff; --fl-soft: rgba(102, 192, 255, 0.08); --fl-glow: rgba(102, 192, 255, 0.5); }
.flight-entry:nth-child(3) { --fl: #7fa6ff; --fl-soft: rgba(127, 166, 255, 0.08); --fl-glow: rgba(127, 166, 255, 0.5); }
.flight-entry:nth-child(4) { --fl: #8b7cff; --fl-soft: rgba(139, 124, 255, 0.08); --fl-glow: rgba(139, 124, 255, 0.5); }
.flight-entry:nth-child(5) { --fl: #b487e0; --fl-soft: rgba(180, 135, 224, 0.08); --fl-glow: rgba(180, 135, 224, 0.5); }
.flight-entry:nth-child(6) { --fl: #e89481; --fl-soft: rgba(232, 148, 129, 0.08); --fl-glow: rgba(232, 148, 129, 0.5); }
.flight-entry:nth-child(n+7) { --fl: #ff9e64; --fl-soft: rgba(255, 158, 100, 0.08); --fl-glow: rgba(255, 158, 100, 0.5); }

.flight-entry {
  position: relative;
  isolation: isolate;            /* keeps the hover wash behind the text */
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1.25rem;
  padding: 1.1rem 0 1.1rem 1.75rem;
  transition: opacity 0.65s ease, translate 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 640px) {
  .flight-entry { grid-template-columns: 120px 1fr; gap: 2rem; }
}
/* Entrance rise — .pre is JS-applied only (D11: markup ships visible) */
.flight-entry.pre { opacity: 0; translate: 0 22px; }

/* Hover wash in the entry's own hue, fading toward the text */
.flight-entry::before {
  content: '';
  position: absolute;
  inset: 0.3rem -0.9rem 0.3rem 0.6rem;
  z-index: -1;
  border-radius: 0.6rem;
  background: linear-gradient(90deg, var(--fl-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* Node → date connector dash (echoes the Mission Log log-rail dashes) */
.flight-entry::after {
  content: '';
  position: absolute;
  left: 9px;
  top: calc(1.45rem + 4px);
  width: 13px;
  height: 1px;
  background: linear-gradient(90deg, var(--fl), transparent);
  opacity: 0;
  transition: opacity 0.5s ease 0.15s;
}
.flight-entry.lit::after { opacity: 1; }

.flight-entry .flight-title { transition: color 0.3s ease; }

@media (hover: hover) {
  .flight-entry:hover::before { opacity: 1; }
  .flight-entry:hover .flight-title { color: var(--fl); }
  .flight-entry:hover .flight-node { scale: 1.3; }
}

.flight-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  padding-top: 0.2rem;
  text-align: left;
  white-space: nowrap;
  transition: color 0.4s ease, text-shadow 0.4s ease;
}
.flight-entry.lit .flight-date {
  color: var(--fl);
  text-shadow: 0 0 14px var(--fl-glow);
}

.flight-node {
  position: absolute;
  left: -4px;
  top: 1.45rem;
  width: 9px; height: 9px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--void);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, scale 0.3s ease;
}
.flight-entry.lit .flight-node {
  background: var(--fl);
  border-color: var(--fl);
  box-shadow: 0 0 14px var(--fl-glow);
}
/* One-shot ping halo when an entry lights */
.flight-node::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px solid var(--fl, rgba(255, 255, 255, 0.4));
  opacity: 0;
}
.flight-entry.lit .flight-node::after {
  animation: flightPing 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}
@keyframes flightPing {
  from { opacity: 0.8; scale: 0.5; }
  to   { opacity: 0;   scale: 1.6; }
}

/* "Active" pill on current roles — blueshift = approaching = now */
.flight-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin-left: 0.6rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(79, 216, 255, 0.35);
  border-radius: 9999px;
  background: rgba(79, 216, 255, 0.08);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blueshift);
}
.flight-badge::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 9999px;
  background: var(--blueshift);
  box-shadow: 0 0 6px rgba(79, 216, 255, 0.9);
  animation: badgePulse 2.4s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* Doppler legend under the heading: NOW ▬gradient▬ 2019 + entry count */
.flight-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 3rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}
.flight-meta .fm-now  { color: var(--blueshift); }
.flight-meta .fm-past { color: var(--redshift); }
.flight-meta .fm-bar {
  width: 56px;
  height: 2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--blueshift), var(--nebula), var(--redshift));
  opacity: 0.7;
}

/* Faint section atmosphere: blue near the present, amber near the past */
.flight-instruction {
  margin: -20px 0 28px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.6;
}
.experience-role { min-width: 0; }
.experience-trigger {
  display: block;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  border-radius: 6px;
  touch-action: manipulation;
}
.experience-trigger::-webkit-details-marker { display: none; }
.experience-trigger:focus-visible {
  outline: 2px solid var(--blueshift);
  outline-offset: 8px;
}
.flight-title {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
.flight-company {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.6;
}
.flight-summary {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.65;
}
.flight-detail-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  color: var(--fl, var(--blueshift));
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
}
.experience-open { overflow: hidden; }
/* Native top-layer dialog stays above the fixed HUD, navigation and cursor.
   Its opaque surface also avoids adding to the backdrop-filter budget. */
.experience-dialog {
  width: min(720px, calc(100% - 48px));
  max-width: none;
  max-height: min(86dvh, 880px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  color: var(--ink);
  background: #14141b;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.55);
}
.experience-dialog[open] { display: flex; flex-direction: column; }
.experience-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
html.has-cursor .experience-dialog,
html.has-cursor .experience-dialog::backdrop { cursor: auto; }
html.has-cursor .experience-dialog button { cursor: pointer; }
html.experience-open #cursor-ring,
html.experience-open #cursor-dot { visibility: hidden; }
.experience-grab { display: none; flex: 0 0 28px; }
.experience-toolbar { flex: 0 0 auto; padding: 12px 20px 8px 28px; }
.experience-toolbar p { color: rgba(255, 255, 255, 0.6); }
.experience-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 32px 32px;
}
.experience-scroll:focus-visible { outline: 2px solid var(--blueshift); outline-offset: -4px; }
.experience-content { overflow-wrap: anywhere; }
.experience-role > .experience-content { padding-block: 24px 8px; }
.experience-company {
  margin: 0 0 8px;
  color: var(--blueshift);
  font-size: 14px;
  line-height: 1.6;
}
.experience-title {
  margin: 0 0 14px;
  font-size: clamp(22px, 3.5vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: #fff;
}
.experience-dates {
  margin-bottom: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}
.experience-meta { font-size: 13px; color: rgba(255, 255, 255, 0.6); line-height: 1.6; }
.experience-section { margin-top: 28px; }
.experience-section h4 {
  margin: 24px 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.experience-work { margin: 0; padding-left: 19px; list-style: disc; }
.experience-work li { padding-left: 4px; margin-top: 12px; }
.experience-work li::marker { color: var(--blueshift); }
.experience-work, .experience-section > p { font-size: 15px; line-height: 1.75; color: rgba(255, 255, 255, 0.76); }
.experience-skills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.experience-skills li {
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid rgba(79, 216, 255, 0.18);
  border-radius: 8px;
  background: rgba(79, 216, 255, 0.05);
  color: #c1eaf5;
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 767px) {
  .experience-dialog {
    width: 100%;
    max-height: 82svh;
    max-height: 82dvh;
    margin: auto 0 0;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.08);
  }
  .experience-grab { display: flex; }
  .experience-toolbar { padding: 0 12px 10px 20px; }
  .experience-scroll { padding: 0 24px max(24px, env(safe-area-inset-bottom)); }
}

.flight-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 45% 50% at 12% 10%, rgba(79, 216, 255, 0.07), transparent 65%),
    radial-gradient(ellipse 50% 55% at 88% 90%, rgba(255, 158, 100, 0.06), transparent 65%);
}

/* ----------------------------------------------------- open channel --- */

/* The final section drops the dense mission-control panels in favor of one
   direct action. The horizon stays as the section's single visual signature. */
.contact-section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 25% 48%, rgba(79, 216, 255, 0.055), transparent 33%),
    radial-gradient(circle at 72% 58%, rgba(255, 158, 100, 0.035), transparent 32%),
    #04040a;
}

.horizon-ring {
  position: absolute;
  left: 27%;
  top: 49%;
  width: min(58vw, 680px);
  height: min(58vw, 680px);
  translate: -50% -50%;
  border-radius: 9999px;
  pointer-events: none;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    rgba(79, 216, 255, 0.5) 40deg,
    transparent 110deg,
    rgba(255, 158, 100, 0.35) 200deg,
    transparent 290deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1.5px));
  animation: ringSpin 34s linear infinite;
  opacity: 0.55;
}
@keyframes ringSpin { to { rotate: 360deg; } }

.contact-stage {
  width: min(100% - 48px, 1280px);
  min-height: 76svh;
  margin: 0 auto;
  padding: clamp(124px, 16vh, 184px) 0 clamp(76px, 10vh, 112px);
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(500px, 1.12fr);
  align-items: center;
  gap: clamp(52px, 7vw, 104px);
}

.contact-copy,
.contact-actions { min-width: 0; }

.contact-copy .section-eyebrow { margin-bottom: 30px; }

.contact-title {
  max-width: 780px;
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(3.4rem, 6.7vw, 6.9rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.055em;
  color: #fff;
  text-wrap: balance;
}

.contact-title span { color: var(--blueshift); }

.contact-location {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.36);
  text-transform: uppercase;
}

.contact-location span { color: rgba(79, 216, 255, 0.75); }

.contact-actions {
  width: 100%;
  max-width: 650px;
  justify-self: end;
}

.contact-intro {
  max-width: 390px;
  margin-top: 7px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(232, 234, 242, 0.64);
  text-wrap: pretty;
}

.contact-panel {
  position: relative;
  padding: clamp(20px, 2.3vw, 27px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(79, 216, 255, 0.075), transparent 34%),
    linear-gradient(152deg, rgba(15, 17, 27, 0.78), rgba(5, 6, 13, 0.92) 58%, rgba(14, 9, 14, 0.82));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.012),
    0 32px 72px -52px rgba(79, 216, 255, 0.48),
    0 24px 54px -40px rgba(0, 0, 0, 0.96);
}

.contact-panel::before {
  content: '';
  position: absolute;
  inset: 0 18% auto 0;
  height: 1px;
  background: linear-gradient(90deg, var(--blueshift), rgba(139, 124, 255, 0.32) 58%, rgba(255, 158, 100, 0));
  box-shadow: 0 0 20px rgba(79, 216, 255, 0.42);
}

.contact-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.contact-kicker,
.contact-field label,
.contact-requirement,
.form-status,
.service-status,
.contact-direct {
  font-family: 'IBM Plex Mono', monospace;
}

.contact-kicker {
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.18em;
  color: var(--blueshift);
  text-transform: uppercase;
}

.service-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.48);
  text-transform: uppercase;
}

.service-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.service-status.is-online {
  border-color: rgba(86, 231, 141, 0.25);
  color: rgba(157, 244, 190, 0.88);
}

.service-status.is-online .service-status-dot {
  background: #56e78d;
  box-shadow: 0 0 0 3px rgba(86, 231, 141, 0.1), 0 0 12px rgba(86, 231, 141, 0.65);
}

.service-status.is-offline {
  border-color: rgba(255, 118, 118, 0.2);
  color: rgba(255, 154, 154, 0.72);
}

.service-status.is-offline .service-status-dot { background: #ff7676; }

.contact-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 0.88fr);
  gap: 12px 10px;
}

.contact-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.contact-field-wide { grid-column: 1 / -1; }

.contact-field label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.54);
  text-transform: uppercase;
}

.contact-field label span { color: var(--blueshift); }

.contact-field input,
.contact-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 7px;
  outline: none;
  background: rgba(1, 2, 8, 0.62);
  color: #fff;
  caret-color: var(--blueshift);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.contact-field textarea {
  height: 96px;
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.contact-field input:hover,
.contact-field textarea:hover { border-color: rgba(255, 255, 255, 0.22); }

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: rgba(79, 216, 255, 0.72);
  background: rgba(4, 8, 16, 0.82);
  box-shadow: 0 0 0 2px rgba(79, 216, 255, 0.085), inset 0 1px rgba(255, 255, 255, 0.025);
}

.contact-field input[aria-invalid="true"],
.contact-field textarea[aria-invalid="true"] { border-color: rgba(255, 118, 118, 0.72); }

.field-error {
  min-height: 0;
  font-size: 11px;
  line-height: 1.3;
  color: #ff9a9a;
}

.field-error:empty { display: none; }

.contact-requirement {
  margin-top: -5px;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.34);
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-status {
  max-width: 310px;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
}

.form-status.is-success { color: #83efa9; }
.form-status.is-error { color: #ff9a9a; }

.contact-submit {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 18px;
  border: 1px solid rgba(79, 216, 255, 0.45);
  border-radius: 9px;
  background: rgba(79, 216, 255, 0.1);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #fff;
  text-transform: uppercase;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.contact-submit svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.contact-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--blueshift);
  background: rgba(79, 216, 255, 0.16);
}

.contact-submit:hover:not(:disabled) svg { transform: translateX(2px); }

.contact-submit:disabled { cursor: wait; opacity: 0.55; }

.contact-direct {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.36);
}

.contact-direct strong {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.74);
  transition: color 160ms ease;
}

.contact-direct:hover strong { color: var(--blueshift); }

.contact-submit:focus-visible,
.contact-direct:focus-visible,
.contact-links a:focus-visible,
.contact-footer a:focus-visible {
  outline: 2px solid var(--blueshift);
  outline-offset: 4px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.contact-links a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.48);
  transition:
    color 160ms cubic-bezier(0.23, 1, 0.32, 1),
    background-color 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.contact-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
}

.contact-links a span:last-child { color: rgba(79, 216, 255, 0.72); }

.contact-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 4, 10, 0.64);
}

.contact-footer-inner {
  width: min(100% - 48px, 1180px);
  min-height: 74px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.28);
  text-transform: uppercase;
}

.contact-footer-inner > :nth-child(2) { text-align: center; }

.contact-footer a {
  justify-self: end;
  color: rgba(255, 255, 255, 0.38);
  transition: color 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.contact-footer a:hover { color: rgba(255, 255, 255, 0.82); }

/* ------------------------------------------------------ custom cursor --- */
/* D13 kill-switch: entire feature lives in this block + one JS module.
   To cut: delete both. Hidden for coarse pointers + reduced motion.        */

#cursor-ring, #cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 140;
  pointer-events: none;
  border-radius: 9999px;
  mix-blend-mode: difference;
  display: none; /* enabled by main.js on (pointer:fine) only */
}
#cursor-ring {
  width: 28px; height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}
#cursor-dot { width: 4px; height: 4px; background: #fff; }
#cursor-ring.locked {
  width: 44px; height: 44px;
  border-color: var(--blueshift);
}
html.has-cursor a, html.has-cursor button, html.has-cursor summary { cursor: none; }
html.has-cursor { cursor: none; }

/* -------------------------------------------------- side tick nav --- */

.tick-nav button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.tick-nav .tick {
  display: block;
  width: 14px;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.3s ease, background 0.3s ease;
}
.tick-nav button:hover .tick { background: rgba(255, 255, 255, 0.6); }
.tick-nav button[aria-current="true"] .tick {
  width: 26px;
  background: var(--blueshift);
}
.tick-nav .tick-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0);
  transition: color 0.25s ease;
  text-transform: uppercase;
}
.tick-nav button:hover .tick-label,
.tick-nav button[aria-current="true"] .tick-label { color: rgba(255, 255, 255, 0.5); }

/* ------------------------------------------------- trajectory probe --- */
/* P4: a glowing probe travels the trajectory as you scroll the Mission Log
   (gsap scrub; hidden when ScrollTrigger/motion unavailable).              */

.probe {
  position: absolute;
  left: 50%;
  top: 0;
  width: 9px; height: 9px;
  translate: -50% -50%;
  border-radius: 9999px;
  background: var(--blueshift);
  box-shadow: 0 0 14px var(--blueshift), 0 0 42px rgba(79, 216, 255, 0.45);
  opacity: 0; /* revealed by JS only when it can actually move */
}

/* ------------------------------------------------- P3 widget system --- */
/* Shared frame for the six capability modules. All state = .is-active
   (eng review D7): no className rebuilds, no positional selectors.         */

.widget {
  border: 1px solid var(--horizon);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

/* C-01 · model selector */
.model-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
  transition: background 0.2s ease;
}
.model-btn:hover { background: rgba(255, 255, 255, 0.05); }
.model-btn .box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 9px;
  color: #04040a;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.model-btn.is-active { background: rgba(255, 255, 255, 0.06); }
.model-btn.is-active .box { background: var(--blueshift); border-color: var(--blueshift); }
.model-btn.is-active .box::after { content: '✓'; }

.cap-row { font-family: 'IBM Plex Mono', monospace; font-size: 10px; }
.cap-track {
  position: relative;
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.cap-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--blueshift), var(--nebula));
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* C-02 · terminal */
.term-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}
.term-dot { width: 9px; height: 9px; border-radius: 9999px; }
#terminal-output {
  height: 10.5rem;
  overflow-y: auto;
  padding: 0.8rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#terminal-output::-webkit-scrollbar { display: none; }
.term-line {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.3s ease, translate 0.3s ease;
}
.term-line.shown { opacity: 1; translate: 0 0; }

/* C-03 · threat radial */
#radial-arcs circle { transition: stroke-dasharray 0.8s ease-out, stroke 0.3s ease; }
.threat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}
.threat-row .dot { width: 7px; height: 7px; border-radius: 9999px; transition: background 0.3s ease; }
.threat-row.is-active { color: #fff; }
.threat-row.is-active .val { color: var(--blueshift); }

/* C-04 · records chart */
.chart-filter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  text-transform: uppercase;
}
.chart-filter.is-active { color: #fff; background: rgba(255, 255, 255, 0.07); }
#chart-wrap { position: relative; }
#chart-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -115%);
  border: 1px solid var(--horizon);
  border-radius: 0.5rem;
  background: rgba(4, 4, 10, 0.92);
  padding: 0.45rem 0.6rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
#chart-ingested, #chart-validated { transition: opacity 0.3s ease; }

/* C-05 · agent chat */
#agent-chat {
  height: 11.5rem;
  overflow-y: auto;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#agent-chat::-webkit-scrollbar { display: none; }
.chat-msg {
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.35s ease, translate 0.35s ease;
}
.chat-msg.shown { opacity: 1; translate: 0 0; }
.chat-msg.user { justify-content: flex-end; }
.chat-bubble {
  max-width: 85%;
  border-radius: 0.6rem;
  padding: 0.5rem 0.7rem;
  font-size: 11px;
  line-height: 1.5;
}
.chat-msg.user .chat-bubble { background: rgba(79, 216, 255, 0.16); border: 1px solid rgba(79, 216, 255, 0.3); color: #eaf8ff; }
.chat-msg.ai .chat-bubble { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--horizon); color: var(--ink); }

/* C-06 · infra tabs */
.infra-tab {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  position: relative;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease;
}
.infra-tab:hover { color: #fff; }
.infra-tab.is-active { color: #fff; background: rgba(255, 255, 255, 0.06); }
.infra-tab.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
  width: 2px; height: 12px;
  border-radius: 9999px;
  background: var(--blueshift);
}
#infra-panel { transition: opacity 0.25s ease, translate 0.25s ease; }
#infra-panel.swap { opacity: 0; translate: 0 6px; }
.infra-stat {
  border: 1px solid var(--horizon);
  border-radius: 0.6rem;
  padding: 0.6rem 0.7rem;
}
.infra-stat .k { font-family: 'IBM Plex Mono', monospace; font-size: 8px; letter-spacing: 0.14em; color: rgba(255,255,255,0.35); text-transform: uppercase; }
.infra-stat .v { font-size: 16px; font-weight: 600; color: var(--blueshift); }
.infra-stat .s { font-size: 9px; color: rgba(255,255,255,0.3); }

@media (max-width: 960px) {
  .contact-stage {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 64px;
  }
  .contact-title { font-size: clamp(3.8rem, 10vw, 6.8rem); }
  .contact-actions { max-width: 590px; }
  .horizon-ring {
    left: 77%;
    top: 30%;
    width: min(74vw, 610px);
    height: min(74vw, 610px);
  }
}

/* ------------------------------------------------ mobile-native layout --- */

@media (max-width: 767px) {
  .site-header .glass-nav-content > div { padding-inline: 16px; }
  .site-header .glass-nav-content > div > div { min-height: 56px; padding-block: 8px; }
  .site-brand {
    min-width: 0;
    min-height: 44px;
    gap: 8px;
  }
  .site-brand .site-monogram { width: 61.6px; height: 28px; }
  .site-brand span {
    overflow: hidden;
    font-size: 10px !important;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .archive-return-desktop { display: none; }

  .hero-shell {
    min-height: 100svh;
    padding: calc(72px + env(safe-area-inset-top)) 20px 36px;
  }
  .hero-shell > .h-16 { display: none; }
  .hero-grid {
    gap: 36px;
    margin-top: 40px;
    padding-bottom: 28px;
  }
  .hero-name { font-size: clamp(2.1rem, 10.3vw, 2.75rem); }
  .hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .hero-actions .glass-btn {
    flex: 0 0 100%;
    width: 100%;
    min-height: 50px;
    padding-inline: 18px;
  }
  .hero-actions > a:not(.glass-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
  }
  .scroll-cue { display: none; }

  .telemetry-row {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
  }
  .telemetry-key,
  .telemetry-value { min-width: 0; }
  .telemetry-value {
    overflow-wrap: anywhere;
    font-size: 11px;
  }

  #capabilities .mx-auto.max-w-7xl { border-inline: 0; }
  #capabilities article { padding: 24px 20px; }
  .widget { border-radius: 14px; }
  .model-btn,
  .chart-filter,
  .infra-tab { min-height: 44px; }
  .chart-filter { padding-inline: 10px; }
  .infra-tab { padding-block: 8px; }

  #work {
    padding-top: 64px;
    padding-bottom: 72px;
  }
  #work > .max-w-6xl,
  .archive-records > .max-w-6xl { padding-inline: 20px; }
  #work .text-center.mb-20 { margin-bottom: 48px; }
  #work .flex.flex-col.gap-24,
  .archive-records .flex.flex-col.gap-24 { gap: 64px; }
  .station {
    gap: 22px;
    scroll-margin-top: calc(5rem + env(safe-area-inset-top));
  }
  .station-data,
  .station-copy { order: 1; }
  .station .holo { order: 2; }
  .station-data { padding: 20px; }
  .station-copy {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(13, 16, 28, 0.84), rgba(6, 7, 14, 0.72));
    box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.9), inset 0 1px rgba(255, 255, 255, 0.05);
  }
  .station-copy::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 14%;
    bottom: 14%;
    width: 2px;
    border-radius: 9999px;
    background: linear-gradient(180deg, transparent, rgba(79, 216, 255, 0.65), transparent);
  }
  .station:nth-child(even) .station-copy::before {
    background: linear-gradient(180deg, transparent, rgba(255, 158, 100, 0.6), transparent);
  }
  .station-title { line-height: 1.2; }
  .station-designation {
    line-height: 1.55;
    letter-spacing: 0.14em;
  }
  .holo {
    border-radius: 14px;
    touch-action: manipulation;
  }
  .holo .uplink {
    padding: 14px;
    opacity: 1;
    background: linear-gradient(180deg, transparent 50%, rgba(4, 4, 10, 0.9));
  }

  .archive-hero {
    padding-top: calc(104px + env(safe-area-inset-top));
    padding-bottom: 48px;
  }
  .archive-hero > div { padding-inline: 20px; }
  .archive-hero .section-eyebrow {
    line-height: 1.6;
    letter-spacing: 0.15em;
  }
  .archive-hero h1 {
    font-size: clamp(2rem, 10vw, 2.75rem);
    line-height: 1.08;
  }
  .archive-records { padding-bottom: 72px; }

  #log {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  #log > .max-w-3xl { padding-inline: 20px; }
  .flight-meta {
    flex-wrap: wrap;
    margin-bottom: 32px;
  }
  .flight-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 16px 0 18px 24px;
  }
  .flight-entry::after {
    left: 8px;
    top: 25px;
    width: 10px;
  }
  .flight-node {
    left: -4px;
    top: 21px;
  }
  .flight-date {
    padding-top: 0;
    font-size: 9px;
  }
  .flight-entry .flight-title { line-height: 1.45; }
  .flight-badge {
    top: 0;
    margin-left: 7px;
  }

  .contact-section { min-height: 100svh; }
  .contact-stage {
    width: calc(100% - 40px);
    min-height: auto;
    padding: 112px 0 72px;
    gap: 52px;
  }
  .contact-copy .section-eyebrow { margin-bottom: 24px; }
  .contact-title {
    font-size: clamp(2.75rem, 14vw, 4.6rem);
    line-height: 0.94;
  }
  .contact-location {
    flex-wrap: wrap;
    row-gap: 4px;
    margin-top: 26px;
    font-size: 9px;
  }
  .contact-actions {
    width: 100%;
    padding-top: 0;
  }
  .contact-intro {
    margin-top: 7px;
    font-size: 0.9rem;
  }
  .contact-panel {
    padding: 20px 16px;
    border-radius: 13px;
  }
  .contact-panel-head { display: grid; gap: 16px; }
  .service-status { justify-self: start; }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
  .contact-field-wide { grid-column: auto; }
  .contact-field input { min-height: 46px; }
  .contact-field textarea { height: 118px; min-height: 118px; }
  .contact-requirement { margin-top: -7px; }
  .contact-submit-row { align-items: stretch; flex-direction: column; }
  .form-status:empty { display: none; }
  .contact-submit { width: 100%; min-height: 46px; }
  .contact-links {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    margin-top: 14px;
  }
  .contact-links a {
    min-height: 50px;
    padding-inline: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
  }
  .contact-footer { padding-bottom: env(safe-area-inset-bottom); }
  .contact-footer-inner {
    width: calc(100% - 40px);
    min-height: auto;
    padding: 24px 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 20px;
  }
  .contact-footer-inner > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
  .contact-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 359px) {
  .site-brand span { max-width: 145px; }
  .hero-shell { padding-inline: 16px; }
  .hero-name { font-size: 2rem; }
  .mobile-sheet .mnav-panel { border-radius: 24px 24px 0 0; }
  .sheet-option { min-height: 55px; }
  .sheet-option small { font-size: 11px; }
}

@media (hover: none), (pointer: coarse) {
  .glass-btn { min-height: 44px; }
  .station-title:hover { text-shadow: none; }
  .station:hover .holo img { transform: none; }
  .station:hover .holo { box-shadow: 0 16px 50px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
  .station:hover .holo .scanline { animation: none; opacity: 0; }
}

/* -------------------------------------------------- reduced motion --- */
/* Hard gate (T9): kill all CSS motion; JS gates its own modules via
   matchMedia — together the page becomes calm and instant.                 */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .station.pre { opacity: 1; translate: 0 0; }
  .flight-entry.pre { opacity: 1; translate: 0 0; }
  #cursor-ring, #cursor-dot { display: none !important; }
}
