html { scroll-behavior: smooth; }
body {
  background: #0a0c0a;
  color: #d7e6d9;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: -0.005em;
}

/* Global smooth scroll */
html { scroll-behavior: smooth; }
::selection { background: rgba(0,255,156,.35); color: #0a0c0a; }

/* Grid overlay */
.bg-grid {
  background-image:
    linear-gradient(rgba(0,255,156,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,156,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Single soft aurora blob (reduced for calmer backdrop) */
.aurora {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.aurora .orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .22;
  mix-blend-mode: screen;
  animation: float 24s ease-in-out infinite;
}
.aurora .orb.o1 { width: 620px; height: 620px; top: -180px; left: -140px;
  background: radial-gradient(circle, #00ff9c 0%, rgba(0,255,156,0) 62%); }
@keyframes float {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(28px,-36px,0) scale(1.05); }
  100% { transform: translate3d(0,0,0) scale(1); }
}

/* Vignette */
.bg-vignette::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.7) 100%);
  z-index: 1;
}

/* Terminal caret */
.caret::after {
  content: "▍";
  display: inline-block;
  margin-left: 4px;
  color: #00ff9c;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Skill bar fill */
.bar-fill { width: 0%; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }

/* Card chrome · premium lift on hover */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(20,26,22,.85), rgba(10,12,10,.85));
  border: 1px solid rgba(0,255,156,.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    transform .45s cubic-bezier(.2,.8,.2,1),
    border-color .3s ease,
    box-shadow .4s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,255,156,.35), transparent 40%, rgba(255,176,32,.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,255,156,.35);
  box-shadow: 0 18px 50px -20px rgba(0,255,156,.35), 0 0 0 1px rgba(0,255,156,.18);
}
.card:hover::before { opacity: 1; }

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .65rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #b8ffd4;
  background: rgba(0,255,156,.06);
  border: 1px solid rgba(0,255,156,.18);
  border-radius: 999px;
  white-space: nowrap;
}
.chip-amber {
  color: #ffd98a;
  background: rgba(255,176,32,.08);
  border-color: rgba(255,176,32,.28);
}

/* Nav active indicator */
.nav-link { position: relative; transition: color .25s ease; }
.nav-link::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
  background: linear-gradient(90deg, #00ff9c, #ffb020);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.nav-link:hover { color: #00ff9c; }
.nav-link:hover::before { transform: scaleX(1); }
.nav-link.active { color: #00ff9c; }
.nav-link.active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
  background: #00ff9c; box-shadow: 0 0 10px #00ff9c;
}

/* Heading gradient (used on major H2s via .grad-text) */
.grad-text {
  background: linear-gradient(180deg, #ffffff 0%, #b8ffd4 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* Label "kbd" */
.kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid rgba(0,255,156,.25);
  border-radius: 6px;
  color: #7cffb0;
  background: rgba(0,255,156,.05);
}

/* Image frames */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(0,255,156,.18);
  background: #0a0c0a;
}
.frame::before {
  content: "";
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(transparent, rgba(10,12,10,.65)),
    repeating-linear-gradient(to bottom, rgba(0,255,156,.04) 0 1px, transparent 1px 3px);
}
.frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.frame:hover img { transform: scale(1.04); }
/* Carousel · auto-rotate between multiple images within a single frame */
.carousel-imgs { position: absolute; inset: 0; z-index: 1; }
.carousel-imgs img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms ease;
}
.carousel-imgs img.active { opacity: 1; }
.carousel-dots {
  position: absolute; bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 4;
  background: rgba(0,0,0,.45);
  padding: 5px 8px; border-radius: 999px;
  border: 1px solid rgba(0,255,156,.25);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.carousel-dots .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,.28);
  border: 1px solid rgba(0,255,156,.45);
  transition: all .25s ease;
  cursor: pointer;
}
.carousel-dots .dot.active {
  background: #00ff9c; width: 18px;
  box-shadow: 0 0 10px rgba(0,255,156,.7);
}
.carousel-counter {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: #b8ffd4;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(0,255,156,.35);
  padding: 3px 8px; border-radius: 999px;
}
@media (prefers-reduced-motion: reduce) {
  .carousel-imgs img { transition: none; }
}
.frame .frame-tag {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: #b8ffd4;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(0,255,156,.35);
  padding: 3px 8px; border-radius: 999px;
}

