@view-transition {
  navigation: auto;
}

:root {
  /* Site-wide default: the refined, restrained "personal work" language.
     Northrop/defense content overrides this back to the tactical palette
     via [data-theme="tactical"] below — see NOTES.md for why the split
     exists rather than one look applied everywhere. */
  --bg: #0A0A0B;
  --bg-alt: #0D0F11;
  --text-primary: #F5F5F4;
  --text-secondary: #8A8F98;
  --accent: #7C93FF;
  --accent-glow: rgba(124, 147, 255, 0.45);
  /* Matched to js/wafer-scene.js's procedural env map palette (see
     buildEnvMap's DEFAULT_ENV_STOPS) so the CSS shimmer fallback and the
     real WebGL wafer read as the same material family, not two different
     effects. */
  --iridescent: linear-gradient(115deg, #3F2F8C 0%, #3A6BFF 22%, #37E0FF 42%, #F4FBFF 55%, #FFE14D 68%, #FF5FB8 84%, #FF2F6E 100%);
  --border: rgba(245, 245, 244, 0.12);
  --border-strong: rgba(245, 245, 244, 0.22);
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-display-bold: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --redacted-glow: rgba(60, 203, 110, 0.5);
  --danger: #ff5c5c;
  --danger-glow: rgba(255, 92, 92, 0.5);
  --max-width: 1280px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Theme: tactical (Northrop Grumman / defense work only) ----------
   Scoped to <body data-theme="tactical"> — currently just experience.html.
   Restores the original green-glow/glitch/ticker language for that page
   only, so it reads as a deliberate, self-contained "mode" rather than the
   whole site's default voice. */
[data-theme="tactical"] {
  --accent: #3CCB6E;
  --accent-glow: rgba(60, 203, 110, 0.55);
}
[data-theme="tactical"] .ticker { display: block; }

/* ---------- Theme: UCF (education module only) ----------
   Scoped to .edu-module — black-and-gold, distinct from both the tactical
   and default palettes, used for a single self-contained block on about.html. */
.edu-module {
  --ucf-bg: #050400;
  --ucf-gold: #D4AF37;
  --ucf-gold-dim: rgba(212, 175, 55, 0.35);
  --ucf-text: #F3F1E8;
  --ucf-text-secondary: #9C9789;
}

.ticker { display: none; }

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

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

.section-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.section-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* ---------- Section index numerals ---------- */
.section-index {
  position: absolute;
  top: -1.5rem;
  right: var(--gutter);
  z-index: 0;
  font-family: var(--font-display-bold);
  font-weight: 700;
  font-size: clamp(6rem, 16vw, 13rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-strong);
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 300;
  transition: width 0.1s linear;
}

/* ---------- Custom cursor ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 250;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease;
}
.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  transition: opacity 0.25s ease, width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}
html.custom-cursor-active .cursor-dot,
html.custom-cursor-active .cursor-ring { opacity: 1; }
html.custom-cursor-active { cursor: none; }
html.custom-cursor-active a,
html.custom-cursor-active button,
html.custom-cursor-active summary { cursor: none; }

html.cursor-hover .cursor-ring {
  width: 54px;
  height: 54px;
  border-color: var(--accent);
}
html.cursor-hover .cursor-dot { opacity: 0; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Nav ---------- */
.nav {
  view-transition-name: site-nav;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* Above the mobile breakpoint, stack the wordmark and nav row (name as the
   dominant centered element, nav links quiet underneath it) instead of one
   inline space-between row. Left as the original single-row layout below
   860px, since .nav-links becomes a fixed hamburger dropdown there anyway
   (see the max-width: 860px block) and its "top: 60px" offset assumes the
   original one-row nav height. */
@media (min-width: 861px) {
  .nav-inner {
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
  }
  .wordmark {
    font-size: 1.15rem;
    letter-spacing: 0.08em;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  font-size: 0.9rem;
}

.nav-links a { position: relative; color: var(--text-secondary); transition: color 0.2s ease; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--text-primary); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta {
  color: var(--text-primary) !important;
  border: 1px solid var(--border-strong);
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-cta::after { display: none; }
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  width: 22px;
  height: 1px;
  background: var(--text-primary);
}

/* ---------- Ticker ---------- */
.ticker {
  view-transition-name: site-ticker;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 0.9rem 0;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 32s linear infinite;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(0.7rem, 1.1vw, 0.8rem);
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.ticker-track span { padding: 0 0.5rem; }
.ticker-dot { color: var(--accent); opacity: 0.7; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.9rem 1.6rem;
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #0A0A0B;
  font-weight: 500;
}
.btn-primary:hover { background: #9DB0FF; }

.btn-secondary {
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-arrow { transition: transform 0.2s ease; }
.btn:hover .btn-arrow { transform: translateY(3px); }

/* ---------- Redacted / classified panel ---------- */
.redacted-panel {
  position: relative;
  overflow: hidden;
  background: #060706;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  animation: redacted-signal-warble 3.6s ease-in-out infinite;
}
.redacted-panel--portrait { aspect-ratio: 3 / 4; }
.redacted-panel--full { aspect-ratio: auto; border: none; }
.redacted-panel--thumb { aspect-ratio: 1; }
.redacted-panel--thumb .redacted-title { font-size: 0.58rem; letter-spacing: 0.09em; }
.redacted-panel--thumb .redacted-code { font-size: 0.5rem; }
.redacted-panel--thumb .redacted-label { padding: 0.5rem; gap: 0.3rem; }
@keyframes redacted-signal-warble {
  0%, 41%, 47%, 77%, 83%, 100% { filter: brightness(1); }
  43% { filter: brightness(0.82); }
  45% { filter: brightness(1.06); }
  79% { filter: brightness(0.9); }
  81% { filter: brightness(1.03); }
}
.redacted-panel::before {
  content: '';
  position: absolute;
  inset: -20%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.15;
  mix-blend-mode: overlay;
  animation: redacted-noise 0.5s steps(3) infinite;
}
.redacted-panel::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 10px var(--redacted-glow);
  opacity: 0.75;
  animation: redacted-scan 4.5s linear infinite;
}
.redacted-bands {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(245, 245, 244, 0.02) 0px,
    rgba(245, 245, 244, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  animation: redacted-glitch 6s steps(1) infinite;
}
.redacted-label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  padding: 1.5rem;
}
.redacted-label .redacted-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 8px var(--redacted-glow);
}
.redacted-label .redacted-code {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  opacity: 0.65;
}
@keyframes redacted-scan {
  0% { top: 0%; opacity: 0; transform: translateX(0); }
  5% { opacity: 0.75; }
  27% { transform: translateX(2px); }
  48% { transform: translateX(-2px); }
  71% { transform: translateX(1px); }
  95% { opacity: 0.75; transform: translateX(0); }
  100% { top: 100%; opacity: 0; }
}
@keyframes redacted-noise {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-1%, 1%); }
  66% { transform: translate(1%, -1%); }
  100% { transform: translate(0, 0); }
}
@keyframes redacted-glitch {
  0%, 92%, 100% { transform: translateX(0); opacity: 1; }
  93% { transform: translateX(-4px); opacity: 0.8; }
  94% { transform: translateX(3px); opacity: 1; }
  95% { transform: translateX(0); opacity: 0.6; }
}
@media (prefers-reduced-motion: reduce) {
  .redacted-panel,
  .redacted-panel::before,
  .redacted-panel::after,
  .redacted-bands { animation: none; }
}

/* ---------- Forced redaction (NG work — signal seized, not just unavailable) ---------- */
.redacted-panel--forced {
  border-color: rgba(255, 92, 92, 0.3);
  animation: redacted-forced-warble 2.8s ease-in-out infinite;
  animation-delay: var(--glitch-delay, 0s);
}
.redacted-panel--forced::before {
  opacity: 0.26;
  animation: redacted-noise 0.35s steps(3) infinite;
  animation-delay: var(--glitch-delay, 0s);
}
.redacted-panel--forced::after {
  background: linear-gradient(90deg, transparent, var(--danger), transparent);
  box-shadow: 0 0 10px var(--danger-glow);
  animation: redacted-scan 2.1s linear infinite;
  animation-delay: var(--glitch-delay, 0s);
}
.redacted-panel--forced .redacted-bands {
  animation: redacted-forced-tear 2.6s steps(1) infinite;
  animation-delay: var(--glitch-delay, 0s);
}
.redacted-panel--forced .redacted-label .redacted-title {
  color: var(--danger);
  text-shadow: 0 0 8px var(--danger-glow);
  animation: redacted-forced-flicker 2.8s steps(1) infinite;
  animation-delay: var(--glitch-delay, 0s);
}
.redacted-panel--forced .redacted-label .redacted-code { color: rgba(255, 92, 92, 0.65); }
@keyframes redacted-forced-warble {
  0%, 40%, 100% { filter: brightness(1) saturate(1); }
  41% { filter: brightness(2.4) saturate(0); }
  42% { filter: brightness(0.6) saturate(1); }
  43% { filter: brightness(1); }
  74% { filter: brightness(0.7); }
  76% { filter: brightness(1.5) saturate(0.4); }
  77% { filter: brightness(1); }
}
@keyframes redacted-forced-tear {
  0%, 100% { transform: translateX(0) skewX(0); opacity: 1; }
  4% { transform: translateX(-12px) skewX(-5deg); opacity: 0.55; }
  4.6% { transform: translateX(9px) skewX(4deg); opacity: 0.85; }
  5.2% { transform: translateX(0) skewX(0); opacity: 1; }
  47% { transform: translateX(7px); opacity: 0.7; }
  47.6% { transform: translateX(-6px); opacity: 1; }
  71% { transform: translateX(-4px) skewX(-2deg); opacity: 0.8; }
  71.6% { transform: translateX(0) skewX(0); opacity: 1; }
}
@keyframes redacted-forced-flicker {
  0%, 40%, 100% { opacity: 1; transform: translate(0); text-shadow: 0 0 8px var(--danger-glow); }
  41% { opacity: 0.25; transform: translate(2px, 0); text-shadow: 2px 0 var(--danger), -2px 0 #3ccbcb; }
  42% { opacity: 1; transform: translate(-1px, 0); text-shadow: 0 0 8px var(--danger-glow); }
  74% { opacity: 0.15; transform: translate(-2px, 0); }
  75% { opacity: 1; transform: translate(1px, 0); text-shadow: -2px 0 var(--danger), 2px 0 #3ccbcb; }
  76% { opacity: 1; transform: translate(0); text-shadow: 0 0 8px var(--danger-glow); }
}
@media (prefers-reduced-motion: reduce) {
  .redacted-panel--forced,
  .redacted-panel--forced::before,
  .redacted-panel--forced::after,
  .redacted-panel--forced .redacted-bands,
  .redacted-panel--forced .redacted-label .redacted-title { animation: none; }
}

/* ---------- Redacted word (hover-to-decrypt text) ---------- */
.redacted-word {
  display: inline-block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.94em;
  letter-spacing: 0.02em;
  padding: 0 0.2em;
  border-radius: 2px;
  cursor: default;
  transition: color 0.15s ease, background 0.15s ease, text-shadow 0.15s ease;
}
.redacted-word.is-sealed {
  background: #0c0c0c;
  color: #0c0c0c;
  box-shadow: inset 0 0 0 1px rgba(245, 245, 244, 0.06);
}
.redacted-word:not(.is-sealed) {
  background: rgba(60, 203, 110, 0.1);
  color: var(--accent);
  text-shadow: 0 0 6px var(--redacted-glow);
}
.redacted-word.is-classified:not(.is-sealed) {
  background: rgba(255, 92, 92, 0.12);
  color: var(--danger);
  text-shadow: 0 0 6px var(--danger-glow);
}

/* Passive glitch: sealed classified text stays legible-as-redacted even
   when nobody's hovering it, echoing the forced-redaction panel glitch.
   Kept subtle and infrequent — this sits inline with body copy, so it
   shouldn't compete for attention while someone's actually reading. */
.redacted-word.is-classified.is-sealed {
  animation: redacted-word-glitch 4.4s steps(1) infinite;
  animation-delay: var(--glitch-delay, 0s);
}
@keyframes redacted-word-glitch {
  0%, 95%, 100% {
    background: #0c0c0c;
    color: #0c0c0c;
    box-shadow: inset 0 0 0 1px rgba(245, 245, 244, 0.06);
  }
  96.5% {
    background: rgba(255, 92, 92, 0.22);
    color: var(--danger);
    box-shadow: none;
    text-shadow: 0 0 4px var(--danger-glow);
  }
  98% {
    background: #0c0c0c;
    color: #0c0c0c;
    box-shadow: inset 0 0 0 1px rgba(245, 245, 244, 0.06);
  }
}
@media (prefers-reduced-motion: reduce) {
  .redacted-word.is-classified.is-sealed { animation: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-placeholder {
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 30%, #14171a 0%, #0A0A0B 70%);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  /* Previously ramped to 0.92 (near-opaque) at the bottom, right where
     .hero-content sits (align-items: flex-end) -- that's what was making
     the board animation read as barely visible behind the text. Lightened
     across the board so the render actually shows through. */
  background: linear-gradient(180deg, rgba(10,10,11,0.05) 0%, rgba(10,10,11,0.25) 55%, rgba(10,10,11,0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 8vh, 6rem);
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 20ch;
}

.hero-hook {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  color: var(--text-primary);
  margin: 1.1rem 0 2.25rem;
}

.hero-subhead {
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  max-width: 46ch;
  margin: 0.6rem 0 2.25rem;
}

.scroll-cue {
  position: absolute;
  bottom: clamp(1.25rem, 3vh, 2rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 1px;
  height: 46px;
  background: var(--border-strong);
  overflow: hidden;
}
.scroll-cue span {
  position: absolute;
  top: -46px;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scroll-cue-move 2.2s ease-in-out infinite;
}
@keyframes scroll-cue-move {
  0% { transform: translateY(0); }
  60% { transform: translateY(92px); }
  100% { transform: translateY(92px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; top: 0; }
}

/* ---------- Page header (subpages) ---------- */
.page-header {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 14vh, 9rem) 0 clamp(2rem, 6vh, 3rem);
  border-bottom: 1px solid var(--border);
}

/* ---------- About ---------- */
.about {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding: clamp(4rem, 10vh, 7rem) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.about-body p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 60ch;
  margin-bottom: 2.25rem;
}

.spec-list { border-top: 1px solid var(--border); }
.spec-row {
  display: flex;
  gap: 2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.spec-row dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  width: 140px;
  flex-shrink: 0;
  padding-top: 0.15rem;
}
.spec-row dd { font-size: 0.98rem; }

/* ---------- Home page-links ---------- */
.page-links {
  border-top: 1px solid var(--border);
  padding: clamp(3rem, 8vh, 5rem) 0;
}
.page-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  margin-top: 2rem;
}
@media (max-width: 1024px) {
  .page-links-grid { grid-template-columns: repeat(2, 1fr); }
}
.page-link-tile {
  position: relative;
  display: block;
  padding: 2.25rem 1.75rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  transition: background 0.25s ease;
}
.page-link-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0.06;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.page-link-tile:hover::before { transform: translateY(0); }
.page-link-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.page-link-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.page-link-desc { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 1.5rem; max-width: 32ch; }
.page-link-arrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}
.page-link-tile:hover .page-link-arrow { transform: translateX(6px); }

/* ---------- Experience / Timeline ---------- */
.experience { position: relative; overflow: hidden; padding: clamp(3rem, 8vh, 5rem) 0 clamp(4rem, 10vh, 7rem); }

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 2px;
  background: var(--border-strong);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.75rem, 4vh, 2.5rem) 0;
}
.timeline-item + .timeline-item { border-top: 1px solid var(--border); }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: clamp(1.75rem, 4vh, 2.5rem);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-meta { display: flex; flex-direction: column; gap: 0.6rem; }

.timeline-photo { width: 100%; max-width: 132px; margin-top: 0.5rem; }

.timeline-index {
  font-family: var(--font-display-bold);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--text-secondary);
  opacity: 0.45;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.timeline-role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.timeline-org {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.timeline-summary {
  color: var(--text-secondary);
  max-width: 62ch;
}

/* ---------- Expandable details ---------- */
.timeline-details { margin-top: 1.1rem; }

.timeline-details summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.timeline-details summary::-webkit-details-marker { display: none; }
.timeline-details summary::before {
  content: '+';
  font-size: 0.95rem;
  line-height: 1;
}
.timeline-details[open] summary::before { content: '–'; }
.timeline-details summary:hover { color: #5edb8c; }

.detail-list {
  list-style: none;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.detail-list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 68ch;
}
.detail-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-secondary);
  opacity: 0.6;
}

.project-details { margin-top: 0.75rem; }

/* ---------- Projects ---------- */
.projects { position: relative; overflow: hidden; padding: clamp(3rem, 8vh, 5rem) 0 clamp(4rem, 10vh, 7rem); }

.projects-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.project-carousel {
  overflow: hidden;
  margin: 0 calc(var(--gutter) * -1);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}

.project-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  padding: 0.5rem var(--gutter) 1.5rem;
  animation: projects-scroll linear infinite;
  animation-duration: var(--marquee-duration, 60s);
}
.project-carousel:hover .project-track,
.project-carousel:focus-within .project-track { animation-play-state: paused; }
@keyframes projects-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .project-track { animation: none; }
}

.project-card {
  flex: 0 0 clamp(300px, 34vw, 560px);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
}

.project-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 1.25rem;
}
.project-thumb-index {
  position: absolute;
  left: 1rem;
  bottom: 0.75rem;
  font-family: var(--font-display-bold);
  font-weight: 700;
  font-size: 2.75rem;
  color: rgba(245, 245, 244, 0.92);
  text-shadow: 0 2px 16px rgba(0,0,0,0.55);
}

.thumb-pattern-1 {
  background:
    repeating-linear-gradient(0deg, rgba(60,203,110,0.16) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(60,203,110,0.16) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 30% 20%, rgba(60,203,110,0.35), transparent 60%),
    linear-gradient(155deg, #0f2019, #0a1410);
}
.thumb-pattern-2 {
  background:
    repeating-radial-gradient(circle at 70% 30%, rgba(124,131,253,0.35) 0 2px, transparent 2px 26px),
    radial-gradient(circle at 70% 30%, rgba(124,131,253,0.25), transparent 65%),
    linear-gradient(155deg, #171a2b, #0d0e18);
}
.thumb-pattern-3 {
  background:
    repeating-linear-gradient(45deg, rgba(255,176,59,0.22) 0 2px, transparent 2px 22px),
    radial-gradient(circle at 80% 80%, rgba(255,176,59,0.25), transparent 60%),
    linear-gradient(155deg, #211a0d, #14100a);
}
.thumb-pattern-4 {
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(60,196,203,0.3) 0 2px, transparent 2px 30px),
    radial-gradient(circle at 50% 50%, rgba(60,196,203,0.2), transparent 70%),
    linear-gradient(155deg, #0d2020, #0a1414);
}

.project-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }

.project-title-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.project-title-line h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
}
.badge-muted { color: var(--text-secondary); border-color: var(--border-strong); }

.project-card-body p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.project-tags {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  opacity: 0.75;
}

/* ---------- Skills ---------- */
.skills { position: relative; overflow: hidden; padding: clamp(4rem, 10vh, 7rem) 0; border-top: 1px solid var(--border); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  margin-top: 2rem;
}

.skill-col {
  padding: 1.75rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease;
}
.skill-col:hover { background: rgba(245, 245, 244, 0.03); }

.skill-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.skill-col p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.6; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 16vh, 10rem) 0;
  text-align: center;
}

.cta-content { display: flex; flex-direction: column; align-items: center; }

.cta-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: -0.02em;
  max-width: 18ch;
  line-height: 1.1;
}

