/* ============================================================
   Fares Neghiz — Portfolio
   Tokens + base + sections. Light is default; dark follows OS
   (prefers-color-scheme) and can be force-toggled via [data-theme].
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --lime: #d4ff00;
  --ink: #212121;
  --white: #ffffff;

  /* light theme (default) */
  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --text: #212121;
  --muted: #8a8a8a;
  --line: #d9d9d9;
  --hairline: rgba(33, 33, 33, 0.12);
  --wave: #212121;
  --wave-op: 0.9;
  --thread: #8a8a8a;
  --thread-op: 0.65;
  --sheet-bg: #ffffff;
  --sheet-text: #212121;
  --circuit: #d9d9d9;
  --card-border: transparent;
  --nav-bg: rgba(242, 242, 242, 0.72);
  --shadow: 0 30px 60px -30px rgba(33, 33, 33, 0.25);

  --maxw: 1384px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1a1a;
    --surface: #242424;
    --surface-2: #242424;
    --text: #ffffff;
    --muted: #8a8a8a;
    --line: rgba(255, 255, 255, 0.14);
    --hairline: rgba(255, 255, 255, 0.12);
    --wave: #ffffff;
    --wave-op: 0.5;
    --thread: #d4ff00;
    --thread-op: 0.7;
    --sheet-bg: #242424;
    --sheet-text: #d4ff00;
    --circuit: rgba(255, 255, 255, 0.16);
    --card-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(26, 26, 26, 0.72);
    --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7);
  }
}

[data-theme="dark"] {
  --bg: #1a1a1a;
  --surface: #242424;
  --surface-2: #242424;
  --text: #ffffff;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.14);
  --hairline: rgba(255, 255, 255, 0.12);
  --wave: #ffffff;
  --wave-op: 0.5;
  --thread: #d4ff00;
  --thread-op: 0.7;
  --sheet-bg: #242424;
  --sheet-text: #d4ff00;
  --circuit: rgba(255, 255, 255, 0.16);
  --card-border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(26, 26, 26, 0.72);
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  transition: background-color 0.5s var(--ease);
}

html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }

.mono {
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0.02em;
}

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Reveal animation primitive ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
.reveal[data-d="5"] { transition-delay: 0.40s; }

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

/* ---------- Word-level reveal (staggered) ---------- */
.reveal-words .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  transition:
    opacity 0.7s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 40ms);
  will-change: opacity, transform;
}
.reveal-words.in .word {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal-words .word { opacity: 1; transform: none; transition: none; }
}

/* ---------- Animated threads (fixed full-viewport background) ---------- */
.threads-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--thread-op);
  transition: opacity 0.5s var(--ease);
}
.threads-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Wave field ---------- */
.wave {
  position: absolute;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  color: var(--wave);
  opacity: var(--wave-op);
}
.wave svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wave path { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wave path.accent { stroke: var(--lime); opacity: 1; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: 88px;
  display: flex;
  align-items: center;
  background: linear-gradient(var(--nav-bg), color-mix(in srgb, var(--nav-bg) 0%, transparent));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: translateY(0);
  transition: background 0.5s var(--ease), transform 0.55s var(--ease);
  will-change: transform;
}
.nav--hidden { transform: translateY(-100%); }

.nav__inner {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* brand label — fades in once user scrolls past the hero */
.nav__brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -4px);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.45s var(--ease);
}
.nav--scrolled .nav__brand {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.burger {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  padding: 8px 0;
  background: none;
  border: 0;
}
.burger span {
  display: block;
  height: 2px;
  width: 35px;
  background: var(--text);
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease), width 0.45s var(--ease);
}
.burger span:nth-child(2) { width: 24px; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 35px; }
.burger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 35px; }
.nav__right { display: flex; align-items: center; gap: 12px; }

