/* ============================================
   Tokens
   ============================================ */
:root {
  /* accent (default: blue from design system) */
  --accent: oklch(0.66 0.17 250);
  --accent-soft: oklch(0.66 0.17 250 / 0.14);
  --accent-gold: oklch(0.78 0.14 80);
  --accent-gold-soft: oklch(0.78 0.14 80 / 0.14);
  --accent-neutral: oklch(0.72 0.005 250);

  /* display font swap */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-display-style: italic;
  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* density */
  --section-pad-y: 160px;
  --section-pad-x: clamp(24px, 5vw, 96px);
  --gap-lg: 48px;
  --gap-md: 32px;
  --gap-sm: 16px;

  /* motion */
  --t-fast: 180ms;
  --t: 320ms;
  --t-slow: 640ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-density="compact"] {
  --section-pad-y: 96px;
  --gap-lg: 32px;
  --gap-md: 24px;
  --gap-sm: 12px;
}

/* ============================================
   Theme
   ============================================ */
[data-theme="dark"] {
  --bg: oklch(0.16 0.01 250);
  --bg-2: oklch(0.19 0.01 250);
  --bg-3: oklch(0.23 0.01 250);
  --fg: oklch(0.96 0.005 250);
  --fg-2: oklch(0.72 0.01 250);
  --fg-3: oklch(0.5 0.01 250);
  --line: oklch(0.3 0.01 250 / 0.7);
  --line-soft: oklch(0.3 0.01 250 / 0.35);
  --card: oklch(0.21 0.01 250);
  --card-hover: oklch(0.25 0.01 250);
  --backdrop: oklch(0.16 0.01 250 / 0.85);
}

[data-theme="light"] {
  --bg: oklch(0.97 0.004 80);
  --bg-2: oklch(0.94 0.005 80);
  --bg-3: oklch(0.91 0.006 80);
  --fg: oklch(0.2 0.015 250);
  --fg-2: oklch(0.42 0.01 250);
  --fg-3: oklch(0.6 0.01 250);
  --line: oklch(0.2 0.015 250 / 0.22);
  --line-soft: oklch(0.2 0.015 250 / 0.1);
  --card: oklch(1 0 0);
  --card-hover: oklch(0.99 0.003 80);
  --backdrop: oklch(0.97 0.004 80 / 0.85);
}

/* accent variants */
[data-accent="gold"] { --accent: oklch(0.78 0.14 80); --accent-soft: oklch(0.78 0.14 80 / 0.14); }
[data-accent="magenta"] { --accent: oklch(0.68 0.22 340); --accent-soft: oklch(0.68 0.22 340 / 0.14); }
[data-accent="mint"] { --accent: oklch(0.78 0.12 165); --accent-soft: oklch(0.78 0.12 165 / 0.14); }

/* display font variants */
[data-font="sans"] {
  --font-display: 'Inter Tight', sans-serif;
  --font-display-style: normal;
}

/* motion settings */
[data-motion="reduced"] { --t: 200ms; --t-slow: 300ms; }
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* ============================================
   Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.serif-italic { font-family: var(--font-display); font-style: var(--font-display-style); font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); font-weight: 400; font-size: 0.78rem; letter-spacing: 0.02em; text-transform: uppercase; }

/* selection */
::selection { background: var(--accent); color: var(--bg); }

/* ============================================
   Cursor blob
   ============================================ */
.cursor-blob {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  transition: width var(--t) var(--ease), height var(--t) var(--ease), opacity var(--t), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  opacity: 0;
}
.cursor-blob::after {
  content: '';
  color: transparent;
  font-family: 'Outfit', var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.cursor-blob.visible { opacity: 0.7; }
.cursor-blob.hover { width: 64px; height: 64px; opacity: 0.9; }
body.archive-cursor-view .cursor-blob {
  width: 72px;
  height: 72px;
  opacity: 1;
  background: #1597ff;
  color: #fff;
  mix-blend-mode: normal;
}
body.archive-cursor-view .cursor-blob::after {
  content: 'view';
  color: #fff;
}
body.no-cursor .cursor-blob { display: none; }

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

/* ============================================
   Nav
   ============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--section-pad-x);
  background: var(--backdrop);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease), padding var(--t) var(--ease);
}
.nav.scrolled {
  padding: 12px var(--section-pad-x);
  border-bottom-color: var(--line-soft);
}

.nav-logo {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.logo-serif { font-family: var(--font-display); font-style: italic; font-size: 1.55rem; color: var(--accent); line-height: 1; }
.logo-sans { font-weight: 500; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  position: relative;
  font-size: 0.92rem;
  color: var(--fg-2);
  transition: color var(--t-fast) var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-right { display: flex; gap: 8px; align-items: center; }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-grid; place-items: center;
  font-size: 1.1rem;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover { background: var(--card-hover); border-color: var(--fg-2); }
.theme-toggle .theme-icon-dark,
.theme-toggle .theme-icon-light {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}
[data-theme="dark"] .theme-icon-light { opacity: 0; transform: rotate(45deg) scale(0.6); }
[data-theme="light"] .theme-icon-dark { opacity: 0; transform: rotate(-45deg) scale(0.6); }

.tweaks-pill {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.tweaks-pill:hover { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ============================================
   Page transition
   ============================================ */
.page-transition {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  transform: translateY(-100%);
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.page-transition.enter {
  animation: page-in var(--t-slow) var(--ease) forwards;
}
.page-transition.exit {
  animation: page-out var(--t-slow) var(--ease) forwards;
}
@keyframes page-in {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}
@keyframes page-out {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}
.page-transition-inner { display: flex; align-items: center; gap: 10px; color: var(--fg-2); }
.page-transition-label { font-size: 0.8rem; }
.page-transition-inner::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: pulse 0.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(0.6); opacity: 0.4; }
  50% { transform: scale(1); opacity: 1; }
}

/* ============================================
   Routes
   ============================================ */
.route { display: block; }
.route[hidden] { display: none; }

/* ============================================
   Home — single column (hero + stacked sections)
   ============================================ */
#home.route {
  min-height: 100%;
  --home-max-w: 1200px;
  --home-section-gap: clamp(64px, 9vh, 120px);
}
#home .hero.hero-about {
  min-height: 0;
  justify-content: flex-start;
  padding: clamp(104px, 12vh, 144px) var(--section-pad-x) clamp(56px, 8vh, 96px);
}
#home .hero-about .hero-grid {
  width: 100%;
  max-width: var(--home-max-w);
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 2.2vw, 32px);
}
#home .hero-about .hero-name {
  flex: 1 1 0;
  max-width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#home .hero-about .hero-bio {
  max-width: min(72ch, 100%);
}
#home .hero-about .hero-cta {
  margin-top: 34px;
}
#home .hero-about .hero-photo {
  flex: 0 1 min(400px, 40vw);
  max-width: min(400px, 100%);
}
#home .hero-photo-frame--cutout {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
  aspect-ratio: auto;
  min-height: 0;
  overflow: visible;
  isolation: isolate;
}
#home .hero-photo-frame--cutout img {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 660px);
  object-fit: contain;
  object-position: center;
}
/* sparkle stars around the photo */
.hero-photo-sparkle {
  position: absolute;
  font-size: 1.6rem;
  color: var(--fg);
  z-index: 3;
  animation: sparkle-spin 6s linear infinite;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.hero-photo-sparkle.s1 {
  top: 8%;
  left: 2%;
  font-size: 1.9rem;
  animation-duration: 7s;
  animation-direction: normal;
}
.hero-photo-sparkle.s2 {
  bottom: 18%;
  right: -2%;
  font-size: 1.3rem;
  animation-duration: 5s;
  animation-direction: reverse;
  animation-delay: -2.5s;
}
@keyframes sparkle-spin {
  0%   { transform: rotate(0deg) scale(1);    opacity: 1; }
  25%  { transform: rotate(90deg) scale(0.8); opacity: 0.7; }
  50%  { transform: rotate(180deg) scale(1);  opacity: 1; }
  75%  { transform: rotate(270deg) scale(0.8);opacity: 0.7; }
  100% { transform: rotate(360deg) scale(1);  opacity: 1; }
}

/* Sections after hero: constrained width + generous gap */
#home > section:not(.hero) {
  max-width: var(--home-max-w);
  margin-inline: auto;
  width: 100%;
  padding-left: var(--section-pad-x);
  padding-right: var(--section-pad-x);
  box-sizing: border-box;
}
#home > section:not(.hero) + section:not(.hero) {
  margin-top: var(--home-section-gap);
}

#home .news {
  padding-top: 0;
  padding-bottom: 0;
}
#home .skills.skills-about {
  padding-top: 0;
  padding-bottom: 0;
}
#home .contact {
  padding-top: 0;
  padding-bottom: clamp(40px, 6vh, 80px);
  max-width: var(--home-max-w);
}
#home .section-head {
  padding: 0;
  margin-bottom: 18px;
}
#home .news-list {
  padding: 0;
  margin-top: 0;
}
#home .news-item {
  padding: 14px 0;
}
#home .education {
  padding: 0;
}
#home .education > .section-head {
  margin-bottom: 2px;
}
#home .about-edu-folders {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}
#home .about-edu-folders .edu-svg {
  width: min(100%, 720px);
  height: auto;
  max-height: min(42vh, 420px);
}
#home .contact-big {
  padding: 0;
}
#home .contact-grid,
#home .footer-bottom {
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 900px) {
  #home .hero-about .hero-photo {
    flex-basis: auto;
    max-width: min(340px, 82vw);
  }
}
@media (max-width: 680px) {
  #home .hero-about .hero-grid {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  #home .hero-about .hero-photo {
    max-width: min(260px, 70vw);
    align-self: flex-end;
  }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 140px var(--section-pad-x) var(--section-pad-y);
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero-grid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero > .hero-grid,
.hero > .hero-ticker {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: flex;
  flex-direction: row;
  gap: var(--gap-lg);
  align-items: center;
  justify-content: center;
}

.hero-name {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(9000px, 100%);
}
.hero-photo {
  flex: 0 1 500px;
  max-width: min(380px, 100%);
}

@media (max-width: 900px) {
  .hero-grid {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-photo {
    align-self: center;
    flex-basis: auto;
    width: min(380px, 100%);
  }
}

.hero-meta {
  display: flex; flex-direction: column; gap: 10px;
  color: var(--fg-3);
}
.meta-row { display: flex; gap: 14px; align-items: baseline; }
.meta-k { color: var(--accent); font-weight: 500; }
.meta-v { color: var(--fg-2); text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 0.88rem; }

.hero-kicker { color: var(--fg-3); margin-bottom: 24px; }

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 10vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.hero-title .serif-italic { color: var(--accent); display: inline-block; padding-right: 0.08em; }

.hero-bio {
  margin-top: 36px;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.5;
  max-width: 56ch;
  color: var(--fg);
}
.hero-bio em { font-size: 1.75rem; color: var(--accent); }

.hero-cta {
  margin-top: 40px;
  display: flex; gap: 12px; flex-wrap: wrap;
}

.hero-photo {
  display: flex; justify-content: center;
  align-items: center;
}
.hero-photo-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  isolation: isolate;
}
.hero-photo-frame img {
  position: absolute;
  inset: -6% -5% 0;
  width: 110%;
  height: 110%;
  object-fit: contain;
  object-position: bottom center;
  z-index: 2;
  transition: transform var(--t-slow) var(--ease);
}

@keyframes blob {
  0%, 100% { border-radius: 50% 40% 45% 55% / 40% 55% 45% 60%; transform: scale(1); }
  33% { border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%; transform: scale(1.05) translate(4px, -6px); }
  66% { border-radius: 60% 40% 35% 65% / 50% 60% 40% 50%; transform: scale(0.98) translate(-4px, 4px); }
}


.hero-photo-badge {
  position: absolute;
  z-index: 4;
  bottom: 16px; left: 16px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.7rem;
  color: var(--fg);
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: oklch(0.7 0.2 145);
  box-shadow: 0 0 8px oklch(0.7 0.2 145);
  animation: blink 1.8s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-ticker {
  margin-top: 80px;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.ticker-track {
  display: flex; gap: 48px; align-items: center;
  white-space: nowrap;
  animation: ticker 60s linear infinite;
  font-family: var(--font-display); font-style: italic;
  font-size: 1.5rem;
  color: var(--fg-2);
}
.ticker-track span:nth-child(even) { color: var(--accent); font-family: var(--font-sans); font-style: normal; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   Section heads
   ============================================ */
.section-head {
  padding: 0 var(--section-pad-x);
  max-width: 1400px;
  margin: 0 auto 64px;
}
.section-head-wide { padding: 0; max-width: none; margin-bottom: 48px; }
.section-kicker {
  color: var(--accent);
  margin-bottom: 20px;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
}
.section-title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.025em;
  max-width: 22ch;
}
.section-title .serif-italic { color: var(--accent); }

/* ============================================
   About
   ============================================ */
.about {
  padding: var(--section-pad-y) 0 var(--section-pad-y);
}
.about-grid {
  padding: 0 var(--section-pad-x);
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-lg);
}
.about-col p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--fg);
}
.about-label { color: var(--accent); margin-bottom: 16px; display: block; }

/* ============================================
   News
   ============================================ */
.news {
  padding: var(--section-pad-y) 0;
}
.news-list {
  padding: 0 var(--section-pad-x);
  max-width: 1400px;
  margin: 0 auto;
  font-family: var(--font-mono);
}
.news-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--gap-md);
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.news-date {
  color: var(--fg-3);
  padding-top: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.news-body { font-size: 1.05rem; line-height: 1.55; }
.news-body em {
  font-family: inherit;
  font-style: normal;
  font-weight: 500;
  font-size: 1em;
  line-height: inherit;
  color: var(--fg);
  letter-spacing: 0.02em;
  text-transform: none;
}
.news-body strong {
  font-family: inherit;
  font-weight: 600;
}
.news-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.03em; text-transform: uppercase;
  margin-right: 10px;
  vertical-align: 2px;
}
.news-tag-gold { background: var(--accent-gold-soft); color: var(--accent-gold); }
.news-tag-blue { background: var(--accent-soft); color: var(--accent); }
.news-tag-neutral { background: var(--bg-3); color: var(--fg-2); }

@media (pointer: fine) {
  .news-item--site-preview:hover { cursor: none; }
}

body.site-preview-active .cursor-blob {
  opacity: 0;
}

#floating-preview-card {
  position: fixed;
  left: 0;
  top: 0;
  width: 320px;
  height: 200px;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  z-index: 100000;
  opacity: 0;
  transform: translate(-50%, -75%) scale(0.96);
  transition: opacity 180ms var(--ease), transform 220ms var(--ease);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px oklch(0 0 0 / 0.12), 0 2px 10px oklch(0 0 0 / 0.06);
  background: var(--card);
  border: 1px solid var(--line-soft);
}
#floating-preview-card.is-visible {
  opacity: 1;
  transform: translate(-50%, -75%) scale(1);
}
.floating-preview-chrome {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11px;
  color: var(--fg-2);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-soft);
}
.floating-preview-shot {
  flex: 1;
  min-height: 0;
  background: var(--bg-3);
}
.floating-preview-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-motion="reduced"] #floating-preview-card,
[data-motion="off"] #floating-preview-card {
  transition-duration: 0.001ms;
}

@media (max-width: 720px) {
  .news-item { grid-template-columns: 1fr; gap: 8px; }
}

/* ============================================
   Works
   ============================================ */
.works {
  padding: var(--section-pad-y) 0;
}
.works-sticky {
  position: sticky;
  top: 64px;
  z-index: 10;
  background: var(--backdrop);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 32px var(--section-pad-x) 24px;
  border-bottom: 1px solid var(--line-soft);
  transition: padding var(--t) var(--ease);
}
.works-sticky .section-head { padding: 0; margin-bottom: 28px; }

.track-tabs {
  display: flex; 
  flex-wrap: wrap;
  gap: 8px;
}
.track-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.9rem;
  color: var(--fg-2);
  transition: all var(--t-fast) var(--ease);
  position: relative;
}
.track-tab:hover { color: var(--fg); border-color: var(--fg-2); }
.track-tab.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tab-count { font-size: 0.7rem; opacity: 0.7; }
.tab-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fg-2);
}
.tab-dot-blue { background: oklch(0.66 0.17 250); }
.tab-dot-gold { background: oklch(0.78 0.14 80); }
.tab-dot-neutral { background: oklch(0.72 0.005 250); }

.works-grid {
  padding: 48px var(--section-pad-x) 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap-md);
}
.work-card {
  grid-column: span 6;
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), opacity var(--t) var(--ease);
  opacity: 0;
  transform: translateY(24px);
  animation: card-in var(--t-slow) var(--ease) forwards;
}
.work-card:nth-child(1) { animation-delay: 0.05s; }
.work-card:nth-child(2) { animation-delay: 0.1s; }
.work-card:nth-child(3) { animation-delay: 0.15s; }
.work-card:nth-child(4) { animation-delay: 0.2s; }
.work-card:nth-child(5) { animation-delay: 0.25s; }
.work-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