.cta-subhead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 1.5rem 0 2.5rem;
}

.cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 460px;
  margin: 0.5rem auto 0;
  text-align: left;
}
.form-row { display: flex; flex-direction: column; gap: 0.5rem; }
.form-row label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.form-row input,
.form-row textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 0.75rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.form-row input:focus,
.form-row textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn { align-self: flex-start; border: none; cursor: pointer; }
.form-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-height: 1.2em;
}
.form-status.is-success { color: var(--accent); }
.form-status.is-error { color: var(--danger); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Footer ---------- */
.footer { padding: 2.5rem 0; border-top: 1px solid var(--border); }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.footer-links { display: flex; gap: 1.75rem; align-items: center; }
.footer-links a:hover { color: var(--text-primary); }
.footer-muted { opacity: 0.55; }

/* ---------- View transitions ---------- */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes vt-fade-out {
  to { opacity: 0; transform: scale(0.98); }
}
@keyframes vt-fade-in {
  from { opacity: 0; transform: scale(1.02); }
}
::view-transition-old(root) { animation-name: vt-fade-out; }
::view-transition-new(root) { animation-name: vt-fade-in; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem var(--gutter);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }

  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .page-links-grid { grid-template-columns: 1fr; }
  .spec-row { flex-direction: column; gap: 0.35rem; }
  .spec-row dt { width: auto; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.75rem; }
  .timeline-photo { max-width: 96px; }
  .section-index { font-size: clamp(3.5rem, 20vw, 6rem); top: -0.25rem; opacity: 0.4; }
  .hero-headline { font-size: clamp(2.6rem, 14vw, 4rem); }
  .page-title { font-size: clamp(2.4rem, 12vw, 4rem); }
}