/* CTA group — pill "Get in touch" + arrow icon that expand toward each other on hover */
.cta-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.4s var(--ease);
}
.cta-group:hover {
  transform: translateY(-2px);
}
.cta-group .pill--cta {
  transition: filter 0.3s var(--ease),
              padding-right 0.4s var(--ease),
              border-top-right-radius 0.4s var(--ease),
              border-bottom-right-radius 0.4s var(--ease);
}
.cta-group .icon-btn {
  transition: background 0.3s var(--ease),
              margin-left 0.4s var(--ease),
              border-top-left-radius 0.4s var(--ease),
              border-bottom-left-radius 0.4s var(--ease);
}
.cta-group:hover .pill--cta {
  padding-right: 28px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
.cta-group:hover .icon-btn {
  margin-left: -6px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.icon-btn {
  width: 41px; height: 41px;
  border-radius: 999px;
  border: 0;
  background: var(--lime);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease);
}
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn svg { width: 18px; height: 18px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 41px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  border: 0;
  white-space: nowrap;
  transition: transform 0.4s var(--ease), filter 0.3s var(--ease);
}
.pill:hover { transform: translateY(-2px); filter: brightness(1.04); }
.pill--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--hairline);
}
.pill--ghost:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); }

/* theme toggle */
.theme-toggle {
  width: 41px; height: 41px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.theme-toggle svg { width: 18px; height: 18px; position: absolute; transition: transform 0.5s var(--ease), opacity 0.4s var(--ease); }
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.theme-toggle .i-moon { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle .i-sun { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
}

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px var(--gutter) 64px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease);
  pointer-events: none;
}
.menu.open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.menu__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(6px, 1.4vw, 14px); }
.menu__list a {
  font-size: clamp(40px, 9vw, 96px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), color 0.3s;
}
.menu.open .menu__list a { opacity: 1; transform: none; }
.menu.open .menu__list li:nth-child(1) a { transition-delay: 0.12s; }
.menu.open .menu__list li:nth-child(2) a { transition-delay: 0.18s; }
.menu.open .menu__list li:nth-child(3) a { transition-delay: 0.24s; }
.menu.open .menu__list li:nth-child(4) a { transition-delay: 0.30s; }
.menu.open .menu__list li:nth-child(5) a { transition-delay: 0.36s; }
.menu__list a:hover { color: var(--muted); }
.menu__list .idx { font-size: 14px; font-weight: 500; color: var(--lime); font-family: "DM Mono", monospace; transform: translateY(-0.4em); }
.menu__foot { margin-top: clamp(28px, 5vw, 56px); display: flex; gap: 28px; flex-wrap: wrap; }
.menu__foot a { font-size: 15px; color: var(--muted); }
.menu__foot a:hover { color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: clamp(22vh, 32vh, 38vh);
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero__wave { top: -60px; right: -2%; width: 78%; height: 720px; }
.hero__inner { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; }
.hero__hi { font-size: clamp(22px, 2.4vw, 32px); font-weight: 300; }
.hero__title {
  margin: 18px 0 0;
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.02em;
}
.hero__scroll {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.hero__scroll .track {
  width: 1.5px; height: 64px;
  background: var(--hairline);
  position: relative;
  overflow: hidden;
}
.hero__scroll .track::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 26px;
  background: var(--lime);
  animation: scrolldot 2.2s var(--ease) infinite;
}
@keyframes scrolldot {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(260%); }
}
.hero__scroll span { font-size: 16px; color: var(--muted); }

/* ============================================================
   STATEMENT / intro
   ============================================================ */
.statement {
  position: relative;
  padding: clamp(80px, 14vw, 200px) 0;
  overflow: hidden;
}
.statement__wave { left: -10%; top: 20%; width: 120%; height: 560px; }
.statement__inner { position: relative; z-index: 2; max-width: 980px; margin-inline: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 64px; }
.statement h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 300;
  line-height: 1.78;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ============================================================
   STORY
   ============================================================ */
.story { position: relative; padding: clamp(80px, 12vw, 180px) 0; }
.story__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.h-section { font-size: clamp(28px, 3.4vw, 36px); font-weight: 300; letter-spacing: -0.01em; margin: 0; }
.story__lead { grid-column: 7 / 13; display: flex; flex-direction: column; gap: 28px; }
.story__lead p { margin: 0; max-width: 50ch; }
.story__second {
  grid-column: 2 / 9;
  margin-top: clamp(40px, 7vw, 100px);
  max-width: 52ch;
}
.story__media {
  grid-column: 1 / 7;
  margin: 0;
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.story__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.6s var(--ease);
}
.story__media:hover img { transform: scale(1.03); }