.work-card.hidden {
  display: none;
}
.work-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.work-card.span-4 { grid-column: span 4; }
.work-card.span-8 { grid-column: span 8; }

.work-media {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: var(--bg-3);
}
.work-media .placeholder { border-radius: 0; }
.work-body {
  padding: 24px 24px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.work-top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  color: var(--fg-3);
}
.work-track-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px;
}
.work-track-research { background: oklch(0.66 0.17 250); }
.work-track-design { background: oklch(0.78 0.14 80); }
.work-track-built { background: oklch(0.72 0.005 250); }
.work-title {
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.work-title em { font-family: var(--font-display); font-style: italic; color: var(--accent); font-weight: 400; }
.work-sub {
  color: var(--fg-2);
  font-size: 0.98rem;
  line-height: 1.4;
}
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.work-tag {
  font-family: var(--font-mono); font-size: 0.65rem;
  padding: 3px 8px; border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.work-arrow {
  position: absolute;
  top: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg);
  display: grid; place-items: center;
  border: 1px solid var(--line);
  transition: transform var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease);
  z-index: 3;
}
.work-card:hover .work-arrow { transform: rotate(-45deg); background: var(--accent); color: var(--bg); border-color: var(--accent); }

.works-cta {
  padding: 72px var(--section-pad-x) 0;
  display: flex; justify-content: center;
}

@media (max-width: 960px) {
  .work-card, .work-card.span-4, .work-card.span-8 { grid-column: span 12; }
  .works-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Placeholders (image stand-ins)
   ============================================ */
.placeholder {
  position: relative;
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0, transparent 14px,
      oklch(0.5 0.01 250 / 0.08) 14px, oklch(0.5 0.01 250 / 0.08) 15px
    ),
    linear-gradient(135deg, var(--bg-2), var(--bg-3));
  display: grid; place-items: center;
  transition: background var(--t) var(--ease);
  min-height: 180px;
}
.placeholder-tall { aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; }
.placeholder-gold {
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0, transparent 14px,
      oklch(0.78 0.14 80 / 0.1) 14px, oklch(0.78 0.14 80 / 0.1) 15px
    ),
    linear-gradient(135deg, oklch(0.78 0.14 80 / 0.04), oklch(0.78 0.14 80 / 0.1));
}
.placeholder-label {
  padding: 6px 12px;
  background: var(--bg);
  color: var(--fg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.7rem;
}

/* ============================================
   Education
   ============================================ */
.education {
  padding: var(--section-pad-y) 0;
  overflow: visible;
}
.education.education-pinned {
  padding: 0;
}
.education-pin-wrap {
  position: relative;
  height: 220vh;
}
.education-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.education-pin-inner {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: clamp(64px, 8vh, 110px);
}
.education-pin-inner > .section-head {
  position: relative;
  z-index: 5;
  margin-bottom: clamp(8px, 1.2vh, 18px);
}
.education-pin-inner > .edu-folders-wrap {
  position: relative;
  z-index: 5;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.education-pin-inner .edu-svg {
  width: min(58vw, 92vh, 780px);
  height: auto;
  max-height: 46vh;
}
@media (max-width: 900px) {
  .education-pin-wrap { height: 200vh; }
  .education-pin { height: 100vh; }
  .education-pin-inner { padding-top: clamp(40px, 6vh, 80px); }
  .education-pin-inner .edu-svg {
    width: min(78vw, 84vh, 640px);
    max-height: 42vh;
  }
}
.edu-svg-layout {
  position: relative;
  padding: 0;
  max-width: none;
  width: 100%;
  overflow: visible;
}
.edu-title-block {
  padding: 0 var(--section-pad-x);
  margin-bottom: 22px;
}
.edu-stack-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.edu-stack-sub {
  color: var(--fg-3);
  font-size: 1rem;
}
.edu-scene {
  display: contents;
}
.edu-svg {
  width: min(70vw, 960px);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
  touch-action: manipulation;
}
.edu-node {
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 0.88s cubic-bezier(0.19, 1, 0.22, 1),
    opacity 0.62s var(--ease),
    filter 0.88s cubic-bezier(0.19, 1, 0.22, 1);
  transform-box: fill-box;
  transform-origin: 50% 75%;
  will-change: transform, opacity, filter;
}
.edu-node > *:not(.edu-hit-area) {
  pointer-events: none;
}
.edu-hit-area {
  pointer-events: all;
  cursor: pointer;
}
#upenn.edu-node { transform: rotate(-2.8deg); }
#davis.edu-node { transform: rotate(6.42deg); }
#upenn.edu-node:focus-visible,
#davis.edu-node:focus-visible {
  outline: none;
  filter: none;
}
.edu-node:focus,
.edu-node:active {
  outline: none;
  filter: none;
}
.edu-scene[data-hover="upenn"]:not([data-active]) #upenn {
  transform: rotate(-2.8deg) translateY(-8px) scale(1.012);
  filter: drop-shadow(0 16px 22px oklch(0 0 0 / 0.18));
}
.edu-scene[data-hover="davis"]:not([data-active]) #davis {
  transform: rotate(6.42deg) translateY(-8px) scale(1.012);
  filter: drop-shadow(0 16px 22px oklch(0 0 0 / 0.18));
}
.edu-scene[data-active="upenn"] #upenn {
  transform: rotate(0deg) translateY(-12px) scale(1.018);
  filter: drop-shadow(0 22px 32px oklch(0 0 0 / 0.23));
}
.edu-scene[data-active="upenn"] #davis {
  opacity: 0.58;
}
.edu-scene[data-active="davis"] #davis {
  transform: rotate(0deg) translateY(-12px) scale(1.018);
  filter: drop-shadow(0 22px 32px oklch(0 0 0 / 0.23));
}
.edu-scene[data-active="davis"] #upenn {
  opacity: 0.58;
}
/* ---- Education popup card ---- */
/* While a folder is open, lift the whole Education block above §03 Skills (later sibling in DOM). */
.education:has(#eduScene[data-active]) {
  position: relative;
  z-index: 40;
}

#skills.skills-about {
  position: relative;
  z-index: 1;
}

.skills-about .section-head{
  margin-top: 40px;
}

.edu-popup {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 24px));
  max-height: min(88dvh, calc(100vh - 96px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 60;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.04) inset,
    0 30px 70px oklch(0 0 0 / 0.16),
    0 6px 16px oklch(0 0 0 / 0.06);
  isolation: isolate;
  animation: edu-popup-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.edu-popup[hidden] { display: none; }
.edu-popup::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 0% 0%, var(--accent-soft) 0%, transparent 55%),
    radial-gradient(80% 60% at 100% 100%, oklch(from var(--fg) l c h / 0.04) 0%, transparent 60%);
  z-index: 0;
}
@keyframes edu-popup-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)) scale(0.985); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.edu-info-panel { display: none; position: relative; z-index: 1; }
.edu-popup[data-active="upenn"] [data-edu-panel="upenn"],
.edu-popup[data-active="davis"] [data-edu-panel="davis"] { display: block; }

.edu-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--fg-2);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  padding: 0;
}
.edu-popup-close:hover {
  color: var(--fg);
  background: oklch(from var(--fg) l c h / 0.06);
  border-color: var(--line);
}

/* Same row as close (left): archive chip replaces the old accent dot */
.edu-popup-panel-head {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 14px 48px 10px 26px;
  position: relative;
}
.edu-popup-panel-head .edu-archive-chip {
  margin-bottom: 0;
}

.edu-card-top {
  padding: 8px 56px 18px 26px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.edu-info-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--fg);
}
.edu-info-degree {
  font-family: 'Bitter', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 0.92rem;
  color: var(--fg-2);
  margin: 0;
  letter-spacing: 0;
}

.edu-card-archive {
  padding: 12px 26px 22px;
  position: relative;
}
.edu-archive-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.edu-archive-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.edu-course-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.edu-course-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  transition: padding var(--t-fast) var(--ease);
}
.edu-course-info {
  min-width: 0;
  flex: 1;
}
.edu-course-item:first-child { border-top: 0; padding-top: 8px; }
.edu-course-item:last-child { padding-bottom: 0; }
.edu-course-name {
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: var(--fg);
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.edu-course-desc {
  font-size: 0.8rem;
  color: var(--fg-3);
  line-height: 1.55;
}
.edu-course-view {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  align-self: center;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), padding-right var(--t-fast) var(--ease), gap var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.edu-course-view:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  gap: 10px;
}

@media (max-width: 760px) {
  #upenn.edu-node,
  #davis.edu-node { transform: none; }
  .edu-scene[data-hover="upenn"]:not([data-active]) #upenn,
  .edu-scene[data-hover="davis"]:not([data-active]) #davis {
    transform: translateY(-6px) scale(1.01);
  }
  .edu-scene[data-active="upenn"] #upenn,
  .edu-scene[data-active="davis"] #davis { transform: translateY(-8px) scale(1.01); }
  .edu-popup {
    position: relative;
    top: auto; left: auto; transform: none;
    width: calc(100% - 16px);
    max-height: min(78dvh, calc(100dvh - 120px));
    margin: 16px auto 0;
    animation: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .edu-popup-panel-head { padding: 12px 48px 8px 22px; }
  .edu-card-top { padding: 8px 50px 16px 22px; }
  .edu-card-archive { padding: 12px 22px 20px; }
  .edu-course-item { flex-direction: column; align-items: flex-start; }
  .edu-course-view { align-self: flex-start; }
}

/* ============================================
   Skills floor (drop animation) + standalone section
   ============================================ */
.skills-floor {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* Top padding clears the section header; bottom keeps pills off the very edge. */
  padding: clamp(120px, 14vh, 180px) var(--section-pad-x) clamp(40px, 5vh, 80px);
}
.skills-floor .skills-pills {
  pointer-events: auto;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  /* Two columns of pills with a huge column-gap reserved for the SVG in the middle.
     The SVG sits in front (higher z-index), so pills naturally "wrap around" it. */
  column-count: 2;
  column-gap: min(58vw, 92vh, 700px);
  column-fill: balance;
}
.skills-floor .skill-pill {
  display: block;
  width: max-content;
  /* `margin-top` is randomized per pill via JS for an irregular vertical rhythm;
     bottom margin keeps a base gap so neighbours never touch. */
  margin: 12px auto 12px;
  break-inside: avoid;
}
.skill-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: #0a0a0a;
  color: #dedede;
  border: 1px solid #0a0a0a;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
[data-theme="dark"] .skill-pill {
  background: #f5f5f5;
  color: #0a0a0a;
  border-color: #f5f5f5;
}
.skill-pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* Skills in #skills: normal flow; after drop, pills settle into a flex row. */
.skills-about .skills-about-floor {
  position: relative;
  inset: auto;
  display: block;
  padding: 0 var(--section-pad-x) 2px;
  pointer-events: auto;
  align-items: stretch;
  justify-content: flex-start;
}
.skills-about .skills-about-floor .skills-pills {
  column-count: unset;
  column-gap: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 1400px;
}
.skills-about .skills-about-floor .skill-pill {
  display: inline-flex;
  width: auto;
  margin: 0;
  break-inside: auto;
}
.skills-about .skills-about-floor.skills-row-settled .skill-pill.is-landed {
  transform: none;
  translate: 0 0;
  rotate: 0deg;
  animation: none;
}
.skills-about .skills-about-floor.skills-row-settled .skill-pill.is-landed:hover {
  animation: none;
  animation-play-state: running;
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* Pre-fall: pills are translated up from their layout position, invisible. */
.skills-floor .skill-pill {
  --fall-x: 0vw;
  --fall-y: -18vh;
  --fall-rot: 0deg;
  --fall-delay: 0ms;
  /* Scatter: per-pill offset + tilt applied to the *settled* position, so the
     final layout looks irregular instead of stacked in tidy columns. */
  --scatter-x: 0px;
  --scatter-y: 0px;
  --scatter-rot: 0deg;
  /* Idle wobble defaults (overridden per-pill via JS). */
  --wobble-x: 1px;
  --wobble-y: 1px;
  --wobble-rot: 0.6deg;
  --wobble-dur: 4s;
  --wobble-delay: 0s;
  opacity: 0;
  transform: translate(var(--fall-x), var(--fall-y)) rotate(var(--fall-rot));
  will-change: transform, opacity, translate, rotate;
  transition: none;
}
.skills-floor.is-falling .skill-pill {
  animation: skill-pill-drop 1.22s cubic-bezier(0.45, 0, 0.55, 1) var(--fall-delay) forwards;
}
.skills-floor .skill-pill.is-landed {
  opacity: 1;
  /* Settled scatter pose carried by `transform`; wobble adds tiny motion via
     the separate `translate`/`rotate` properties so they compose cleanly. */
  transform: translate(var(--scatter-x), var(--scatter-y)) rotate(var(--scatter-rot));
  animation: pill-wobble var(--wobble-dur) ease-in-out var(--wobble-delay) infinite;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.skills-floor .skill-pill.is-landed:hover {
  animation-play-state: paused;
  /* Preserve the scattered tilt while lifting the pill 2px. */
  transform: translate(var(--scatter-x), calc(var(--scatter-y) - 2px)) rotate(var(--scatter-rot));
  border-color: var(--accent);
}

@keyframes skill-pill-drop {
  0% {
    transform: translate(var(--fall-x), var(--fall-y)) rotate(var(--fall-rot));
    opacity: 0;
    animation-timing-function: cubic-bezier(0.55, 0.05, 0.85, 0.4);
  }
  12% { opacity: 1; }
  55% {
    transform: translate(var(--scatter-x), var(--scatter-y)) rotate(var(--scatter-rot));
    animation-timing-function: cubic-bezier(0.34, 1.45, 0.64, 1);
  }
  68% {
    transform: translate(var(--scatter-x), calc(var(--scatter-y) - 0.32rem)) rotate(calc(var(--scatter-rot) - 0.65deg));
    animation-timing-function: cubic-bezier(0.55, 0.05, 0.85, 0.4);
  }
  80% {
    transform: translate(var(--scatter-x), var(--scatter-y)) rotate(var(--scatter-rot));
    animation-timing-function: cubic-bezier(0.34, 1.4, 0.64, 1);
  }
  90% {
    transform: translate(var(--scatter-x), calc(var(--scatter-y) - 0.12rem)) rotate(var(--scatter-rot));
    animation-timing-function: cubic-bezier(0.55, 0.05, 0.85, 0.4);
  }
  100% {
    transform: translate(var(--scatter-x), var(--scatter-y)) rotate(var(--scatter-rot));
    opacity: 1;
  }
}

/* Idle wobble — uses separate translate/rotate properties so it composes with hover transform. */
@keyframes pill-wobble {
  0%   { translate: 0 0; rotate: 0deg; }
  20%  { translate: var(--wobble-x) calc(var(--wobble-y) * -0.7); rotate: var(--wobble-rot); }
  42%  { translate: calc(var(--wobble-x) * -0.85) var(--wobble-y); rotate: calc(var(--wobble-rot) * -0.6); }
  61%  { translate: calc(var(--wobble-x) * 0.55) calc(var(--wobble-y) * -0.4); rotate: calc(var(--wobble-rot) * 0.45); }
  78%  { translate: calc(var(--wobble-x) * -0.4) calc(var(--wobble-y) * 0.7); rotate: calc(var(--wobble-rot) * -0.25); }
  100% { translate: 0 0; rotate: 0deg; }
}

@media (max-width: 720px) {
  .skill-pill { padding: 7px 16px; font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) {
  .skills-floor .skill-pill { opacity: 1; transform: none; translate: 0 0; rotate: 0deg; }
  .skills-floor.is-falling .skill-pill,
  .skills-floor .skill-pill.is-landed { animation: none; }
}

/* ============================================
   Contact / footer
   ============================================ */
.contact {
  padding: var(--section-pad-x) 0 22px;
}
.contact-big {
  padding: 0 var(--section-pad-x);
  max-width: 1400px;
  margin: 0 auto;
}
.contact-big > .section-kicker {
  margin-bottom: 8px;
}
.contact-kicker { color: var(--accent); margin-bottom: 24px; }
.contact-title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0;
}
.contact-title .serif-italic { color: var(--accent); }

.contact-email {
  display: inline-flex; align-items: baseline; gap: 12px;
  margin-top: 22px;
  font-size: clamp(1rem, 3vw, 1.85rem);
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--fg);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }

.contact-grid {
  padding: 0 var(--section-pad-x);
  max-width: 1400px;
  margin: 36px auto 0;
  display: flex;
  flex-direction: row;
  gap: var(--gap-md);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.contact-col-title { color: var(--fg-3); margin-bottom: 16px; }
.contact-col p { color: var(--fg-2); font-size: 0.95rem; line-height: 1.6; }
.contact-links { display: flex; flex-direction: row; gap: 8px; }
.contact-links a {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: 1.05rem;
  color: var(--fg);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-soft);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
}
.contact-links a:hover { color: var(--accent); border-color: var(--accent); padding-left: 6px; }

.footer-bottom {
  padding: 12px var(--section-pad-x) 0;
  max-width: 1400px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  color: var(--fg-3);
  font-size: 0.7rem;
}
.footer-spacer { flex: 1; }
.footer-top { transition: color var(--t-fast) var(--ease); }
.footer-top:hover { color: var(--accent); }

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

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--line);
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
  will-change: transform;
}
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--fg-2); }
.btn-big { padding: 18px 32px; font-size: 1.05rem; }
.btn-arrow {
  display: inline-block;
  transition: transform var(--t) var(--ease);
}
.btn:hover .btn-arrow { transform: translateX(4px) translateY(-2px); }

