/* ============================================================
   Muhammad Nauman Masood — personal site (v4)
   Dark, rich, scroll-driven. Pinned scrollytelling chapters,
   parallax layers, liquid WebGL hero. No frameworks.
   Shared by the main page and /resume lander.
   ============================================================ */

:root {
  --bg: #060b09;
  --bg-2: #0a120f;
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e9f1ed;
  --muted: #9db3aa;
  --faint: #64786f;
  --acc: #34d399;
  --acc-2: #10b981;
  --acc-dim: rgba(52, 211, 153, 0.13);
  --glow: rgba(52, 211, 153, 0.22);
  --font-display: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-h: 76px;
  --frame-gap: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* the JS glide engine drives scroll itself — native smooth would fight it */
html.has-glide { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--acc); color: #04120c; }

section { scroll-margin-top: var(--nav-h); position: relative; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }

a { color: inherit; text-decoration: none; }

.grad {
  font-style: normal;
  background: linear-gradient(100deg, #6ee7b7 0%, #34d399 45%, #a7f3d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- progress bar ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--acc-2), var(--acc));
  z-index: 1001;
}

/* ---------- parallax orbs ---------- */
.orb {
  position: absolute; z-index: 0; pointer-events: none;
  width: min(46vw, 560px); aspect-ratio: 1;
  background: radial-gradient(circle at 38% 38%, rgba(52, 211, 153, 0.17), rgba(52, 211, 153, 0.05) 45%, transparent 68%);
  border-radius: 50%;
  will-change: transform;
}
.orb-a { top: 4%; right: -12%; }
.orb-b { bottom: -4%; left: -14%; width: min(38vw, 460px); }
.orb-c { top: 10%; left: -10%; }
.orb-d { top: 14%; right: -10%; width: min(36vw, 430px); }
.orb-e { top: -6%; right: -8%; width: min(32vw, 400px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  padding: 14px 28px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  transition: transform 0.25s var(--ease-out), background 0.25s, border-color 0.25s, box-shadow 0.25s;
  will-change: transform;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn-primary {
  background: linear-gradient(120deg, #10b981, #34d399);
  border-color: transparent; color: #04120c;
  box-shadow: 0 10px 34px -10px var(--glow);
}
.btn-primary:hover { box-shadow: 0 14px 46px -8px rgba(52, 211, 153, 0.5); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { background: var(--card-hover); border-color: rgba(255, 255, 255, 0.22); }
.btn-small { padding: 10px 20px; font-size: 0.85rem; }
.btn-big { padding: 19px 36px; font-size: 1.1rem; }
.btn .arrow { transition: transform 0.25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 clamp(20px, 4vw, 48px);
  transition: transform 0.4s var(--ease-out), background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 11, 9, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav.hidden { transform: translateY(-100%); }
.nav-logo { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.logo-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  font-family: var(--font-display); font-weight: 800; font-size: 0.9rem;
  color: var(--acc); background: var(--acc-dim);
  border: 1px solid rgba(52, 211, 153, 0.28);
}
.logo-name { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-size: 0.88rem; color: var(--muted); font-weight: 500;
  transition: color 0.2s; position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1.5px; background: var(--acc);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links .contact-link { display: none; }
.nav-burger { display: none; }
.nav-plain-link { margin-left: auto; font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.nav-plain-link:hover { color: var(--text); }

/* ---------- hero: liquid shader in a rounded frame ---------- */
.hero { position: relative; padding: var(--frame-gap); }
.hero-frame {
  position: relative;
  min-height: calc(100svh - 2 * var(--frame-gap));
  border-radius: 30px;
  overflow: hidden;
  display: flex; align-items: center;
  background:
    radial-gradient(1100px 640px at 74% 14%, rgba(52, 211, 153, 0.15), transparent 62%),
    radial-gradient(820px 560px at 8% 88%, rgba(16, 185, 129, 0.1), transparent 58%),
    radial-gradient(600px 420px at 40% 55%, rgba(52, 211, 153, 0.05), transparent 65%),
    #04120c;
  border: 1px solid rgba(52, 211, 153, 0.14);
  transform: scale(calc(1 - var(--hp, 0) * 0.045));
  will-change: transform;
}
#heroCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1060px; margin: 0 auto; width: 100%;
  padding: calc(var(--nav-h) + 20px) clamp(22px, 5vw, 72px) 80px;
  transform: translateY(calc(var(--hp, 0) * -90px));
  opacity: calc(1 - var(--hp, 0) * 1.05);
  will-change: transform, opacity;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(233, 241, 237, 0.85); font-weight: 600; margin-bottom: 30px;
  text-shadow: 0 1px 10px rgba(4, 18, 12, 0.6);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--acc);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.hero-title {
  font-size: clamp(2.9rem, 8vw, 6.2rem);
  font-weight: 800; line-height: 1.02; margin-bottom: 30px;
  text-shadow: 0 2px 30px rgba(4, 18, 12, 0.55);
}
.hero-title .line { display: block; }
.hero-sub {
  max-width: 640px; color: rgba(233, 241, 237, 0.82);
  font-size: clamp(1rem, 1.6vw, 1.2rem); margin-bottom: 14px;
  text-shadow: 0 1px 14px rgba(4, 18, 12, 0.6);
}
.hero-typed {
  font-family: var(--font-display); font-size: clamp(0.95rem, 1.5vw, 1.12rem);
  color: rgba(157, 179, 170, 0.9); margin-bottom: 44px; min-height: 1.6em;
  text-shadow: 0 1px 12px rgba(4, 18, 12, 0.6);
}
.typed { color: #7df0c3; font-weight: 600; }
.caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 3px;
  background: var(--acc); vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-grid {
  display: grid; grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(28px, 4vw, 60px); align-items: center;
}

/* ---------- browser mockup ---------- */
.browser {
  background: #0b1310;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.85), 0 18px 50px -20px var(--glow);
}
.browser-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.browser-bar i:first-child { background: rgba(255, 111, 97, 0.75); }
.browser-bar i:nth-child(2) { background: rgba(246, 190, 79, 0.75); }
.browser-bar i:nth-child(3) { background: rgba(66, 211, 146, 0.75); }
.browser-bar span {
  margin-left: 10px; font-size: 0.72rem; font-weight: 500;
  color: var(--faint); background: rgba(255, 255, 255, 0.05);
  padding: 3px 12px; border-radius: 999px; letter-spacing: 0.03em;
}
.browser img { display: block; width: 100%; height: auto; }

/* ---------- hero collage ---------- */
.hero-shots { position: relative; min-height: 420px; }
.hero-shots .browser { position: absolute; width: 88%; }
.hero-shots .shot-1 {
  right: 0; top: 52%; transform: translateY(-50%) rotate(2.5deg);
  z-index: 2;
  animation: shot-float 7s ease-in-out infinite;
}
.hero-shots .shot-2 {
  left: -4%; top: 8%; width: 74%;
  transform: rotate(-5deg);
  opacity: 0.85; z-index: 1;
  animation: shot-float 9s 0.8s ease-in-out infinite;
}
@keyframes shot-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -12px; }
}

/* ---------- storefront showcase ---------- */
.showcase {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 4.5vw, 64px); align-items: center;
  margin-bottom: clamp(56px, 8vw, 96px);
}
.showcase-flip { grid-template-columns: 0.85fr 1.15fr; }
.showcase-flip .showcase-media { order: 2; }
.showcase-flip .showcase-info { order: 1; }
.showcase-media { transform-style: preserve-3d; }
.browser-imgs { position: relative; }
.browser-imgs .img-alt {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.6s var(--ease-out);
}
.showcase-media:hover .img-alt { opacity: 1; }
.role-pill {
  display: inline-block;
  font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--acc); font-weight: 600; margin-bottom: 14px;
  background: var(--acc-dim); border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px; padding: 5px 14px;
}
.showcase-info h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; margin-bottom: 12px; }
.showcase-info p { color: var(--muted); margin-bottom: 18px; }
.showcase-info strong { color: var(--text); font-weight: 600; }
.chips-mini { margin-bottom: 22px; }
.chips-mini span { font-size: 0.8rem; padding: 6px 13px; box-shadow: none; }
.show-link {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  color: var(--acc);
  border-bottom: 1.5px solid rgba(52, 211, 153, 0.35);
  padding-bottom: 2px;
  transition: border-color 0.25s, color 0.25s;
}
.show-link:hover { color: #7df0c3; border-color: #7df0c3; }

/* ---------- contact photo ---------- */
.avatar-photo {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.08), 0 18px 40px -16px var(--glow);
  margin-bottom: 22px;
}
.scroll-hint {
  position: absolute; z-index: 2; left: 50%; bottom: 26px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(233, 241, 237, 0.7);
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
  white-space: nowrap;
}
.scroll-hint::before {
  content: ""; width: 1.5px; height: 42px;
  background: linear-gradient(to bottom, transparent, var(--acc));
  animation: drop 1.8s var(--ease-out) infinite;
}
@keyframes drop {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  35% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  70%, 100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

/* ---------- hero stats (used on /resume lander) ---------- */
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  max-width: 920px;
}
.hero-stats .stat {
  background: rgba(4, 18, 12, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 18px 20px 15px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, background 0.3s;
}
.hero-stats .stat:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(4, 18, 12, 0.65);
}
.hero-stats .stat dd { color: rgba(157, 179, 170, 0.95); font-size: 0.8rem; letter-spacing: 0.04em; margin-top: 3px; }
.hero-stats .num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); color: #ffffff;
  text-shadow: 0 0 24px rgba(52, 211, 153, 0.35);
}

/* ---------- reveal animations ---------- */
.reveal-up {
  opacity: 0; transform: translateY(26px);
  animation: rise 0.9s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise { to { opacity: 1; transform: none; } }

[data-reveal] {
  opacity: 0; transform: translateY(34px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].in { opacity: 1; transform: none; }

/* word-by-word heading reveal */
[data-split] .w {
  display: inline-block;
  opacity: 0; transform: translateY(0.65em) rotate(2deg);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.in [data-split] .w, [data-split].in .w { opacity: 1; transform: none; }

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding: 18px 0; overflow: hidden; position: relative;
  background: var(--bg-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 34px;
  white-space: nowrap; will-change: transform;
  animation: scroll 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.92rem; letter-spacing: 0.06em; color: var(--muted);
}
.marquee-track i { color: var(--acc); font-style: normal; font-size: 0.75rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============================================================
   SCROLLYTELLING SCENES
   Each .scene is a tall wrapper; .scene-sticky pins to the
   viewport while JS drives --p (0 → 1) across the wrapper.
   ============================================================ */
.scene { position: relative; }
.scene-sticky {
  position: sticky; top: 0;
  height: 100svh; overflow: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.scene-kicker {
  position: absolute; top: calc(var(--nav-h) + 10px); left: 5vw; z-index: 3;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--acc); font-weight: 600;
}
.scene-progress {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 3;
}
.scene-progress span {
  width: 26px; height: 2px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden; position: relative;
}
.scene-progress span::after {
  content: ""; position: absolute; inset: 0;
  background: var(--acc);
  transform-origin: left;
}

/* ----- Chapter 01 · story beats ----- */
.scene-story { height: 380vh; }
.story-stage { position: relative; width: 100%; height: 100%; }
.story-beat {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 0 6vw; text-align: center;
}
.story-line {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 4.9vw, 4rem);
  line-height: 1.18; letter-spacing: -0.02em;
}
.story-beat-1 {
  opacity: clamp(0, min((var(--p, 0) - 0.01) * 14, (0.33 - var(--p, 0)) * 14), 1);
  transform: translateY(calc((1 - clamp(0, (var(--p, 0) - 0.01) * 14, 1)) * 60px - clamp(0, (var(--p, 0) - 0.26) * 14, 1) * 60px));
}
.story-beat-2 {
  opacity: clamp(0, min((var(--p, 0) - 0.34) * 14, (0.66 - var(--p, 0)) * 14), 1);
  transform: translateY(calc((1 - clamp(0, (var(--p, 0) - 0.34) * 14, 1)) * 60px - clamp(0, (var(--p, 0) - 0.59) * 14, 1) * 60px));
}
.story-beat-3 {
  opacity: clamp(0, (var(--p, 0) - 0.67) * 14, 1);
  transform: translateY(calc((1 - clamp(0, (var(--p, 0) - 0.67) * 14, 1)) * 60px));
}
.scene-story .scene-progress span:nth-child(1)::after { transform: scaleX(clamp(0, var(--p, 0) * 3.1, 1)); }
.scene-story .scene-progress span:nth-child(2)::after { transform: scaleX(clamp(0, (var(--p, 0) - 0.33) * 3.1, 1)); }
.scene-story .scene-progress span:nth-child(3)::after { transform: scaleX(clamp(0, (var(--p, 0) - 0.66) * 3.1, 1)); }

/* ----- Chapter 02 · proof counters ----- */
.scene-proof { height: 460vh; }
.proof-stage { position: relative; width: 100%; height: 100%; }
.proof-beat {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 0 6vw;
}
.proof-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(4.6rem, 17vw, 14rem);
  line-height: 1; letter-spacing: -0.03em;
  background: linear-gradient(115deg, #ffffff 30%, #6ee7b7 75%, #34d399 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 34px rgba(52, 211, 153, 0.22));
}
.proof-num span { font-size: 0.42em; vertical-align: 0.12em; }
.proof-label {
  margin-top: 18px; color: var(--muted);
  font-size: clamp(0.95rem, 1.8vw, 1.25rem); font-weight: 500;
  letter-spacing: 0.01em;
}
.proof-beat-1 {
  opacity: clamp(0, min((var(--p, 0) - 0.02) * 12, (0.28 - var(--p, 0)) * 12), 1);
  transform: scale(calc(1.1 - clamp(0, (var(--p, 0) - 0.02) * 12, 1) * 0.1));
}
.proof-beat-2 {
  opacity: clamp(0, min((var(--p, 0) - 0.27) * 12, (0.53 - var(--p, 0)) * 12), 1);
  transform: scale(calc(1.1 - clamp(0, (var(--p, 0) - 0.27) * 12, 1) * 0.1));
}
.proof-beat-3 {
  opacity: clamp(0, min((var(--p, 0) - 0.52) * 12, (0.78 - var(--p, 0)) * 12), 1);
  transform: scale(calc(1.1 - clamp(0, (var(--p, 0) - 0.52) * 12, 1) * 0.1));
}
.proof-beat-4 {
  opacity: clamp(0, (var(--p, 0) - 0.77) * 12, 1);
  transform: scale(calc(1.1 - clamp(0, (var(--p, 0) - 0.77) * 12, 1) * 0.1));
}
.scene-proof .scene-progress span:nth-child(1)::after { transform: scaleX(clamp(0, var(--p, 0) * 4.2, 1)); }
.scene-proof .scene-progress span:nth-child(2)::after { transform: scaleX(clamp(0, (var(--p, 0) - 0.25) * 4.2, 1)); }
.scene-proof .scene-progress span:nth-child(3)::after { transform: scaleX(clamp(0, (var(--p, 0) - 0.5) * 4.2, 1)); }
.scene-proof .scene-progress span:nth-child(4)::after { transform: scaleX(clamp(0, (var(--p, 0) - 0.75) * 4.2, 1)); }

/* ----- Chapter 03 · horizontal work pan ----- */
.scene-work { height: 380vh; }
.scene-work .scene-sticky { align-items: stretch; justify-content: flex-start; }
.work-head {
  padding: calc(var(--nav-h) + 18px) 5vw 0;
}
.work-title {
  font-size: clamp(2rem, 4.8vw, 3.4rem); font-weight: 800;
  display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap;
}
.work-hint {
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  color: var(--faint); letter-spacing: 0.06em;
  opacity: calc(1 - var(--p, 0) * 4);
}
.work-track {
  display: flex; gap: 22px;
  align-items: center;
  flex: 1;
  padding: 30px 5vw 60px;
  transform: translate3d(calc(var(--p, 0) * var(--pan, -1600) * 1px), 0, 0);
  will-change: transform;
}
.work-card {
  position: relative; overflow: hidden;
  flex: 0 0 auto;
  width: min(430px, 80vw);
  background: var(--card); border: 1px solid var(--line); border-radius: 26px;
  padding: 34px 32px 36px;
  transition: border-color 0.3s, background 0.3s;
}
.work-card:hover { border-color: rgba(52, 211, 153, 0.38); background: var(--card-hover); }
.work-index {
  position: absolute; top: 18px; right: 24px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 3.4rem; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(52, 211, 153, 0.25);
}
.app-icon {
  width: 54px; height: 54px; border-radius: 16px; margin-bottom: 20px;
  display: grid; place-items: center; color: var(--acc);
  background: var(--acc-dim); border: 1px solid rgba(52, 211, 153, 0.28);
  box-shadow: 0 12px 26px -12px var(--glow);
}
.app-icon svg { width: 26px; height: 26px; }
.app-tag {
  display: inline-block;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint); font-weight: 600;
}
.work-card h3 { font-size: 1.35rem; margin: 8px 0 10px; font-weight: 700; }
.work-card p { color: var(--muted); font-size: 0.98rem; }
.work-card-end {
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.14), rgba(52, 211, 153, 0.03) 60%);
  border-color: rgba(52, 211, 153, 0.3);
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.work-end-num {
  font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; line-height: 1;
  background: linear-gradient(115deg, #ffffff 20%, #6ee7b7 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.work-card-end h3 { margin-top: 2px; }
.work-card-end .btn { margin-top: 16px; }

/* ----- Chapter 04 · manifesto scroll-fill ----- */
.scene-manifesto { height: 300vh; }
.manifesto { padding: 0 6vw; max-width: 1100px; }
.fill-line {
  position: relative;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.55rem, 4.2vw, 3.4rem);
  line-height: 1.3; letter-spacing: -0.015em;
  margin: 0.55em 0;
}
.fill-base { color: rgba(233, 241, 237, 0.14); }
.fill-top {
  position: absolute; inset: 0;
  color: #eafff5;
  text-shadow: 0 0 30px rgba(52, 211, 153, 0.25);
}
.fill-line:nth-child(1) .fill-top { clip-path: inset(0 calc((1 - clamp(0, (var(--p, 0) - 0.06) * 3.4, 1)) * 100%) 0 0); }
.fill-line:nth-child(2) .fill-top { clip-path: inset(0 calc((1 - clamp(0, (var(--p, 0) - 0.36) * 3.4, 1)) * 100%) 0 0); }
.fill-line:nth-child(3) .fill-top { clip-path: inset(0 calc((1 - clamp(0, (var(--p, 0) - 0.66) * 3.4, 1)) * 100%) 0 0); }

/* ---------- standard sections ---------- */
.section { padding: clamp(96px, 12vw, 160px) clamp(20px, 5vw, 64px); max-width: 1200px; margin: 0 auto; }
.section-head { position: relative; margin-bottom: clamp(44px, 6vw, 76px); }
.section-head[data-num]::before {
  content: attr(data-num);
  position: absolute; top: -0.55em; left: -0.08em;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(6rem, 16vw, 11rem); line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(52, 211, 153, 0.14);
  pointer-events: none; z-index: -1;
}
.kicker {
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--acc); font-weight: 600; margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(2rem, 4.8vw, 3.6rem); font-weight: 800; line-height: 1.1;
}
.section-sub { color: var(--muted); margin-top: 16px; max-width: 560px; }

/* ---------- capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; perspective: 1400px; }
.cap-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.06), var(--card) 40%);
  border: 1px solid var(--line); border-radius: 26px;
  padding: 36px 32px;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
  transform-style: preserve-3d;
  --mx: 50%; --my: 50%;
}
.cap-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(52, 211, 153, 0.09), transparent 60%);
  opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.cap-card:hover { border-color: rgba(52, 211, 153, 0.38); }
.cap-card:hover::before { opacity: 1; }
.cap-num {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 14px;
  font-family: var(--font-display); font-weight: 700; color: var(--acc);
  background: var(--acc-dim); border: 1px solid rgba(52, 211, 153, 0.3);
  transform: translateZ(28px);
}
.cap-card h3 { font-size: 1.35rem; font-weight: 700; margin: 16px 0 10px; transform: translateZ(20px); }
.cap-card p { color: var(--muted); transform: translateZ(10px); }

/* ---------- skills ---------- */
.skills-groups { display: grid; gap: 30px; max-width: 940px; }
.skill-group h4 {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips span {
  font-size: 0.9rem; font-weight: 500; color: var(--muted);
  background: var(--card); border: 1px solid var(--line);
  padding: 9px 18px; border-radius: 999px;
  transition: color 0.25s, border-color 0.25s, transform 0.25s var(--ease-out), background 0.25s;
}
.chips span:hover {
  color: var(--text); border-color: rgba(52, 211, 153, 0.45);
  background: var(--acc-dim); transform: translateY(-3px);
}
.chips-glow span { border-color: rgba(52, 211, 153, 0.3); color: var(--acc); }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact::before {
  content: ""; position: absolute; inset: 10% 15%;
  background: radial-gradient(closest-side, rgba(52, 211, 153, 0.09), transparent);
  pointer-events: none;
}
.contact-inner { position: relative; z-index: 2; }
.contact-inner h2 {
  font-size: clamp(2.2rem, 5.4vw, 4rem); font-weight: 800; line-height: 1.1;
  margin-bottom: 18px;
}
.contact-sub { color: var(--muted); margin-bottom: 42px; max-width: 560px; margin-inline: auto; }
.contact-cta { margin-bottom: 30px; }
.contact-facts {
  color: var(--faint); font-size: 0.85rem; letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.contact-links { display: flex; justify-content: center; gap: 16px; color: var(--faint); flex-wrap: wrap; }
.contact-links a { color: var(--muted); font-weight: 500; transition: color 0.2s; }
.contact-links a:hover { color: var(--acc); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 30px clamp(20px, 5vw, 64px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--faint); font-size: 0.85rem;
}
.to-top { color: var(--muted); font-weight: 500; }
.to-top:hover { color: var(--acc); }

/* ---------- timeline (/resume) ---------- */
.timeline { position: relative; padding-left: 42px; max-width: 840px; }
.timeline-rail {
  position: absolute; left: 10px; top: 6px; bottom: 6px; width: 2px;
  background: var(--line); border-radius: 2px; overflow: hidden;
}
.timeline-fill {
  width: 100%; height: 0%;
  background: linear-gradient(to bottom, var(--acc-2), var(--acc));
  transition: height 0.15s linear;
}
.t-item { position: relative; padding-bottom: clamp(44px, 6vw, 64px); }
.t-item:last-child { padding-bottom: 0; }
.t-dot {
  position: absolute; left: -42px; top: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--acc); background: var(--bg);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.35);
  display: grid; place-items: center;
}
.t-dot::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--acc); opacity: 0.9;
}
.t-date {
  display: inline-block;
  font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--acc); font-weight: 600; margin-bottom: 10px;
  background: var(--acc-dim); border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px; padding: 4px 12px;
}
.t-item h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 700; }
.t-item .co { color: var(--acc); }
.t-sub { color: var(--faint); font-size: 0.92rem; margin: 4px 0 16px; }
.t-item ul { list-style: none; }
.t-item li {
  color: var(--muted); position: relative; padding-left: 22px; margin-bottom: 9px;
}
.t-item li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 7px; height: 7px; background: var(--acc-dim);
  border: 1px solid var(--acc); border-radius: 2px; transform: rotate(45deg);
}
.t-item strong { color: var(--text); font-weight: 600; }