/* image reveal — slides in from the left, soft scale */
.reveal-img {
  opacity: 0;
  transform: translateX(-48px) scale(0.96);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  will-change: opacity, transform;
}
.reveal-img.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal-img { opacity: 1; transform: none; transition: none; }
}

/* placeholder */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--line) 60%, transparent) 0 1px, transparent 1px 11px),
    var(--line);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 55%, transparent);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ============================================================
   WHAT I DO
   ============================================================ */
.whatido { padding: clamp(40px, 7vw, 90px) 0; }
.whatido__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(28px, 4vw, 56px); }
.whatido__col { grid-column: 4 / 11; display: flex; flex-direction: column; gap: 47px; }
.whatido__paras { display: flex; flex-direction: column; gap: 36px; max-width: 60ch; }
.whatido__paras p { margin: 0; }
.divider { height: 4px; background: var(--lime); border: 0; border-radius: 4px; width: 100%; }
.facts { display: flex; gap: clamp(40px, 7vw, 90px); flex-wrap: wrap; }
.fact { display: flex; flex-direction: column; gap: 16px; }
.fact .mono { color: var(--text); }
.fact p { margin: 0; line-height: 1.7; }

/* ============================================================
   STATS
   ============================================================ */
.stats { position: relative; padding: clamp(60px, 11vw, 150px) 0; overflow: hidden; }
.stats__wave { left: -8%; bottom: -10%; width: 116%; height: 520px; }
.stats__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
  align-items: center;
}
.stat-card {
  border-radius: 22px;
  padding: 30px;
  min-height: 258px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-card .mono { letter-spacing: 0.08em; text-transform: uppercase; }
.stat-card .num {
  font-size: clamp(86px, 9vw, 128px);
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-card--ink { background: var(--ink); }
.stat-card--ink .mono { color: var(--lime); }
.stat-card--ink .num { color: var(--lime); }
.stat-card--ink.alt .mono { color: var(--white); }
.stat-card--ink.alt .num { color: var(--white); }
.stat-card--light { background: var(--white); }
.stat-card--light .mono,
.stat-card--light .num { color: var(--ink); }

.stat-1 { grid-column: 1 / 5; }
.stat-2 { grid-column: 5 / 9; }
.stat-3 { grid-column: 9 / 13; }

/* ============================================================
   EXPERIENCE
   ============================================================ */
.section-head { text-align: center; padding: clamp(40px, 7vw, 90px) 0 clamp(30px, 5vw, 64px); }
.section-head .h-section { display: inline-block; }

.experience { position: relative; padding-bottom: clamp(40px, 8vw, 120px); }
.experience .section-head {
  text-align: left;
  padding: clamp(60px, 10vw, 120px) 0 clamp(20px, 3vw, 40px);
}
.experience .section-head .h-section {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.exp-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 7vw, 110px);
  padding: clamp(20px, 4vw, 48px) 0;
}
/* curved, glowing timeline drawn as an SVG path (built in JS) */
.exp-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 0;
  pointer-events: none;
}
.exp-line path { fill: none; }
.exp-line__base {
  stroke: url(#expFade);
  stroke-width: 2;
  opacity: 0.28;
}
.exp-line__trail {
  /* the portion already travelled by the dot — bright + glowing.
     stroke-dasharray / -dashoffset are driven by scroll in JS. */
  stroke: url(#expFade);
  stroke-width: 2.5;
  stroke-linecap: round;
  filter:
    drop-shadow(0 0 6px rgba(212, 255, 0, 0.9))
    drop-shadow(0 0 16px rgba(212, 255, 0, 0.55))
    drop-shadow(0 0 30px rgba(212, 255, 0, 0.3));
}

.exp-card {
  position: relative;
  z-index: 2;
  width: min(430px, 92%);
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.exp-card[data-side="left"] {
  align-self: flex-start;
  margin-left: clamp(20px, 10%, 160px);
}
.exp-card[data-side="right"] {
  align-self: flex-end;
  margin-right: clamp(20px, 10%, 160px);
}
/* single glowing dot that travels along the curved line as the user scrolls.
   left / top (in px, relative to the track) are set by JS from the path. */
.exp-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow:
    0 0 8px rgba(212, 255, 0, 0.95),
    0 0 20px rgba(212, 255, 0, 0.6),
    0 0 44px rgba(212, 255, 0, 0.3);
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.exp-dot.is-ready { opacity: 1; }

/* experience cards slide in from their own side, with a soft blur + scale */
.exp-card[data-side="left"].reveal {
  opacity: 0;
  transform: translate(-64px, 32px) scale(0.94);
  filter: blur(8px);
}
.exp-card[data-side="right"].reveal {
  opacity: 0;
  transform: translate(64px, 32px) scale(0.94);
  filter: blur(8px);
}
.exp-card.reveal {
  transition:
    opacity 0.9s var(--ease),
    transform 1.05s var(--ease),
    filter 0.9s var(--ease);
}
.exp-card[data-side].reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}
@media (prefers-reduced-motion: reduce) {
  .exp-card[data-side].reveal { opacity: 1; transform: none; filter: none; }
}
.exp-card .meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 48px; }
.exp-card h3 {
  margin: 0 0 40px;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
}
.exp-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.exp-card li { line-height: 1.6; position: relative; padding-left: 18px; }
.exp-card li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; background: var(--lime); border-radius: 1px; }