/* ============================================
   Page load entrance — about / home
   ============================================ */
@keyframes enter-nav {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes enter-left {
  from { opacity: 0; transform: translateX(-22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes enter-section {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
/* Nav */
.nav {
  animation: enter-nav 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Home hero + stacked sections — staggered cascade */
#home > .hero.hero-about {
  animation: enter-left 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}
#home > section:nth-child(2) {
  animation: enter-section 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}
#home > section:nth-child(3) {
  animation: enter-section 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}
#home > section:nth-child(4) {
  animation: enter-section 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both;
}
#home > section:nth-child(5) {
  animation: enter-section 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.43s both;
}
@media (prefers-reduced-motion: reduce) {
  .nav,
  #home > .hero.hero-about,
  #home > section:nth-child(2),
  #home > section:nth-child(3),
  #home > section:nth-child(4),
  #home > section:nth-child(5) {
    animation: none;
  }
}

/* ============================================
   Reveal animations
   ============================================ */
.reveal-line {
  display: block;
  overflow: hidden;
}
.reveal-word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.9s var(--ease-out), opacity 0.7s var(--ease-out);
}
.reveal-line .reveal-word { display: inline-block; }
.reveal-fade {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.in-view .reveal-word, .in-view .reveal-fade {
  transform: translateY(0);
  opacity: 1;
}
.in-view .reveal-word:nth-child(2) { transition-delay: 80ms; }
.in-view .reveal-word:nth-child(3) { transition-delay: 160ms; }
.in-view .reveal-word:nth-child(4) { transition-delay: 240ms; }
.in-view .reveal-word:nth-child(5) { transition-delay: 320ms; }

.hero-title .reveal-word { transition-duration: 1.1s; }
.hero-bio .reveal-fade { transition-duration: 0.7s; }
.hero-bio .reveal-fade:nth-child(1) { transition-delay: 0.5s; }
.hero-bio .reveal-fade:nth-child(2) { transition-delay: 0.55s; }
.hero-bio .reveal-fade:nth-child(3) { transition-delay: 0.6s; }
.hero-bio .reveal-fade:nth-child(4) { transition-delay: 0.65s; }
.hero-bio .reveal-fade:nth-child(5) { transition-delay: 0.7s; }
.hero-bio .reveal-fade:nth-child(6) { transition-delay: 0.75s; }
.hero-bio .reveal-fade:nth-child(7) { transition-delay: 0.8s; }
.hero-bio .reveal-fade:nth-child(8) { transition-delay: 0.85s; }
.hero-bio .reveal-fade:nth-child(9) { transition-delay: 0.9s; }
.hero-bio .reveal-fade:nth-child(10) { transition-delay: 0.95s; }
.hero-bio .reveal-fade:nth-child(11) { transition-delay: 1s; }
.hero-bio .reveal-fade:nth-child(12) { transition-delay: 1.05s; }
.hero-bio .reveal-fade:nth-child(13) { transition-delay: 1.1s; }
.hero-bio .reveal-fade:nth-child(14) { transition-delay: 1.15s; }

/* ============================================
   Archive
   ============================================ */
.route-archive {
  position: relative;
  padding: 132px 0 120px;
  min-height: 100svh;
  transition: padding 0.55s var(--ease), background 0.55s var(--ease);
}
.route-archive::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  background: oklch(0.12 0.01 250);
  opacity: 0;
  display: none;
  pointer-events: none;
  transform: scaleY(0.015);
  transform-origin: 50% 38%;
  transition: transform 0.52s var(--ease), opacity 0.34s var(--ease);
}
.route-archive.is-archive-opening::before {
  opacity: 1;
  transform: scaleY(1);
}
.route-archive.is-archive-open::before {
  opacity: 0;
  transform: scaleY(1);
  transition: opacity 0.42s var(--ease) 0.08s;
}
.route-archive.is-archive-closing::before {
  opacity: 0.95;
  transform: scaleY(1);
  transition: opacity 0.26s var(--ease), transform 0.42s var(--ease);
}
.route-archive.is-archive-open {
  height: 100svh;
  overflow: hidden;
  padding: 98px 0 0;
}
.archive-profile {
  max-width: none;
  width: 100%;
  margin: 0 0 52px;
  padding: 80px 0 56px;
  background: transparent;
  border: 0;
  text-align: center;
  position: relative;
  overflow: visible;
  isolation: isolate;
  border-radius: 0;
  min-height: 340px;
  max-height: 560px;
  transition: opacity 0.42s var(--ease), transform 0.55s var(--ease), max-height 0.55s var(--ease), min-height 0.55s var(--ease), padding 0.55s var(--ease), margin 0.55s var(--ease);
}
.route-archive.is-archive-opening .archive-profile,
.route-archive.is-archive-open .archive-profile {
  opacity: 0;
  transform: translateY(-34px) scale(0.985);
  min-height: 0;
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  pointer-events: none;
}
.archive-orbs {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.archive-orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px) brightness(1.05);
  will-change: transform;
  --orb-follow-x: 0px;
  --orb-follow-y: 0px;
  translate: var(--orb-follow-x) var(--orb-follow-y);
  transition: translate 0.08s linear;
}
.archive-orb--yellow {
  width: 19%;
  height: 50%;
  background: #FFD966;
  left: calc(50% - 19% / 2 - 2.5%);
  top: calc(50% - 50% / 2 - 6%);
  right: auto;
  bottom: auto;
  animation: orb-a 15.8s ease-in-out infinite;
}
.archive-orb--blue {
  width: 21%;
  height: 56%;
  background: #6ECAFF;
  left: calc(50% - 21% / 2 + 1.5%);
  top: calc(50% - 56% / 2 - 3.5%);
  right: auto;
  bottom: auto;
  animation: orb-c 17.1s ease-in-out infinite;
  transition: translate 0.06s linear;
}
.archive-orb--purple {
  width: 16%;
  height: 46%;
  background: oklch(0.76 0.15 305 / 0.52);
  left: calc(50% - 16% / 2 - 0.5%);
  top: calc(50% - 46% / 2 + 1%);
  right: auto;
  bottom: auto;
  animation: orb-d 14.9s ease-in-out infinite;
}
@keyframes orb-a {
  0%   { transform: translate(0,      0)      scale(1);    }
  33%  { transform: translate(26%,    18%)    scale(1.06); }
  66%  { transform: translate(-20%,   24%)    scale(0.95); }
  100% { transform: translate(0,      0)      scale(1);    }
}
@keyframes orb-c {
  0%   { transform: translate(0,      0)      scale(1);    }
  25%  { transform: translate(-26%,   12%)    scale(1.07); }
  60%  { transform: translate(18%,    26%)    scale(0.94); }
  100% { transform: translate(0,      0)      scale(1);    }
}
@keyframes orb-d {
  0%   { transform: translate(0,      0)      scale(1);    }
  40%  { transform: translate(-18%,   -26%)  scale(1.05); }
  70%  { transform: translate(24%,    16%)   scale(0.96); }
  100% { transform: translate(0,      0)      scale(1);    }
}
.archive-profile-image {
  position: relative;
  z-index: 1;
  width: 130px;
  height: 130px;
  margin: 0 auto 22px;
  border-radius: 46%;
  object-fit: cover;
}
.route-archive .archive-profile-image {
  transform-origin: 50% 58%;
  will-change: opacity, transform, filter;
  animation: archive-portrait-in 1.05s var(--ease-out) 0.08s both;
}
.archive-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.35rem;
  color: var(--bg);
  background: linear-gradient(130deg, oklch(0.64 0.15 248), oklch(0.72 0.12 310));
}
.archive-name {
  font-size: clamp(1.75rem, 5.4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.06;
}
.route-archive .archive-name {
  will-change: opacity, transform, filter;
  animation: archive-copy-in 0.92s var(--ease-out) 0.34s both;
}
.archive-name--lustria {
  font-family: 'Lustria', Georgia, serif;
  font-style: normal;
}
.archive-role {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  color: var(--fg-3);
  letter-spacing: 0.05em;
}
.archive-role--mono {
  font-family: 'DM Mono', 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  text-transform: none;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.route-archive .archive-role {
  will-change: opacity, transform, filter;
  animation: archive-copy-in 0.86s var(--ease-out) 0.48s both;
}
.archive-sticky {
  max-width: 1400px;
  margin: 0 auto 26px;
  padding: 0 var(--section-pad-x);
  position: static;
  top: auto;
  z-index: 1;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  max-height: 180px;
  transition: opacity 0.38s var(--ease), transform 0.48s var(--ease), max-height 0.55s var(--ease), margin 0.55s var(--ease), padding 0.55s var(--ease);
}
.route-archive.is-archive-opening .archive-sticky,
.route-archive.is-archive-open .archive-sticky {
  opacity: 0;
  transform: translateY(-28px);
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
  overflow: hidden;
}
.archive-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}
.archive-filters .track-tab {
  font-family: 'Outfit', var(--font-sans);
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 20px 14px 22px;
  color: var(--fg);
  background: transparent;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
  transition: color 0.32s var(--ease);
}
.archive-filters .track-tab > span {
  position: relative;
  z-index: 1;
}
.route-archive .archive-filters {
  animation: archive-filter-frame-in 0.84s var(--ease-out) 0.64s both;
}
.route-archive .archive-filters .track-tab {
  will-change: opacity, transform, filter;
  animation: archive-tab-in 0.78s var(--ease-out) both;
}
.route-archive .archive-filters .track-tab:nth-child(1) { animation-delay: 0.76s; }
.route-archive .archive-filters .track-tab:nth-child(2) { animation-delay: 0.86s; }
.route-archive .archive-filters .track-tab:nth-child(3) { animation-delay: 0.96s; }
.route-archive .archive-filters .track-tab:nth-child(4) { animation-delay: 1.06s; }
.archive-filters .track-tab:last-child {
  border-right: 0;
}
.archive-filters .track-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: oklch(0.12 0.01 250);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.36s var(--ease);
  z-index: 0;
}
.archive-filters .track-tab:hover::before,
.archive-filters .track-tab.active::before {
  transform: scaleX(1);
}
.route-archive.is-archive-opening .archive-filters .track-tab.active {
  overflow: visible;
}
.route-archive.is-archive-opening .archive-filters .track-tab.active::before {
  transform: scaleX(1);
  transition-duration: 0.36s;
}
.archive-filters .track-tab:hover,
.archive-filters .track-tab.active {
  color: oklch(0.97 0 0);
}
.archive-tab-index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  color: inherit;
  opacity: 0.55;
  transition: opacity 0.32s var(--ease);
}
.archive-filters .track-tab:hover .archive-tab-index,
.archive-filters .track-tab.active .archive-tab-index {
  opacity: 0.92;
}
.archive-tab-label {
  font-family: 'Outfit', var(--font-sans);
  font-size: clamp(0.92rem, 1.1vw, 1.02rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  width: 100%;
  min-height: calc(1.25em * 2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-wrap: balance;
}
.archive-filters::after {
  content: attr(data-hover-label);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 0;
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  font-weight: 500;
  color: oklch(1 0 0 / 0.12);
  letter-spacing: -0.02em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
  white-space: nowrap;
}
.archive-filters.is-hovering::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
@keyframes archive-portrait-in {
  0% {
    opacity: 0;
    filter: blur(18px) saturate(0.86);
    transform: translate3d(0, 24px, 0) scale(0.82) rotate(-2.5deg);
  }
  58% {
    opacity: 1;
    filter: blur(0) saturate(1.04);
    transform: translate3d(0, -3px, 0) scale(1.035) rotate(0.6deg);
  }
  100% {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: translate3d(0, 0, 0) scale(1) rotate(0);
  }
}
@keyframes archive-copy-in {
  0% {
    opacity: 0;
    filter: blur(14px);
    transform: translate3d(0, 20px, 0);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
  }
}
@keyframes archive-filter-frame-in {
  0% {
    opacity: 0;
    clip-path: inset(0 50% 0 50%);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}
@keyframes archive-tab-in {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translate3d(0, 22px, 0) scale(0.985);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}
.archive-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}
.archive-body--gallery {
  max-width: none;
  width: 100%;
  height: calc(100svh - 98px);
  min-height: 0;
  opacity: 0;
  transform: translateY(96px) scale(0.975);
  filter: blur(10px);
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.5s var(--ease), transform 0.72s var(--ease-out), filter 0.62s var(--ease);
}
.archive-body--gallery.is-visible,
.archive-body--gallery.is-leaving {
  display: grid;
  grid-template-columns: minmax(190px, 24vw) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
  animation: archive-rise-bounce 0.82s var(--ease-out) both;
}
.archive-body--gallery[data-direction="prev"] {
  transform: translateY(-64px) scale(0.985);
}
.archive-body--gallery[data-direction="next"] {
  transform: translateY(96px) scale(0.975);
}
.archive-body--gallery.is-visible[data-direction] {
  transform: translateY(0) scale(1);
}
.archive-body--gallery.is-visible[data-direction="prev"] {
  animation-name: archive-drop-bounce;
}
.archive-body--gallery.is-leaving {
  opacity: 0;
  transform: translateY(-18px) scale(0.992);
  filter: blur(4px);
  pointer-events: none;
  transition-duration: 0.42s;
}
.archive-body--gallery.is-switching-out[data-direction="next"] {
  transform: translateY(-54px) scale(0.99);
}
.archive-body--gallery.is-switching-out[data-direction="prev"] {
  transform: translateY(54px) scale(0.99);
}
@keyframes archive-rise-bounce {
  0% {
    opacity: 0;
    transform: translateY(96px) scale(0.975);
    filter: blur(10px);
  }
  72% {
    opacity: 1;
    transform: translateY(-10px) scale(1.006);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
@keyframes archive-drop-bounce {
  0% {
    opacity: 0;
    transform: translateY(-64px) scale(0.985);
    filter: blur(8px);
  }
  72% {
    opacity: 1;
    transform: translateY(8px) scale(1.004);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
.archive-selected-track {
  position: relative;
  top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', var(--font-sans);
  font-weight: 400;
  padding: 0 clamp(18px, 3vw, 42px);
  transform: none;
  height: 100%;
  min-height: 0;
  justify-content: center;
  border-right: 1px solid var(--line-soft);
  background: oklch(from var(--bg) l c h / 0.64);
  cursor: grab;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  perspective: 820px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 3%, #000 22%, #000 78%, transparent 97%);
  mask-image: linear-gradient(to bottom, transparent 3%, #000 22%, #000 78%, transparent 97%);
  --wheel-slot: clamp(82px, 10vh, 110px);
  --wheel-slot-far: clamp(160px, 19.5vh, 210px);
  --wheel-live-offset: 0px;
  --wheel-rail-opacity: 0.32;
}
.archive-selected-track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}
.archive-selected-track.is-wheel-active {
  cursor: grabbing;
  --wheel-rail-opacity: 0.72;
}
.archive-selected-track::before,
.archive-selected-track::after {
  content: '';
  position: absolute;
  left: 14%;
  right: 14%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  opacity: var(--wheel-rail-opacity);
  pointer-events: none;
  transition: opacity 0.32s var(--ease);
}
.archive-selected-track:hover::before,
.archive-selected-track:hover::after {
  opacity: 0.78;
}
.archive-selected-track::before {
  transform: translateY(calc(-1 * var(--wheel-slot) * 0.55));
}
.archive-selected-track::after {
  transform: translateY(calc(var(--wheel-slot) * 0.55));
}
.archive-wheel-stack {
  position: relative;
  width: min(100%, 280px);
  height: min(68vh, 520px);
  min-height: 360px;
  transform-style: preserve-3d;
  transform: translate3d(0, var(--wheel-live-offset), 0);
  transition: transform 0.46s var(--ease-out);
  will-change: transform;
}
.archive-selected-track.is-wheel-active .archive-wheel-stack {
  transition: transform 0.06s linear;
}
.archive-selected-track.is-wheel-snapping .archive-wheel-stack {
  transition: transform 0.5s cubic-bezier(0.22, 1.18, 0.36, 1);
}
.archive-wheel-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100%, 260px);
  display: grid;
  gap: 7px;
  place-items: center;
  text-align: center;
  color: var(--fg);
  letter-spacing: -0.02em;
  pointer-events: auto;
  transform-style: preserve-3d;
  will-change: opacity, transform, filter;
  transition:
    opacity 0.42s var(--ease),
    filter 0.46s var(--ease),
    transform 0.56s cubic-bezier(0.22, 1.08, 0.36, 1);
}
.archive-wheel-item--prev-1,
.archive-wheel-item--next-1,
.archive-wheel-item--prev-2,
.archive-wheel-item--next-2 {
  cursor: pointer;
}
.archive-wheel-index {
  font-size: clamp(0.68rem, 0.88vw, 0.92rem);
  line-height: 1;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
.archive-wheel-label {
  font-size: clamp(0.86rem, 1.12vw, 1.12rem);
  line-height: 1.08;
}
.archive-wheel-item--center {
  z-index: 5;
  opacity: 1;
  filter: blur(0) saturate(1.05);
  transform: translate3d(-50%, -50%, 96px) rotateX(0) scale(1.18);
  text-shadow: 0 16px 34px oklch(0 0 0 / 0.14);
  cursor: default;
}
.archive-wheel-item--center .archive-wheel-index {
  font-size: clamp(1.18rem, 1.75vw, 1.6rem);
  opacity: 0.9;
}
.archive-wheel-item--center .archive-wheel-label {
  font-size: clamp(1.18rem, 1.9vw, 1.95rem);
}
.archive-wheel-item--prev-1 {
  z-index: 4;
  opacity: 0.42;
  filter: blur(0.6px) saturate(0.88);
  transform: translate3d(-50%, calc(-50% - var(--wheel-slot)), -50px) rotateX(-24deg) scale(0.9);
}
.archive-wheel-item--next-1 {
  z-index: 4;
  opacity: 0.42;
  filter: blur(0.6px) saturate(0.88);
  transform: translate3d(-50%, calc(-50% + var(--wheel-slot)), -50px) rotateX(24deg) scale(0.9);
}
.archive-wheel-item--prev-2 {
  z-index: 3;
  opacity: 0.14;
  filter: blur(2.4px) saturate(0.7);
  transform: translate3d(-50%, calc(-50% - var(--wheel-slot-far)), -150px) rotateX(-42deg) scale(0.7);
}
.archive-wheel-item--next-2 {
  z-index: 3;
  opacity: 0.14;
  filter: blur(2.4px) saturate(0.7);
  transform: translate3d(-50%, calc(-50% + var(--wheel-slot-far)), -150px) rotateX(42deg) scale(0.7);
}
.archive-selected-track:hover .archive-wheel-item--prev-1,
.archive-selected-track:hover .archive-wheel-item--next-1 {
  opacity: 0.78;
  filter: blur(0) saturate(0.95);
}
.archive-selected-track:hover .archive-wheel-item--prev-2,
.archive-selected-track:hover .archive-wheel-item--next-2 {
  opacity: 0.34;
  filter: blur(1.6px) saturate(0.78);
}
.archive-wheel-item--prev-1:hover,
.archive-wheel-item--next-1:hover,
.archive-wheel-item--prev-2:hover,
.archive-wheel-item--next-2:hover {
  opacity: 1;
  filter: blur(0) saturate(1);
}
.archive-selected-track.is-rail-next .archive-wheel-item--center {
  animation: archive-wheel-center-from-next 0.5s cubic-bezier(0.22, 1.08, 0.36, 1) both;
}
.archive-selected-track.is-rail-prev .archive-wheel-item--center {
  animation: archive-wheel-center-from-prev 0.5s cubic-bezier(0.22, 1.08, 0.36, 1) both;
}
@keyframes archive-wheel-center-from-next {
  0% {
    transform: translate3d(-50%, calc(-50% + var(--wheel-slot)), -50px) rotateX(24deg) scale(0.9);
    filter: blur(0.6px) saturate(0.88);
    opacity: 0.42;
  }
  60% {
    transform: translate3d(-50%, -50%, 110px) rotateX(0) scale(1.22);
    filter: blur(0) saturate(1.08);
    opacity: 1;
  }
  100% {
    transform: translate3d(-50%, -50%, 96px) rotateX(0) scale(1.18);
    filter: blur(0) saturate(1.05);
    opacity: 1;
  }
}
@keyframes archive-wheel-center-from-prev {
  0% {
    transform: translate3d(-50%, calc(-50% - var(--wheel-slot)), -50px) rotateX(-24deg) scale(0.9);
    filter: blur(0.6px) saturate(0.88);
    opacity: 0.42;
  }
  60% {
    transform: translate3d(-50%, -50%, 110px) rotateX(0) scale(1.22);
    filter: blur(0) saturate(1.08);
    opacity: 1;
  }
  100% {
    transform: translate3d(-50%, -50%, 96px) rotateX(0) scale(1.18);
    filter: blur(0) saturate(1.05);
    opacity: 1;
  }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .archive-wheel-item {
    text-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .archive-selected-track {
    --wheel-live-offset: 0px !important;
  }
  .archive-wheel-stack {
    transition: none;
  }
  .archive-wheel-item {
    transition: opacity 0.18s linear;
  }
  .archive-selected-track.is-rail-next .archive-wheel-item--center,
  .archive-selected-track.is-rail-prev .archive-wheel-item--center {
    animation: none;
  }
}
/* Legacy rail class names kept harmless for older markup while testing. */
.archive-selected-track-current {
  position: relative;
  z-index: 1;
  animation: archive-rail-current-in 0.34s var(--ease-out) both;
}
.archive-selected-track-index {
  font-size: 1.55rem;
  line-height: 1;
  text-align: center;
}
.archive-selected-track-label {
  text-align: center;
  font-size: clamp(1.15rem, 1.7vw, 1.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.archive-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  align-content: start;
  gap: clamp(18px, 2.1vw, 30px);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--section-pad-x) 52px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.archive-gallery-grid::-webkit-scrollbar {
  display: none;
}
.archive-gallery-grid--masonry,
.archive-gallery-grid:has(.archive-masonry-grid) {
  display: block;
  padding-right: var(--section-pad-x);
}
.archive-gallery-grid.is-works-switching {
  opacity: 0;
  transform: translateY(-22px) scale(0.992);
  filter: blur(4px);
  transition: opacity 0.24s var(--ease), transform 0.28s var(--ease), filter 0.28s var(--ease);
}
.archive-gallery-grid.is-works-switching[data-direction="prev"] {
  transform: translateY(22px) scale(0.992);
}
.archive-gallery-grid.is-works-entering {
  animation: archive-works-rise 0.72s var(--ease-out) both;
}
.archive-gallery-grid.is-works-entering[data-direction="prev"] {
  animation-name: archive-works-drop;
}
@keyframes archive-works-rise {
  0% { opacity: 0; transform: translateY(72px) scale(0.985); filter: blur(8px); }
  72% { opacity: 1; transform: translateY(-8px) scale(1.004); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes archive-works-drop {
  0% { opacity: 0; transform: translateY(-52px) scale(0.99); filter: blur(7px); }
  72% { opacity: 1; transform: translateY(6px) scale(1.003); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.archive-gallery-card {
  position: relative;
  display: grid;
  gap: 20px;
  align-content: start;
  color: inherit;
  cursor: default;
  opacity: 0;
  transform: translateY(44px) scale(0.97);
  transition: transform 0.58s var(--ease), opacity 0.48s var(--ease);
}
.archive-gallery-card:has(.archive-gallery-card-hit) {
  cursor: pointer;
}
.archive-gallery-card-hit {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
}
.archive-gallery-card-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.archive-body--gallery.is-visible .archive-gallery-card {
  opacity: 1;
  transform: translateY(0);
}
.archive-body--gallery.is-leaving .archive-gallery-card {
  opacity: 0;
  transform: translateY(-22px) scale(0.985);
  transition-delay: 0ms;
}
.archive-body--gallery.is-visible .archive-gallery-card:nth-child(2) { transition-delay: 50ms; }
.archive-body--gallery.is-visible .archive-gallery-card:nth-child(3) { transition-delay: 100ms; }
.archive-body--gallery.is-visible .archive-gallery-card:nth-child(4) { transition-delay: 150ms; }
.archive-body--gallery.is-visible .archive-gallery-card:nth-child(5) { transition-delay: 200ms; }
.archive-body--gallery.is-visible .archive-gallery-card:nth-child(6) { transition-delay: 250ms; }
.archive-body--gallery.is-visible .archive-gallery-card:nth-child(7) { transition-delay: 300ms; }
.archive-body--gallery.is-visible .archive-gallery-card:nth-child(8) { transition-delay: 350ms; }
.archive-body--gallery.is-visible .archive-gallery-card:nth-child(9) { transition-delay: 400ms; }
.archive-gallery-card:nth-child(3n + 1) {
  margin-top: 0;
}
.archive-gallery-card:nth-child(3n + 2) {
  margin-top: 34px;
}
.archive-gallery-card:nth-child(3n) {
  margin-top: -10px;
}
.archive-gallery-media {
  background:
    linear-gradient(135deg, oklch(0.72 0.005 250 / 0.55), oklch(0.88 0.004 250 / 0.72)),
    oklch(from var(--bg-2) l c h / 0.85);
  min-height: 190px;
  border: 0;
  box-shadow: none;
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
  position: relative;
  transition: transform 0.42s var(--ease), filter 0.42s var(--ease);
}
.archive-gallery-media:has(.archive-gallery-img) {
  display: block;
  padding: 0;
  background: transparent;
}
.archive-gallery-media:has(.archive-gallery-img)::before,
.archive-gallery-media:has(.archive-gallery-img)::after {
  display: none;
}
.archive-gallery-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}
.archive-gallery-media::before,
.archive-gallery-media::after {
  content: '';
  position: absolute;
  inset: 12%;
  background:
    linear-gradient(90deg, oklch(0.1 0 0 / 0.78) 0 34%, transparent 34% 100%),
    repeating-linear-gradient(0deg, oklch(1 0 0 / 0.9) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, oklch(1 0 0 / 0.82), oklch(0.78 0.01 250 / 0.7));
  opacity: 0.8;
}
.archive-gallery-media::after {
  inset: auto 8% 10% 30%;
  height: 34%;
  background:
    linear-gradient(90deg, oklch(1 0 0 / 0.92), oklch(1 0 0 / 0.72)),
    repeating-linear-gradient(90deg, oklch(0.18 0 0 / 0.16) 0 10px, transparent 10px 20px);
  opacity: 0.72;
}
.archive-gallery-card:hover .archive-gallery-media {
  transform: scale(0.985);
  filter: contrast(1.05);
}
.archive-gallery-media--wide { aspect-ratio: 16 / 8.8; }
.archive-gallery-media--medium { aspect-ratio: 4 / 3.5; }
.archive-gallery-media--tall { aspect-ratio: 4 / 5.2; }
.archive-gallery-media:has(.archive-gallery-img) {
  aspect-ratio: unset;
  min-height: 0;
  height: auto;
  overflow: visible;
  align-self: start;
}
.archive-gallery-label {
  position: relative;
  z-index: 1;
  padding: 4px 8px;
  background: oklch(from var(--bg) l c h / 0.78);
  color: var(--fg-3);
  text-transform: none;
  font-size: 0.68rem;
}
.archive-gallery-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 0;
  width: 100%;
}
.archive-gallery-year {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.025em;
}
.archive-gallery-text {
  text-align: left;
  width: 100%;
}
.archive-gallery-title {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.archive-masonry-intro {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.archive-masonry-kicker {
  color: var(--fg-3);
  margin-bottom: 10px;
}
.archive-masonry-intro h2 {
  font-size: clamp(2.2rem, 5vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  margin-bottom: 14px;
}
.archive-masonry-intro p:not(.archive-masonry-kicker) {
  max-width: 560px;
  color: var(--fg-2);
  font-size: clamp(0.96rem, 1.2vw, 1.08rem);
}
.archive-masonry-grid {
  column-count: 3;
  column-gap: clamp(18px, 2.1vw, 30px);
}
.archive-masonry-card {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin: 0 0 clamp(20px, 2.4vw, 34px);
  break-inside: avoid;
  color: inherit;
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.48s var(--ease), transform 0.58s var(--ease);
  transition-delay: var(--masonry-delay, 0ms);
}
.archive-masonry-card:has(.archive-masonry-card-hit) {
  cursor: pointer;
}
.archive-masonry-card-hit {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
}
.archive-masonry-card-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.archive-body--gallery.is-visible .archive-masonry-card {
  opacity: 1;
  transform: translateY(0);
}
.archive-masonry-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 220px;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 18%, oklch(1 0 0 / 0.6), transparent 34%),
    linear-gradient(145deg, oklch(0.9 0.02 75), oklch(0.8 0.02 250 / 0.72));
  border: 1px solid var(--line-soft);
}
.archive-masonry-media--landscape { aspect-ratio: 4 / 3; }
.archive-masonry-media--landscape-wide { aspect-ratio: 16 / 9; }
.archive-masonry-media--portrait { aspect-ratio: 4 / 5.4; }
.archive-masonry-media--square { aspect-ratio: 1; }
.archive-masonry-media--tall { aspect-ratio: 4 / 6.4; }
.archive-masonry-img {
  width: 100%;
  height: auto;
  display: block;
}
.archive-masonry-media:has(> .archive-masonry-img) {
  display: block;
  min-height: 0;
  height: auto;
  aspect-ratio: unset;
  overflow: visible;
  align-self: flex-start;
  background: transparent;
  border-color: transparent;
}
.archive-masonry-media:has(.archive-masonry-hover-wrap) {
  position: relative;
  display: block;
  overflow: hidden;
  background: transparent;
  border-color: transparent;
}
.archive-masonry-hover-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.archive-masonry-hover-wrap .archive-masonry-img,
.archive-masonry-hover-wrap .archive-masonry-hover-video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.22s var(--ease);
}
.archive-masonry-hover-wrap .archive-masonry-hover-video {
  opacity: 0;
  pointer-events: none;
}
.archive-masonry-card:hover .archive-masonry-hover-wrap .archive-masonry-hover-video,
.archive-masonry-card:focus-within .archive-masonry-hover-wrap .archive-masonry-hover-video {
  opacity: 1;
}
.archive-masonry-card:hover .archive-masonry-hover-wrap .archive-masonry-img,
.archive-masonry-card:focus-within .archive-masonry-hover-wrap .archive-masonry-img {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .archive-masonry-hover-wrap .archive-masonry-hover-video {
    display: none;
  }
  .archive-masonry-card:hover .archive-masonry-hover-wrap .archive-masonry-img {
    opacity: 1;
  }
}
.archive-masonry-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 0;
  color: var(--fg);
}
.archive-masonry-caption-year {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.archive-masonry-caption-title {
  font-size: 0.86rem;
  color: var(--fg-2);
  line-height: 1.35;
}
#archiveTable,
#archiveTable * {
  font-family: 'Outfit', var(--font-sans);
}
.archive-note {
  margin: 6px 0 20px;
  text-align: center;
  color: var(--fg-3);
  font-size: 0.88rem;
}
.archive-empty {
  color: var(--fg-3);
  text-align: center;
  margin-top: 30px;
}
.archive-card {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 250px);
  align-items: stretch;
  gap: 28px;
  padding: 26px 32px;
  margin-bottom: 26px;
  border: 0;
  border-radius: 14px;
  background: oklch(from var(--bg) l c h / 0.85);
  box-shadow: 0 16px 34px oklch(0 0 0 / 0.04), 0 4px 12px oklch(0 0 0 / 0.05);
  font-size: 0.95rem;
}
.archive-card-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.archive-card-title {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.archive-card-desc {
  color: var(--fg-2);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 26px;
}
.archive-card-cta {
  margin-top: auto;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.archive-card-cta:hover {
  background: var(--fg);
  color: var(--bg);
}
.archive-card-media,
.archive-tile-media,
.archive-full-media {
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: oklch(from var(--bg-2) l c h / 0.85);
  min-height: 210px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
}
.archive-media-label {
  color: var(--fg-3);
  letter-spacing: 0.05em;
}
.archive-media--uiux { background: linear-gradient(145deg, oklch(0.94 0.03 75), oklch(0.92 0.02 40)); }
.archive-media--hci { background: linear-gradient(145deg, oklch(0.94 0.02 95), oklch(0.92 0.03 145)); }
.archive-media--frontend { background: linear-gradient(145deg, oklch(0.95 0.01 260), oklch(0.92 0.03 220)); }
.archive-media--graphic { background: linear-gradient(145deg, oklch(0.9 0.03 45), oklch(0.87 0.06 35)); }
.archive-media--illustration { background: linear-gradient(145deg, oklch(0.88 0.04 120), oklch(0.8 0.06 65)); }
.archive-body--tile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 28px;
}
.archive-tile-title {
  margin-top: 12px;
  text-align: center;
  font-size: 2rem;
  letter-spacing: -0.02em;
}
.archive-body--full {
  display: grid;
  gap: 24px;
}
.archive-full-media {
  min-height: 440px;
}

@media (max-width: 920px) {
  .archive-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .archive-body--gallery.is-visible {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .archive-selected-track {
    position: static;
    transform: none;
    height: 220px;
    min-height: 220px;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 0 18px 14px;
    --wheel-slot: 64px;
    --wheel-slot-far: 118px;
  }
  .archive-wheel-stack {
    height: 210px;
    min-height: 210px;
    width: min(100%, 360px);
  }
  .archive-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .archive-masonry-grid {
    column-count: 2;
  }
}
@media (max-width: 720px) {
  .route-archive { padding: 112px 0 90px; }
  .archive-profile { padding: 34px 0 24px; border-radius: 0; }
  .archive-sticky { margin-bottom: 18px; }
  .archive-filters {
    grid-template-columns: 1fr;
  }
  .archive-filters .track-tab {
    padding: 18px 14px;
  }
  .archive-filters::after {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }
  .archive-orb {
    --orb-size: clamp(48px, 14vw, 72px);
    width: var(--orb-size);
    height: var(--orb-size);
  }
  .archive-orb--yellow {
    left: calc(50% - var(--orb-size) / 2 - 12px);
    top: calc(50% - var(--orb-size) / 2 - 20px);
  }
  .archive-orb--blue {
    left: calc(50% - var(--orb-size) / 2 + 10px);
    top: calc(50% - var(--orb-size) / 2 - 16px);
  }
  .archive-orb--purple {
    left: calc(50% - var(--orb-size) / 2 - 2px);
    top: calc(50% - var(--orb-size) / 2 - 2px);
  }
  .archive-avatar { width: 86px; height: 86px; font-size: 1.65rem; margin-bottom: 14px; }
  .archive-profile-image { width: 86px; height: 86px; margin-bottom: 14px; }
  .archive-role { font-size: 0.65rem; }
  .archive-gallery-grid { grid-template-columns: 1fr; gap: 16px; }
  .archive-gallery-grid--masonry { padding-right: 0; }
  .archive-masonry-grid { column-count: 1; }
  .archive-masonry-intro h2 { font-size: clamp(2rem, 12vw, 3.4rem); }
  .archive-gallery-year { font-size: 1.75rem; }
  .archive-gallery-title { font-size: 0.95rem; }
}

/* ============================================
   Case study
   ============================================ */
.route-case {
  padding: 120px var(--section-pad-x) 140px;
}
.case-intro {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--gap-lg);
  max-width: 1400px;
  margin: 0 auto 96px;
}
.case-intro .case-header {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  max-width: none;
}
.case-intro .case-hero {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}
.case-intro .case-hero .placeholder,
.case-intro .case-hero .demo-frame {
  width: 100%;
}
.case-header {
  max-width: 1200px;
  margin: 0 auto 64px;
}
.case-meta {
  display: flex; gap: 20px; flex-wrap: wrap;
  color: var(--fg-3);
  margin-bottom: 32px;
}
.case-track {
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 500;
}
.case-track-blue { background: var(--accent-soft); color: var(--accent); }
.case-track-gold { background: var(--accent-gold-soft); color: var(--accent-gold); }
.case-track-neutral { background: var(--bg-3); color: var(--fg-2); }

.case-title {
  font-family: var(--font-sans);
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
  max-width: 18ch;
}
.case-title .serif-italic { color: var(--accent); }
.case-lede {
  margin-top: 36px;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--fg-2);
  max-width: 58ch;
  line-height: 1.45;
}

.case-hero {
  max-width: 1400px;
  margin: 0 auto 96px;
}
.case-hero .placeholder { aspect-ratio: 16 / 8; min-height: 320px; border-radius: 24px; }
.case-hero-demo { aspect-ratio: auto; }

@media (max-width: 900px) {
  .case-intro {
    flex-direction: column;
    gap: 40px;
    margin-bottom: 64px;
  }
}

.case-body {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 80px;
}
.case-side {
  position: sticky; top: 100px;
  display: flex; flex-direction: column; gap: 28px;
  height: fit-content;
}
.side-block { display: flex; flex-direction: column; gap: 4px; }
.side-label { color: var(--fg-3); font-size: 0.7rem; }
.side-block > div:not(.side-label),
.side-link {
  color: var(--fg); font-family: var(--font-sans); font-size: 0.95rem;
  text-transform: none; letter-spacing: 0;
}
.side-link {
  display: block;
  color: var(--accent);
  transition: color var(--t-fast) var(--ease);
}
.side-link:hover { color: var(--fg); }

.case-main {
  font-size: 1.1rem; line-height: 1.65;
}
.case-h {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
}
.case-h:first-child { margin-top: 0; }
.case-main p { margin-bottom: 16px; color: var(--fg); }
.case-ul li { padding-left: 20px; position: relative; margin-bottom: 8px; }
.case-ul li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }
.case-fig {
  margin: 48px 0;
}
.case-fig .placeholder { aspect-ratio: 16 / 9; border-radius: 16px; }
.case-links {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 48px;
}

.case-nav {
  max-width: 1200px;
  margin: 120px auto 0;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

/* ============================================
   Course project template page
   ============================================ */
.route-course {
  position: relative;
  padding: 132px var(--section-pad-x) 120px;
  min-height: 100svh;
}
.course-intro {
  max-width: 1100px;
  margin: 0 auto 64px;
  display: block;
}
.course-header {
  max-width: 880px;
  margin: 0 auto;
}
.course-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Course switcher dropdown */
.course-switcher {
  position: relative;
}
.course-switcher-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.course-switcher-button:hover { border-color: var(--fg-2); background: var(--card-hover); }
.course-switcher-label {
  color: var(--fg-3);
  letter-spacing: 0.02em;
}
.course-switcher-current {
  color: var(--fg);
  font-weight: 500;
}
.course-switcher-caret {
  font-size: 0.7rem;
  color: var(--fg-3);
  transition: transform var(--t-fast) var(--ease);
}
.course-switcher[data-open="true"] .course-switcher-caret { transform: rotate(180deg); }

.course-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  max-width: 420px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 56px oklch(0 0 0 / 0.16), 0 6px 14px oklch(0 0 0 / 0.06);
  z-index: 30;
  animation: course-switcher-in 0.18s var(--ease);
}
.course-switcher-menu[hidden] { display: none; }
@keyframes course-switcher-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.course-switcher-menu li { margin: 0; padding: 0; }
.course-switcher-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.course-switcher-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.course-switcher-item.is-active {
  background: oklch(from var(--fg) l c h / 0.06);
}
.course-switcher-item.is-active::after {
  content: '●';
  margin-left: auto;
  color: var(--accent);
  font-size: 0.55rem;
  align-self: center;
}
.course-switcher-item-code {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--fg-3);
}
.course-switcher-item:hover .course-switcher-item-code { color: var(--accent); }
.course-switcher-item-title {
  font-size: 0.92rem;
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.course-switcher-item:hover .course-switcher-item-title { color: var(--accent); }

@media (max-width: 600px) {
  .course-switcher-menu {
    left: auto;
    right: 0;
    min-width: 280px;
    max-width: calc(100vw - 32px);
  }
}

.course-title {
  max-width: 22ch;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  margin-top: clamp(20px, 3vw, 32px);
}
.course-lede {
  margin-top: 28px;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

.course-body {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
}
.course-side { gap: 22px; }

.course-projects { display: flex; flex-direction: column; gap: 28px; }

.course-projects[data-preview='1']:not([data-count='many']) {
  gap: clamp(28px, 4vw, 42px);
}

.course-web-preview-card {
  padding: clamp(28px, 3.5vw, 36px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}
.course-web-preview-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 60% at 12% -10%, var(--accent-soft) 0%, transparent 52%);
}

.course-web-preview-head {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}
.course-web-preview-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 2vw, 1.42rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.3;
}
.course-web-preview-desc {
  margin: 10px 0 0;
  font-size: 0.98rem;
  color: var(--fg-2);
  line-height: 1.55;
}

.course-web-preview-viewport {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: oklch(from var(--bg) l c h / 0.5);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.04),
    0 20px 40px oklch(0 0 0 / 0.06);
  overflow: hidden;
}
.course-web-preview-chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  color: var(--fg-3);
}
.course-web-preview-dots {
  display: inline-flex;
  gap: 5px;
  flex-shrink: 0;
}
.course-web-preview-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-3);
  opacity: 0.42;
}
.course-web-preview-dots span:nth-child(1) { opacity: 0.55; }
.course-web-preview-dots span:nth-child(2) { opacity: 0.38; }
.course-web-preview-dots span:nth-child(3) { opacity: 0.28; }
.course-web-preview-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  opacity: 0.78;
}

