:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #ea580c;
  --accent-soft: #fed7aa;
  --ink: #102132;
  --ink-soft: #334155;
  --bg: #f6fbff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(15, 23, 42, 0.22);
  --ok: #067647;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-lg: 0 28px 70px rgba(10, 37, 64, 0.18);
  --shadow-md: 0 14px 32px rgba(10, 37, 64, 0.12);
  --atm-a: rgba(13, 148, 136, 0.22);
  --atm-b: rgba(11, 95, 255, 0.16);
  --atm-c: rgba(234, 88, 12, 0.14);
  --section-y: clamp(2.45rem, 4.2vw, 3.05rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Sora', ui-sans-serif, system-ui;
  color: var(--ink);
  line-height: 1.6;
  background: linear-gradient(160deg, #f8fcff 0%, #fff8ef 56%, #f6fffb 100%);
}

body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 80;
  transform: translateY(-180%);
  border-radius: 10px;
  border: 1px solid rgba(11, 95, 255, 0.35);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.52rem 0.7rem;
  box-shadow: 0 10px 24px rgba(10, 37, 64, 0.12);
  transition: transform 140ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid rgba(13, 148, 136, 0.5);
  outline-offset: 2px;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  opacity: 0.9;
  background:
    radial-gradient(circle at 8% 12%, var(--atm-a) 0, transparent 42%),
    radial-gradient(circle at 92% 8%, var(--atm-b) 0, transparent 38%),
    radial-gradient(circle at 80% 86%, var(--atm-c) 0, transparent 44%);
  transition: background 900ms ease;
  animation: atmosphere-shift 24s ease-in-out infinite alternate;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 33, 50, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 33, 50, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 82%);
  z-index: -2;
}

body[data-page='home']::after {
  animation: none;
}

/* Theme variations */
body[data-story-theme='01'] {
  --atm-a: rgba(13, 148, 136, 0.25);
  --atm-b: rgba(11, 95, 255, 0.19);
  --atm-c: rgba(234, 88, 12, 0.15);
}
body[data-story-theme='02'] {
  --atm-a: rgba(148, 163, 184, 0.22);
  --atm-b: rgba(30, 64, 175, 0.18);
  --atm-c: rgba(217, 119, 6, 0.14);
}
body[data-story-theme='03'] {
  --atm-a: rgba(20, 184, 166, 0.25);
  --atm-b: rgba(59, 130, 246, 0.18);
  --atm-c: rgba(251, 146, 60, 0.13);
}
body[data-story-theme='04'] {
  --atm-a: rgba(6, 182, 212, 0.24);
  --atm-b: rgba(37, 99, 235, 0.19);
  --atm-c: rgba(249, 115, 22, 0.13);
}
body[data-story-theme='05'] {
  --atm-a: rgba(15, 23, 42, 0.2);
  --atm-b: rgba(14, 116, 144, 0.19);
  --atm-c: rgba(59, 130, 246, 0.14);
}
body[data-story-theme='06'] {
  --atm-a: rgba(45, 212, 191, 0.2);
  --atm-b: rgba(14, 165, 233, 0.2);
  --atm-c: rgba(234, 88, 12, 0.13);
}
body[data-story-theme='07'] {
  --atm-a: rgba(5, 150, 105, 0.22);
  --atm-b: rgba(37, 99, 235, 0.16);
  --atm-c: rgba(250, 204, 21, 0.14);
}
body[data-story-theme='08'] {
  --atm-a: rgba(16, 185, 129, 0.2);
  --atm-b: rgba(59, 130, 246, 0.19);
  --atm-c: rgba(251, 146, 60, 0.15);
}
body[data-story-theme='09'] {
  --atm-a: rgba(13, 148, 136, 0.18);
  --atm-b: rgba(99, 102, 241, 0.2);
  --atm-c: rgba(249, 115, 22, 0.18);
}
body[data-story-theme='10'] {
  --atm-a: rgba(34, 197, 94, 0.2);
  --atm-b: rgba(14, 165, 233, 0.18);
  --atm-c: rgba(244, 114, 182, 0.14);
}
body[data-story-theme='11'] {
  --atm-a: rgba(16, 185, 129, 0.2);
  --atm-b: rgba(37, 99, 235, 0.2);
  --atm-c: rgba(234, 88, 12, 0.18);
}
body[data-story-theme='12'] {
  --atm-a: rgba(52, 211, 153, 0.22);
  --atm-b: rgba(59, 130, 246, 0.18);
  --atm-c: rgba(249, 115, 22, 0.16);
}