/* ---------- resume lander ---------- */
.resume-hero { position: relative; padding: var(--frame-gap); }
.resume-hero .hero-frame { min-height: auto; display: block; transform: none; }
.resume-hero .hero-inner {
  padding: calc(var(--nav-h) + 40px) clamp(22px, 5vw, 72px) 70px;
  transform: none; opacity: 1;
}
.resume-hero h1 {
  font-size: clamp(2.3rem, 5.8vw, 4.4rem); font-weight: 800; line-height: 1.06;
  margin: 16px 0 20px;
  text-shadow: 0 2px 30px rgba(4, 18, 12, 0.55);
}
.resume-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 840px; }
.edu-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 26px 28px;
  transition: border-color 0.3s;
}
.edu-card:hover { border-color: rgba(52, 211, 153, 0.35); }
.edu-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.edu-card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- intro reveal ---------- */
.intro {
  position: fixed; inset: 0; z-index: 2000;
  background: #04120c;
  display: grid; place-items: center;
  transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s 0.85s;
}
.intro.done { transform: translateY(-101%); visibility: hidden; }
.intro-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.intro-mark {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 18px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  color: var(--acc); background: var(--acc-dim);
  border: 1px solid rgba(52, 211, 153, 0.3);
  box-shadow: 0 0 40px rgba(52, 211, 153, 0.25);
  animation: intro-pop 0.7s var(--ease-out) both;
}
.intro-name {
  font-family: var(--font-display); font-weight: 600;
  color: var(--muted); font-size: 0.95rem; letter-spacing: 0.1em;
  animation: intro-pop 0.7s 0.12s var(--ease-out) both;
}
.intro-line {
  width: 150px; height: 2px; margin-top: 4px;
  background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden;
}
.intro-line i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--acc-2), var(--acc));
  transform: scaleX(0); transform-origin: left;
  animation: intro-load 0.85s 0.2s var(--ease-out) forwards;
}
@keyframes intro-pop { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes intro-load { to { transform: scaleX(1); } }
body:not(.loaded) .reveal-up { animation-play-state: paused; }

/* ---------- film grain ---------- */
body::after {
  content: ""; position: fixed; inset: -120px;
  z-index: 1500; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
  animation: grain 9s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-38px, 26px); }
  20% { transform: translate(44px, -34px); }
  30% { transform: translate(-30px, -42px); }
  40% { transform: translate(52px, 38px); }
  50% { transform: translate(-46px, 12px); }
  60% { transform: translate(28px, -48px); }
  70% { transform: translate(-52px, 44px); }
  80% { transform: translate(36px, 20px); }
  90% { transform: translate(-20px, -30px); }
}