.course-web-preview-shell {
  position: relative;
  height: clamp(260px, 38vh, 400px);
  background: var(--bg);
  overflow: hidden;
  --course-preview-nudge-y: clamp(48px, 10vh, 112px);
}

.course-web-preview-iframe {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  height: calc(100% + var(--course-preview-nudge-y));
  border: 0;
  pointer-events: none;
  transform: translateY(calc(-1 * var(--course-preview-nudge-y)));
}

.course-web-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  object-position: center 18%;
  pointer-events: none;
}

.course-web-preview-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: clamp(14px, 2.5vw, 22px);
  background:
    linear-gradient(to top,
      oklch(from var(--bg) l c h / 0.82) 0%,
      oklch(from var(--bg) l c h / 0.15) 45%,
      transparent 76%);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: opacity 0.26s var(--ease), backdrop-filter var(--t) var(--ease);
  backdrop-filter: blur(0px);
}
.course-web-preview-cover:hover {
  opacity: 1;
}
.course-web-preview-cover:hover .course-web-preview-cta-arrow {
  transform: translate(2px, -2px);
}

.course-web-preview-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 12px 32px oklch(0 0 0 / 0.1);
}

.course-web-preview-cover:hover .course-web-preview-cta {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  gap: 12px;
}
.course-web-preview-cta-arrow {
  transition: transform var(--t-fast) var(--ease);
}