body[data-about-theme='01'] {
  --atm-a: rgba(13, 148, 136, 0.24);
  --atm-b: rgba(59, 130, 246, 0.18);
  --atm-c: rgba(234, 88, 12, 0.15);
}

body[data-about-theme='02'] {
  --atm-a: rgba(16, 185, 129, 0.2);
  --atm-b: rgba(14, 165, 233, 0.2);
  --atm-c: rgba(251, 146, 60, 0.14);
}

body[data-about-theme='03'] {
  --atm-a: rgba(34, 211, 238, 0.2);
  --atm-b: rgba(37, 99, 235, 0.2);
  --atm-c: rgba(244, 114, 182, 0.13);
}

body[data-about-theme='04'] {
  --atm-a: rgba(20, 184, 166, 0.22);
  --atm-b: rgba(99, 102, 241, 0.2);
  --atm-c: rgba(249, 115, 22, 0.16);
}

body[data-about-theme='05'] {
  --atm-a: rgba(15, 23, 42, 0.24);
  --atm-b: rgba(14, 116, 144, 0.2);
  --atm-c: rgba(45, 212, 191, 0.13);
}

.dynamic-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  opacity: 0.98;
}

.dynamic-orb {
  position: absolute;
  width: var(--orb-size);
  height: var(--orb-size);
  left: var(--orb-left);
  top: var(--orb-top);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.72), transparent 45%),
    radial-gradient(circle at 60% 70%, rgba(var(--orb-hue), 0.24), rgba(var(--orb-hue), 0.08));
  filter: blur(4px) saturate(1.28);
  mix-blend-mode: screen;
  box-shadow: 0 0 44px rgba(var(--orb-hue), 0.2);
  animation: orb-float var(--orb-speed) ease-in-out infinite alternate;
}

.container {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(16, 33, 50, 0.08);
  background: rgba(246, 251, 255, 0.74);
  transition:
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.topbar.is-scrolled {
  border-bottom-color: rgba(16, 33, 50, 0.14);
  background: rgba(246, 251, 255, 0.9);
  box-shadow: 0 8px 24px rgba(10, 37, 64, 0.09);
}

.topbar-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 0;
}

.brand {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  font-size: 1.01rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.75), transparent 42%),
    linear-gradient(140deg, var(--primary), #0b5fff 65%, var(--accent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 20px rgba(13, 148, 136, 0.34);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding: 0.4rem 0.56rem;
  border-radius: 10px;
  transition:
    background 180ms ease,
    color 180ms ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: rgba(13, 148, 136, 0.14);
}

.cta-row {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-cta-mobile {
  display: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.7rem;
  margin-right: 0.2rem;
  z-index: 100;
  flex-shrink: 0;
}

.hamburger-box {
  width: 28px;
  height: 22px;
  display: inline-block;
  position: relative;
}

.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -2px;
  position: absolute;
  width: 28px;
  height: 4px;
  background: var(--ink-soft);
  border-radius: 4px;
  transition: background 0.2s;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  display: block;
  position: absolute;
  width: 28px;
  height: 4px;
  background: var(--ink-soft);
  border-radius: 4px;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.hamburger-inner::before {
  top: -9px;
}
.hamburger-inner::after {
  bottom: -9px;
}

.hamburger.is-active .hamburger-inner {
  background: transparent;
}
.hamburger.is-active .hamburger-inner::before {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.is-active .hamburger-inner::after {
  transform: translateY(-9px) rotate(-45deg);
}

.btn {
  --mx: 0px;
  --my: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.72rem 0.98rem;
  line-height: 1;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
  white-space: nowrap;
  transform: translate3d(var(--mx), var(--my), 0);
}

.btn:hover {
  transform: translate3d(var(--mx), calc(var(--my) - 1px), 0);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.5);
  outline-offset: 2px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(100deg, var(--primary) 0%, #0b5fff 58%, var(--accent) 100%);
  box-shadow: 0 12px 24px rgba(11, 95, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 16px 30px rgba(11, 95, 255, 0.34);
}

.btn-secondary {
  color: var(--ink);
  background: var(--surface-strong);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: #ffffff;
  border-color: var(--line-strong);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 50;
  transform-origin: left center;
  transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--primary), #0b5fff, var(--accent));
  box-shadow: 0 0 14px rgba(13, 148, 136, 0.48);
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + 40px + 0.5rem);
  z-index: 35;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  border-radius: 999px;
  min-width: 50px;
  min-height: 40px;
  padding: 0.46rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 28px rgba(10, 37, 64, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  border-color: rgba(13, 148, 136, 0.34);
}
.back-to-top:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.5);
  outline-offset: 2px;
}