@media (max-width: 520px) {
  .skills-grid { grid-template-columns: 1fr; }
}

@media (hover: none) and (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* =========================================================================
   Personal-projects design system additions (redesign-v2)
   Pending-panel, status chips, keynote hero/chapters, project hub v2,
   education module. See NOTES.md at repo root for what's full-treatment
   vs. lighter pass, and why these choices were made.
   ========================================================================= */

/* ---------- Pending panel: honest "not shot yet" placeholder ----------
   Replaces .redacted-panel on non-tactical pages. No glitch, no classified
   framing — that voice belongs to the Northrop page specifically. Just a
   calm, intentional "this is coming" state. */
.pending-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #101013, #0a0a0c);
  border: 1px solid var(--border);
  border-radius: 6px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pending-panel--portrait { aspect-ratio: 3 / 4; }
.pending-panel--square { aspect-ratio: 1; }

.about-portrait {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  aspect-ratio: 3 / 4;
}
.pending-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(245,245,247,0.06) 45%, rgba(245,245,247,0.06) 55%, transparent 70%);
  background-size: 220% 100%;
  animation: pending-sweep 3.4s ease-in-out infinite;
}
@keyframes pending-sweep {
  0% { background-position: 140% 0; }
  100% { background-position: -40% 0; }
}
.pending-label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.5rem;
}
.pending-label .pending-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
}
.pending-label .pending-code {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  opacity: 0.5;
}
@media (prefers-reduced-motion: reduce) {
  .pending-panel::before { animation: none; }
}

