/* ============================================
   MURMUR DESIGN TOKENS
   ============================================ */
:root {
  --bg: #1A1816;
  --surface: #22201D;
  --surface-hover: #2D2A26;
  --border: #3D3630;
  --border-subtle: rgba(255,255,255,0.06);
  --text-primary: #E8E2DA;
  --text-secondary: #A69985;
  --text-muted: #73676D;
  --accent: #C8A064;
  --success: #7EC896;
  --error: #D4756A;
  --warning: #D4A054;
  --info: #6BA3BE;
  --purple: #9B7DB8;
  --teal: #6BA3BE;
  --deep-tan: #856B4E;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Spacing (4pt grid) */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-4xl: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   LIGHT MODE — Manual toggle override
   ============================================ */
html[data-theme="light"] {
  --bg: #F5F2EE;
  --surface: #EBE7E1;
  --surface-hover: #E2DDD6;
  --border: #D1C9BE;
  --border-subtle: rgba(0,0,0,0.06);
  --text-primary: #3D3630;
  --text-secondary: #736B5F;
  --text-muted: #A09790;
  --accent: #A07830;
  --success: #3D8A5A;
  --error: #B8483E;
  --warning: #B08030;
  --info: #3D7A8F;
  --purple: #7B5D9E;
  --teal: #3D7A8F;
  --deep-tan: #A68860;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F5F2EE;
    --surface: #EBE7E1;
    --surface-hover: #E2DDD6;
    --border: #D1C9BE;
    --border-subtle: rgba(0,0,0,0.06);
    --text-primary: #3D3630;
    --text-secondary: #736B5F;
    --text-muted: #A09790;
    --accent: #A07830;
    --success: #3D8A5A;
    --error: #B8483E;
    --warning: #B08030;
    --info: #3D7A8F;
    --purple: #7B5D9E;
    --teal: #3D7A8F;
    --deep-tan: #A68860;
  }
}


/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-secondary);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: rgba(200, 160, 100, 0.3);
  color: var(--text-primary);
}

html[data-theme="light"] ::selection {
  background: rgba(160, 120, 48, 0.25);
}

a {
  color: var(--accent);
  text-decoration: none;
}

strong {
  color: var(--text-primary);
  font-weight: 500;
}

em {
  font-style: italic;
  color: var(--text-primary);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--accent);
  border: 1px solid var(--border-subtle);
}


/* ============================================
   HERO
   ============================================ */
.hero {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.hero__title-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  flex-shrink: 0;
}

.hero__orbital {
  width: 100%;
  height: 100vh;
  flex-shrink: 0;
  position: relative;
}

.hero__orbital canvas {
  width: 100%;
  height: 100%;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__title {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
}

.hero__title-line--1 {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 2vw, 1.25rem);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hero__title-line--2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin-top: var(--sp-2xl);
  font-size: 0.9375rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(20px);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero__subtitle strong {
  color: var(--text-secondary);
}

.hero__scroll-hint {
  position: absolute;
  bottom: var(--sp-2xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  opacity: 0;
}

.hero__scroll-dot {
  animation: hero-scroll-bob 2s ease-in-out infinite;
}

@keyframes hero-scroll-bob {
  0%, 100% { cy: 8; }
  50% { cy: 16; }
}


/* ============================================
   PROLOGUE
   ============================================ */
.prologue {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-xl);
  position: relative;
  overflow: hidden;
}

.prologue::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(200,160,100,0.04) 0%, transparent 70%);
  pointer-events: none;
}

html[data-theme="light"] .prologue::before {
  background: radial-gradient(ellipse at center, rgba(160,120,48,0.04) 0%, transparent 70%);
}


.prologue__content {
  max-width: 700px;
}

.prologue__line {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3.5vw, 2.5rem);
  color: var(--text-secondary);
  line-height: 1.4;
  opacity: 0;
  transform: translateY(20px);
  font-style: italic;
}

.prologue__line--2 {
  margin-top: var(--sp-lg);
  color: var(--text-primary);
  font-style: normal;
  font-weight: 700;
}


/* ============================================
   TYPOGRAPHY SCALE
   ============================================ */
.act__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.act__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.15;
  margin-top: var(--sp-sm);
}

.step__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-block;
  margin-bottom: var(--sp-sm);
}

.step__label--teal { color: var(--teal); }
.step__label--purple { color: var(--purple); }
.step__label--gold { color: var(--accent); }

.step__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-md);
}

.step__body {
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: 36ch;
}


/* ============================================
   LAYOUT — SECTIONS
   ============================================ */