.story-main {
  position: relative;
  margin: 0 auto;
}

.story-rail {
  position: fixed;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 26;
  width: min(230px, 24vw);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(10px) saturate(135%);
  box-shadow: 0 14px 34px rgba(10, 37, 64, 0.16);
  opacity: 0.54;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    background 220ms ease;
}

.story-rail:hover,
.story-rail:focus-within,
.story-rail.is-open {
  opacity: 0.98;
  background: rgba(255, 255, 255, 0.82);
}

.story-rail-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.62rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  margin-bottom: 0.45rem;
}

.story-rail-toggle:hover {
  border-color: rgba(13, 148, 136, 0.34);
}

.story-rail-title {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0f766e;
}

.story-rail a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.34rem;
  padding: 0.36rem 0.45rem;
  border-radius: 10px;
  text-decoration: none;
  color: #334155;
  font-size: 0.82rem;
  border: 1px solid transparent;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    color 180ms ease;
}

.story-rail a span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border-radius: 999px;
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.69rem;
  color: #0f172a;
  background: rgba(148, 163, 184, 0.2);
}

.story-rail a:hover,
.story-rail a.active {
  border-color: rgba(13, 148, 136, 0.34);
  background: rgba(13, 148, 136, 0.1);
  color: #0f172a;
  transform: translateX(2px);
}

.story-rail a.active span {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.22), rgba(11, 95, 255, 0.22));
}

.story-rail.is-collapsed #story-rail-list,
.story-rail.is-collapsed .story-rail-title {
  display: none;
}

.chapter-hud {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 28;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.64rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 28px rgba(10, 37, 64, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.chapter-hud.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chapter-hud-index {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border-radius: 999px;
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.73rem;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.2), rgba(234, 88, 12, 0.2));
  color: #0f172a;
}

.chapter-hud-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.4rem, 6vw, 4.4rem) 0 clamp(1.6rem, 3vw, 2.2rem);
  max-height: 150vh;
  --spot-x: 50%;
  --spot-y: 50%;
}

.hero.hero-spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--spot-x) var(--spot-y),
    rgba(255, 255, 255, 0.34),
    transparent 34%
  );
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  right: max(3vw, 1rem);
  top: 20px;
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.86), transparent 52%),
    radial-gradient(circle at 65% 65%, rgba(13, 148, 136, 0.26), transparent 72%),
    linear-gradient(150deg, rgba(11, 95, 255, 0.2), rgba(234, 88, 12, 0.22));
  filter: blur(8px);
  opacity: 0.85;
  pointer-events: none;
  z-index: -1;
}

.hero-constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  mix-blend-mode: normal;
}

.global-constellation {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.96;
  mix-blend-mode: normal;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 1.2rem;
  align-items: stretch;
}

.hero-cycler {
  margin: 0.88rem 0 0;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: 0.01em;
  min-height: 1.6em;
}

.hero-cycler-word {
  display: inline-block;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(13, 148, 136, 0.2),
    rgba(11, 95, 255, 0.18),
    rgba(234, 88, 12, 0.2)
  );
  color: #0f172a;
  min-width: 9ch;
  text-align: center;
}

.hero-cycler-word.is-animated {
  animation: pulse-word 420ms ease;
}

.eyebrow {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
  margin-bottom: 0.9rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.2rem, 4.7vw, 3.9rem);
  max-width: 15ch;
  letter-spacing: -0.01em;
}

.subhead {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 58ch;
}

.hero-actions {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.68rem;
}

.microcopy {
  margin-top: 0.92rem;
  color: #475569;
  font-size: 0.86rem;
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px) saturate(130%);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #0b5fff, var(--accent));
  opacity: 0.65;
}

.feature.card,
.hero-card {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.feature.card:hover,
.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13, 148, 136, 0.26);
}

.hero-card {
  padding: 1.1rem;
  display: grid;
  gap: 0.85rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(241, 249, 255, 0.8)),
    radial-gradient(circle at 100% 0, rgba(13, 148, 136, 0.14), transparent 40%);
}

.hero-card.card {
  min-width: 0;
  overflow: hidden;
}