/* ---------- Status chips ---------- */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.32rem 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  white-space: nowrap;
}
.status-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-chip--live { color: #6BD98C; border-color: rgba(107, 217, 140, 0.35); }
.status-chip--progress { color: var(--accent); border-color: var(--accent-glow); }
.status-chip--planned { color: var(--text-secondary); border-color: var(--border-strong); }

/* ---------- Shimmer surface: the "iridescent silicon" treatment ----------
   Placeholder version of the effect described in asic_flow.md — meant to
   eventually mask a real KLayout floorplan render. For now it's applied to
   a generated shape. Swap the element it's applied to once a real render
   exists; the effect itself shouldn't need to change. */
.shimmer-surface {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.shimmer-surface::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: var(--iridescent);
  background-size: 300% 300%;
  mix-blend-mode: color-dodge;
  opacity: 0.5;
  animation: shimmer-drift 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer-drift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .shimmer-surface::after { animation: none; }
}

/* ---------- Keynote hero (flagship project treatment) ----------
   A pinned scrollytelling centerpiece (see js/scroll-centerpiece.js): this
   section fills the viewport, GSAP ScrollTrigger pins it while the WebGL
   wafer scene behind the content plays its zoom, then releases into normal
   scroll. Content is an overlay over a full-bleed canvas layer, not a
   side-by-side grid column — the "animation plays in the back, heading
   stays put" structure is literal here, not simulated with CSS transforms
   (the old per-element --sp scroll-linked tilt/brightness filter is gone;
   all motion now lives inside the WebGL scene itself, driven by the pin). */
.keynote {
  position: relative;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.keynote-canvas-layer {
  position: absolute;
  inset: 0;
}
.keynote-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(10,10,11,0.92) 0%, rgba(10,10,11,0.62) 32%, rgba(10,10,11,0.15) 58%, transparent 75%),
              linear-gradient(0deg, rgba(10,10,11,0.75) 0%, transparent 30%);
  pointer-events: none;
}
.keynote-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(4rem, 10vh, 6rem);
}
.keynote-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.keynote-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1.04;
  max-width: 16ch;
}
.keynote-sub {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 46ch;
  margin: 1.25rem 0 2rem;
}
.keynote-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.keynote-scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(1.25rem, 3vh, 2rem);
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.7;
  animation: keynote-cue-bob 2.4s ease-in-out infinite;
}
@keyframes keynote-cue-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
  50% { transform: translateX(-50%) translateY(-6px); opacity: 0.35; }
}