.course-web-preview-card:focus-within .course-web-preview-cover:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .course-web-preview-shell {
    height: clamp(220px, 42vh, 320px);
  }
}

html.is-educ-real-locked {
  overflow: hidden;
}
html.is-educ-real-locked body {
  overflow: hidden;
}

/* EDUC 6144 linked site (stub) */
.route-educ-6144-site {
  max-width: none;
  margin: 0 auto;
  min-height: 100svh;
  padding: 0;
  background: #fff;
  color: #111;
}
.educ-6144-site-back {
  display: inline-flex;
  z-index: 5;
  align-self: flex-start;
  margin-inline-start: clamp(2px, 1.2vw, 14px);
  text-align: left;
}

.educ-6144-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(8px, 1.4vh, 14px);
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.educ-6144-hero {
  min-height: 220svh;
  border-bottom: 1px solid #d9d9d9;
  color: #000;
}
.educ-6144-hero-sticky {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: clamp(40px, 6vw, 72px);
  padding: clamp(96px, 7vh, 88px) clamp(32px, 10vw, 112px) clamp(56px, 8vh, 88px);
}
.educ-6144-kicker {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111;
  text-wrap: balance;
  max-width: 42rem;
  align-self: center;
  text-align: center;
  width: 100%;
}
.educ-6144-hero-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(44px, 9vw, 140px);
}
.educ-6144-hero-visual {
  display: grid;
  place-items: center;
  min-height: clamp(220px, 34vw, 360px);
}
.educ-6144-morph-svg {
  width: min(100%, 360px);
  height: auto;
  overflow: visible;
}
.educ-6144-svg-state {
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.08s linear;
  will-change: opacity, transform;
}
.educ-6144-svg-state path {
  fill: #111;
}
.educ-6144-svg-state--second {
  opacity: 0;
}
.educ-6144-svg-state path {
  will-change: d, opacity;
}
.educ-6144-svg-state .is-smart-morph-target {
  opacity: 0;
}
.educ-6144-morph-line,
.educ-6144-morph-detail {
  stroke: #111;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.educ-6144-morph-detail {
  opacity: calc(1 - var(--educ-6144-morph-progress, 0));
  transition: opacity 0.16s linear;
}
.educ-6144-morph-detail--second {
  opacity: var(--educ-6144-morph-progress, 0);
}
.educ-6144-morph-target {
  opacity: 0;
}
.educ-6144-hero-question {
  margin: 0;
  max-width: 13.5ch;
  font-family: 'Bitter', Georgia, serif;
  font-size: clamp(2.35rem, 4.8vw, 4.7rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.045em;
}
.educ-6144-char {
  color: rgb(166, 166, 166);
  transition: color 0.12s linear;
}
.educ-6144-char--space {
  display: inline;
}

.educ-6144-intro-note {
  width: min(1200px, calc(100% - clamp(32px, 12vw, 220px)));
  margin: 0 auto;
  padding: clamp(42px, 7vh, 88px) 0;
  border-bottom: 1px solid #d9d9d9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.educ-6144-intro-note p {
  margin: 0;
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  line-height: 1.75;
  max-width: 95ch;
  color: #2f2f2f;
}

.educ-6144-split {
  width: min(1240px, calc(100% - clamp(32px, 12vw, 220px)));
  margin: 0 auto;
  min-height: 100svh;
  padding: clamp(44px, 7vh, 88px) 0;
  border-bottom: 1px solid #d9d9d9;
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  grid-template-areas: "title content";
  align-items: start;
  gap: clamp(28px, 6vw, 92px);
  --educ-6144-pane-height: calc(100svh - clamp(102px, 15vh, 168px));
}
.educ-6144-split[data-title-side="right"] {
  grid-template-columns: 1.22fr 0.78fr;
  grid-template-areas: "content title";
}
.educ-6144-split-title {
  grid-area: title;
  align-self: start;
  min-height: var(--educ-6144-pane-height);
}
#educ6144ShiftCoreg .educ-6144-split-title {
  align-self: stretch;
  min-height: 0;
}
#educ6144ShiftCoreg.educ-6144-split {
  min-height: 72svh;
  padding: clamp(36px, 6vh, 72px) 0 clamp(20px, 3.5vh, 44px);
  --educ-6144-pane-height: max(240px, calc(72svh - clamp(96px, 14vh, 154px)));
}
#educ6144ShiftCoreg .educ-6144-phase-pin {
  --educ-6144-phase-segment: clamp(240px, 56svh, 560px);
}
#educ6144ShiftCoreg .educ-6144-phase-panes {
  min-height: max(100px, calc(var(--educ-6144-pane-height) - 48px));
}
#educ6144ShiftCoreg .educ-6144-phase-row {
  padding-top: clamp(16px, 2.8vh, 28px);
}
.educ-6144-split-title-inner {
  position: sticky;
  top: clamp(106px, 13vh, 150px);
}
.educ-6144-split-title h2 {
  margin: 0;
  font-family: 'Bitter', Georgia, serif;
  font-size: clamp(1.9rem, 3.3vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.educ-6144-scroll {
  grid-area: content;
  align-self: start;
  min-height: var(--educ-6144-pane-height);
  overflow: visible;
  padding-right: clamp(6px, 0.8vw, 12px);
}
.educ-6144-scroll p {
  margin: 0 0 18px;
  color: #262626;
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  line-height: 1.78;
}
.educ-6144-quote {
  margin: clamp(26px, 4vh, 44px) 0;
  padding: 0;
  border: 0;
}
/* Stroke only around quote copy, not the attribution */
.educ-6144-quote--left .educ-6144-quote-text {
  margin: 0;
  border-left: 8px solid #d7edf8;
  padding-left: 22px;
}
.educ-6144-quote--right .educ-6144-quote-text {
  margin: 0;
  border-right: 8px solid #f6ead6;
  padding-right: 22px;
}
.educ-6144-quote-text {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.7rem, 3vw, 2.9rem);
  line-height: 1.34;
  letter-spacing: -0.018em;
  color: #121212;
}
.educ-6144-quote-source {
  display: block;
  margin-top: 12px;
  text-align: right;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  line-height: 1.78;
  color: #6a6a6a;
}
.educ-6144-quote--left .educ-6144-quote-source {
  padding-left: 0;
}
.educ-6144-quote--right .educ-6144-quote-source {
  padding-right: calc(8px + 22px);
}
.educ-6144-quote-source--right {
  text-align: right;
}
.educ-6144-mini-card {
  margin-top: 24px;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  padding: 16px 18px;
  background: #f7f7f7;
}
.educ-6144-mini-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.educ-6144-mini-card ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  line-height: 1.5;
}