.hero-card .code {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.hero-card .ticker {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  white-space: normal; /* wraps when there's not enough space */
  word-break: break-word;
}

.hero-card h3 {
  font-size: 1.05rem;
}

.code {
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  border: 1px solid rgba(148, 163, 184, 0.44);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
  color: #e2e8f0;
  border-radius: 14px;
  padding: 0.84rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  word-break: break-all;
  white-space: pre-wrap;
}

.metric-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.52rem 0.76rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.pill:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 148, 136, 0.32);
}

.pill img {
  height: 20px;
  border-radius: 6px;
}

.section {
  padding: var(--section-y) 0;
  max-height: 200vh;
}

.chapter {
  position: relative;
  scroll-margin-top: 88px;
  transition:
    border-color 300ms ease,
    background 300ms ease;
}

.chapter::before {
  content: 'Chapter ' attr(data-chapter) ' - ' attr(data-chapter-title);
  position: absolute;
  left: clamp(0.4rem, 3vw, 2.2rem);
  top: 1.1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(15, 23, 42, 0.58);
  font-weight: 700;
}

.section-dark.chapter::before {
  color: rgba(226, 232, 240, 0.7);
}

.chapter-active {
  border-left-color: transparent;
  background: transparent;
}

.section-dark.chapter.chapter-active {
  background:
    radial-gradient(circle at 90% 0, rgba(13, 148, 136, 0.18), transparent 40%),
    linear-gradient(160deg, #091524 0%, #0b1f33 100%);
}

.section-dark {
  position: relative;
  padding: var(--section-y) 0;
  max-height: 200vh;
  background:
    radial-gradient(circle at 90% 0, rgba(13, 148, 136, 0.18), transparent 40%),
    linear-gradient(160deg, #091524 0%, #0b1f33 100%);
  color: #e2e8f0;
}

.section-dark .section-intro,
.section-dark .feature p,
.section-dark .feature li {
  color: #cbd5e1;
}

.section-dark .card {
  background: rgba(11, 31, 51, 0.74);
  border-color: rgba(148, 163, 184, 0.25);
}

.section h2 {
  font-size: clamp(1.5rem, 2.3vw, 2.2rem);
}

.section-intro {
  margin-top: 0.68rem;
  color: var(--ink-soft);
  max-width: 64ch;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 0.92rem;
  margin-top: 1.1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature {
  padding: 1.05rem;
}

.feature h3 {
  font-size: 1.05rem;
}

.feature p,
.feature li {
  color: #475569;
  font-size: 0.92rem;
}

.feature ul {
  margin: 0.65rem 0 0;
  padding-left: 1rem;
}

.feature ol {
  margin: 0.65rem 0 0;
  padding-left: 1.15rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.split-70 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  align-items: start;
}

.terminal-shot {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

.web-ui-start {
  margin-top: 1rem;
  border-color: rgba(13, 148, 136, 0.24);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(238, 251, 247, 0.86)),
    radial-gradient(circle at 100% 0, rgba(13, 148, 136, 0.14), transparent 45%);
}

/* ============================================
   CLIMAX SECTION
   ============================================ */
.climax-section {
  min-height: 72vh;
  max-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 24%, rgba(34, 211, 238, 0.22), transparent 36%),
    radial-gradient(circle at 86% 70%, rgba(244, 114, 182, 0.2), transparent 34%),
    linear-gradient(130deg, #071525 0%, #102d44 38%, #0d9488 100%);
}

.climax-section::before {
  color: rgba(226, 232, 240, 0.82);
}

.climax-section.section-dark.chapter.chapter-active {
  background:
    radial-gradient(circle at 15% 24%, rgba(34, 211, 238, 0.22), transparent 36%),
    radial-gradient(circle at 86% 70%, rgba(244, 114, 182, 0.2), transparent 34%),
    linear-gradient(130deg, #071525 0%, #102d44 38%, #0d9488 100%);
}

.climax-wrap {
  text-align: center;
  max-width: 900px;
  padding: 2.2rem 0;
}

.climax-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
  color: rgba(191, 219, 254, 0.92);
  font-weight: 700;
}

.climax-title {
  margin-top: 0.7rem;
  font-size: clamp(2.3rem, 8vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  background: none !important;
  transition: none !important;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal;
  position: relative;
  z-index: 1;
  text-wrap: balance;
  text-shadow: 0 18px 38px rgba(2, 6, 23, 0.46);
}

.climax-subtitle {
  margin: 1.05rem auto 0;
  max-width: 62ch;
  color: rgba(226, 232, 240, 0.95);
  font-size: 1.02rem;
}

.climax-wrap .hero-actions {
  justify-content: center;
}

.cta {
  margin-top: 1.25rem;
  padding: 1.2rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(237, 251, 248, 0.88)),
    radial-gradient(circle at 0 100%, rgba(13, 148, 136, 0.18), transparent 45%);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.95rem;
}

.kpi {
  border-radius: 12px;
  padding: 0.86rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.kpi .v {
  font-weight: 800;
  font-size: 1.16rem;
}

.kpi .l {
  font-size: 0.82rem;
  color: #475569;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.badge {
  padding: 0.64rem 0.76rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  font-size: 0.82rem;
}

.compare-board {
  margin-top: 1rem;
  display: grid;
  gap: 0.7rem;
}

.compare-head,
.compare-row {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  align-items: center;
}

.compare-head {
  padding: 0 0.2rem;
}

.compare-head span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: #0f766e;
}

.compare-row {
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  padding: 0.72rem;
  background:
    radial-gradient(circle at 0 0, rgba(13, 148, 136, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.86);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.compare-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.8), rgba(11, 95, 255, 0.7));
}

.compare-row:hover {
  transform: translateY(-2px);
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: 0 14px 28px rgba(10, 37, 64, 0.12);
}

.compare-capability {
  margin: 0;
  padding-left: 0.4rem;
  font-size: 0.96rem;
  line-height: 1.25;
  color: #0f172a;
}

.compare-value {
  margin: 0;
  padding: 0.46rem 0.58rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.83rem;
  font-weight: 600;
  text-align: center;
}

.compare-value.is-low {
  color: #7f1d1d;
  background: rgba(239, 68, 68, 0.11);
  border-color: rgba(185, 28, 28, 0.2);
}

.compare-value.is-mid {
  color: #78350f;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(180, 83, 9, 0.2);
}

.compare-value.is-high {
  color: #065f46;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(6, 120, 90, 0.24);
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.84rem;
}

.logo-chip {
  font-size: 0.82rem;
  border: 1px solid var(--line);
  padding: 0.45rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
}

.ticker {
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  border-left: 3px solid rgba(20, 184, 166, 0.65);
  padding: 0.48rem 0.72rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 9px;
  font-size: 0.82rem;
  color: #e2e8f0;
  white-space: nowrap;
}

.muted-link {
  color: #475569;
  text-decoration: none;
}

.muted-link:hover {
  color: var(--primary-dark);
}

.mono {
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.footer {
  position: relative;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  padding: 2.2rem 0 2.4rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.86)),
    radial-gradient(circle at 0 0, rgba(13, 148, 136, 0.08), transparent 42%);
}

.footer::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1120px, calc(100% - 2.2rem));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    rgba(13, 148, 136, 0.2),
    rgba(11, 95, 255, 0.24),
    rgba(234, 88, 12, 0.2)
  );
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr;
  gap: 1.1rem 1.3rem;
  align-items: start;
}