/* Sized, positioned host for the homepage teaser's canvas/fallback (both
   `position:absolute; inset:0`, below) -- the GISC-0 hero itself no longer
   uses this class (rebuilt into .keynote-canvas-layer, full-viewport), but
   index.html's lighter teaser still does. Without an explicit width here
   this collapses to 0x0 -- the same "2x2px" trap this project's NOTES.md
   already documented once for the hero, recurring here because this class
   went unsized when the hero moved off it. */
/* #indexTeaserMount (index.html's teaser only -- gisc0.html's hero doesn't
   use this id) is itself a flex item of .keynote's row layout with no
   explicit width, so it sizes by content (flex-basis:auto) -- but its
   content (.keynote-visual, below) sizes itself as a percentage OF this
   element, which is circular/indeterminate and resolves to 0. An explicit
   flex-basis breaks the circularity. Same root cause as .keynote-visual's
   own fix below, one level up the tree. */
#indexTeaserMount {
  flex: 1 1 320px;
  min-width: 260px;
}
.keynote-visual {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
}
.keynote-canvas {
  display: none; /* shown by js/gisc0-scene.js only once WebGL init actually succeeds */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.keynote-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(245, 245, 247, 0.18);
}
.keynote-visual-die {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(245, 245, 247, 0.18);
  background:
    repeating-linear-gradient(0deg, rgba(245,245,247,0.05) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(90deg, rgba(245,245,247,0.05) 0 1px, transparent 1px 14px),
    radial-gradient(circle at 30% 25%, rgba(124,147,255,0.25), transparent 55%),
    linear-gradient(155deg, #16171c, #08080a);
  overflow: hidden;
}
.keynote-visual-core {
  position: absolute;
  inset: 28%;
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(245,245,247,0.09), rgba(245,245,247,0.02));
  border: 1px solid rgba(245, 245, 247, 0.14);
}
@media (prefers-reduced-motion: reduce) {
  .keynote-scroll-cue { animation: none; }
}
@media (max-width: 960px) {
  .keynote { align-items: center; }
  .keynote-content { padding-top: clamp(5rem, 10vh, 6rem); }
  .keynote-scrim { background: linear-gradient(0deg, rgba(10,10,11,0.85) 0%, rgba(10,10,11,0.35) 55%, rgba(10,10,11,0.55) 100%); }
}

/* ---------- Keynote chapters (per-milestone narrative beats) ---------- */
.chapter {
  position: relative;
  border-top: 1px solid var(--border);
  padding: clamp(4rem, 10vh, 7rem) 0;
  overflow: hidden;
}
.chapter-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.chapter-grid.chapter-grid--reverse { grid-template-columns: 1.15fr 0.85fr; }
.chapter-grid.chapter-grid--reverse .chapter-visual { order: -1; }
.chapter-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: block;
}
.chapter-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.chapter-body {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 52ch;
  margin-bottom: 1.5rem;
}
.chapter-body + .status-chip { margin-top: -0.5rem; }
.chapter-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(150deg, #121317, #0a0a0c);
  transform: translateY(calc(24px - var(--sp, 0.5) * 24px));
  transition: transform 0.1s linear;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .chapter-visual { transform: none; transition: none; }
}
@media (max-width: 860px) {
  .chapter-grid, .chapter-grid.chapter-grid--reverse { grid-template-columns: 1fr; }
  .chapter-grid.chapter-grid--reverse .chapter-visual { order: 0; }
}