#educ6144ShiftJudgment .educ-6144-split-title {
  align-self: stretch;
  min-height: 0;
}
#educ6144ShiftJudgment .educ-6144-judgment-scroll {
  min-height: 0;
}
#educ6144ShiftJudgment .educ-6144-judgment-pin {
  --judgment-chain-segment: clamp(260px, 42svh, 500px);
  min-height: calc(var(--educ-6144-pane-height) + 3 * var(--judgment-chain-segment));
}
#educ6144ShiftConstraint .educ-6144-split-title {
  align-self: stretch;
  min-height: 0;
}
.educ-6144-judgment-stage {
  position: sticky;
  top: clamp(106px, 13vh, 150px);
  background: #fff;
  z-index: 1;
}
.educ-6144-chain-wrap {
  position: relative;
  margin-top: 32px;
}
.educ-6144-chain-card {
  border: 1px solid #d6d6d6;
  border-radius: 14px;
  padding: clamp(18px, 2.4vw, 28px) clamp(18px, 2.4vw, 28px);
  background: #f7f7f7;
}
.educ-6144-chain-row {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.educ-6144-chain-row + .educ-6144-chain-row {
  margin-top: 26px;
}
.educ-6144-chain-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #555;
  text-transform: none;
}
.educ-6144-chain-flow {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.educ-6144-chain-node {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: #e4e4e4;
  border-radius: 7px;
  padding: 5px 11px;
  white-space: nowrap;
  color: #111;
}
.educ-6144-chain-arr {
  color: #777;
  font-size: 1rem;
  line-height: 1;
}
/* Step-driven reveal (chain card only) */
.educ-6144-chain-card [data-step-in] {
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.34s var(--ease), transform 0.38s var(--ease-out);
}
.educ-6144-chain-card [data-step-in].is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* "Optional Evaluation" dims when Judgement appears */
[data-chain-role="optional-eval"] {
  transition: opacity 0.34s var(--ease), transform 0.38s var(--ease-out),
              color 0.3s ease, text-decoration-color 0.3s ease;
  text-decoration: line-through;
  text-decoration-color: transparent;
}
[data-chain-role="optional-eval"].is-dimmed {
  opacity: 0.32;
  color: #777;
  text-decoration-color: #999;
  background: #e8e8e8;
}
/* "Judgement" node gets a subtle highlight */
[data-chain-role="judgement"].is-visible {
  background: #dce8f7;
  color: #0d3a6a;
}

.educ-6144-phase-scroll {
  position: relative;
}
.educ-6144-phase-pin {
  --educ-6144-phase-segment: clamp(320px, 56svh, 560px);
  min-height: calc(var(--educ-6144-pane-height) + 2 * var(--educ-6144-phase-segment));
}
.educ-6144-phase-stage {
  position: sticky;
  top: clamp(106px, 13vh, 150px);
  min-height: var(--educ-6144-pane-height);
  display: block;
  background: #fff;
  z-index: 1;
}
.educ-6144-phase-stage .educ-6144-phase-intro {
  margin: 0 0 clamp(14px, 2.5vh, 22px);
  max-width: 78ch;
  margin-bottom: 0;
}
.educ-6144-phase-stage .educ-6144-phase-after {
  margin: clamp(8px, 2.2vh, 18px) 0 0;
  max-width: 78ch;
}
.educ-6144-phase-panes {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: min(120px, calc(var(--educ-6144-pane-height) - 44px));
}
@media (min-width: 821px) {
  .educ-6144-phase-panes {
    overflow: visible;
    height: var(--educ-6144-phase-intro, min(80px, calc(var(--educ-6144-pane-height) - 64px)));
    transition: height 0.3s var(--ease-out);
  }
}
.educ-6144-phase-pane {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.32s var(--ease), transform 0.42s var(--ease-out);
}
.educ-6144-phase-pane.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.educ-6144-phase-panes p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  line-height: 1.78;
  letter-spacing: normal;
  color: #262626;
}
.educ-6144-phase-panes p + p {
  margin-top: 18px;
}
.educ-6144-phase-tabs {
  display: grid;
  flex-shrink: 0;
  gap: clamp(18px, 3vh, 30px);
  justify-content: start;
  align-content: center;
}
.educ-6144-phase-tab {
  display: grid;
  grid-template-columns: 26px auto;
  align-items: baseline;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: left;
  cursor: pointer;
  transition: color 0.22s var(--ease), transform 0.28s var(--ease-out);
}
.educ-6144-phase-tab:hover,
.educ-6144-phase-tab.is-active {
  color: #111;
}
.educ-6144-phase-tab.is-active {
  transform: translateX(-2px);
  font-weight: 600;
}
.educ-6144-phase-tab:not(.is-active) {
  font-weight: 400;
}
.educ-6144-phase-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(24px, 4vw, 58px);
  padding-top: clamp(24px, 4vh, 42px);
}
.educ-6144-phase-dash {
  font-weight: 700;
}

/* Community insights (from shift narrative; uses existing quote / chain-card patterns) */
.educ-6144-insights {
  display: grid;
  gap: clamp(40px, 7vh, 72px);
}
.educ-6144-insights-block {
  scroll-margin-top: clamp(96px, 14vh, 140px);
}
.educ-6144-insights-block--split {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(22px, 3.8vh, 40px);
}
.educ-6144-insights-title {
  margin: 0 0 clamp(12px, 2vh, 18px);
  font-family: 'Bitter', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: #111;
}
.educ-6144-insights-quote-group {
  display: grid;
  gap: 10px;
  margin: clamp(12px, 2vh, 18px) 0;
}
.educ-6144-insights-quote-group .educ-6144-quote {
  margin: clamp(8px, 1.2vh, 16px) 0;
}
.educ-6144-insights-quote-group .educ-6144-quote-source {
  margin-top: 8px;
}
.educ-6144-insights-pull p {
  margin: 0;
  font-weight: 600;
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  line-height: 1.65;
}
.educ-6144-chain-card.educ-6144-insights-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
  width: 100%;
  max-width: min(680px, 100%);
}
.educ-6144-mini-card.educ-6144-insights-output {
  min-height: 72px;
  font-size: 0.92rem;
  line-height: 1.62;
  color: #454545;
  margin-top: 0;
}
.educ-6144-insights-timeline {
  display: grid;
  gap: 14px;
}
.educ-6144-insights-timeline-row {
  display: grid;
  grid-template-columns: clamp(92px, 16%, 124px) 1fr;
  gap: 12px;
  align-items: center;
}
.educ-6144-insights-timeline-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #656565;
}
.educ-6144-insights-range-label {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: #666;
}
.educ-6144-insights-range {
  width: 100%;
  accent-color: var(--accent-gold);
}
.educ-6144-insights-range-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #777;
  margin-bottom: 2px;
}
.educ-6144-insights-zone {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  border: 1px solid #ccc;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  font-size: clamp(0.78rem, 1.05vw, 0.88rem);
  font-weight: 650;
}
.educ-6144-insights-zone-cell {
  padding: 16px 8px;
  background: #f5f5f5;
  border-right: 1px solid #d0d0d0;
}
.educ-6144-insights-zone-cell:last-child {
  border-right: 0;
}
.educ-6144-insights-zone-cell.is-active-zone {
  background: var(--accent-gold-soft);
  color: #5a3d10;
}
.educ-6144-insights-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.educ-6144-insights-btn {
  padding: 8px 16px;
  border: 1px solid #cbcbcb;
  border-radius: 999px;
  background: #fafafa;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}
.educ-6144-insights-btn:hover {
  border-color: #aaa;
}
.educ-6144-insights-btn.is-active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #fff;
}
.educ-6144-insights-agency {
  display: grid;
  gap: 20px;
}
.educ-6144-insights-diagram-caption {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #666;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.educ-6144-insights-medium-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.educ-6144-insights-medium-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #d6d6d6;
  background: #fff;
}
.educ-6144-insights-medium-title {
  margin: 0 0 10px;
}
.educ-6144-insights-medium-title strong {
  font-size: 0.95rem;
}
.educ-6144-insights-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #5a5a5a;
  line-height: 1.5;
}
.educ-6144-insights-node--amber {
  background: #fff0d8;
  border-color: #e8c48a !important;
  color: #6a4510 !important;
}
.educ-6144-insights-node--green {
  background: #e8eee4;
  border-color: #c5d4be !important;
  color: #3d4f37 !important;
}
.educ-6144-insights-node--blue {
  background: #e8eef3;
  border-color: #b8cdd8 !important;
  color: #2f5562 !important;
}
.educ-6144-insights-node--faded {
  opacity: 0.38 !important;
}
.educ-6144-chain-card .educ-6144-chain-node {
  border: 1px solid #cbcbcb;
}
.educ-6144-insights-fade:not(.is-visible) {
  opacity: 0;
  transform: translateY(14px);
}
.educ-6144-insights-fade {
  transition: opacity 0.5s var(--ease), transform 0.55s var(--ease-out);
}
.educ-6144-insights-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.educ-6144-final {
  width: min(1240px, calc(100% - clamp(32px, 12vw, 220px)));
  margin: 0 auto;
  padding: clamp(56px, 9vh, 116px) 0 clamp(78px, 11vh, 130px);
}
.educ-6144-final h2 {
  margin: 0;
  text-align: center;
  font-family: 'Bitter', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}