.footer-shell {
  display: grid;
  gap: 1rem;
}

.footer-main {
  padding-top: 0.25rem;
}

.footer section {
  min-width: 0;
}

.footer h4 {
  margin: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #0f766e;
  opacity: 0.9;
}

.footer a {
  display: inline-block;
  margin-top: 0.46rem;
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  min-height: 30px;
  border-bottom: 1px solid transparent;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

.footer a:hover {
  color: #0f766e;
  border-bottom-color: rgba(13, 148, 136, 0.35);
}

.footer a:focus-visible {
  outline: 2px solid rgba(11, 95, 255, 0.42);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer .section-intro {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #475569;
  max-width: 34ch;
}

.footer .microcopy {
  margin-top: 0.62rem;
  font-size: 0.78rem;
  color: #64748b;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  padding-top: 0.9rem;
}

.footer-meta p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}

.footer-meta-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.footer-meta-links a {
  margin-top: 0;
  font-size: 0.78rem;
  color: #475569;
  border-bottom-color: rgba(71, 85, 105, 0.2);
}

body.has-intro-motion .topbar,
body.has-intro-motion main,
body.has-intro-motion .footer {
  opacity: 0;
  transform: translateY(10px);
}

body.has-intro-motion.is-ready .topbar,
body.has-intro-motion.is-ready main,
body.has-intro-motion.is-ready .footer {
  opacity: 1;
  transform: none;
  transition:
    opacity 300ms ease,
    transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.has-intro-motion.is-ready main {
  transition-delay: 70ms;
}
body.has-intro-motion.is-ready .footer {
  transition-delay: 110ms;
}

.hero-grid > *,
.grid-2 > .card,
.grid-3 > .card,
.grid-4 > .card,
.split > .card,
.split-70 > .card {
  animation: fade-up 600ms ease both;
}

.hero-grid > *:nth-child(2),
.grid-2 > .card:nth-child(2),
.grid-3 > .card:nth-child(2),
.grid-4 > .card:nth-child(2) {
  animation-delay: 80ms;
}

.hero-grid > div:first-child {
  min-height: 0;
}

.grid-3 > .card:nth-child(3),
.grid-4 > .card:nth-child(3) {
  animation-delay: 140ms;
}

.grid-4 > .card:nth-child(4) {
  animation-delay: 200ms;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   ABOUT PAGE STYLES
   ============================================ */

.about-hero {
  padding-top: 3rem;
}

.about-hero-shell {
  padding: 1.35rem;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.94), rgba(236, 251, 247, 0.9)),
    radial-gradient(circle at 100% 0, rgba(13, 148, 136, 0.15), transparent 42%);
}

.about-hero-shell h1 {
  max-width: 18ch;
}

.about-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
  padding: 0.3rem 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.about-cycler-word {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.82em;
  background: linear-gradient(
    90deg,
    rgba(13, 148, 136, 0.24),
    rgba(11, 95, 255, 0.18),
    rgba(234, 88, 12, 0.22)
  );
  color: #0f172a;
  min-width: 8.4ch;
  text-align: center;
}

.about-cycler-word.is-animated {
  animation: pulse-word 420ms ease;
}

.about-role-switcher {
  margin-top: 0.9rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.about-role-btn {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.84);
  color: #0f172a;
  border-radius: 999px;
  padding: 0.4rem 0.68rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.about-role-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 148, 136, 0.4);
}