/* ---------- custom cursor ---------- */
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 2100;
  pointer-events: none; border-radius: 50%;
  opacity: 0; will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: var(--acc); }
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(52, 211, 153, 0.55);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              border-color 0.25s, background 0.25s, opacity 0.3s;
}
.cursor-ring.hot {
  width: 58px; height: 58px;
  border-color: rgba(52, 211, 153, 0.95);
  background: rgba(52, 211, 153, 0.08);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cap-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .edu-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-shots { display: none; }
  .showcase, .showcase-flip { grid-template-columns: 1fr; gap: 26px; }
  .showcase-flip .showcase-media { order: 0; }
  .showcase-flip .showcase-info { order: 1; }
}

@media (max-width: 640px) {
  :root { --frame-gap: 8px; }
  .hero-frame { border-radius: 22px; }
  .nav { gap: 14px; }
  .nav .btn { display: none; }
  .logo-name { display: none; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; gap: 0;
    background: #0a120f;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
    padding: 10px 24px 20px;
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease-out), visibility 0s 0.4s;
    visibility: hidden;
  }
  .nav-links.open { transform: none; visibility: visible; transition: transform 0.4s var(--ease-out); }
  .nav-links a { padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-links .contact-link { display: block; color: var(--acc); }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px; justify-content: center;
    width: 42px; height: 42px; align-items: center;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    cursor: pointer; margin-left: auto;
  }
  .nav-burger span {
    display: block; width: 18px; height: 2px; background: var(--text);
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
  }
  .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-logo { margin-right: 0; }
  .timeline { padding-left: 34px; }
  .t-dot { left: -34px; }
  .scroll-hint { display: none; }
  .section-head[data-num]::before { font-size: 5.4rem; top: -0.4em; }
  .scene-story { height: 320vh; }
  .scene-proof { height: 400vh; }
  .scene-work { height: 330vh; }
  .scene-manifesto { height: 260vh; }
  .work-head { padding-top: calc(var(--nav-h) + 46px); }
  .work-title { font-size: clamp(1.7rem, 7.4vw, 2.4rem); }
}

/* ---------- reduced motion: static, fully readable ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-up, [data-reveal] { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  [data-split] .w { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee-track { animation: none; }
  .pulse-dot { animation: none; }
  .caret { animation: none; }
  .scroll-hint::before { animation: none; }
  .hero-frame, .hero-inner { transform: none !important; opacity: 1 !important; }
  .scene { height: auto !important; }
  .scene-sticky { position: relative; height: auto; overflow: visible; padding: 110px 5vw; gap: 40px; }
  .scene-kicker { position: static; margin-bottom: 10px; }
  .scene-progress { display: none; }
  .story-stage, .proof-stage { height: auto; }
  .story-beat, .proof-beat {
    position: relative; inset: auto;
    opacity: 1 !important; transform: none !important;
    padding: 26px 0;
  }
  .work-track { transform: none !important; flex-wrap: wrap; justify-content: center; }
  .fill-top { clip-path: none !important; }
  .work-hint { opacity: 0; }
  .intro { display: none; }
  body::after { animation: none; }
  .cursor-dot, .cursor-ring { display: none; }
}