/* Terminal window */
.term {
  background: #07090a;
  border: 1px solid rgba(0,255,156,.2);
  border-radius: 14px;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  color: #c2d1c6; /* explicit so text stays light in light-mode too */
}
.term-head {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,255,156,.12);
  background: rgba(0,255,156,.04);
}
.term-head .title { color: #8a9a8a; font-size: 11px; }
.term-body { padding: 18px 22px; }
.term .cmd { color: #7cffb0; margin-right: 4px; }
.term .dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; background: #22312a; }
.term .dot.red { background: #ff5f57; }
.term .dot.amber { background: #ffbd2e; }
.term .dot.green { background: #28c940; }
.term-dot { width: 10px; height: 10px; border-radius: 999px; background: #22312a; }
.term-dot.red { background: #ff5f57; }
.term-dot.amber { background: #ffbd2e; }
.term-dot.green { background: #28c940; }

/* Hero portrait ring */
.portrait-ring {
  position: relative;
  border-radius: 999px;
  padding: 4px;
  background: conic-gradient(from 180deg, #00ff9c, #0a0c0a, #00ff9c 60%, #ffb020, #00ff9c);
  animation: rot 16s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }
.portrait-ring > div {
  animation: rot-rev 16s linear infinite;
}
@keyframes rot-rev { to { transform: rotate(-360deg); } }

/* Filter active */
.filter-btn.active {
  background: #00ff9c;
  color: #05140b;
  border-color: #00ff9c;
  box-shadow: 0 0 18px rgba(0,255,156,.35);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0c0a; }
::-webkit-scrollbar-thumb { background: #1b241e; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #003f24; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .portrait-ring { animation: none; }
  .portrait-ring > div { animation: none; }
  .aurora .orb { animation: none; }
}

/* Utility: anchor offset for fixed nav */
section[id] { scroll-margin-top: 88px; }

/* Shared fixed navbar offset so content starts below nav */
:root { --nav-offset: 7rem; }
@media (max-width: 767px) {
  :root { --nav-offset: 5rem; }
}
main.page-shell { padding-top: var(--nav-offset); }
section[id] { scroll-margin-top: calc(var(--nav-offset) + 0.5rem); }

/* ---------- Design principles pass ---------- */

/* Movement + Emphasis: top scroll-progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, #00ff9c 0%, #7cffb0 50%, #ffb020 100%);
  box-shadow: 0 0 10px rgba(0,255,156,.6);
  z-index: 60;
  transition: width .08s linear;
  pointer-events: none;
}

/* Repetition + Rhythm: section numbers [00]..[05] */
.section-num {
  display: inline-flex; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .15em;
  color: #ffb020;
  padding: 2px 8px;
  border: 1px dashed rgba(255,176,32,.4);
  border-radius: 6px;
  background: rgba(255,176,32,.04);
}

/* Pattern: corner brackets framing a focal module */
.has-corners { position: relative; }
.has-corners::before,
.has-corners::after,
.has-corners > .corner-bl,
.has-corners > .corner-br {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-color: #00ff9c;
  border-style: solid;
  border-width: 0;
  opacity: .7;
  pointer-events: none;
}
.has-corners::before { top: -8px; left: -8px; border-top-width: 2px; border-left-width: 2px; }
.has-corners::after  { top: -8px; right: -8px; border-top-width: 2px; border-right-width: 2px; }
.has-corners > .corner-bl { bottom: -8px; left: -8px; border-bottom-width: 2px; border-left-width: 2px; }
.has-corners > .corner-br { bottom: -8px; right: -8px; border-bottom-width: 2px; border-right-width: 2px; }

/* Emphasis: mono pull-quote card */
.pullquote {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: .02em;
  color: #b8ffd4;
  border-left: 2px solid #00ff9c;
  padding: 18px 22px;
  background: linear-gradient(90deg, rgba(0,255,156,.06), rgba(0,255,156,0));
  border-radius: 10px;
}

/* Variety: Featured pill on a hero project card */
.featured-ribbon {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .18em;
  color: #ffb020;
  background: rgba(10,12,10,.85);
  border: 1px solid rgba(255,176,32,.55);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255,176,32,.25);
}

/* Lab project · collapsible description */
.proj-desc {
  transition: max-height .35s ease;
}
.proj-desc[data-state="collapsed"] {
  display: -webkit-box;
  -webkit-line-clamp: 2;
          line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.see-more-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .7rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #7cffb0;
  background: rgba(0,255,156,.06);
  border: 1px solid rgba(0,255,156,.25);
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s ease;
}
.see-more-btn:hover {
  color: #00ff9c;
  border-color: rgba(0,255,156,.55);
  background: rgba(0,255,156,.12);
}
.see-more-btn .chev { transition: transform .25s ease; display: inline-block; }
.see-more-btn.open .chev { transform: rotate(180deg); }

/* Pulse dot keyframes (reused by live status tile) */
@keyframes pulseDot { 0%,100% { transform: scale(1); opacity:1; } 50% { transform: scale(.6); opacity:.6; } }

/* =========================================================
   PREMIUM UPGRADE · LAYER STACK
   ========================================================= */

/* --- Skip link (a11y premium) --- */
.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 200;
  padding: 10px 16px;
  background: #00ff9c; color: #05140b;
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,255,156,.6);
  transition: top .25s ease;
}
.skip-link:focus { top: 12px; outline: none; }

/* --- Unified phosphor focus ring --- */
*:focus-visible {
  outline: 2px solid #00ff9c !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(0,255,156,.18);
  border-radius: 8px;
}

/* --- Custom phosphor cursor (desktop, pointer: fine) --- */
@media (pointer: fine) {
  .has-custom-cursor, .has-custom-cursor * { cursor: none !important; }
  .cur-ring {
    position: fixed; top: 0; left: 0;
    width: 32px; height: 32px;
    border: 1px solid rgba(0,255,156,.55);
    border-radius: 999px;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%) scale(1);
    transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease, transform .12s ease;
    mix-blend-mode: screen;
  }
  .cur-ring::before, .cur-ring::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 10px; height: 1px;
    background: #00ff9c; transform: translate(-50%, -50%);
  }
  .cur-ring::after { width: 1px; height: 10px; }
  .cur-dot {
    position: fixed; top: 0; left: 0;
    width: 5px; height: 5px;
    background: #00ff9c;
    border-radius: 999px;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #00ff9c;
  }
  body.cur-link .cur-ring {
    width: 56px; height: 56px;
    background: rgba(0,255,156,.12);
    border-color: rgba(0,255,156,.85);
  }
  body.cur-card .cur-ring { width: 70px; height: 70px; border-style: dashed; }
  body.cur-down .cur-ring { transform: translate(-50%, -50%) scale(.78); }
}
@media (pointer: coarse) { .cur-ring, .cur-dot { display: none !important; } }

/* --- Boot loader overlay --- */
.boot {
  position: fixed; inset: 0; z-index: 9990;
  background: #05070a;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  transition: opacity .5s ease, visibility .5s ease;
}
.boot.hide { opacity: 0; visibility: hidden; }
.boot-inner {
  width: min(560px, 86vw);
  color: #7cffb0;
  font-size: 13px;
  line-height: 1.9;
}
.boot-inner .b-line { display: block; opacity: 0; }
.boot-inner .b-line.show { opacity: 1; }
.boot-inner .b-line .ok { color: #00ff9c; font-weight: 700; }
.boot-bar {
  margin-top: 14px;
  height: 2px; width: 100%;
  background: rgba(0,255,156,.15);
  overflow: hidden; border-radius: 2px;
}
.boot-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #00ff9c, #ffb020);
  width: 0%;
  animation: bootFill 1.4s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes bootFill { to { width: 100%; } }

/* --- Split-text hero reveal --- */
.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}
.split-char.in { opacity: 1; transform: translateY(0); }
.split-word { display: inline-block; white-space: nowrap; }

/* --- Animated SVG circuit schematic overlay (hero) --- */
.hero-schematic {
  position: absolute;
  inset: 30px 40px 40px 30px;
  z-index: 0; pointer-events: none;
  opacity: .12;
  mix-blend-mode: screen;
}
.hero-schematic path, .hero-schematic line {
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: drawTrace 4.5s ease-out forwards;
}
.hero-schematic .pad { opacity: 0; animation: padPop .4s ease-out 3.8s forwards; }
/* Ensure the terminal + portrait always render above the schematic traces */
.has-corners > .term,
.has-corners > .portrait-ring,
.has-corners > div[class*="absolute"] { position: relative; z-index: 2; }
@keyframes drawTrace { to { stroke-dashoffset: 0; } }
@keyframes padPop { to { opacity: 1; } }

/* --- Ken Burns on portrait --- */
.ken-burns { animation: kenBurns 22s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes kenBurns {
  0%   { transform: scale(1.00) translate(0,0); }
  100% { transform: scale(1.08) translate(-2%, -2%); }
}

/* --- Live status tile --- */
.status-tile {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  border: 1px solid rgba(0,255,156,.28);
  background: rgba(0,255,156,.05);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: #b8ffd4;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.status-tile .dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: #00ff9c; box-shadow: 0 0 8px #00ff9c;
  animation: pulseDot 1.6s ease-in-out infinite;
}
.status-tile .sep { opacity: .35; }

/* --- Pointer-tracked spotlight on cards --- */
.card { --mx: 50%; --my: 50%; }
.card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx) var(--my),
              rgba(0,255,156,.12), transparent 55%);
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none; z-index: 1;
}
.card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 2; }

/* --- 3D tilt (applied via data attr) --- */
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .18s ease; }

/* --- Magnetic CTA baseline --- */
.magnetic { transition: transform .18s cubic-bezier(.2,.8,.2,1); will-change: transform; }

/* --- Sticky section rail (desktop) --- */
.rail {
  position: fixed; right: 18px; top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: none;
  flex-direction: column; gap: 10px;
  padding: 14px 10px;
  border-radius: 999px;
  background: rgba(10,12,10,.55);
  border: 1px solid rgba(0,255,156,.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity .35s ease;
}
@media (min-width: 1536px) { .rail { display: flex; } }
body.in-hero .rail { opacity: 0; pointer-events: none; }
.rail a {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: #7cffb0;
  text-decoration: none;
  padding: 3px 6px; border-radius: 999px;
  transition: color .25s ease;
}
.rail a .rail-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(0,255,156,.3);
  box-shadow: 0 0 0 2px rgba(10,12,10,.6);
  transition: background .25s ease, box-shadow .25s ease, transform .25s ease;
}
.rail a .rail-label {
  opacity: 0; max-width: 0;
  overflow: hidden; white-space: nowrap;
  transition: opacity .25s ease, max-width .3s ease;
}
.rail a:hover .rail-label, .rail a.active .rail-label { opacity: 1; max-width: 120px; }
.rail a.active .rail-dot {
  background: #00ff9c;
  box-shadow: 0 0 0 2px rgba(10,12,10,.6), 0 0 12px #00ff9c;
  transform: scale(1.15);
}
.rail a:hover { color: #fff; }

/* --- Infinite marquee --- */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(0,255,156,.12);
  border-bottom: 1px solid rgba(0,255,156,.12);
  background: linear-gradient(90deg, rgba(0,255,156,.03), rgba(255,176,32,.03));
  padding: 14px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #b8ffd4;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee .track {
  display: inline-flex; gap: 40px;
  white-space: nowrap;
  padding-left: 100%;
  animation: marq 38s linear infinite;
}
.marquee:hover .track { animation-play-state: paused; }
.marquee .mi { display: inline-flex; align-items: center; gap: 10px; }
.marquee .mi .sep {
  display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: #00ff9c; box-shadow: 0 0 8px #00ff9c;
}
@keyframes marq { to { transform: translateX(-100%); } }

/* --- SVG section divider --- */
.sec-divider { width: 100%; height: 60px; display: block; opacity: .55; }
.sec-divider path { stroke: #00ff9c; stroke-width: 1; fill: none; }
.sec-divider .pad { fill: #ffb020; }

/* --- Editorial typography --- */
.drop-cap::first-letter {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 3.6em;
  font-weight: 700;
  color: #00ff9c;
  float: left;
  line-height: 0.9;
  padding: 6px 10px 0 0;
  text-shadow: 0 0 18px rgba(0,255,156,.4);
}
.fig-cap {
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: #7cffb0;
  letter-spacing: .12em; text-transform: uppercase;
  margin-top: 10px;
}
.fig-cap .fig-num {
  padding: 1px 6px; border: 1px dashed rgba(0,255,156,.35);
  border-radius: 4px; color: #ffb020;
}
h2.section-h2 {
  font-variation-settings: "wght" 600;
  transition: font-variation-settings .6s ease, letter-spacing .6s ease;
}
h2.section-h2.in-view {
  font-variation-settings: "wght" 800;
  letter-spacing: -0.02em;
}

/* --- Labs rail mode --- */
#labsGrid.rail-mode {
  display: flex !important;
  grid-template-columns: none !important;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 18px;
  padding-bottom: 14px;
  scrollbar-width: thin;
}
#labsGrid.rail-mode > article {
  scroll-snap-align: start;
  flex: 0 0 min(86vw, 420px);
}
.grid-rail-toggle .gtr {
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: .3rem .7rem;
  color: #b8ffd4;
  background: rgba(0,255,156,.04);
  border: 1px solid rgba(0,255,156,.18);
  border-radius: 999px;
  transition: all .25s ease;
}
.grid-rail-toggle .gtr.active {
  background: #00ff9c; color: #05140b; border-color: #00ff9c;
  box-shadow: 0 0 14px rgba(0,255,156,.5);
}

/* --- Cmd+K palette --- */
.cmdk {
  position: fixed; inset: 0; z-index: 9995;
  background: rgba(5,7,10,.7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 18vh;
  opacity: 0; transition: opacity .2s ease;
}
.cmdk.open { display: flex; opacity: 1; }
.cmdk-box {
  width: min(620px, 92vw);
  background: #0a0c0a;
  border: 1px solid rgba(0,255,156,.3);
  border-radius: 14px;
  box-shadow: 0 30px 80px -10px rgba(0,0,0,.7), 0 0 40px rgba(0,255,156,.15);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
}
.cmdk-input {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(0,255,156,.18);
  color: #fff; font-size: 15px; outline: none;
}
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 8px 0; }
.cmdk-list .it {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  font-size: 13px; color: #d7e6d9;
  cursor: pointer; border-left: 2px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.cmdk-list .it .ix {
  color: #7cffb0; min-width: 26px; font-size: 11px;
}
.cmdk-list .it .ik {
  margin-left: auto; font-size: 10px; color: #7cffb0;
  border: 1px solid rgba(0,255,156,.25);
  padding: 2px 6px; border-radius: 4px;
}
.cmdk-list .it.active, .cmdk-list .it:hover {
  background: rgba(0,255,156,.08);
  border-left-color: #00ff9c;
  color: #fff;
}
.cmdk-hint {
  padding: 8px 18px;
  font-size: 10px; color: #7cffb0;
  border-top: 1px solid rgba(0,255,156,.12);
  display: flex; gap: 16px;
}

/* --- Nav chips (cmdk + beep) --- */
.nav-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: #7cffb0;
  background: rgba(0,255,156,.04);
  border: 1px solid rgba(0,255,156,.2);
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.nav-chip:hover { border-color: #00ff9c; color: #00ff9c; }
.nav-chip.on { background: rgba(0,255,156,.18); color: #fff; border-color: #00ff9c; }

/* --- Toast --- */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9997;
  pointer-events: none;
}
.toast {
  min-width: 220px;
  padding: 12px 16px;
  background: rgba(10,12,10,.92);
  border: 1px solid rgba(0,255,156,.35);
  border-radius: 10px;
  color: #d7e6d9;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5), 0 0 24px rgba(0,255,156,.15);
  transform: translateX(120%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateX(0); }
.toast .t-dot { width: 7px; height: 7px; border-radius: 999px; background: #00ff9c; box-shadow: 0 0 8px #00ff9c; }

/* --- Ripple --- */
.ripple-host { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 999px;
  background: rgba(255,255,255,.45);
  pointer-events: none;
  transform: scale(0);
  animation: ripple .6s ease-out forwards;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* --- Blur-up & duotone on Labs --- */
img.blur-up {
  filter: blur(14px);
  transform: scale(1.02);
  transition: filter .6s ease, transform .6s ease;
}
img.blur-up.loaded { filter: blur(0); transform: scale(1); }
#labsGrid .frame img {
  filter: saturate(.78) contrast(1.04);
  transition: filter .6s ease, transform .8s ease;
}
#labsGrid .frame:hover img { filter: saturate(1.12) contrast(1.02); }

/* ---- Prose list items with inline icon ----
   Pattern used site-wide: <li class="flex gap-2"><i data-lucide="..."></i> text <span>emphasis</span> text</li>
   Problem: flex turns each text node + span into its own anonymous flex item,
   producing a staircase layout. Fix: switch these li's to block-flow with a
   positioned leading icon so the prose flows as a single inline stream. */
ul > li.flex.gap-2 {
  display: block !important;
  position: relative;
  padding-left: 1.6rem;
}
ul > li.flex.gap-2 > svg,
ul > li.flex.gap-2 > i[data-lucide] {
  position: absolute;
  left: 0;
  top: 0.35em;
  margin: 0 !important;
}

/* --- Reduced motion sweep --- */
@media (prefers-reduced-motion: reduce) {
  .split-char { opacity: 1 !important; transform: none !important; }
  .hero-schematic path, .hero-schematic line, .hero-schematic .pad { animation: none !important; stroke-dashoffset: 0 !important; opacity: .22 !important; }
  .ken-burns { animation: none !important; }
  .marquee .track { animation: none !important; padding-left: 0 !important; }
  .boot-bar > span { animation: none !important; width: 100% !important; }
  .cur-ring, .cur-dot { display: none !important; }
  .tilt { transform: none !important; }
}

/* =========================================================
   LIGHT THEME · scoped overrides (html.light gate)
   Keeps brand colors (phos green, warm amber) but flips
   surfaces + text. Terminal block intentionally stays dark
   because it's a signature element.
   ========================================================= */
html.light { color-scheme: light; }
html.light body {
  background: #f4f7f3;
  color: #1b221c;
}
html.light ::selection { background: rgba(0,180,100,.25); color: #07150c; }

/* Grid + aurora + vignette soften on light */
html.light .bg-grid {
  background-image:
    linear-gradient(rgba(10,90,45,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,90,45,0.06) 1px, transparent 1px);
}
html.light .aurora .orb {
  opacity: .14;
  mix-blend-mode: multiply;
  background: radial-gradient(circle, #a9ecc6 0%, rgba(169,236,198,0) 62%) !important;
}
html.light .bg-vignette::after {
  background: radial-gradient(ellipse at center, transparent 58%, rgba(10,30,16,.10) 100%);
}

/* ---- Text tokens (WCAG AA tuned — contrast ≥4.5 : 1 on #f4f7f3) ---- */
html.light .text-white      { color: #0a110c !important; } /* 18.2 : 1  */
html.light .text-mute-300   { color: #35463c !important; } /*  9.6 : 1  */
html.light .text-mute-400   { color: #48594f !important; } /*  7.1 : 1  */
html.light .text-mute-500   { color: #5a6b60 !important; } /*  5.1 : 1  */
html.light .text-mute-600   { color: #6b7a70 !important; } /*  4.5 : 1  */
html.light .text-phos-50    { color: #044f2c !important; } /*  8.4 : 1  */
html.light .text-phos-100   { color: #056039 !important; } /*  6.6 : 1  */
html.light .text-phos-200   { color: #00724a !important; } /*  5.6 : 1  */
html.light .text-phos-300   { color: #00724a !important; } /*  5.6 : 1  */
html.light .text-phos-500   { color: #007a44 !important; } /*  5.4 : 1  */
html.light .text-amber2-400 { color: #8a4d00 !important; } /*  5.9 : 1  */
html.light .text-amber2-500 { color: #7a4400 !important; } /*  7.2 : 1  */

/* ---- Restore terminal palette ----
   .term keeps its dark bg (iconic); force its text back to the
   dark-theme phosphor colors so it stays readable in light mode. */
html.light .term .text-white      { color: #ffffff !important; }
html.light .term .text-mute-300   { color: #c2d1c6 !important; }
html.light .term .text-mute-400   { color: #8a9a8a !important; }
html.light .term .text-mute-500   { color: #7d8f82 !important; }
html.light .term .text-phos-50    { color: #e6ffef !important; }
html.light .term .text-phos-100   { color: #b8ffd4 !important; }
html.light .term .text-phos-200   { color: #7cffb0 !important; }
html.light .term .text-phos-300   { color: #40ff90 !important; }
html.light .term .text-phos-500   { color: #00ff9c !important; }
html.light .term .text-amber2-400 { color: #ffc34d !important; }
html.light .term .text-amber2-500 { color: #ffb020 !important; }

/* ---- Background utility tokens ---- */
html.light .bg-ink-950 { background-color: #edf1ea !important; }
html.light .bg-ink-900 { background-color: #f0f4ee !important; }
html.light .bg-ink-800 { background-color: #ffffff !important; }
html.light .bg-ink-700 { background-color: #e6ebe2 !important; }
/* Opacity-modified variants (bg-ink-900/70, /80, /95, etc.) */
html.light [class*="bg-ink-900/"] { background-color: rgba(252,254,250,.78) !important; }
html.light [class*="bg-ink-950/"] { background-color: rgba(248,250,246,.78) !important; }
html.light [class*="bg-ink-800/"] { background-color: rgba(255,255,255,.82) !important; }

/* ---- Borders (neutralise dark border utilities) ---- */
html.light .border-ink-900 { border-color: #d7dfd7 !important; }
html.light [class*="border-phos-500/40"] { border-color: rgba(0,140,80,.45) !important; }
html.light [class*="border-phos-500/50"] { border-color: rgba(0,140,80,.55) !important; }
html.light [class*="border-phos-500/15"] { border-color: rgba(0,140,80,.22) !important; }
html.light [class*="border-phos-500/10"] { border-color: rgba(0,140,80,.18) !important; }
html.light [class*="border-amber2-500/40"] { border-color: rgba(200,120,30,.45) !important; }

/* ---- Card ---- */
html.light .card {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(245,248,243,.92));
  border: 1px solid rgba(0,140,80,.18);
  box-shadow: 0 2px 14px -6px rgba(20,40,25,.08);
}
html.light .card::before {
  background: linear-gradient(135deg, rgba(0,180,100,.35), transparent 40%, rgba(220,140,40,.22));
}
html.light .card:hover {
  border-color: rgba(0,140,80,.42);
  box-shadow: 0 20px 40px -20px rgba(0,140,80,.28), 0 0 0 1px rgba(0,140,80,.18);
}

/* ---- Chips / kbd ---- */
html.light .chip {
  color: #005a33;
  background: rgba(0,180,100,.08);
  border-color: rgba(0,180,100,.28);
}
html.light .chip-amber {
  color: #8d5a00;
  background: rgba(255,170,60,.14);
  border-color: rgba(220,140,40,.4);
}
html.light .kbd {
  color: #006a3a;
  background: rgba(0,180,100,.07);
  border-color: rgba(0,180,100,.28);
}

/* ---- Nav chip (cmdk / beep / theme toggle) ---- */
html.light .nav-chip {
  color: #005e36;
  background: rgba(0,180,100,.05);
  border-color: rgba(0,180,100,.3);
}
html.light .nav-chip:hover { color: #007a44; border-color: #00a062; }  /*  5.4 : 1 text / 3 : 1 UI */
html.light .nav-chip.on { background: rgba(0,180,100,.18); color: #0b2a1e; border-color: #00b066; }

/* ---- Nav bar glass ---- */
html.light #navbar .backdrop-blur-md {
  background: rgba(252,254,250,.75) !important;
  border-color: rgba(0,140,80,.22) !important;
}
html.light #mobileMenu {
  background: rgba(252,254,250,.96) !important;
  border-color: rgba(0,140,80,.2) !important;
}

/* ---- Nav link hover/active retains phos but darker ---- */
html.light .nav-link:hover  { color: #007a44; }          /*  5.4 : 1  */
html.light .nav-link.active { color: #007a44; }          /*  5.4 : 1  */
html.light .nav-link.active::after { background: #007a44; box-shadow: 0 0 8px rgba(0,130,70,.4); }

/* ---- Frames (image cards) ---- */
html.light .frame {
  background: #fbfdfa;
  border-color: rgba(0,140,80,.22);
}
html.light .frame::before {
  background: linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(240,245,238,.6) 100%);
}
html.light .frame-tag { color: #006a3a; background: rgba(255,255,255,.82); }  /*  6.5 : 1  */

/* ---- Status tile ---- */
html.light .status-tile {
  background: rgba(255,255,255,.75);
  border-color: rgba(0,180,100,.28);
  color: #264a38;
}
html.light .status-tile .dot { background: #00904a; box-shadow: 0 0 8px rgba(0,144,74,.55); }  /*  3.6 : 1 UI  */

/* ---- Section numbers, figcap, drop cap ---- */
html.light .section-num        { color: #006a42; }   /*  6.0 : 1  */
html.light .fig-cap            { color: #48594f; }   /*  7.1 : 1  */
html.light .fig-cap .fig-num   { color: #007238; }   /*  5.6 : 1  */
html.light .drop-cap::first-letter { color: #007238; text-shadow: none; }  /* large → 5.6 : 1 */

/* ---- Gradient heading text recoloured for light bg ---- */
html.light .grad-text {
  background: linear-gradient(180deg, #0a120c 0%, #007a46 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* ---- Corners (phos brackets around media) ---- */
html.light .has-corners::before,
html.light .has-corners::after,
html.light .has-corners > .corner-bl,
html.light .has-corners > .corner-br { border-color: rgba(0,140,80,.5); }

/* ---- Portrait ring: keep phos glow ---- */
html.light .portrait-ring > div {
  border-color: #d7dfd7 !important;
  background: #fbfdfa !important;
}

/* ---- Hero schematic: calm it down on light ---- */
html.light .hero-schematic { opacity: .16; }

/* ---- Terminal window: keep dark & iconic, soften shadow ---- */
html.light .term {
  color: #c2d1c6 !important;   /* belt-and-suspenders so plain text stays readable */
  box-shadow: 0 22px 52px -24px rgba(10,30,16,.32),
              0 0 0 1px rgba(0,140,80,.18);
}
html.light .term-head .title { color: #8a9a8a !important; }
html.light .term .cmd        { color: #7cffb0 !important; }

/* ---- CTA buttons (the primary phos fill stays; outlined variants adjust) ---- */
html.light .bg-phos-500 { background-color: #00b066 !important; color: #052013 !important; }
html.light .bg-phos-500:hover { background-color: #00c478 !important; }
html.light .text-ink-900 { color: #052013 !important; }

/* ---- Toast ---- */
html.light .toast {
  background: rgba(252,254,250,.96);
  border-color: rgba(0,180,100,.4);
  color: #1b221c;
  box-shadow: 0 10px 30px rgba(10,30,16,.15), 0 0 16px rgba(0,180,100,.12);
}

/* ---- Ripple contrast ---- */
html.light .ripple { background: rgba(0,60,40,.22); }

/* ---- Icon fills in `.bg-phos-500/10` badge squares ---- */
html.light [class*="bg-phos-500/10"] { background-color: rgba(0,180,100,.12) !important; }
html.light [class*="bg-phos-500/15"] { background-color: rgba(0,180,100,.16) !important; }
html.light [class*="bg-phos-500/5"]  { background-color: rgba(0,180,100,.08) !important; }
html.light [class*="bg-amber2-500/10"] { background-color: rgba(220,140,40,.14) !important; }

/* ---- Any section that used dark gradient bg (marquee/lab strips) ---- */
html.light .bg-gradient-to-b.from-ink-950,
html.light .bg-gradient-to-b.to-ink-950 { --tw-gradient-from: #f0f4ee !important; --tw-gradient-to: #f0f4ee !important; }

/* ---- Theme toggle icon snap ---- */
html.light #themeToggle .sun-icon { display: none; }
html.light #themeToggle .moon-icon { display: inline-flex; }
#themeToggle .sun-icon { display: inline-flex; }
#themeToggle .moon-icon { display: none; }

/* =========================================================
   EXECUTIVE + IMMERSIVE REFINEMENT LAYER
   Appended overrides for a cleaner premium tone.
   ========================================================= */
:root {
  --exec-bg: #090d12;
  --exec-surface: rgba(20, 27, 34, 0.78);
  --exec-surface-2: rgba(24, 31, 39, 0.82);
  --exec-border: rgba(130, 171, 165, 0.22);
  --exec-border-strong: rgba(130, 171, 165, 0.36);
  --exec-text: #e7edf3;
  --exec-muted: #a2b0bf;
  --exec-accent: #38d7a0;
  --exec-accent-2: #f4b563;
}

body {
  background:
    radial-gradient(1000px 600px at 88% -12%, rgba(56, 215, 160, 0.12), transparent 55%),
    radial-gradient(680px 480px at 6% 8%, rgba(62, 133, 240, 0.08), transparent 60%),
    var(--exec-bg);
  color: var(--exec-text);
}

.bg-grid {
  background-size: 56px 56px;
  opacity: 0.2;
}

.aurora .orb {
  opacity: 0.14;
  filter: blur(110px);
}

#navbar .backdrop-blur-md {
  border-radius: 16px;
}

.nav-link {
  letter-spacing: 0.01em;
}

.nav-link.active::after,
.nav-link:hover::before {
  box-shadow: 0 0 8px rgba(56, 215, 160, 0.45);
}

.nav-chip {
  border-color: var(--exec-border);
  color: #c8d6e5;
  background: rgba(16, 22, 28, 0.68);
}

.nav-chip:hover {
  border-color: var(--exec-border-strong);
  color: #f5fbff;
}

.card {
  background: linear-gradient(180deg, var(--exec-surface), var(--exec-surface-2));
  border: 1px solid var(--exec-border);
  box-shadow: 0 10px 30px -18px rgba(5, 10, 16, 0.8);
}

.card::before {
  background: linear-gradient(140deg, rgba(56, 215, 160, 0.22), transparent 45%, rgba(244, 181, 99, 0.18));
}

.card:hover {
  border-color: var(--exec-border-strong);
  box-shadow: 0 18px 42px -20px rgba(8, 14, 20, 0.9);
}

.chip {
  font-size: 10.5px;
  border-color: rgba(125, 177, 169, 0.28);
  background: rgba(56, 215, 160, 0.08);
}

.chip-amber {
  border-color: rgba(244, 181, 99, 0.34);
  background: rgba(244, 181, 99, 0.1);
}

.section-num,
.kbd {
  border-radius: 8px;
}

.section-h2,
h1.font-display,
h2.font-display {
  letter-spacing: -0.018em;
}

.text-mute-300 {
  color: #b0becc !important;
}
.text-mute-400 {
  color: #8f9dae !important;
}

.term {
  border-color: rgba(105, 156, 147, 0.25);
  box-shadow: 0 16px 38px -28px rgba(0, 0, 0, 0.9);
}

.frame {
  border-color: rgba(124, 168, 160, 0.3);
}

.frame::before {
  background:
    linear-gradient(transparent, rgba(9, 13, 18, 0.45)),
    repeating-linear-gradient(to bottom, rgba(56, 215, 160, 0.03) 0 1px, transparent 1px 4px);
}

.see-more-btn {
  border-color: rgba(125, 177, 169, 0.34);
  background: rgba(56, 215, 160, 0.09);
}

/* More cinematic reveal rhythm */
.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.995);
  transition:
    opacity 680ms cubic-bezier(.2,.65,.2,1),
    transform 680ms cubic-bezier(.2,.65,.2,1),
    filter 680ms cubic-bezier(.2,.65,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  filter: blur(2px);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Page intro transition */
body.page-enter .page-shell {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(3px);
}
body.is-loaded .page-shell {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: opacity 620ms ease, transform 620ms ease, filter 620ms ease;
}

/* Stack progressive disclosure */
.stack-extra {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height .55s cubic-bezier(.2,.65,.2,1), opacity .35s ease, transform .35s ease;
}
.stack-extra.open {
  max-height: 320px;
  opacity: 1;
  transform: translateY(0);
}
.stack-more-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .95rem;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .02em;
  color: #d6f3e8;
  background: rgba(56, 215, 160, 0.12);
  border: 1px solid rgba(125, 177, 169, 0.36);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.stack-more-btn:hover {
  border-color: rgba(125, 177, 169, 0.6);
  background: rgba(56, 215, 160, 0.18);
  transform: translateY(-1px);
}
.stack-more-btn .chev {
  transition: transform .28s ease;
}
.stack-more-btn.open .chev {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.in,
  body.page-enter .page-shell,
  body.is-loaded .page-shell,
  .stack-extra,
  .stack-extra.open,
  .stack-more-btn,
  .stack-more-btn .chev {
    transition: none !important;
    transform: none !important;
    filter: none !important;
  }
}

html.light {
  --exec-bg: #f2f5f1;
  --exec-surface: rgba(255, 255, 255, 0.88);
  --exec-surface-2: rgba(247, 250, 245, 0.92);
  --exec-border: rgba(34, 105, 76, 0.2);
  --exec-border-strong: rgba(34, 105, 76, 0.34);
  --exec-text: #122117;
  --exec-muted: #4d5d54;
}

.cta-secondary {
  background: rgba(16, 23, 30, 0.46);
  border-color: rgba(140, 176, 172, 0.35);
}

.cta-secondary:hover {
  background: rgba(20, 30, 38, 0.7);
}

#work .space-y-10 > .grid > div:first-child .font-mono.text-\[11px\] {
  font-size: 12px;
  letter-spacing: 0.03em;
}

#work .space-y-10 > .grid > div:first-child .text-mute-400 {
  color: #9fb0bf !important;
}

#labsGrid article h3 {
  min-height: 3.2rem;
}

/* =========================================================
   RELAXED + RICH CONTENT TUNING
   Softer motion and stronger reading comfort.
   ========================================================= */
body {
  line-height: 1.62;
}

p,
li {
  line-height: 1.72;
}

.section-h2,
h1.font-display,
h2.font-display {
  letter-spacing: -0.014em;
}

.text-mute-300 {
  color: #bcc7d3 !important;
}

.card {
  box-shadow: 0 10px 26px -18px rgba(5, 10, 16, 0.72);
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -20px rgba(8, 14, 20, 0.8);
}

.chip {
  background: rgba(56, 215, 160, 0.07);
}

.nav-link.active::after,
.nav-link:hover::before {
  box-shadow: 0 0 5px rgba(56, 215, 160, 0.28);
}

.reveal {
  transform: translateY(12px) scale(0.998);
  transition:
    opacity 560ms cubic-bezier(.22,.61,.36,1),
    transform 560ms cubic-bezier(.22,.61,.36,1),
    filter 560ms cubic-bezier(.22,.61,.36,1);
}

body.page-enter .page-shell {
  transform: translateY(8px);
  filter: blur(2px);
}

body.is-loaded .page-shell {
  transition: opacity 480ms ease, transform 480ms ease, filter 480ms ease;
}

.relax-rich-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1.2rem;
}

.relax-rich-item {
  border-radius: 14px;
  border: 1px solid rgba(125, 177, 169, 0.24);
  background: rgba(19, 27, 34, 0.56);
  padding: .78rem .95rem;
}

.relax-rich-item h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #7dddbc;
  margin-bottom: .35rem;
}

.relax-rich-item p {
  font-size: 13px;
  color: #b8c6d4;
}

@media (min-width: 768px) {
  .relax-rich-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

html.light .relax-rich-item {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(34, 105, 76, 0.26);
}

html.light .relax-rich-item p {
  color: #3c4d42;
}

/* =========================================================
   FINAL CALM MODERN PASS
   Remove blur haze and keep premium clarity.
   ========================================================= */
.aurora .orb {
  filter: blur(72px);
  opacity: 0.12;
}

.bg-vignette::after {
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0,0,0,.5) 100%);
}

.card {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  filter: none !important;
  transition:
    opacity 460ms cubic-bezier(.22,.61,.36,1),
    transform 460ms cubic-bezier(.22,.61,.36,1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
  filter: none !important;
}

body.page-enter .page-shell {
  opacity: 0;
  transform: translateY(6px);
  filter: none !important;
}

body.is-loaded .page-shell {
  opacity: 1;
  transform: translateY(0);
  filter: none !important;
  transition: opacity 420ms ease, transform 420ms ease;
}

.text-mute-300 {
  color: #c4ced9 !important;
}

.text-mute-400 {
  color: #9eabb9 !important;
}

/* ============================================================
   HERO SECTION · terminal-first, executive calm
   ============================================================ */

.hero-section {
  display: block;
  position: relative;
}

.hero-section > .max-w-6xl,
.hero-section > .max-w-7xl {
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Identity strip · avatar + name + status */
.hero-identity {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem 1.5rem;
}

.hero-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(0, 255, 156, 0.25);
  box-shadow: 0 0 0 4px rgba(0, 255, 156, 0.06), 0 12px 28px -14px rgba(0, 0, 0, 0.5);
  background: #0a0f15;
}

.hero-avatar img,
.hero-avatar picture,
.hero-avatar picture img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

.hero-avatar-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00ff9c;
  border: 2px solid #0a0f15;
  box-shadow: 0 0 8px rgba(0, 255, 156, 0.9);
}

.hero-identity-meta {
  min-width: 0;
}

.hero-name {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.014em;
  line-height: 1.1;
  margin: 0;
}

.hero-role {
  margin-top: 0.25rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(196, 206, 217, 0.82);
}

html.light .hero-name { color: #0f1721; }
html.light .hero-role { color: rgba(15, 23, 33, 0.62); }

/* Terminal as primary hero element */
.hero-terminal-primary .term {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.92), rgba(6, 10, 15, 0.88));
  box-shadow:
    0 40px 80px -32px rgba(0, 0, 0, 0.7),
    0 8px 16px -8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

html.light .hero-terminal-primary .term {
  background: linear-gradient(180deg, #0d1218 0%, #0a0f15 100%);
  border-color: rgba(15, 23, 33, 0.14);
  box-shadow:
    0 30px 60px -26px rgba(15, 23, 33, 0.28),
    0 6px 14px -6px rgba(15, 23, 33, 0.14);
}

.hero-terminal-primary .term-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.hero-terminal-primary .term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.hero-terminal-primary .term-dot.red   { background: #ff5f57; }
.hero-terminal-primary .term-dot.amber { background: #febc2e; }
.hero-terminal-primary .term-dot.green { background: #28c840; }

.hero-terminal-primary .term-body {
  padding: 1.5rem 1.5rem 1.75rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  line-height: 1.72;
  color: #c4ced9;
}

@media (min-width: 768px) {
  .hero-terminal-primary .term-body {
    padding: 2rem 2.25rem 2.25rem;
    font-size: 14px;
    line-height: 1.8;
  }
}

.hero-terminal-primary .line .prompt {
  color: rgba(158, 171, 185, 0.7);
  margin-right: 0.6rem;
}

.hero-terminal-primary .line .cmd {
  color: #9ce1ff;
}

.hero-terminal-primary .out {
  margin: 0.15rem 0 0 1.4rem;
  white-space: pre-wrap;
}

.hero-terminal-primary .out.phos {
  color: #00ff9c;
}

.hero-terminal-primary pre.out {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: #c4ced9;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.hero-terminal-primary .term {
  overflow: hidden;
  max-width: 100%;
}

.hero-terminal-primary .out .key   { color: #00ff9c; }
.hero-terminal-primary .out .str   { color: #e5eaf0; }
.hero-terminal-primary .out .amber { color: #ffb020; }

.hero-terminal-primary .cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: #00ff9c;
  vertical-align: text-bottom;
  animation: termBlink 1.05s steps(2) infinite;
}

@keyframes termBlink {
  50% { opacity: 0; }
}

/* Responsive */
@media (max-width: 767px) {
  /* Stack the identity strip vertically on mobile to avoid squeezed columns. */
  .hero-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .hero-identity > .hero-avatar,
  .hero-identity > .hero-identity-meta,
  .hero-identity > #heroStatus {
    width: auto;
    max-width: 100%;
  }

  .hero-identity-meta {
    width: 100%;
  }

  .hero-avatar {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px;
    min-height: 56px;
  }

  .hero-name {
    font-size: 1.6rem !important;
    line-height: 1.15;
  }

  .hero-role {
    font-size: 12px;
    line-height: 1.5;
  }

  .hero-identity .section-eyebrow {
    flex-wrap: nowrap;
    gap: 0.6rem;
  }

  .hero-identity .section-num {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Status pill sits on its own row, full-width flex so it doesn't squeeze */
  .hero-identity #heroStatus {
    display: inline-flex !important;
    margin-top: 0.25rem;
  }

  /* Terminal body gets tighter padding on very narrow screens */
  .hero-terminal-primary .term-body {
    padding: 1.1rem 1rem 1.25rem;
    font-size: 12px;
    line-height: 1.65;
  }
}

/* Extra-small safety net */
@media (max-width: 380px) {
  .hero-name { font-size: 1.4rem !important; }
  .hero-role { font-size: 11px; }
  .hero-identity #heroStatus {
    font-size: 10.5px;
    padding: 0.35rem 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-terminal-primary .cursor,
  .hero-avatar-dot {
    animation: none !important;
  }
}

/* Portrait wrapper · keeps badges anchored without colliding */
.portrait-wrap {
  padding: 1.25rem;
}

.portrait-wrap .portrait-ring {
  position: relative;
  z-index: 1;
}

/* Hero badges · unified floating pill style */
.hero-badge {
  position: absolute;
  z-index: 3;
  white-space: nowrap;
  background: rgba(11, 16, 22, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--exec-border, rgba(255, 255, 255, 0.08));
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}

.hero-badge-signal {
  top: 6%;
  right: -0.25rem;
}

.hero-badge-grad {
  bottom: 4%;
  left: -0.5rem;
}

html.light .hero-badge {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 33, 0.08);
  box-shadow: 0 10px 28px -14px rgba(15, 23, 33, 0.18);
}

/* Metrics strip · quieter cards, consistent rhythm */
.metric-card {
  position: relative;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--exec-surface, rgba(14, 20, 28, 0.55));
  border: 1px solid var(--exec-border, rgba(255, 255, 255, 0.06));
  transition: border-color .3s ease, transform .3s ease, background .3s ease;
}

.metric-card:hover {
  border-color: rgba(0, 255, 156, 0.35);
  transform: translateY(-2px);
}

html.light .metric-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 33, 0.08);
}

/* Responsive hero tuning */
@media (max-width: 1023px) {
  .hero-section {
    min-height: 0;
    padding-top: 1.5rem;
  }

  .portrait-wrap {
    padding: 0.75rem;
  }

  #about .hero-context-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  #about .status-tile {
    width: auto;
  }
}

@media (max-width: 639px) {
  .hero-badge {
    font-size: 11px;
  }

  .hero-badge-signal {
    top: 2%;
    right: -0.5rem;
  }

  .hero-badge-grad {
    bottom: 2%;
    left: -0.5rem;
  }

  .metric-card {
    padding: 0.85rem 0.95rem;
  }
}

/* ================================================================
   PREMIUM LAYER · design-principle driven polish
   · Hierarchy · Grid · Typography · Depth · Restraint · Motion
   ================================================================ */

/* 1 · Spacing & rhythm tokens */
:root {
  --space-section: clamp(5rem, 9vw, 8rem);
  --space-block: clamp(2.25rem, 3.5vw, 3.5rem);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --ring-phos: 0 0 0 1px rgba(0, 255, 156, 0.12);
  --ring-phos-strong: 0 0 0 1px rgba(0, 255, 156, 0.28);
  --shadow-card: 0 24px 60px -30px rgba(0, 0, 0, 0.55), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 32px 70px -26px rgba(0, 0, 0, 0.7), 0 4px 10px -4px rgba(0, 255, 156, 0.12);
}

html.light {
  --shadow-card: 0 20px 44px -26px rgba(15, 23, 33, 0.18), 0 1px 2px rgba(15, 23, 33, 0.05);
  --shadow-card-hover: 0 28px 60px -22px rgba(15, 23, 33, 0.22), 0 4px 10px -4px rgba(0, 196, 112, 0.14);
}

/* 2 · Refined card material · layered depth with hairline inner ring */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 22, 30, 0.72) 0%, rgba(10, 15, 21, 0.62) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-card);
  transition: transform .45s cubic-bezier(.2,.7,.2,1),
              border-color .35s ease,
              box-shadow .45s ease,
              background .35s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 255, 156, 0.32);
  box-shadow: var(--shadow-card-hover);
}

html.light .card {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(253,254,250,0.82));
  border-color: rgba(15, 23, 33, 0.08);
}

html.light .card::before {
  background: linear-gradient(180deg, rgba(15,23,33,0.06), rgba(15,23,33,0) 60%);
}

/* 3 · Section rhythm · eyebrow + title + kicker triad */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.section-eyebrow .rule {
  width: 2.25rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,255,156,0.6), rgba(0,255,156,0));
  display: inline-block;
}

.section-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(0, 255, 156, 0.85);
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(0, 255, 156, 0.22);
  border-radius: 999px;
  background: rgba(0, 255, 156, 0.04);
}

.section-h2, .section-title {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.12;
}

/* 4 · Chip · tighter, more premium */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: #c4ced9;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: color .25s, background .25s, border-color .25s;
}

.chip:hover {
  color: #00ff9c;
  border-color: rgba(0, 255, 156, 0.3);
  background: rgba(0, 255, 156, 0.06);
}

html.light .chip {
  background: rgba(15, 23, 33, 0.04);
  border-color: rgba(15, 23, 33, 0.08);
  color: rgba(15, 23, 33, 0.7);
}

/* 5 · Navbar · glass + precision */
#navbar {
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

#navbar.scrolled {
  background: rgba(8, 12, 18, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html.light #navbar.scrolled {
  background: rgba(253, 254, 250, 0.82);
  border-bottom: 1px solid rgba(15, 23, 33, 0.08);
}

#navbar .nav-link {
  transition: color .25s ease, background .25s ease;
}

#navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 1px;
  background: rgba(0, 255, 156, 0.9);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}

#navbar .nav-link:hover::after,
#navbar .nav-link.active::after {
  transform: scaleX(1);
}

/* 6 · Hero · ambient halo + portrait luminance */
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 78% 35%, rgba(0, 255, 156, 0.10), transparent 70%),
    radial-gradient(40% 40% at 20% 60%, rgba(255, 176, 32, 0.07), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.hero-section > .max-w-7xl {
  position: relative;
  z-index: 1;
}

.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 255, 156, 0.14), rgba(0, 255, 156, 0) 72%);
  filter: blur(18px);
  opacity: .55;
  z-index: 0;
  pointer-events: none;
}

html.light .portrait-wrap::before {
  background: radial-gradient(closest-side, rgba(0, 196, 112, 0.18), rgba(0, 196, 112, 0) 72%);
  opacity: .45;
}

.portrait-ring {
  position: relative;
  border-radius: 50%;
  padding: 2px;
  background:
    conic-gradient(
      from 120deg,
      rgba(0, 255, 156, 0.55),
      rgba(255, 176, 32, 0.35) 35%,
      rgba(0, 255, 156, 0) 55%,
      rgba(0, 255, 156, 0.55) 100%
    );
  box-shadow: 0 20px 60px -28px rgba(0, 255, 156, 0.45);
}

.portrait-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 255, 156, 0.18);
  pointer-events: none;
}

/* 7 · Metric cards · accent bar + confident type */
.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(0, 255, 156, 0.7), rgba(0, 255, 156, 0));
  opacity: .6;
  transition: opacity .3s ease;
}

.metric-card:hover::after {
  opacity: 1;
}

.metric-card .countup {
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 0%, #d8e3ec 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

html.light .metric-card .countup {
  background: linear-gradient(180deg, #0f1721 0%, #2a3644 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* 8 · Status tile · refined */
.status-tile {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 255, 156, 0.05);
  border: 1px solid rgba(0, 255, 156, 0.16);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: rgba(196, 206, 217, 0.92);
}

.status-tile .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff9c;
  box-shadow: 0 0 10px rgba(0, 255, 156, 0.8);
  animation: pulseDot 2.4s ease-in-out infinite;
}

.status-tile .sep {
  color: rgba(255, 255, 255, 0.2);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .55; transform: scale(1.25); }
}

/* 9 · Explore cards · premium list item */
.explore-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.75rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  isolation: isolate;
}

.explore-card .explore-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: rgba(158, 171, 185, 0.7);
}

.explore-card .explore-title {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.012em;
  line-height: 1.2;
}

html.light .explore-card .explore-title {
  color: #0f1721;
}

.explore-card .explore-desc {
  color: #c4ced9;
  font-size: 0.9rem;
  line-height: 1.6;
}

.explore-card .explore-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #00ff9c;
  transition: gap .35s cubic-bezier(.2,.7,.2,1);
}

.explore-card:hover .explore-cta {
  gap: 0.7rem;
}

.explore-card .explore-cta i {
  width: 14px;
  height: 14px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}

.explore-card:hover .explore-cta i {
  transform: translate(3px, -3px);
}

.explore-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 100% 0%, rgba(0, 255, 156, 0.10), transparent 55%);
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
  z-index: -1;
}

.explore-card:hover::after {
  opacity: 1;
}

/* Back-to-top flavored explore card */
.explore-card--return {
  background: linear-gradient(135deg, rgba(0, 255, 156, 0.06), rgba(255, 176, 32, 0.04));
}

.explore-card--return .explore-cta {
  color: #ffb020;
}

/* 10 · Cinematic section rule — subtle divider between major blocks */
.section-rule {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 156, 0.22), transparent);
  border: 0;
  margin: 0 auto;
  width: min(100%, 72rem);
}

/* 11 · Footer polish */
footer {
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 72rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 156, 0.2), transparent);
}

/* 12 · Reveal · refined choreography */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1),
              transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .portrait-ring::after,
  .status-tile .dot {
    animation: none !important;
  }
}

/* ============================================================
   FALLBACKS · for Tailwind classes NOT present in the
   pre-compiled dist/tailwind.min.css build.
   (No npm/tailwind.config.js exists in this project.)
   These restore the intended layout/typography without a rebuild.
   ============================================================ */

/* ---- Text sizes (base) ---- */
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem;  line-height: 2.5rem; }
.text-5xl { font-size: 3rem;     line-height: 1; }

/* ---- Arbitrary text sizes used across hero/explore ---- */
.text-\[9px\]    { font-size: 9px; }
.text-\[10px\]   { font-size: 10px; }
.text-\[10\.5px\] { font-size: 10.5px; }
.text-\[11px\]   { font-size: 11px; }
.text-\[12px\]   { font-size: 12px; }
.text-\[12\.5px\] { font-size: 12.5px; }
.text-\[13px\]   { font-size: 13px; }
.text-\[14px\]   { font-size: 14px; }
.text-\[15px\]   { font-size: 15px; }
.text-\[40px\]   { font-size: 40px; line-height: 1.1; }
.text-\[56px\]   { font-size: 56px; line-height: 1.05; }

@media (min-width: 768px) {
  .md\:text-\[40px\] { font-size: 40px; line-height: 1.1; }
  .md\:text-\[56px\] { font-size: 56px; line-height: 1.05; }
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-4xl { font-size: 2.25rem;  line-height: 2.5rem; }
  .md\:text-6xl { font-size: 3.75rem;  line-height: 1; }
  .md\:pt-12   { padding-top: 3rem; }
  .md\:pt-16   { padding-top: 4rem; }
  .md\:pb-20   { padding-bottom: 5rem; }
  .md\:py-24   { padding-top: 6rem; padding-bottom: 6rem; }
  .md\:py-28   { padding-top: 7rem; padding-bottom: 7rem; }
  .md\:mt-12   { margin-top: 3rem; }
  .md\:mt-16   { margin-top: 4rem; }
  .md\:mt-20   { margin-top: 5rem; }
  .md\:gap-5   { gap: 1.25rem; }
  .md\:gap-6   { gap: 1.5rem; }
  .md\:gap-14  { gap: 3.5rem; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:inline    { display: inline; }
  .md\:inline-flex { display: inline-flex; }
  .md\:text-\[11px\] { font-size: 11px; }
  .md\:text-\[12px\] { font-size: 12px; }
}

@media (min-width: 1024px) {
  .lg\:text-\[56px\] { font-size: 56px; line-height: 1.05; }
  .lg\:gap-14 { gap: 3.5rem; }
  .lg\:order-1 { order: 1; }
  .lg\:order-2 { order: 2; }
}

/* ---- Orders on base ---- */
.order-1 { order: 1; }
.order-2 { order: 2; }

/* ---- Arbitrary max-widths / widths ---- */
.max-w-xs { max-width: 20rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }

@media (min-width: 640px) {
  .sm\:max-w-sm { max-width: 24rem; }
  .sm\:ml-0    { margin-left: 0; }
  .sm\:mt-0    { margin-top: 0; }
  .sm\:absolute { position: absolute; }
  .sm\:inline  { display: inline; }
}

/* ---- Fine-grained spacing ---- */
.w-1\.5 { width: .375rem; }
.gap-2\.5 { gap: .625rem; }
.px-3\.5 { padding-left: .875rem; padding-right: .875rem; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-3    { padding-top: .75rem;  padding-bottom: .75rem; }
.pt-10   { padding-top: 2.5rem; }
.pb-16   { padding-bottom: 4rem; }
.pb-20   { padding-bottom: 5rem; }
.pt-8    { padding-top: 2rem; }
.mt-8    { margin-top: 2rem; }
.mt-14   { margin-top: 3.5rem; }
.mt-16   { margin-top: 4rem; }
.mt-12   { margin-top: 3rem; }
.mb-7    { margin-bottom: 1.75rem; }
.mb-8    { margin-bottom: 2rem; }
.mb-9    { margin-bottom: 2.25rem; }
.mb-12   { margin-bottom: 3rem; }

/* ---- Section headings ---- */
.section-h2,
.section-title {
  font-size: clamp(1.75rem, 2.6vw, 2.35rem);
  line-height: 1.12;
  color: #ffffff;
}

html.light .section-h2,
html.light .section-title {
  color: #0f1721;
}

/* ---- Metrics grid · 4 cols md+ ---- */
.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .hero-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* ---- Explore cards grid ---- */
.grid.sm\:grid-cols-2.lg\:grid-cols-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid.sm\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .grid.sm\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* ---- Font family helpers ---- */
.font-display { font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif; }
.font-mono    { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace; }

/* ---- Body text sizes if missing ---- */
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs   { font-size: 0.75rem; line-height: 1rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem; line-height: 2rem; }

/* ---- Eyebrow layout ---- */
.section-eyebrow {
  gap: 0.75rem;
}

/* ---- Hero identity name (always sized explicitly) ---- */
.hero-name {
  font-size: clamp(1.35rem, 2.6vw, 2rem) !important;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

/* ---- Explore card typography ---- */
.explore-card .explore-title { font-size: 1.2rem; }
.explore-card .explore-desc  { font-size: 0.925rem; }

/* ---- About-Profile wrapper width/grid for new markup ---- */
.hero-section > .max-w-6xl {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

/* ================================================================
   PAGE HEADER · unified header component for every subpage.
   Use: <header class="page-header">
          <div class="page-header-inner">
            <div class="section-eyebrow">...</div>
            <h1 class="page-title">...</h1>
            <p class="page-lede">...</p>
          </div>
        </header>
   ================================================================ */

.page-header {
  position: relative;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 2.5rem;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 85% 0%, rgba(0, 255, 156, 0.08), transparent 70%),
    radial-gradient(40% 40% at 10% 100%, rgba(255, 176, 32, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page-header-inner {
  position: relative;
  z-index: 1;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .page-header {
    padding: 4rem 0 3rem;
    margin-bottom: 3.5rem;
  }
  .page-header-inner {
    padding: 0 2rem;
  }
}

html.light .page-header {
  border-bottom-color: rgba(15, 23, 33, 0.08);
}

.page-title {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.1;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 0.75rem;
}

html.light .page-title { color: #0f1721; }

.page-lede {
  color: #c4ced9;
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.72;
  margin-top: 1rem;
  max-width: 42rem;
}

html.light .page-lede { color: rgba(15, 23, 33, 0.72); }

.page-header-meta {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(158, 171, 185, 0.75);
  text-align: right;
  display: none;
}

@media (min-width: 1024px) {
  .page-header-meta { display: block; }
}

/* ================================================================
   FOOTER · consistent across every page
   ================================================================ */

footer {
  position: relative;
  padding: 3.5rem 1.25rem 2.75rem;
  margin-top: 5rem;
}

@media (min-width: 768px) {
  footer {
    padding: 4rem 2rem 3rem;
  }
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 72rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 156, 0.22), transparent);
}

/* ================================================================
   SECTION · canonical content section spacing
   ================================================================ */

.page-section {
  padding: 3rem 1.25rem;
}

@media (min-width: 768px) {
  .page-section {
    padding: 4rem 2rem;
  }
}

/* ================================================================
   CONSISTENT COMPONENT POLISH applied everywhere
   ================================================================ */

/* kbd tag (sometimes used on subpages) */
.kbd {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  color: rgba(196, 206, 217, 0.9);
  letter-spacing: 0.02em;
}

html.light .kbd {
  background: rgba(15, 23, 33, 0.04);
  border-color: rgba(15, 23, 33, 0.08);
  color: rgba(15, 23, 33, 0.72);
}

/* Opacity helper (missing from pre-compiled tailwind) */
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }

/* Labs toolbar · consistent alignment */
.labs-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

html.light .labs-toolbar {
  border-bottom-color: rgba(15, 23, 33, 0.08);
}

/* Filter buttons · premium pill style */
.filter-btn {
  transition: all .25s ease;
  background: rgba(255, 255, 255, 0.02);
}

.filter-btn:hover {
  border-color: rgba(0, 255, 156, 0.5);
  color: #00ff9c;
  background: rgba(0, 255, 156, 0.04);
}

.filter-btn.active {
  border-color: #00ff9c;
  color: #00ff9c;
  background: rgba(0, 255, 156, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 255, 156, 0.18);
}

/* ================================================================
   LIGHT-MODE CONTRAST FIXES
   Applied last so they override dark-only declarations used by the
   premium layer, explore cards, page header meta, filter pills,
   status/section pills, rich content blocks, and hero elements.
   Target: WCAG AA (>= 4.5:1 body, >= 3:1 UI) on the #f4f7f3 surface.
   Brand phosphor is shifted from #00ff9c (neon, fails on light) to
   a darker forest green (#007a44 / #00603a) that keeps the identity
   while hitting ≥5.4:1 on light backgrounds.
   ================================================================ */

/* Local phosphor & surface tokens for light mode */
html.light {
  --phos-on-light: #00734a;         /* 5.8 : 1 on #f4f7f3 */
  --phos-on-light-strong: #005e3a;  /* 7.8 : 1 */
  --ink-on-light: #0f1721;          /* 17.2 : 1 */
  --ink-on-light-muted: #3a4652;    /*  8.9 : 1 */
  --ink-on-light-soft: #5a6b60;     /*  5.1 : 1 */
  --border-on-light: rgba(15, 23, 33, 0.12);
  --border-on-light-strong: rgba(15, 23, 33, 0.18);
}

/* ---- Explore cards · text + num + cta contrast ---- */
html.light .explore-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 246, 0.88));
  border: 1px solid var(--border-on-light);
}
html.light .explore-card .explore-num  { color: var(--ink-on-light-soft); }   /* 5.1 : 1 */
html.light .explore-card .explore-title { color: var(--ink-on-light); }
html.light .explore-card .explore-desc {
  color: var(--ink-on-light-muted);   /* 8.9 : 1 body */
}
html.light .explore-card .explore-cta {
  color: var(--phos-on-light);         /* 5.8 : 1 */
}
html.light .explore-card--return {
  background: linear-gradient(180deg, rgba(240, 247, 242, 0.92), rgba(230, 240, 232, 0.86));
}

/* ---- Section eyebrow · pill bg/border stronger on light ---- */
html.light .section-num {
  background: rgba(0, 115, 74, 0.06);
  border-color: rgba(0, 115, 74, 0.32);
}
html.light .section-eyebrow .rule {
  background: linear-gradient(90deg, rgba(0, 115, 74, 0.55), rgba(0, 115, 74, 0));
}

/* ---- Status tile · surface + dot + text visibly grounded on light ---- */
html.light .status-tile {
  background: rgba(0, 115, 74, 0.06);
  border-color: rgba(0, 115, 74, 0.28);
  color: var(--ink-on-light-muted); /* 8.9 : 1 */
}
html.light .status-tile .dot {
  background: #00a062;
  box-shadow: 0 0 8px rgba(0, 160, 98, 0.55);
}
html.light .status-tile .sep { color: rgba(15, 23, 33, 0.35); }

/* ---- Page header meta (desktop right-aligned $ text) ---- */
html.light .page-header-meta {
  color: var(--ink-on-light-soft);  /* 5.1 : 1 */
}
html.light .page-header-meta .opacity-60,
html.light .page-header-meta .opacity-70,
html.light .page-header-meta .opacity-80 {
  opacity: 1;
  color: var(--ink-on-light-muted);
}

/* ---- Filter buttons · light-mode forest green ---- */
html.light .filter-btn {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border-on-light);
  color: var(--ink-on-light-muted);
}
html.light .filter-btn:hover {
  border-color: rgba(0, 115, 74, 0.55);
  color: var(--phos-on-light);
  background: rgba(0, 115, 74, 0.06);
}
html.light .filter-btn.active {
  border-color: var(--phos-on-light);
  color: var(--phos-on-light);
  background: rgba(0, 115, 74, 0.1);
  box-shadow: 0 0 0 1px rgba(0, 115, 74, 0.25);
}

/* ---- Hero CTAs · shift neon phosphor to forest on light ---- */
html.light .hero-ctas a.bg-phos-500,
html.light a.bg-phos-500 {
  background-color: #009158 !important;
  color: #ffffff !important;
}
html.light .hero-ctas a.bg-phos-500:hover,
html.light a.bg-phos-500:hover {
  background-color: #00a968 !important;
}

/* Secondary CTA (outline) */
html.light .cta-secondary,
html.light .hero-ctas .cta-secondary {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 115, 74, 0.4);
  color: var(--phos-on-light-strong) !important;
}
html.light .cta-secondary:hover,
html.light .hero-ctas .cta-secondary:hover {
  background: rgba(0, 115, 74, 0.08);
  color: var(--phos-on-light) !important;
  border-color: rgba(0, 115, 74, 0.55);
}

/* ---- Hero identity (name + role + avatar-dot ring) ---- */
html.light .hero-avatar {
  border-color: rgba(0, 115, 74, 0.32);
  box-shadow: 0 0 0 4px rgba(0, 115, 74, 0.08), 0 10px 24px -14px rgba(15, 23, 33, 0.18);
  background: #ffffff;
}
html.light .hero-avatar-dot {
  background: #00a062;
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(0, 160, 98, 0.7);
}
html.light .hero-name { color: var(--ink-on-light); }
html.light .hero-role { color: var(--ink-on-light-muted); }  /* 8.9 : 1 */

/* ---- Relaxed rich content · monospace kicker needs forest on light ---- */
html.light .relax-rich-item h3 {
  color: var(--phos-on-light-strong);
}

/* ---- Metric card inner chrome ---- */
html.light .metric-card .font-mono.text-mute-400 {
  color: var(--ink-on-light-soft) !important;
}
html.light .metric-card .text-phos-500,
html.light .metric-card .font-mono.text-phos-500 {
  color: var(--phos-on-light) !important;
}
html.light .metric-card::after {
  background: linear-gradient(180deg, rgba(0, 115, 74, 0.7), rgba(0, 115, 74, 0));
}

/* ---- Explore card decorative hover arc ---- */
html.light .explore-card::after {
  background: linear-gradient(135deg, transparent 45%, rgba(0, 115, 74, 0.12));
}

/* ---- Card hover border uses forest on light ---- */
html.light .card:hover {
  border-color: rgba(0, 115, 74, 0.32);
  box-shadow: var(--shadow-card-hover);
}

/* ---- Hero section ambient halo recolor for light ---- */
html.light .hero-section::before {
  background:
    radial-gradient(60% 50% at 78% 35%, rgba(0, 160, 98, 0.08), transparent 70%),
    radial-gradient(40% 40% at 20% 60%, rgba(200, 120, 30, 0.05), transparent 72%);
}

/* ---- Page header::before halo ---- */
html.light .page-header::before {
  background:
    radial-gradient(60% 60% at 85% 0%, rgba(0, 160, 98, 0.08), transparent 70%),
    radial-gradient(40% 40% at 10% 100%, rgba(200, 120, 30, 0.05), transparent 70%);
}

/* ---- Section-rule divider ---- */
html.light .section-rule,
html.light hr.section-rule {
  border-color: rgba(15, 23, 33, 0.08);
  background: linear-gradient(90deg, transparent, rgba(15, 23, 33, 0.12), transparent);
}

/* ---- Footer phosphor accent hairline ---- */
html.light footer::before {
  background: linear-gradient(90deg, transparent, rgba(0, 115, 74, 0.28), transparent);
}

/* ---- Nav chip and nav link hover states (desktop) ---- */
html.light .nav-link {
  color: var(--ink-on-light-muted);
}
html.light .nav-link:hover,
html.light .nav-link.active {
  color: var(--phos-on-light);
}

/* ---- Generic white-alpha borders used throughout (cards, dividers) ---- */
html.light [class*="border-white/"],
html.light .border-white\/5,
html.light .border-white\/10,
html.light .border-white\/20 {
  border-color: var(--border-on-light) !important;
}

/* ---- Generic white-alpha backgrounds used as surfaces ---- */
html.light [class*="bg-white/"],
html.light .bg-white\/5,
html.light .bg-white\/10 {
  background-color: rgba(15, 23, 33, 0.04) !important;
}

/* ---- Stack disclosure / details toggle edges ---- */
html.light .stack-extra,
html.light .stack-toggle {
  border-color: var(--border-on-light);
}

/* ---- Generic phos neon text that slipped through ---- */
html.light .text-phos-500\/80,
html.light [class*="text-phos-500/"] {
  color: var(--phos-on-light) !important;
}

/* ---- Mute text on light backgrounds inside cards ---- */
html.light .card .text-mute-300,
html.light .card .text-mute-400 {
  color: var(--ink-on-light-muted) !important;
}
html.light .card .text-mute-500 {
  color: var(--ink-on-light-soft) !important;
}

/* ---- Focus ring for keyboard nav on light ---- */
html.light a:focus-visible,
html.light button:focus-visible {
  outline: 2px solid var(--phos-on-light);
  outline-offset: 2px;
  border-radius: 4px;
}