.educ-6144-final > p {
  margin: 18px auto 0;
  max-width: 80ch;
  text-align: center;
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  line-height: 1.75;
}
.educ-6144-final-grid {
  margin-top: clamp(38px, 7vh, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(26px, 5vw, 72px);
  align-items: start;
}
.educ-6144-final-pin {
  --edu-real-count: 4;
  --edu-real-window-h: clamp(280px, 48svh, 460px);
  position: relative;
  margin-top: clamp(38px, 7vh, 72px);
}
.educ-6144-final-pin-sticky {
  position: sticky;
  top: clamp(76px, 11vh, 118px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 18px);
  padding-bottom: clamp(4px, 1.5vh, 12px);
}
.educ-6144-final-pin-sticky > .educ-6144-final-grid {
  margin-top: 0;
}
.educ-6144-final-col--text {
  min-width: 0;
}
.educ-6144-final-scroll-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  font-size: clamp(0.78rem, 1.05vw, 0.86rem);
  color: #6a6a6a;
  line-height: 1.4;
}
.educ-6144-final-text-window {
  overflow: hidden;
  height: var(--edu-real-window-h);
  border-radius: 12px;
}
.educ-6144-final-text-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.educ-6144-final-step {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: var(--edu-real-window-h);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 2.8vh, 28px) clamp(12px, 2vw, 20px);
}
.educ-6144-final-slide-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.educ-6144-final-slide-hint {
  opacity: 0.92;
}
.educ-6144-final-step h3 {
  margin: 0 0 clamp(14px, 2.2vh, 22px);
  font-family: 'Bitter', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.32rem, 2.55vw, 1.92rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: #111;
}
.educ-6144-final-step p {
  margin: 0 0 clamp(14px, 2vh, 18px);
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  line-height: 1.78;
  color: #262626;
}
.educ-6144-final-step p:last-child {
  margin-bottom: 0;
}
.educ-6144-final-col--visual {
  align-self: start;
}
.educ-6144-final-sticky {
  position: sticky;
  top: clamp(92px, 14vh, 140px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 16px);
}
.educ-6144-final-pin .educ-6144-final-sticky {
  position: static;
  top: auto;
  z-index: auto;
}
.educ-6144-final-frame {
  position: relative;
  aspect-ratio: 1;
  border: 2px dashed #cbcbcb;
  border-radius: clamp(10px, 1.8vw, 14px);
  background: linear-gradient(180deg, #fdfdfd 0%, #f4f4f4 100%);
  overflow: hidden;
}
.educ-6144-real-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 1.6vw, 14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}
.educ-6144-real-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.educ-6144-real-panel.is-active {
  opacity: 1;
  visibility: visible;
}
.educ-6144-final-diagram-caption {
  margin: 0;
  font-size: clamp(0.82rem, 1vw, 0.92rem);
  line-height: 1.58;
  color: #585858;
  text-align: center;
  padding: 0 4px;
}
/* Decision D·01: slot comparison */
.educ-6144-real-d1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(280px, 100%);
}
.educ-6144-real-d1-label {
  margin: 0;
  font-size: clamp(0.68rem, 1.4vw, 0.78rem);
  font-weight: 600;
  color: #6a6a6a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.educ-6144-real-d1-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(10px, 2.5vw, 16px);
}
.educ-6144-real-d1-slot {
  width: clamp(52px, 13vw, 74px);
  height: clamp(68px, 17vw, 92px);
  border: 2px solid #3a87a9;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.61rem;
  font-weight: 700;
  color: #1a5570;
  background: rgba(215, 237, 248, 0.5);
}
.educ-6144-real-d1-slot.is-one {
  border-style: dashed;
  opacity: 0.92;
}
.educ-6144-real-d1-double {
  display: flex;
  gap: 8px;
}
.educ-6144-real-d1-vs {
  font-weight: 700;
  color: #a8a8a8;
  font-size: 0.74rem;
  padding-bottom: 18%;
}
/* D·02 timeline */
.educ-6144-real-timeline {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: clamp(4px, 1.25vw, 9px);
  font-size: clamp(0.65rem, 1.45vw, 0.8rem);
  font-weight: 600;
  color: #292929;
}
.educ-6144-real-timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 2.75em;
}
.educ-6144-real-timeline-dot {
  width: clamp(13px, 3vw, 16px);
  height: clamp(13px, 3vw, 16px);
  border-radius: 50%;
  background: #3a87a9;
}
.educ-6144-real-timeline-dot--ai {
  background: #cc8b2e;
}
.educ-6144-real-timeline-caption {
  line-height: 1.25;
}
.educ-6144-real-timeline-arr {
  color: #ababab;
  padding-bottom: 1.85em;
  font-weight: 500;
}
/* D·03 prompt bubble */
.educ-6144-real-panel[data-real-panel='2'] {
  gap: clamp(12px, 2.8vw, 16px);
  padding-top: clamp(28px, 5vh, 36px);
}
.educ-6144-real-prompt-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.8vw, 18px);
  width: min(292px, 100%);
}
.educ-6144-real-figure {
  width: clamp(40px, 10vw, 48px);
  height: clamp(40px, 10vw, 48px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(0.72rem, 1.65vw, 0.82rem);
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.educ-6144-real-figure--adult {
  background: #3f648c;
}
.educ-6144-real-figure--child {
  background: #3d8f6f;
}
.educ-6144-real-prompt-bubble {
  padding: clamp(10px, 2.2vw, 14px) clamp(13px, 3vw, 18px);
  border-radius: 14px;
  background: rgba(238, 244, 250, 0.95);
  border: 2px dashed #5f7ea0;
  font-weight: 700;
  font-size: clamp(0.94rem, 2.25vw, 1.06rem);
  color: #345678;
}
.educ-6144-real-prompt-ai {
  opacity: 0.38;
  position: absolute;
  top: clamp(14px, 3vh, 24px);
  right: clamp(14px, 3vw, 22px);
}
.educ-6144-real-ai-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(246, 234, 214, 0.95);
  color: #7a5824;
  font-size: clamp(0.62rem, 1.35vw, 0.7rem);
  font-weight: 700;
}
.educ-6144-real-prompt-note {
  margin: 0;
  font-size: clamp(0.66rem, 1.42vw, 0.74rem);
  line-height: 1.42;
  text-align: center;
  color: #666;
}
.educ-6144-real-prompt-note span {
  opacity: 0.88;
}
/* D·04 passing card */
.educ-6144-real-handflow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  width: min(260px, 100%);
  min-height: 92px;
  padding-bottom: 8px;
  position: relative;
}
.educ-6144-real-hand {
  justify-self: center;
  width: clamp(42px, 11vw, 52px);
  height: clamp(56px, 14vw, 68px);
  border-radius: 12px;
  border: 2px solid #b8b8b8;
  background: #fff;
}
.educ-6144-real-hand-middle {
  position: relative;
  width: clamp(72px, 22vw, 110px);
  height: clamp(72px, 22vw, 110px);
  align-self: end;
  overflow: visible;
}
.educ-6144-real-fly-chip {
  position: absolute;
  left: 50%;
  bottom: 42%;
  width: clamp(38px, 10vw, 46px);
  height: clamp(24px, 6.5vw, 30px);
  border-radius: 5px;
  background: linear-gradient(148deg, #8ec5d9, #cce8f2);
  border: 1px solid #478aa4;
  will-change: transform;
}
.educ-6144-real-hand--adult {
  display: grid;
  place-items: end center;
}
.educ-6144-real-card-slot {
  display: block;
  width: clamp(48px, 14vw, 64px);
  height: clamp(17px, 4.5vw, 22px);
  border: 2px dashed #a5a5a5;
  border-radius: 4px;
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes educ-6144-fly-chip {
    0% {
      transform: translate(calc(-50% - 52px), 8%) rotate(-5deg);
    }
    42% {
      transform: translate(-50%, -55%) rotate(6deg);
    }
    100% {
      transform: translate(calc(-50% + 52px), 14%) rotate(-2deg);
    }
  }
  .educ-6144-real-panel.is-active[data-real-panel='3'] .educ-6144-real-fly-chip {
    animation: educ-6144-fly-chip 2.6s ease-in-out infinite alternate;
  }
}
/* D·05 ages */
.educ-6144-real-age {
  width: min(226px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2.2vh, 14px);
}
.educ-6144-real-age-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(13px, 3vw, 18px) clamp(16px, 4vw, 24px);
  border-radius: 12px;
  background:
    linear-gradient(
      90deg,
      rgba(238, 238, 238, 0.8) 0%,
      rgba(215, 237, 248, 0.65) 20%,
      rgba(215, 237, 248, 0.65) 80%,
      rgba(238, 238, 238, 0.8) 100%
    ), #eaeaea;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.educ-6144-real-age-tick i {
  font-style: normal;
  font-weight: 700;
  font-size: clamp(0.75rem, 1.62vw, 0.84rem);
  color: #3a6894;
}
.educ-6144-real-age-window {
  padding: clamp(8px, 1.9vw, 10px) clamp(18px, 4vw, 24px);
  border-radius: 9px;
  background: rgba(215, 237, 248, 0.88);
  border: 2px solid #3a87a9;
  font-weight: 700;
  font-size: clamp(0.85rem, 1.82vw, 0.94rem);
  color: #1a5570;
  text-align: center;
}
/* D·06 paths contrast */
.educ-6144-real-paths {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4.8vw, 30px);
  width: min(262px, 100%);
}
.educ-6144-real-path {
  display: grid;
  grid-template-columns: minmax(0, 104px) 1fr;
  gap: clamp(10px, 2.5vw, 14px);
  align-items: center;
}
.educ-6144-real-path-label {
  font-size: clamp(0.68rem, 1.52vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.educ-6144-real-path-line {
  height: 5px;
  border-radius: 5px;
  max-width: 100%;
}
.educ-6144-real-path--fast .educ-6144-real-path-label {
  color: #a34c44;
}
.educ-6144-real-path--fast .educ-6144-real-path-line {
  background: linear-gradient(90deg, #e89288 55%, transparent 100%);
}
.educ-6144-real-path--slow .educ-6144-real-path-label {
  color: #2c6f52;
}
.educ-6144-real-path--slow .educ-6144-real-path-line {
  background: linear-gradient(90deg, #71c095 72%, transparent 100%);
}

@media (prefers-reduced-motion: reduce) {
  .educ-6144-real-panel {
    transition: none;
  }
  .educ-6144-real-fly-chip {
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .educ-6144-hero {
    min-height: 100svh;
  }
  .educ-6144-hero-sticky {
    position: relative;
  }
  .educ-6144-char {
    color: #000 !important;
  }
  .educ-6144-phase-pane {
    opacity: 1;
    transform: none;
  }
  .educ-6144-insights-fade {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 820px) {
  .educ-6144-hero-meta {
    padding-top: clamp(8px, 2vh, 16px);
  }
  .educ-6144-hero-sticky {
    padding-top: clamp(72px, 12vh, 110px);
    align-content: start;
  }
  .educ-6144-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .educ-6144-hero-visual {
    min-height: 180px;
    justify-content: start;
  }
  .educ-6144-morph-svg {
    width: min(68vw, 280px);
  }
  .educ-6144-hero-question {
    max-width: 12.5ch;
    font-size: clamp(2.35rem, 11vw, 4rem);
  }
  .educ-6144-intro-note,
  .educ-6144-split,
  .educ-6144-final {
    width: calc(100% - 30px);
  }
  .educ-6144-split,
  .educ-6144-split[data-title-side="right"] {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "content";
    gap: 20px;
    padding: 34px 0 44px;
  }
  #educ6144ShiftCoreg.educ-6144-split {
    min-height: auto;
    padding: 34px 0 28px;
  }
  .educ-6144-split-title {
    min-height: auto;
  }
  .educ-6144-split-title-inner {
    position: static;
  }
  .educ-6144-split-title h2 {
    font-size: clamp(1.65rem, 8vw, 2.45rem);
  }
  .educ-6144-scroll,
  .educ-6144-phase-scroll {
    height: auto;
    min-height: auto;
    overflow: visible;
    scroll-snap-type: none;
  }
  .educ-6144-phase-pin {
    min-height: auto;
  }
  .educ-6144-phase-stage {
    position: static;
    min-height: auto;
  }
  .educ-6144-phase-panes {
    min-height: auto;
    flex: none;
  }
  .educ-6144-phase-row {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .educ-6144-phase-pane {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .educ-6144-phase-pane + .educ-6144-phase-pane {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px dashed #d7d7d7;
  }
  .educ-6144-phase-tabs {
    display: none;
  }
  .educ-6144-final-grid {
    grid-template-columns: 1fr;
    gap: clamp(22px, 4vh, 36px);
  }
  .educ-6144-final-pin {
    --edu-real-window-h: clamp(248px, 44svh, 400px);
  }
  .educ-6144-final-col--visual {
    order: -1;
  }
  .educ-6144-final-frame {
    width: min(100%, min(320px, 86vw));
    margin-inline: auto;
  }
  .educ-6144-judgment-pin {
    min-height: auto;
  }
  .educ-6144-judgment-stage {
    position: static;
  }
  .educ-6144-quote {
    padding: 0;
  }
  .educ-6144-quote--left .educ-6144-quote-text {
    border-left-width: 6px;
    padding-left: 14px;
  }
  .educ-6144-quote--right .educ-6144-quote-source {
    padding-right: calc(6px + 14px);
  }
  .educ-6144-quote--right .educ-6144-quote-text {
    border-right-width: 6px;
    padding-right: 14px;
  }
  .educ-6144-quote-text {
    font-size: clamp(1.25rem, 6.8vw, 2rem);
    line-height: 1.42;
  }
  .educ-6144-insights-block--split {
    gap: clamp(18px, 3vh, 30px);
  }
  .educ-6144-insights-timeline-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .educ-6144-insights-timeline-label {
    font-weight: 700;
  }
  .educ-6144-insights-medium-grid {
    grid-template-columns: 1fr;
  }
}

/* Single-project layout: feature card */
.course-projects[data-count="1"] {
  gap: 0;
}
.course-projects[data-count="1"] .course-project {
  padding: 36px 36px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}
.course-projects[data-count="1"] .course-project::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 70% at 100% 0%, var(--accent-soft) 0%, transparent 55%);
}
.course-projects[data-count="1"] .course-project-title {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

/* Multi-project list */
.course-projects[data-count="many"] .course-project {
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 24px 28px;
  align-items: start;
}
.course-projects[data-count="many"] .course-project:first-child { border-top: 0; padding-top: 8px; }
.course-projects[data-count="many"] .course-project-head {
  display: contents;
}
.course-projects[data-count="many"] .course-project-index {
  grid-column: 1;
  color: var(--fg-3);
  padding-top: 6px;
  align-self: start;
}
.course-projects[data-count="many"] .course-project-title {
  grid-column: 2;
}
.course-projects[data-count="many"] .course-project-desc {
  grid-column: 2;
}
.course-projects[data-count="many"] .course-project-tags {
  grid-column: 2;
}
.course-projects[data-count="many"] .course-project-link {
  grid-column: 3;
  grid-row: 1 / -1;
  align-self: start;
  margin-top: 4px;
}

.course-project-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.course-project-index { font-size: 0.75rem; }
.course-project-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--fg);
  margin: 0;
}
.course-project-desc {
  font-size: 1rem;
  color: var(--fg-2);
  line-height: 1.6;
  margin: 12px 0 0;
}
.course-project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.course-project-tag {
  display: inline-flex;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
.course-project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), gap var(--t-fast) var(--ease);
}
.course-project-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  gap: 12px;
}
.course-project-link .btn-arrow { transition: transform var(--t-fast) var(--ease); }
.course-project-link:hover .btn-arrow { transform: translate(2px, -2px); }

/* Floating book preview while hovering “Open project” (native cursor:url cannot use large PNGs). */
.course-project-link--hide-cursor {
  cursor: none !important;
}
.course-link-cursor-follower {
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: min(260px, 38vw);
  height: auto;
  pointer-events: none;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  box-shadow:
    0 16px 48px oklch(0 0 0 / 0.18),
    0 0 0 1px oklch(0 0 0 / 0.04);
}

@media (max-width: 900px) {
  .course-body { grid-template-columns: 1fr; gap: 36px; }
  .course-side { position: relative; top: auto; flex-direction: row; flex-wrap: wrap; gap: 18px 32px; }
  .course-projects[data-count="many"] .course-project {
    grid-template-columns: 36px 1fr;
  }
  .course-projects[data-count="many"] .course-project-link {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: flex-start;
  }
}

.case-nav-next {
  display: block;
  padding: 32px 0;
  transition: padding var(--t) var(--ease);
}
/* .case-nav-next:hover { padding-left: 24px; } */
.case-nav-kicker { color: var(--fg-3); margin-bottom: 12px; }
.case-nav-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--fg);
  font-family: var(--font-display);
  font-style: italic;
  transition: color var(--t) var(--ease);
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  /* gap: 0.35em 0.5em; */
}
.case-nav-title .work-arrow {
  position: static;
  top: auto;
  right: auto;
  width: 56px;
  height: 56px;
  margin: 0;
  flex-shrink: 0;
  font-size: 2rem;
  border: none;
  background: none;
}
.case-nav-next:hover .case-nav-title { color: var(--accent); }
.case-nav-next:hover .case-nav-title .work-arrow {
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  .case-body { grid-template-columns: 1fr; gap: 40px; }
  .case-side { position: static; flex-direction: row; flex-wrap: wrap; gap: 20px 32px; }
}

/* ============================================
   Demo frame (Built track)
   ============================================ */
.demo-frame {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
}
.demo-frame-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--fg-3);
}
.demo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--fg-3); opacity: 0.4; }
.demo-frame-bar .demo-dot:nth-child(1) { background: oklch(0.7 0.2 25); }
.demo-frame-bar .demo-dot:nth-child(2) { background: oklch(0.78 0.16 80); }
.demo-frame-bar .demo-dot:nth-child(3) { background: oklch(0.7 0.18 145); }
.demo-url { margin-left: 12px; }
.demo-open { margin-left: auto; color: var(--accent); transition: color var(--t-fast) var(--ease); }
.demo-open:hover { color: var(--fg); }
.demo-viewport {
  position: relative;
  min-height: 420px;
  background: var(--bg);
  overflow: hidden;
  padding: 24px;
}
.sound-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  height: 380px;
}
.sound-tile {
  background: var(--bg-3);
  border-radius: 4px;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.sound-tile:hover {
  background: var(--accent);
  transform: scale(1.18);
  z-index: 2;
}
.demo-hint {
  position: absolute;
  bottom: 14px; left: 14px;
  color: var(--fg-3);
  font-size: 0.7rem;
}

/* ============================================
   Tweaks panel
   ============================================ */
.tweaks-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 320px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 50;
  overflow: hidden;
  animation: tweak-in 0.32s var(--ease-out);
}
@keyframes tweak-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.tweaks-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.tweaks-head .mono { color: var(--accent); }
.tweaks-close {
  width: 28px; height: 28px;
  font-size: 1.3rem;
  display: grid; place-items: center;
  color: var(--fg-2);
}
.tweaks-close:hover { color: var(--fg); }

.tweaks-body { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.tweak-row { display: flex; flex-direction: column; gap: 8px; }
.tweak-label { color: var(--fg-3); }

.tweak-swatches { display: flex; gap: 8px; }
.swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid transparent;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.swatch.active { border-color: var(--fg); }
.swatch:hover { transform: scale(1.08); }
.swatch-blue { background: oklch(0.66 0.17 250); }
.swatch-gold { background: oklch(0.78 0.14 80); }
.swatch-magenta { background: oklch(0.68 0.22 340); }
.swatch-mint { background: oklch(0.78 0.12 165); }

.tweak-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--fg-2);
  transition: all var(--t-fast) var(--ease);
}
.pill:hover { border-color: var(--fg-2); color: var(--fg); }
.pill.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.tweaks-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--fg-3);
  font-size: 0.65rem;
}

@media (max-width: 720px) {
  .tweaks-panel { left: 16px; right: 16px; bottom: 16px; width: auto; }
}

/* ============================================
   Dark-mode overrides — Archive / Works page
   ============================================ */

/* Page background: slightly warmer dark instead of cold blue-grey */
[data-theme="dark"] .route-archive {
  background: oklch(0.14 0.012 255);
}

/* Profile section orbs — pull back saturation so they glow softly */
[data-theme="dark"] .archive-orb--yellow {
  background: oklch(0.72 0.12 80);
  opacity: 0.72;
}
[data-theme="dark"] .archive-orb--blue {
  background: oklch(0.62 0.14 245);
  opacity: 0.68;
}
[data-theme="dark"] .archive-orb--purple {
  background: oklch(0.58 0.14 300 / 0.5);
}

/* Profile name + role — brighter text, subtle letter-spacing */
[data-theme="dark"] .archive-name {
  color: oklch(0.96 0.006 250);
}
[data-theme="dark"] .archive-role {
  color: oklch(0.6 0.012 250);
}

/* Profile avatar ring */
[data-theme="dark"] .archive-profile-image {
  box-shadow: 0 0 0 2px oklch(0.3 0.015 250 / 0.6);
}

/* Filter bar — give it a visible surface */
[data-theme="dark"] .archive-filters {
  background: oklch(0.18 0.012 252);
  border-color: oklch(0.28 0.012 252 / 0.5);
}
[data-theme="dark"] .archive-filters .track-tab {
  border-right-color: oklch(0.28 0.012 252 / 0.5);
  color: oklch(0.78 0.01 250);
}

/* Tab hover/active fill: use near-white fill so text stays readable */
[data-theme="dark"] .archive-filters .track-tab::before {
  background: oklch(0.92 0.006 250);
}
[data-theme="dark"] .archive-filters .track-tab:hover,
[data-theme="dark"] .archive-filters .track-tab.active {
  color: oklch(0.14 0.01 255);
}
[data-theme="dark"] .archive-filters::after {
  color: oklch(0 0 0 / 0.1);
}

/* Wheel / sidebar track */
[data-theme="dark"] .archive-selected-track {
  background: oklch(0.17 0.013 253 / 0.75);
  border-right-color: oklch(0.3 0.012 252 / 0.4);
}
[data-theme="dark"] .archive-wheel-item--center {
  text-shadow: 0 12px 28px oklch(0 0 0 / 0.45);
}

/* Gallery grid: scroll area */
[data-theme="dark"] .archive-gallery-grid {
  background: transparent;
}

/* Gallery card media placeholder — dark-friendly palette */
[data-theme="dark"] .archive-gallery-media {
  background:
    linear-gradient(135deg, oklch(0.28 0.02 258 / 0.7), oklch(0.22 0.015 250 / 0.9)),
    oklch(0.2 0.012 252);
}
[data-theme="dark"] .archive-gallery-media::before {
  background:
    linear-gradient(90deg, oklch(0.12 0.01 250 / 0.82) 0 34%, transparent 34% 100%),
    repeating-linear-gradient(0deg, oklch(0.9 0 0 / 0.12) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, oklch(0.38 0.04 255 / 0.7), oklch(0.26 0.02 250 / 0.6));
  opacity: 0.9;
}
[data-theme="dark"] .archive-gallery-media::after {
  background:
    linear-gradient(90deg, oklch(0.9 0 0 / 0.14), oklch(0.9 0 0 / 0.08)),
    repeating-linear-gradient(90deg, oklch(0.9 0 0 / 0.08) 0 10px, transparent 10px 20px);
  opacity: 0.55;
}

/* Gallery meta text */
[data-theme="dark"] .archive-gallery-year {
  color: oklch(0.88 0.01 250);
}
[data-theme="dark"] .archive-gallery-title {
  color: oklch(0.72 0.01 250);
}
[data-theme="dark"] .archive-gallery-label {
  background: oklch(0.22 0.012 252 / 0.9);
  color: oklch(0.62 0.01 250);
}

/* Gallery card hit-area hover subtle lift */
[data-theme="dark"] .archive-gallery-card:has(.archive-gallery-card-hit):hover
  .archive-gallery-media {
  filter: contrast(1.08) brightness(1.04);
}

/* Masonry photo captions */
[data-theme="dark"] .archive-masonry-caption-year {
  color: oklch(0.88 0.01 250);
}
[data-theme="dark"] .archive-masonry-caption-title {
  color: oklch(0.58 0.012 250);
}

/* Masonry media placeholder background */
[data-theme="dark"] .archive-masonry-media {
  background:
    radial-gradient(circle at 24% 18%, oklch(0.32 0.04 255 / 0.5), transparent 36%),
    linear-gradient(145deg, oklch(0.22 0.02 255), oklch(0.18 0.015 250 / 0.85));
  border-color: oklch(0.28 0.015 252 / 0.45);
}

/* ============================================
  EDUC 5930 — Editorial portfolio
  No bounding boxes; uses oversized numerals,
  hairline rules, asymmetry, and horizontal scroll.
============================================ */
.route-educ-5930-site {
  --edu5930-pad: clamp(20px, 5vw, 64px);
  --edu5930-rule: var(--line-soft);
  max-width: 100%;
  margin: 0;
  padding: clamp(112px, 12vh, 148px) 0 clamp(80px, 10vh, 140px);
  display: block;
}