/* ---------- Metrics ---------- */
.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 2rem 0;
}
.metric {
  background: var(--bg-alt);
  padding: 1.5rem 1.25rem;
}
.metric-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: -0.01em;
}
.metric-value.is-pending { color: var(--text-secondary); font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.metric-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

/* ---------- Project hub v2 (Apple-treated personal projects index) ---------- */
.project-hub { padding: clamp(3rem, 8vh, 5rem) 0 clamp(4rem, 10vh, 7rem); }

.project-hero-tile {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 3rem;
  background: linear-gradient(150deg, rgba(124,147,255,0.06), transparent 60%);
  transition: border-color 0.25s ease, transform 0.25s var(--ease-fluid);
}
.project-hero-tile:hover { border-color: var(--accent-glow); transform: translateY(-2px); }
.project-hero-media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.project-hero-eyebrow { color: var(--accent); }
.project-hero-tile h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0.75rem 0 1rem;
}
.project-hero-tile p { color: var(--text-secondary); max-width: 48ch; margin-bottom: 1.5rem; }
@media (max-width: 860px) {
  .project-hero-tile { grid-template-columns: 1fr; }
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 960px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .project-grid { grid-template-columns: 1fr; } }

.project-tile {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-alt);
  transition: border-color 0.25s ease, transform 0.25s var(--ease-fluid);
}
.project-tile:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.project-tile-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.project-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}
.project-tile-body { padding: 1.35rem 1.5rem 1.6rem; }
.project-tile-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 0.6rem 0 0.5rem;
}
.project-tile-body p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.9rem; }
.project-tile-tags {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* ---------- Education module (UCF black-and-gold, about.html only) ---------- */
.edu-module {
  background: var(--ucf-bg);
  border: 1px solid var(--ucf-gold-dim);
  border-radius: 12px;
  padding: clamp(2rem, 4vw, 3rem);
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}
.edu-module::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ucf-gold), transparent);
  background-size: 250% 100%;
  opacity: 0.8;
  /* A slow gold sweep instead of a static line — the same "living surface"
     idea as .shimmer-surface's drift, in this module's own black-and-gold
     palette rather than the site default's iridescent one. Deliberately not
     3D/WebGL here: this module already has a strong, settled identity, and
     a restrained typographic/motion touch fits it better than a chip motif
     that has nothing to do with UCF. See NOTES.md. */
  animation: edu-sweep 7s ease-in-out infinite;
}
@keyframes edu-sweep {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .edu-module::before { animation: none; }
}
.edu-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ucf-gold);
  display: block;
  margin-bottom: 1rem;
}
.edu-module h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  color: var(--ucf-text);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.edu-module .edu-detail { color: var(--ucf-text-secondary); font-size: 0.95rem; max-width: 56ch; margin-bottom: 1.5rem; }
.edu-spec-list { border-top: 1px solid var(--ucf-gold-dim); }
.edu-spec-row {
  display: flex;
  gap: 2rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--ucf-gold-dim);
}
.edu-spec-row dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  color: var(--ucf-gold);
  width: 140px;
  flex-shrink: 0;
}
.edu-spec-row dd { color: var(--ucf-text); font-size: 0.92rem; }
@media (max-width: 520px) {
  .edu-spec-row { flex-direction: column; gap: 0.3rem; }
  .edu-spec-row dt { width: auto; }
}