.act {
  padding: var(--sp-4xl) var(--sp-xl);
  max-width: 1200px;
  margin: 0 auto;
}

.act__header {
  margin-bottom: var(--sp-3xl);
  opacity: 0;
  transform: translateY(30px);
}

.act__header.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}


/* ============================================
   SCROLLYTELLING — Pudding.cool style
   ============================================ */
.scrolly {
  position: relative;
  display: flex;
  gap: var(--sp-xl);
}

.scrolly__graphic {
  position: sticky;
  top: 0;
  width: 50%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg);
  border-radius: var(--radius-lg);
}

.scrolly__graphic-inner {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
}

.scrolly__graphic-inner--wide {
  max-width: 560px;
  aspect-ratio: 4 / 3;
}

.scrolly__text {
  width: 50%;
  padding: 40vh 0;
}

.scrolly__step {
  min-height: 60vh;
  padding: var(--sp-2xl) var(--sp-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0.15;
  transition: opacity 0.6s var(--ease-out);
}

.scrolly__step.is-active {
  opacity: 1;
}


/* ============================================
   ACT INTRO TEXT
   ============================================ */
.act-3__intro,
.act-4__intro,
.act-5__intro {
  max-width: 640px;
  margin-bottom: var(--sp-3xl);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.act-3__intro p + p,
.act-4__intro p + p,
.act-5__intro p + p {
  margin-top: var(--sp-md);
}


/* ============================================
   PULL QUOTE
   ============================================ */
.pull-quote {
  padding: var(--sp-4xl) var(--sp-xl);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.pull-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
}

.pull-quote__highlight {
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
}


/* ============================================
   TOOL GALLERY — 8-card grid
   ============================================ */
.tool-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
  margin-bottom: var(--sp-4xl);
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out), border-color 0.3s;
}

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

.tool-card:hover {
  border-color: var(--border);
}

.tool-card__preview {
  height: 120px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.tool-card__preview svg {
  width: 80%;
  height: 80%;
}

.tool-card__mono {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: var(--sp-md) var(--sp-md) 0;
}

.tool-card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--text-primary);
  padding: var(--sp-xs) var(--sp-md) var(--sp-xs);
  font-weight: 400;
}

.tool-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0 var(--sp-md);
  line-height: 1.55;
}

.tool-card__stat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent);
  padding: var(--sp-sm) var(--sp-md) var(--sp-md);
  letter-spacing: 0.05em;
}


/* ============================================
   STAT ROW — Big counting numbers
   ============================================ */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
  padding: var(--sp-4xl) 0;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin: var(--sp-2xl) 0;
}

.stat-row__item {
  opacity: 0;
  transform: translateY(20px);
}

.stat-row__item.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.stat-row__number {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* No automatic ::after — suffixes handled by JS */

.stat-row__label {
  display: block;
  margin-top: var(--sp-sm);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}


/* ============================================
   CODE WINDOW — Terminal-styled block
   ============================================ */
.code-window {
  max-width: 700px;
  margin: var(--sp-3xl) auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  opacity: 0;
  transform: translateY(20px);
}

.code-window.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.code-window__header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
}

.code-window__dots {
  display: flex;
  gap: 6px;
}

.code-window__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.code-window__dots span:first-child { background: #D4756A; opacity: 0.6; }
.code-window__dots span:nth-child(2) { background: #D4A054; opacity: 0.6; }
.code-window__dots span:last-child { background: #7EC896; opacity: 0.6; }

.code-window__filename {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-window__body {
  padding: var(--sp-lg);
  overflow-x: auto;
}

.code-window__code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre;
}

.code-window__code code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.code-window__caption {
  padding: var(--sp-sm) var(--sp-md) var(--sp-md);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}


/* ============================================
   COMPARISON — Side by Side
   ============================================ */
.comparison {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 900px;
  margin: var(--sp-3xl) auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(30px);
}

.comparison.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.comparison__side {
  flex: 1;
  padding: var(--sp-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.comparison__side--left {
  background: var(--surface);
}

.comparison__side--right {
  background: var(--bg);
  border-left: 1px solid var(--border);
}

.comparison__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.comparison__label--gold {
  color: var(--accent);
}

.comparison__content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comparison__instruction {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: left;
}

.comparison__content--code {
  align-items: flex-start;
}

.comparison__code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.9;
  color: var(--accent);
  white-space: pre;
}

.comparison__code code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.comparison__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  flex-shrink: 0;
  background: var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.comparison__caption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--sp-md);
  padding: 0 var(--sp-xl);
}


/* ============================================
   TIMELINE
   ============================================ */
.timeline-section {
  padding: var(--sp-3xl) 0;
}

.timeline {
  max-width: 900px;
  margin: 0 auto;
  min-height: 500px;
}

.timeline svg {
  width: 100%;
  height: 100%;
}


/* ============================================
   EMBEDDED PROTOTYPE
   ============================================ */
.prototype-section {
  margin: var(--sp-3xl) calc(-1 * var(--sp-xl));
  padding: var(--sp-2xl) var(--sp-xl);
}

.prototype__header {
  text-align: center;
  margin-bottom: var(--sp-2xl);
}

.prototype__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text-primary);
  margin-bottom: var(--sp-sm);
}