/* ----- Hero ----- */
.educ-5930-hero {
  display: grid;
  gap: 18px;
  padding: 0 var(--edu5930-pad);
  max-width: 1200px;
  margin: 0 auto clamp(38px, 6vh, 64px);
}
.educ-5930-back {
  display: inline-flex;
  justify-self: start;
  margin-bottom: 4px;
}
.educ-5930-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.educ-5930-title {
  margin: 4px 0 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  max-width: 16ch;
}
.educ-5930-title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.educ-5930-lede {
  margin: 8px 0 0;
  max-width: 60ch;
  color: var(--fg-2);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.65;
}
.educ-5930-hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.educ-5930-hero-meta .dot { opacity: 0.5; }

/* ----- Sticky local navigation ----- */
.educ-5930-localnav {
  position: sticky;
  top: clamp(58px, 6.5vh, 76px);
  z-index: 40;
  margin: 0 auto clamp(48px, 8vh, 96px);
  max-width: 1200px;
  padding: 0 var(--edu5930-pad);
  pointer-events: none;
}
.educ-5930-localnav-inner {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: oklch(from var(--bg) l c h / 0.78);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 16px 36px oklch(0 0 0 / 0.07);
  width: max-content;
  max-width: 100%;
  margin: 0;
  top: 20px;
  pointer-events: auto;
  overflow: hidden;
  --educ5930-nav-shift: 0px;
  transform: translateX(var(--educ5930-nav-shift));
  will-change: transform;
}
.educ-5930-localnav-inner a {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--fg-2);
  letter-spacing: -0.005em;
  transition: color var(--t-fast) var(--ease);
  white-space: nowrap;
}
.educ-5930-localnav-inner a .mono {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  transition: color var(--t-fast) var(--ease);
}
.educ-5930-localnav-inner a em.label {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.88rem;
  letter-spacing: -0.02em;
}
.educ-5930-localnav-inner a:hover { color: var(--fg); }
.educ-5930-localnav-inner a:hover .mono { color: var(--fg-2); }
.educ-5930-localnav-inner a.is-active { color: var(--fg); }
.educ-5930-localnav-inner a.is-active .mono { color: var(--accent); }
.educ-5930-localnav-inner a.is-active em.label { color: var(--accent); }
.educ-5930-localnav-progress {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.educ-5930-localnav-progress > span {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 0;
  height: 0;
  border-radius: 999px;
  background: oklch(from var(--accent) l c h / 0.12);
  border: 1px solid oklch(from var(--accent) l c h / 0.24);
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.4s var(--ease),
              height 0.4s var(--ease);
}
@media (max-width: 720px) {
  .educ-5930-localnav-inner a em.label { display: none; }
  .educ-5930-localnav-inner a { padding: 10px 14px; }
}

/* ----- Chapter header ----- */
.educ-5930-chapter {
  position: relative;
  padding: clamp(40px, 7vh, 80px) 0 clamp(56px, 9vh, 110px);
  scroll-margin-top: clamp(116px, 14vh, 160px);
  border-top: 1px solid var(--edu5930-rule);
}

.educ-5930-chapter-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(6px, 1.2vw, 14px);
  max-width: 1200px;
  margin: 0 auto clamp(36px, 6vh, 72px);
  padding: 0 var(--edu5930-pad);
}
.educ-5930-chapter-num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #1597ff;
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}
.educ-5930-chapter-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 48rem;
}
.educ-5930-chapter-meta p.mono {
  margin: 0 0 12px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: center;
}
.educ-5930-chapter-meta h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-align: center;
}
.educ-5930-chapter-meta h2 > em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--fg);
}
.educ-5930-chapter-sub {
  display: block;
  margin-top: 0.4em;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1rem, 1.65vw, 1.28rem);
  letter-spacing: -0.02em;
  color: var(--fg-2);
  line-height: 1.25;
}
.educ-5930-chapter-lede {
  margin: 18px 0 0;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--fg-2);
  font-size: clamp(0.98rem, 1.05vw, 1.05rem);
  line-height: 1.7;
  text-align: center;
}
/* ----- Horizontal scroll : sketchbook ----- */
.educ-5930-hscroll {
  position: relative;
  margin: 0 0 clamp(40px, 6vh, 72px);
}
.educ-5930-hscroll-track {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 2.4vw, 32px);
  padding: 8px var(--edu5930-pad) 22px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.educ-5930-book-track {
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 2.4vw, 32px);
  padding: 8px var(--edu5930-pad) 22px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.educ-5930-hscroll-track::-webkit-scrollbar,
.educ-5930-book-track::-webkit-scrollbar { display: none; }

.educ-5930-piece {
  margin: 0;
  scroll-snap-align: start;
  display: grid;
  gap: 12px;
  position: relative;
  flex: 0 0 clamp(250px, 32vw, 410px);
  transition: opacity 0.28s var(--ease), filter 0.28s var(--ease), transform 0.28s var(--ease);
  cursor: pointer;
}
.educ-5930-piece-inner {
  display: grid;
  gap: 12px;
}
.educ-5930-piece-no {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.educ-5930-piece-img {
  position: relative;
  width: 100%;
  min-height: 140px;
  overflow: visible;
  border-radius: 4px;
  background: transparent;
}
.educ-5930-piece-img::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid oklch(from var(--fg) l c h / 0.06);
  pointer-events: none;
  border-radius: inherit;
}
.educ-5930-piece-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.6s var(--ease), filter 0.4s var(--ease);
}
.educ-5930-piece:hover .educ-5930-piece-img img {
  transform: scale(1.04);
}
.educ-5930-piece figcaption {
  margin: 0;
  font-size: 0;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 100%;
  text-align: center;
}
.educ-5930-piece figcaption strong {
  display: block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1.35;
  text-align: center;
  color: var(--fg);
  white-space: nowrap;
}

.educ-5930-hscroll-track.is-focus-mode .educ-5930-piece {
  opacity: 0.24;
  filter: grayscale(0.35);
  transform: scale(0.985);
}
.educ-5930-hscroll-track.is-focus-mode .educ-5930-piece.is-active {
  opacity: 1;
  filter: none;
  transform: none;
}
.educ-5930-piece.is-active {
  flex-basis: min(90vw, 920px);
}
.educ-5930-piece.is-active .educ-5930-piece-no {
  margin-bottom: 2px;
}
.educ-5930-piece.is-active .educ-5930-piece-inner {
  grid-template-columns: minmax(260px, 44%) minmax(280px, 1fr);
  column-gap: clamp(16px, 2.2vw, 28px);
  align-items: center;
  align-content: center;
  min-height: min(64vh, 620px);
}
.educ-5930-piece.is-active figcaption {
  align-self: center;
  text-align: left;
  font-size: 0.95rem;
  max-width: 100%;
}
.educ-5930-piece.is-active figcaption strong {
  display: block;
  text-align: left;
  font-size: 1.04rem;
  margin-bottom: 8px;
  white-space: nowrap;
}

/* Custom scroll indicator */
.educ-5930-hscroll-bar {
  position: relative;
  margin: 6px var(--edu5930-pad) 0;
  height: 2px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}
.educ-5930-hscroll-thumb {
  display: block;
  height: 100%;
  width: 22%;
  background: var(--fg);
  opacity: 0.65;
  transform: translateX(0);
  transition: width 0.18s var(--ease);
}
.educ-5930-hscroll-hint {
  margin: 8px var(--edu5930-pad) 0;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ----- Pull quote / reflection ----- */
.educ-5930-pull {
  display: grid;
  grid-template-columns: clamp(120px, 18vw, 220px) 1fr;
  gap: clamp(20px, 4vw, 64px);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(20px, 3vh, 36px) var(--edu5930-pad) 0;
  position: relative;
}
.educ-5930-pull::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--edu5930-pad);
  right: var(--edu5930-pad);
  height: 1px;
}
.educ-5930-pull-label {
  font-size: 1.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.educ-5930-pull-text {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.45;
  color: var(--fg);
  max-width: 38ch;
}
.educ-5930-pull-text em {
  background: linear-gradient(transparent 60%, oklch(from var(--accent) l c h / 0.22) 60%);
  padding: 0 2px;
}
.educ-5930-pull-after {
  grid-column: 2;
  color: var(--fg-2);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 62ch;
}
.educ-5930-pull-prose p {
  margin: 0;
}
.educ-5930-pull-prose p + p {
  margin-top: 1.15em;
}
.educ-5930-pull-prose {
  text-wrap: pretty;
}

/* ----- Lessons spreads (Module 02) ----- */
.educ-5930-spreads {
  max-width: 1200px;
  margin: 0 auto clamp(40px, 6vh, 72px);
  padding: 0 var(--edu5930-pad);
  display: grid;
  gap: clamp(36px, 7vh, 96px);
}
.educ-5930-spread {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(22px, 4vw, 60px);
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.educ-5930-spread--mirrored {
  grid-template-columns: 0.95fr 1.05fr;
}
.educ-5930-spread--mirrored .educ-5930-spread-img { order: 2; }
.educ-5930-spread--mirrored .educ-5930-spread-meta { order: 1; }

.educ-5930-spread-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
}
.educ-5930-spread-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.4s var(--ease);
}
.educ-5930-spread:hover .educ-5930-spread-img img {
  transform: scale(1.035);
}
.educ-5930-spread-img::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid oklch(from var(--fg) l c h / 0.06);
  pointer-events: none;
  border-radius: inherit;
}
.educ-5930-spread-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: oklch(from var(--bg) l c h / 0.85);
  backdrop-filter: blur(8px);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  border: 1px solid var(--line-soft);
}
.educ-5930-spread-meta p.mono {
  margin: 0 0 12px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.educ-5930-spread-meta h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.educ-5930-spread-desc {
  margin: 16px 0 22px;
  color: var(--fg-2);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 42ch;
}
.educ-5930-spread-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--fg);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  transition: gap var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.educ-5930-spread:hover .educ-5930-spread-cta {
  gap: 14px;
  color: var(--accent);
  border-color: var(--accent);
}

/* ----- Book gallery (Module 03) ----- */
.educ-5930-book {
  position: relative;
  margin: 0 0 clamp(40px, 6vh, 72px);
}
.educ-5930-book-track {
  padding-top: 24px;
  align-items: flex-start;
}
.educ-5930-page {
  margin: 0;
  scroll-snap-align: center;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 10px;
  position: relative;
  flex: 0 0 clamp(220px, 26vw, 320px);
}
.educ-5930-page-no {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.educ-5930-page-img {
  position: relative;
  width: 100%;
  min-height: 160px;
  align-self: start;
  overflow: visible;
  border-radius: 2px;
  background: transparent;
  box-shadow:
    0 1px 0 oklch(from var(--fg) l c h / 0.04),
    0 22px 38px -22px oklch(from var(--fg) l c h / 0.35);
  transition: transform 0.55s var(--ease), box-shadow 0.45s var(--ease);
}
.educ-5930-page-img::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid oklch(from var(--fg) l c h / 0.07);
  border-left: 1px solid oklch(from var(--fg) l c h / 0.18);
  pointer-events: none;
}
.educ-5930-page-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.educ-5930-page:hover .educ-5930-page-img {
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 oklch(from var(--fg) l c h / 0.04),
    0 28px 48px -22px oklch(from var(--fg) l c h / 0.45);
}
.educ-5930-page figcaption {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.96rem;
  line-height: 1.45;
  color: var(--fg-2);
  max-width: 100%;
  align-self: start;
}
.educ-5930-page figcaption em {
  color: var(--fg);
}

/* ----- Book lightbox ----- */
html.is-educ5930-lightbox-open,
html.is-educ5930-lightbox-open body {
  overflow: hidden;
}
.educ-5930-lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  grid-template-columns: minmax(64px, 8vw) 1fr minmax(64px, 8vw);
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  padding: clamp(18px, 3.5vw, 42px);
  background: oklch(from var(--bg) l c h / 0.82);
  backdrop-filter: blur(10px) saturate(0.9);
  -webkit-backdrop-filter: blur(10px) saturate(0.9);
}
.educ-5930-lightbox[hidden] {
  display: none !important;
}
.educ-5930-lightbox-stage {
  display: grid;
  place-items: center;
  min-height: 0;
}
.educ-5930-lightbox-stage img {
  max-width: min(88vw, 1180px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 28px 70px oklch(0 0 0 / 0.38);
  cursor: zoom-out;
}
.educ-5930-lightbox-arrow {
  width: clamp(44px, 5vw, 58px);
  height: clamp(44px, 5vw, 58px);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: oklch(from var(--bg) l c h / 0.82);
  color: var(--fg);
  font-size: clamp(1.2rem, 2.1vw, 1.9rem);
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.educ-5930-lightbox-arrow:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
  background: var(--card);
}
.educ-5930-lightbox-arrow--prev { justify-self: center; }
.educ-5930-lightbox-arrow--next { justify-self: center; }

@media (max-width: 720px) {
  .educ-5930-lightbox {
    grid-template-columns: 52px 1fr 52px;
    padding: 14px;
  }
  .educ-5930-lightbox-stage img {
    max-width: 84vw;
    max-height: 78vh;
  }
}

/* ----- Statement (long form, two-column) ----- */
.educ-5930-statement {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(20px, 3vh, 36px) var(--edu5930-pad) 0;
  border-top: 1px dashed var(--edu5930-rule);
  column-count: 1;
  column-gap: clamp(28px, 4vw, 64px);
  column-rule: 1px solid var(--edu5930-rule);
}
.educ-5930-statement-label {
  font-size: 1.3rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: left;
  /* break-after: column; */
  margin: 0 0 18px;
}
/* Match Final essay body typography (.educ-5930-essay) */
.educ-5930-statement-prose {
  max-width: 90ch;
  margin: 0;
  text-align: left;
  font-size: 1.04rem;
  line-height: 1.95;
  color: var(--fg-2);
  text-wrap: pretty;
}
.educ-5930-statement-prose p {
  margin: 0 0 22px;
  break-inside: avoid;
}
.educ-5930-statement-prose .educ-5930-essay-section-title:first-child {
  margin-top: 0;
}
@media (max-width: 880px) {
  .educ-5930-statement {
    column-count: 1;
  }
}

/* ----- Final essay ----- */
.educ-5930-chapter--essay { padding-bottom: clamp(72px, 10vh, 140px); }
.educ-5930-chapter--references {
  padding-bottom: clamp(72px, 10vh, 140px);
}
.educ-5930-references {
  max-width: 90ch;
  margin: 0 auto;
  padding: 0 var(--edu5930-pad);
  text-align: left;
}
.educ-5930-references-list {
  margin: 0;
  padding-left: 1.35em;
  font-size: 1.04rem;
  line-height: 1.95;
  color: var(--fg-2);
  text-wrap: pretty;
}
.educ-5930-references-list li {
  padding-left: 0.35em;
}
.educ-5930-references-list li + li {
  margin-top: 0.9em;
}
.educ-5930-essay {
  max-width: 90ch;
  margin: 0 auto;
  padding: 0 var(--edu5930-pad);
  font-size: 1.04rem;
  line-height: 1.95;
  color: var(--fg-2);
}
.educ-5930-essay p {
  margin: 0 0 22px;
}
.educ-5930-essay-first {
  font-size: 1.08rem;
}
.educ-5930-dropcap {
  float: left;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 4.4em;
  line-height: 0.86;
  margin: 8px 14px 0 -4px;
  color: var(--accent);
}
.educ-5930-essay-quote {
  margin: 28px 0 28px -4px;
  padding-left: clamp(16px, 3vw, 32px);
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  line-height: 1.45;
  color: var(--fg);
}
.educ-5930-essay-quote em {
  background: linear-gradient(transparent 60%, oklch(from var(--accent) l c h / 0.22) 60%);
  padding: 0 2px;
}
.educ-5930-essay-sign {
  margin-top: 32px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.educ-5930-essay-section-title {
  margin: 30px 0 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.08rem, 1.9vw, 1.45rem);
  line-height: 1.35;
  color: var(--fg);
}

/* Dark theme tuning */
[data-theme="dark"] .educ-5930-localnav-inner {
  background: oklch(from var(--bg) l c h / 0.66);
}
[data-theme="dark"] .educ-5930-page-img {
  box-shadow:
    0 1px 0 oklch(0.95 0 0 / 0.04),
    0 22px 38px -22px oklch(0 0 0 / 0.7);
}

/* Responsive */
@media (max-width: 980px) {
  .educ-5930-spread,
  .educ-5930-spread--mirrored {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .educ-5930-spread--mirrored .educ-5930-spread-img { order: 0; }
  .educ-5930-spread--mirrored .educ-5930-spread-meta { order: 0; }
  .educ-5930-pull {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .educ-5930-pull-after { grid-column: 1; }
}
@media (max-width: 640px) {
  .educ-5930-book-track { align-items: flex-start; }
  .educ-5930-hscroll-track .educ-5930-piece {
    flex-basis: 78vw;
  }
  .educ-5930-piece.is-active {
    flex-basis: 86vw;
  }
  .educ-5930-piece.is-active .educ-5930-piece-inner {
    grid-template-columns: 1fr;
    row-gap: 12px;
    min-height: 0;
    align-items: start;
  }
  .educ-5930-piece.is-active figcaption {
    align-self: start;
  }
  .educ-5930-book-track .educ-5930-page { flex-basis: 60vw; }
}