.about-role-btn.is-active {
  color: #ffffff;
  border-color: rgba(11, 95, 255, 0.34);
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.96), rgba(11, 95, 255, 0.95));
  box-shadow: 0 8px 20px rgba(11, 95, 255, 0.26);
}

.about-stats {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.about-stat {
  padding: 0.72rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.about-stat strong {
  display: block;
  font-size: 0.96rem;
  color: #0f172a;
}

.about-stat span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #475569;
}

.about-card {
  padding: 1.2rem;
}

.about-photo-card {
  text-align: center;
}

.about-photo {
  width: min(340px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
}

.about-timeline {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
}

.about-timeline-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  opacity: 0;
  transform: translateY(14px);
  transition:
    transform 520ms ease,
    opacity 520ms ease,
    border-color 220ms ease;
}

.about-timeline-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.about-timeline-item:hover {
  border-color: rgba(13, 148, 136, 0.35);
}

.about-year {
  display: inline-grid;
  place-items: center;
  padding: 0.35rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.2), rgba(11, 95, 255, 0.18));
}

.about-timeline-item h3 {
  font-size: 1rem;
}

.about-timeline-item p {
  margin-top: 0.3rem;
}

.about-highlights {
  padding: 1.25rem;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(237, 248, 255, 0.86)),
    radial-gradient(circle at 100% 0, rgba(11, 95, 255, 0.14), transparent 45%);
}

.about-highlight-mosaic {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.72rem;
}

.about-highlight-tile {
  --hx: 20%;
  --hy: 0%;
  position: relative;
  overflow: hidden;
  grid-column: span 4;
  min-height: 170px;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 0.92rem;
  background:
    radial-gradient(circle at var(--hx) var(--hy), rgba(13, 148, 136, 0.18), transparent 52%),
    radial-gradient(circle at 90% 100%, rgba(11, 95, 255, 0.16), transparent 48%),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.about-highlight-tile::after {
  content: '';
  position: absolute;
  inset: auto -32px -58px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.2), transparent 68%);
  pointer-events: none;
}

.about-highlight-tile-featured {
  grid-column: span 8;
  min-height: 220px;
  background:
    radial-gradient(circle at 10% 0, rgba(13, 148, 136, 0.24), transparent 46%),
    radial-gradient(circle at 100% 100%, rgba(11, 95, 255, 0.22), transparent 54%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 251, 247, 0.92));
}

.about-highlight-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f766e;
}

.about-highlight-tile h3 {
  margin-top: 0.4rem;
  font-size: 1.02rem;
  line-height: 1.25;
}

.about-highlight-tile p {
  margin-top: 0.5rem;
  color: #334155;
  max-width: 34ch;
}

.about-highlight-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(13, 148, 136, 0.34);
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.14);
}

.about-stage {
  padding: var(--section-y) 0;
}