/* ============================================================
   EDUCATION
   ============================================================ */
.education { padding-bottom: clamp(60px, 10vw, 140px); }
.edu-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; align-items: start; }
.edu-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.edu-card .meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 48px; }
.edu-card h3 {
  margin: 0 0 60px;
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.edu-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.edu-card li { line-height: 1.7; }
.edu-1 { grid-column: 1 / 6; }
.edu-2 { grid-column: 7 / 13; align-self: start; }

/* ============================================================
   SELECTED WORK
   ============================================================ */
.work { padding-bottom: clamp(60px, 10vw, 140px); }
.work .section-head {
  text-align: left;
  padding: clamp(60px, 10vw, 120px) 0 clamp(20px, 3vw, 40px);
}
.work .section-head .h-section {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.work__block { margin-bottom: clamp(48px, 7vw, 88px); }
.work__block:last-child { margin-bottom: 0; }
.work__kicker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.work__kicker .mono { letter-spacing: 0.08em; text-transform: uppercase; }
.work__note { color: var(--muted); font-size: 12px; }
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; }
.work-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.work-card .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 36px;
  color: var(--muted);
}
.work-card .meta .mono { letter-spacing: 0.08em; text-transform: uppercase; }
.work-card h3 {
  margin: 0 0 16px;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.work-card p { margin: 0 0 28px; line-height: 1.7; max-width: 58ch; }
.work-card__tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.work-card__tags .mono {
  font-size: 12px;
  line-height: 1;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}
.wc--4 { grid-column: span 4; }
.wc--6 { grid-column: span 6; }
.wc--8 { grid-column: span 8; }

/* ============================================================
   CORE STACK — pinned section + overlapping card deck
   ============================================================ */
.stack {
  position: relative;
}
.stack__pin {
  position: relative;
  display: block;
}
.stack__shell {
  padding-top: clamp(80px, 12vh, 150px);
  padding-bottom: clamp(70px, 14vh, 160px);
}
.stack-head {
  padding: 0 0 clamp(28px, 5vh, 60px);
}
.stack-head h2 {
  margin: 0;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.stack__deck {
  position: relative;
}
.sheet {
  position: sticky;
  top: 110px;
  height: clamp(340px, 60vh, 520px);
  margin-bottom: clamp(44px, 9vh, 120px);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  transform-origin: top center;
  transform: translateZ(0);
  will-change: transform, filter;
}
.sheet:last-child { margin-bottom: 0; }
.sheet__art { position: relative; overflow: hidden; }
.sheet__art .circuit { display: none; }
.sheet__title {
  position: absolute;
  left: 38px; bottom: 30px;
  z-index: 3;
  font-size: clamp(40px, 5.2vw, 96px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 0;
}
.sheet__tags {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
  padding: 40px clamp(30px, 4vw, 56px);
}
.sheet__tags .mono { color: inherit; }

/* unified sheet style — colours follow the active theme */
.sheet,
.sheet--ink,
.sheet--lime,
.sheet--light {
  background: var(--sheet-bg);
  color: var(--sheet-text);
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
.sheet .sheet__title,
.sheet--ink .sheet__title,
.sheet--lime .sheet__title,
.sheet--light .sheet__title { color: var(--sheet-text); }
.sheet .sheet__tags,
.sheet--ink .sheet__tags,
.sheet--lime .sheet__tags,
.sheet--light .sheet__tags { color: var(--sheet-text); opacity: 0.75; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { position: relative; padding: clamp(80px, 14vw, 200px) 0 64px; overflow: hidden; }
.footer__wave { left: -6%; bottom: -16%; width: 112%; height: 560px; }
.footer__inner { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(12, 1fr); gap: 40px; align-items: end; }
.footer__name { grid-column: 1 / 9; }
.footer__kicker { display: flex; flex-direction: column; margin-bottom: 24px; }
.footer__kicker span { font-size: clamp(20px, 2.4vw, 32px); font-weight: 300; line-height: 1.15; }
.footer__big { margin: 0; font-weight: 500; font-size: clamp(64px, 13vw, 160px); line-height: 0.86; letter-spacing: -0.03em; }
.footer__big em { font-style: italic; font-weight: 500; }
.footer__links { grid-column: 10 / 13; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.footer__links a {
  font-family: "DM Mono", monospace;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.footer__links a::after {
  content: "";
  width: 0; height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.footer__links a:hover::after { width: 28px; }
.footer__links .i-dl {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}
.footer__links a:hover .i-dl { transform: translateY(2px); }
.footer__bottom {
  position: relative;
  z-index: 2;
  margin-top: clamp(60px, 10vw, 120px);
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 13px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .story__media { grid-column: 1 / 7; }
  .story__lead { grid-column: 7 / 13; }
  .story__second { grid-column: 1 / 10; }
  .whatido__col { grid-column: 2 / 12; }
  .stat-1 { grid-column: 1 / 5; }
  .stat-2 { grid-column: 5 / 9; }
  .stat-3 { grid-column: 9 / 13; }
  .edu-1 { grid-column: 1 / 7; }
  .edu-2 { grid-column: 7 / 13; }
  .wc--4 { grid-column: span 6; }
  .wc--8 { grid-column: span 12; }
}

@media (max-width: 760px) {
  .nav { height: 72px; }
  .cta-group .icon-btn { display: none; }
  .cta-group { pointer-events: none; }
  .cta-group .pill--cta { pointer-events: auto; }
  .hero { padding-top: 130px; }
  .story__grid { display: flex; flex-direction: column; }
  .story__lead, .story__second, .story__media { margin: 0; max-width: none; }
  .whatido__grid { display: block; }
  .facts { gap: 36px; }
  .stats__grid { display: flex; flex-direction: column; gap: 22px; }
  .stat-card { transform: none !important; width: 100%; }
  .stat-2, .stat-3 { transform: none; }
  /* keep the curved line on mobile: it runs down a left rail and the
     cards are indented to its right (path + dot are rebuilt for this in JS). */
  .exp-card { width: auto; align-self: stretch !important; margin-left: 50px !important; margin-right: 0 !important; }
  .exp-card[data-side="left"].reveal,
  .exp-card[data-side="right"].reveal { transform: translate(40px, 28px) scale(0.96); }
  .edu-grid { display: flex; flex-direction: column; }
  .edu-1, .edu-2 { width: 100%; }
  .work-grid { display: flex; flex-direction: column; gap: 22px; }
  .work-card { width: 100%; }
  .work-card p { max-width: none; }
  /* Core Stack: keep the pinned deck animation on mobile too,
     just adjust the card's internal layout to a single column. */
  .stack__shell { padding-top: clamp(80px, 14vh, 110px); padding-bottom: clamp(28px, 5vh, 50px); }
  .stack-head h2 { font-size: clamp(32px, 8vw, 48px); }
  .sheet { grid-template-columns: 1fr; height: clamp(320px, 66vh, 460px); margin-bottom: clamp(36px, 8vh, 80px); }
  .sheet__art { min-height: 140px; }
  .sheet__title { font-size: clamp(34px, 9vw, 52px); left: 26px; bottom: 22px; }
  .sheet__tags { flex-direction: row; flex-wrap: wrap; gap: 12px 22px; padding: 22px 26px; }
  .footer__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 40px; }
  .footer__links { flex-direction: row; flex-wrap: wrap; gap: 24px; }
}