.prototype__desc {
  max-width: 600px;
  margin: 0 auto;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.prototype__frame {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.prototype__frame.is-visible {
  opacity: 1;
  transform: scale(1);
}

.prototype__frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.prototype__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  transition: opacity 0.4s var(--ease-out);
  z-index: 1;
}

.prototype__placeholder.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.prototype__placeholder-content {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.prototype__spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--sp-md);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.prototype__fallback {
  text-align: center;
  margin-top: var(--sp-md);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.prototype__fallback a {
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 0.3s;
}

.prototype__fallback a:hover {
  opacity: 1;
}


/* ============================================
   EPILOGUE
   ============================================ */
.epilogue {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-xl);
  position: relative;
  overflow: hidden;
}

.epilogue__illustration {
  width: 100%;
  max-width: 700px;
  aspect-ratio: 1;
  position: relative;
}

.epilogue__illustration canvas {
  width: 100%;
  height: 100%;
}

.epilogue__content {
  max-width: 700px;
  margin-top: var(--sp-2xl);
}

.epilogue__line {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(15px);
}

.epilogue__line--gold {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  color: var(--accent);
  font-weight: 700;
}


/* ============================================
   ESSAY NAV
   ============================================ */
.essay-nav {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--sp-3xl) var(--sp-xl) var(--sp-2xl);
  display: flex;
  gap: var(--sp-md);
}

.essay-nav__link {
  display: block;
  flex: 1;
  padding: var(--sp-lg) var(--sp-2xl);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.essay-nav__link--prev {
  text-align: left;
}

.essay-nav__link--collection {
  text-align: right;
}

.essay-nav__link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.essay-nav__direction {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-xs);
}

.essay-nav__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-xs);
}

.essay-nav__desc {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-xl);
  border-top: 1px solid var(--border-subtle);
}

.footer__credit {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__credit strong {
  color: var(--text-secondary);
}

.footer__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--sp-xs);
}


/* ============================================
   CUSTOM SCROLLBARS
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(61, 54, 48, 0.6); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(166, 153, 133, 0.5); }
::-webkit-scrollbar-thumb:active { background: rgba(200, 160, 100, 0.4); }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: rgba(61, 54, 48, 0.6) transparent; }

html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(209, 201, 190, 0.7);
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(160, 120, 48, 0.4);
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:active {
  background: rgba(160, 120, 48, 0.5);
}
html[data-theme="light"] * {
  scrollbar-color: rgba(209, 201, 190, 0.7) transparent;
}


/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease, transform 0.15s ease;
  padding: 0;
  outline: none;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.06);
}
.theme-toggle:active {
  transform: scale(0.95);
}
.theme-toggle svg {
  display: block;
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .tool-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .scrolly {
    flex-direction: column;
  }

  .scrolly__graphic {
    position: sticky;
    width: 100%;
    height: 50vh;
  }

  .scrolly__graphic-inner {
    max-width: 300px;
  }

  .scrolly__graphic-inner--wide {
    max-width: 400px;
  }

  .scrolly__text {
    width: 100%;
    padding: 20vh var(--sp-md);
  }

  .scrolly__step {
    min-height: 50vh;
  }

  .step__body {
    max-width: none;
  }

  .tool-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-sm);
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md);
  }

  .comparison {
    flex-direction: column;
  }

  .comparison__divider {
    width: 100%;
    height: 32px;
  }

  .essay-nav {
    flex-direction: column;
  }

  .essay-nav__link--collection {
    text-align: left;
  }

  .act {
    padding: var(--sp-3xl) var(--sp-md);
  }
}

@media (max-width: 600px) {
  .prologue__line {
    font-size: 1.25rem;
  }

  .tool-gallery {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .prototype__frame {
    aspect-ratio: 9 / 16;
  }

  .code-window__body {
    padding: var(--sp-md);
  }

  .code-window__code {
    font-size: 0.625rem;
  }
}
