/* ==========================================================================
   Sherif Rahim — portfolio
   Design tokens → base → layout → components → sections → utilities
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #06080c;
  --bg-2: #0a0e14;
  --surface: #0e131b;
  --surface-2: #131a24;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8eef6;
  --muted: #92a0b3;
  --faint: #5f6d80;
  --accent: #34d3c0;
  --accent-2: #5aa9ff;
  --accent-3: #a78bfa;
  --warn: #fbbf24;
  --danger: #f87171;
  --ok: #4ade80;
  --glow: rgba(52, 211, 192, 0.22);
  --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --nav-h: 68px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --line: rgba(10, 20, 40, 0.1);
  --line-strong: rgba(10, 20, 40, 0.2);
  --text: #0b1220;
  --muted: #4b5a6e;
  --faint: #7a889b;
  --accent: #0b9486;
  --accent-2: #2563eb;
  --accent-3: #7c3aed;
  --warn: #b45309;
  --danger: #dc2626;
  --ok: #15803d;
  --glow: rgba(11, 148, 134, 0.18);
  --shadow: 0 24px 60px -28px rgba(20, 40, 80, 0.35);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
code, pre, kbd { font-family: var(--font-mono); }
::selection { background: var(--accent); color: #04110f; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: #04110f; padding: 10px 16px; border-radius: 8px; font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Ambient layers ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 120;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(0);
}

.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
  opacity: 0.55;
}

.cursor-glow {
  position: fixed; top: 0; left: 0; width: 520px; height: 520px; z-index: -1; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  transform: translate3d(-50%, -50%, 0); opacity: 0; transition: opacity 0.4s;
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }

/* ---------- Layout ---------- */
.container { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }
section { position: relative; padding: clamp(72px, 10vw, 128px) 0; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 1.06rem; max-width: 62ch; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons & chips ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--line-strong); background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s, box-shadow 0.3s;
  will-change: transform;
}
.btn:hover { border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.btn-primary { background: var(--grad); border-color: transparent; color: #04110f; }
.btn-primary:hover { border-color: transparent; box-shadow: 0 10px 40px -10px var(--accent); }
.btn-ghost { background: transparent; }
.btn .icon { transition: transform 0.3s var(--ease); }
.btn:hover .icon { transform: translate(2px, -2px); }
.btn .icon.dl { transform: none; }
.btn:hover .icon.dl { transform: translateY(2px); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.76rem; line-height: 1;
  padding: 7px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  transition: color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.chip.hot { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 0.82rem; color: var(--muted); backdrop-filter: blur(8px);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }

/* ---------- Cards ---------- */
.card {
  position: relative; background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 70%, var(--bg)));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: border-color 0.35s, transform 0.45s var(--ease), box-shadow 0.45s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 60%);
  transition: opacity 0.4s;
}
.card:hover { border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #04110f; font-weight: 700; font-size: 0.95rem; letter-spacing: -0.04em;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative; padding: 9px 14px; font-size: 0.9rem; color: var(--muted); border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.kbd-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.82rem; transition: color 0.25s, border-color 0.25s; }
.kbd-btn:hover { color: var(--text); border-color: var(--accent); }
kbd { font-size: 0.7rem; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted); }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 90px)); padding-bottom: clamp(48px, 7vw, 90px); min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
#net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; z-index: -1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.9rem); margin: 22px 0 22px; letter-spacing: -0.035em; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
.hero h1 .line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes rise { to { transform: none; } }
.hero-role { font-family: var(--font-mono); color: var(--accent); font-size: 1rem; min-height: 1.6em; display: flex; align-items: center; gap: 4px; }
.hero-role .caret { display: inline-block; width: 9px; height: 1.1em; background: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); max-width: 54ch; }
.hero-lead strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; color: var(--faint); font-size: 0.88rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }

/* Terminal card */
.me-wrap { position: relative; perspective: 1200px; }
.terminal {
  position: relative; border-radius: 18px; border: 1px solid var(--line-strong); overflow: hidden;
  background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow), 0 0 80px -30px var(--glow);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease-out; transform-style: preserve-3d;
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-family: var(--font-mono); font-size: 0.76rem; color: var(--faint); }
.sev { padding: 3px 8px; border-radius: 6px; font-size: 0.64rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.sev.high { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.sev.med { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.sev.low { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 14%, transparent); }

.float-card {
  position: absolute; z-index: 3; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow);
  animation: bob 6s ease-in-out infinite;
}
.float-card small { display: block; color: var(--faint); font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; }
.float-card b { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.03em; }
.float-card.a { left: -34px; bottom: -66px; }
.float-card.b { right: -18px; top: -26px; animation-delay: -3s; }
.float-card .spark { width: 96px; height: 30px; margin-top: 6px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(48px, 7vw, 90px); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-2); padding: 26px 24px; }
.stat .num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.stat .num sub, .stat .num sup { font-size: 0.5em; vertical-align: baseline; margin-left: 2px; color: var(--accent); }
.stat p { color: var(--muted); font-size: 0.88rem; margin-top: 10px; line-height: 1.45; }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; place-items: center; width: 26px; height: 42px; border: 1px solid var(--line-strong); border-radius: 14px; opacity: 0.6; }
.scroll-cue::after { content: ""; width: 3px; height: 8px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { transform: translateY(-6px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee { padding: 26px 0; border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 44px; animation: scroll 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; color: var(--faint); white-space: nowrap; display: inline-flex; align-items: center; gap: 44px; transition: color 0.25s; }
.marquee-track span::after { content: "◆"; font-size: 0.5rem; color: var(--accent); opacity: 0.6; }
.marquee-track span:hover { color: var(--text); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.about-copy p { color: var(--muted); font-size: 1.06rem; margin-bottom: 18px; }
.about-copy p strong { color: var(--text); font-weight: 600; }
.about-facts { display: grid; gap: 12px; margin-top: 28px; }
.fact { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.95rem; }
.fact .icon { color: var(--accent); width: 1.3em; height: 1.3em; }
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pillar .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); }
.pillar .ico .icon { width: 22px; height: 22px; }
.pillar h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pillar p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

/* ---------- Experience timeline ---------- */
.timeline { position: relative; display: grid; gap: 22px; padding-left: 38px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--accent-2) 60%, transparent); opacity: 0.5; }
.role { position: relative; }
.role::before { content: ""; position: absolute; left: -38px; top: 28px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 5px var(--glow); }
.role.past::before { border-color: var(--faint); box-shadow: none; }
.role-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; margin-bottom: 4px; }
.role h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.role .when { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); white-space: nowrap; }
.role.past .when { color: var(--faint); }
.role .org { color: var(--muted); font-size: 0.96rem; margin-bottom: 14px; }
.role .org b { color: var(--text); font-weight: 500; }
.role ul { display: grid; gap: 10px; }
.role li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.96rem; line-height: 1.6; }
.role li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 2px; background: var(--accent); opacity: 0.8; }
.role li strong { color: var(--text); font-weight: 600; }
.role .sub { font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); margin: 14px 0 8px; }
.role .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.role.current { padding: 30px; }
.more-btn { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 0.88rem; font-weight: 500; }
.role-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.role-more > div { overflow: hidden; }
.role.open .role-more { grid-template-rows: 1fr; }
.more-btn .icon { transition: transform 0.35s var(--ease); }
.role.open .more-btn .icon { transform: rotate(180deg); }

/* ---------- Detection showcase ---------- */
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.88rem; font-weight: 500; transition: all 0.3s var(--ease); }
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter[aria-pressed="true"] { color: #04110f; background: var(--accent); border-color: var(--accent); }

.featured { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 4vw, 54px); padding: clamp(22px, 3vw, 38px); margin-bottom: 20px; align-items: center; }
.proj-kicker { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.featured h3 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 12px; }
.featured p.lead { color: var(--muted); margin-bottom: 18px; }
.feat-list { display: grid; gap: 9px; margin-bottom: 22px; }
.feat-list li { display: flex; gap: 10px; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.feat-list li .icon { color: var(--accent); margin-top: 4px; width: 1em; height: 1em; }
.feat-list li b { color: var(--text); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.shot { position: relative; }
.browser { border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow), 0 0 70px -34px var(--accent); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.browser-bar .url { flex: 1; margin-left: 10px; padding: 4px 12px; border-radius: 6px; background: var(--bg-2); font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-view { position: relative; aspect-ratio: 16 / 10; background: var(--bg-2); }
.browser-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.015); transition: opacity 0.6s var(--ease), transform 0.9s var(--ease); }
.browser-view img.on { opacity: 1; transform: none; }
.shot-tabs { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.shot-tabs::-webkit-scrollbar { display: none; }
.shot-tab { flex: none; padding: 7px 13px; border-radius: 999px; font-size: 0.78rem; color: var(--muted); border: 1px solid var(--line); background: var(--surface); transition: all 0.25s; white-space: nowrap; }
.shot-tab:hover { color: var(--text); }
.shot-tab[aria-selected="true"] { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { display: flex; flex-direction: column; padding: 0; transform-style: preserve-3d; }
.project.hide { display: none; }
.proj-top { padding: 26px 26px 0; }
.proj-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; background: color-mix(in srgb, var(--c, var(--accent)) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 30%, transparent); color: var(--c, var(--accent)); }
.proj-ico .icon { width: 22px; height: 22px; }
.project h3 { font-size: 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project h3 .icon { color: var(--faint); transition: color 0.25s, transform 0.3s var(--ease); }
.project:hover h3 .icon { color: var(--accent); transform: translate(3px, -3px); }
.project p { color: var(--muted); font-size: 0.93rem; margin: 10px 0 16px; line-height: 1.6; }
.proj-bottom { margin-top: auto; padding: 0 26px 24px; }
.proj-bottom .tags { margin-bottom: 14px; }
.proj-stat { display: flex; gap: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-family: var(--font-mono); font-size: 0.74rem; color: var(--faint); flex-wrap: wrap; }
.proj-stat b { color: var(--text); font-weight: 600; }
.proj-media { margin: 0 26px 18px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); height: 170px; display: flex; gap: 8px; padding: 12px 12px 0; background: linear-gradient(180deg, var(--surface-2), var(--bg-2)); }
.proj-media img { height: 220px; width: auto; border-radius: 10px 10px 0 0; border: 1px solid var(--line-strong); transition: transform 0.5s var(--ease); object-fit: cover; object-position: top; }
.project:hover .proj-media img { transform: translateY(-8px); }
.proj-media img:nth-child(2) { transition-delay: 0.05s; }
.proj-media img:nth-child(3) { transition-delay: 0.1s; }
.wip { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); }

.labs { margin-top: 56px; }
.labs h3 { font-size: 1.35rem; margin-bottom: 6px; }
.labs > p { color: var(--muted); margin-bottom: 24px; }
.lab-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lab { padding: 22px; }
.lab .num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); margin-bottom: 14px; }
.lab h4 { font-size: 1.02rem; margin-bottom: 8px; }
.lab p { font-size: 0.86rem; color: var(--muted); line-height: 1.55; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-card { padding: 24px; }
.skill-card h3 { display: flex; align-items: center; gap: 12px; font-size: 1rem; margin-bottom: 18px; }
.skill-card h3 .icon { color: var(--accent); }
.skill-card .tags { gap: 8px; }

/* ---------- Certifications ---------- */
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cert { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.cert-top { display: flex; justify-content: space-between; align-items: center; }
.cert-code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); letter-spacing: 0.04em; }
.badge { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 9px; border-radius: 6px; }
.badge.done { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.badge.prog { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.cert h3 { font-size: 1.08rem; line-height: 1.3; }
.cert p { color: var(--muted); font-size: 0.86rem; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: auto; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.4s var(--ease) 0.2s; }
.in .bar i { transform: scaleX(var(--p, 1)); }

/* ---------- Open source / education ---------- */
.os-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 20px; }
.os-card { padding: 32px; }
.os-card h3 { font-size: 1.6rem; margin: 12px 0 12px; }
.os-card p { color: var(--muted); margin-bottom: 18px; }
.edu-card { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.edu-card .yr { font-family: var(--font-mono); color: var(--accent); font-size: 0.8rem; margin-bottom: 10px; }
.edu-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.edu-card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact-card { position: relative; padding: clamp(40px, 7vw, 88px) clamp(24px, 5vw, 64px); border-radius: 28px; border: 1px solid var(--line-strong); background: radial-gradient(900px 400px at 50% -10%, var(--glow), transparent 70%), linear-gradient(180deg, var(--surface), var(--bg-2)); overflow: hidden; }
.contact-card h2 { font-size: clamp(2.2rem, 6vw, 4.2rem); letter-spacing: -0.04em; max-width: 14ch; margin: 18px auto 20px; }
.contact-card p.lead { color: var(--muted); max-width: 52ch; margin: 0 auto 34px; font-size: 1.08rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-links { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; margin-top: 40px; color: var(--muted); font-size: 0.92rem; }
.contact-links a, .contact-links span { display: inline-flex; gap: 9px; align-items: center; transition: color 0.25s; }
.contact-links a:hover { color: var(--accent); }

footer { padding: 34px 0 44px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.86rem; }
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }
footer kbd { margin-inline: 3px; }

/* ---------- Command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 300; display: none; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; background: rgba(2, 5, 10, 0.6); backdrop-filter: blur(6px); }
.palette.open { display: flex; animation: fadein 0.25s var(--ease); }
.palette-box { width: min(620px, 100%); border-radius: 18px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 1rem; }
.palette-list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.palette-group { padding: 10px 12px 6px; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.palette-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 12px; border-radius: 10px; text-align: left; color: var(--muted); font-size: 0.94rem; }
.palette-item .icon { color: var(--faint); }
.palette-item small { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: 0.7rem; }
.palette-item[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.palette-item[aria-selected="true"] .icon { color: var(--accent); }
.palette-empty { padding: 28px; text-align: center; color: var(--faint); }
.palette-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.74rem; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 400; transform: translate(-50%, 24px); opacity: 0; padding: 12px 20px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--accent); color: var(--text); font-size: 0.9rem; pointer-events: none; transition: all 0.4s var(--ease); display: flex; gap: 10px; align-items: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { color: var(--accent); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.no-js .hero h1 .line > span { transform: none; animation: none; }
.no-js .bar i { transform: scaleX(var(--p, 1)); }
.no-js .browser-view img:first-child { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; }
  .me-wrap { max-width: 640px; margin-inline: auto; width: 100%; }
  .float-card.a { left: 8px; } .float-card.b { right: 8px; }
  .about-grid, .featured, .os-grid { grid-template-columns: 1fr; }
  .proj-grid, .skills-grid, .certs { grid-template-columns: repeat(2, 1fr); }
  .lab-grid { grid-template-columns: repeat(2, 1fr); }
  .kbd-btn .lbl, .kbd-btn kbd { display: none; }
  .kbd-btn { width: 40px; justify-content: center; padding: 0; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 24px 22px; background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all 0.35s var(--ease); }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 14px 12px; font-size: 1.05rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .scroll-cue { display: none; }
}
@media (max-width: 640px) {
  .container { width: min(var(--maxw), 100% - 32px); }
  .proj-grid, .skills-grid, .certs, .pillars, .lab-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 30px; }
  .role::before { left: -30px; width: 16px; height: 16px; }
  .timeline::before { left: 7px; }
  .role.current { padding: 22px; }
  .float-card { display: none; }
  .hero-meta { gap: 8px 16px; }
  .btn { padding: 12px 18px; }
  footer .container { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal, .hero h1 .line > span { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

@media print {
  .nav, .bg-grid, .cursor-glow, #net, #scroll-progress, .palette, .toast { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   CINEMATIC LAYER
   Intro title card · film grain · HUD · letterbox · jump cuts · zoom · iris
   ========================================================================== */

/* ---------- Film grain + vignette ---------- */
.film { position: fixed; inset: -50%; width: 200%; height: 200%; z-index: 150; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); } 60% { transform: translate(-4%, -3%); } 80% { transform: translate(7%, 5%); } 100% { transform: translate(0, 0); } }
:root[data-theme="light"] .film { opacity: 0.045; mix-blend-mode: multiply; }
.vignette { position: fixed; inset: 0; z-index: 149; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.38) 100%); }
:root[data-theme="light"] .vignette { background: radial-gradient(ellipse at center, transparent 65%, rgba(20, 40, 80, 0.1) 100%); }

/* ---------- Letterbox bars (scroll-driven, used around The Reel) ---------- */
.cine-bar { position: fixed; left: 0; right: 0; z-index: 95; background: #000; pointer-events: none; height: calc(var(--cb, 0) * 9vh); }
.cine-bar.t { top: 0; }
.cine-bar.b { bottom: 0; }

/* ---------- HUD (REC · timecode · scene) ---------- */
.hud { position: fixed; left: 20px; bottom: 18px; z-index: 96; display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--muted); padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line); backdrop-filter: blur(10px); text-transform: uppercase; pointer-events: none; }
.hud .rec { color: var(--danger); display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.hud .rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.2s steps(2) infinite; }
.hud .tc { color: var(--text); font-variant-numeric: tabular-nums; }
.hud .sc { color: var(--accent); }

/* ---------- Intro / title card ---------- */
#intro { position: fixed; inset: 0; z-index: 500; color: #e8eef6; overflow: hidden; }
#intro .curtain { position: absolute; left: 0; right: 0; height: 50.2%; background: radial-gradient(ellipse 70% 90% at 50% 100%, #0a1a22, #04070b 70%); z-index: 1; transition: transform 0.95s cubic-bezier(0.76, 0, 0.24, 1); }
#intro .curtain.t { top: 0; background: radial-gradient(ellipse 70% 90% at 50% 100%, #0a1a22, #04070b 70%); }
#intro .curtain.b { bottom: 0; background: radial-gradient(ellipse 70% 90% at 50% 0%, #0a1a22, #04070b 70%); }
#intro.out .curtain.t { transform: translateY(-101%); }
#intro.out .curtain.b { transform: translateY(101%); }
#intro .bar { position: absolute; left: 0; right: 0; height: 13vh; background: #000; z-index: 4; transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1); }
#intro .bar.t { top: 0; transform: translateY(-100%); animation: barin 0.8s 0.1s cubic-bezier(0.76, 0, 0.24, 1) forwards; }
#intro .bar.b { bottom: 0; transform: translateY(100%); animation: barin 0.8s 0.1s cubic-bezier(0.76, 0, 0.24, 1) forwards; }
@keyframes barin { to { transform: none; } }
#intro.out .bar.t { animation: none; transform: translateY(-100%); }
#intro.out .bar.b { animation: none; transform: translateY(100%); }
#intro .intro-stage { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; transition: opacity 0.35s; }
#intro.out .intro-stage { opacity: 0; }
#intro .boot { position: absolute; left: clamp(24px, 8vw, 120px); bottom: 22vh; font-family: var(--font-mono); font-size: clamp(0.72rem, 1.4vw, 0.9rem); line-height: 2; color: #6f8196; }
#intro .boot b { color: #34d3c0; font-weight: 500; }
#intro .boot .ok { color: #4ade80; }
#intro .count { position: absolute; right: clamp(24px, 8vw, 120px); bottom: 20vh; font-family: var(--font-display); font-size: clamp(3rem, 12vw, 8rem); font-weight: 700; letter-spacing: -0.05em; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
#intro .count small { font-size: 0.3em; color: #34d3c0; margin-left: 4px; }
#intro .title { position: absolute; inset: 0; display: none; place-items: center; text-align: center; background: #04070b; }
#intro.title-on .title { display: grid; }
#intro.title-on .boot, #intro.title-on .count { display: none; }
#intro .title .sub { font-family: var(--font-mono); font-size: clamp(0.7rem, 1.6vw, 0.9rem); letter-spacing: 0.4em; text-transform: uppercase; color: #34d3c0; opacity: 0; display: block; margin-bottom: 22px; animation: fadein 0.8s 0.5s forwards; }
#intro .title h2 { font-size: clamp(2.4rem, 10vw, 7.4rem); font-weight: 700; text-transform: uppercase; color: #fff; letter-spacing: 0.02em; animation: tracking 1.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes tracking { 0% { letter-spacing: 0.7em; transform: scale(1.35); filter: blur(14px); opacity: 0; } 55% { opacity: 1; } 100% { letter-spacing: 0.02em; transform: scale(1); filter: none; opacity: 1; } }
#intro .title .rule { display: block; width: min(320px, 50vw); height: 1px; margin: 26px auto 0; background: linear-gradient(90deg, transparent, #34d3c0, transparent); transform: scaleX(0); animation: grow 1s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes grow { to { transform: scaleX(1); } }
#intro .flash { position: absolute; inset: 0; z-index: 6; background: #fff; opacity: 0; pointer-events: none; }
#intro .flash.go { animation: flash 0.22s steps(2) forwards; }
@keyframes flash { 0% { opacity: 0.95; } 50% { opacity: 0.4; } 100% { opacity: 0; } }
#intro .skip { position: absolute; right: 22px; top: calc(13vh + 18px); z-index: 7; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: #6f8196; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); transition: color 0.2s, border-color 0.2s; }
#intro .skip:hover { color: #fff; border-color: #34d3c0; }

/* ---------- Hero camera moves ---------- */
.js:not(.hero-go) .hero h1 .line > span { animation: none; }
.hero-grid { transform-origin: 50% 40%; will-change: transform, opacity; }
.hero-grid.pull { animation: pullback 1.8s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
@keyframes pullback { from { transform: scale(1.14); filter: blur(7px); opacity: 0.2; } to { transform: none; filter: none; opacity: 1; } }

/* Role title — hard jump cuts with a punch-in */
.hero-role { position: relative; margin-bottom: 14px; }
.hero-role .cut { display: inline-block; }
.hero-role .cut.punch { animation: punch 0.42s cubic-bezier(0.2, 0.9, 0.2, 1); }
@keyframes punch { 0% { transform: scale(1.5); filter: blur(5px); opacity: 0.1; } 18% { opacity: 1; filter: none; } 100% { transform: none; } }
.hero-role .slashes { color: var(--faint); margin-right: 6px; }

/* Glitch cut on the headline */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; opacity: 0; -webkit-text-fill-color: currentColor; background: none; pointer-events: none; }
.glitch::before { color: var(--accent-2); animation: glitch-a 7s infinite steps(1); }
.glitch::after { color: var(--danger); animation: glitch-b 7s infinite steps(1); }
@keyframes glitch-a { 0%, 91%, 100% { opacity: 0; } 92% { opacity: 0.9; transform: translate(-5px, 1px); clip-path: inset(12% 0 58% 0); } 94% { opacity: 0.9; transform: translate(4px, -2px); clip-path: inset(55% 0 12% 0); } 96% { opacity: 0; } }
@keyframes glitch-b { 0%, 92%, 100% { opacity: 0; } 93% { opacity: 0.8; transform: translate(5px, -1px); clip-path: inset(40% 0 30% 0); } 95% { opacity: 0.8; transform: translate(-4px, 2px); clip-path: inset(5% 0 70% 0); } 97% { opacity: 0; } }

/* ---------- Rack-focus reveals (blur → sharp + settle) ---------- */
.reveal.focus { opacity: 0; filter: blur(14px); transform: scale(1.07) translateY(10px); transition: opacity 1s var(--ease), filter 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.focus.in { opacity: 1; filter: none; transform: none; }
.no-js .reveal.focus { opacity: 1; filter: none; transform: none; }
/* Hard "jump" reveal — snaps in with stepped easing, no tween */
.reveal.snap { transform: translateY(18px) scale(0.97); transition: opacity 0.12s steps(1), transform 0.45s steps(3); transition-delay: var(--d, 0s); }
.reveal.snap.in { transform: none; }

/* ---------- Stats: zoom punch on settle ---------- */
.stat .num { display: inline-block; transform-origin: 0 100%; }
.stat .num.pop { animation: pop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- Marquee: scroll-velocity whip ---------- */
.marquee-track { transform: skewX(var(--skew, 0deg)); transition: transform 0.2s linear; }
.marquee-wrap-run { animation: scroll 46s linear infinite; }

/* ---------- THE REEL (pinned, scroll-scrubbed jump cuts) ---------- */
.reel { padding: 0; background: #020406; color: #e8eef6; --reel-fg: #e8eef6; }
:root[data-theme="light"] .reel { background: #04070b; }
.reel-track { position: relative; }
.reel-stage { position: relative; min-height: 100svh; overflow: hidden; display: flex; align-items: center; }
.js .reel:not(.static) .reel-track { height: 520vh; }
.js .reel:not(.static) .reel-stage { position: sticky; top: 0; height: 100svh; }
.reel-head { position: absolute; top: calc(var(--nav-h) + 18px); left: 0; right: 0; z-index: 6; }
.reel-head .container { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8b98a9; gap: 16px; }
.reel-head .rec { color: var(--danger); display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.reel-head .rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: blink 1.2s steps(2) infinite; }
.reel-head .tc { color: #fff; font-variant-numeric: tabular-nums; }
.reel-progress { position: absolute; left: 0; right: 0; bottom: calc(var(--cb, 0) * 9vh); height: 3px; background: rgba(255, 255, 255, 0.08); z-index: 6; }
.reel-progress i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--rp, 0)); }
.reel-ticks { position: absolute; left: 0; right: 0; bottom: calc(var(--cb, 0) * 9vh + 22px); z-index: 6; display: flex; justify-content: center; gap: 10px; }
.reel-ticks i { width: 38px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); transition: background 0.2s, transform 0.2s; }
.reel-ticks i.on { background: var(--accent); transform: scaleY(1.8); }
.reel-flash { position: absolute; inset: 0; z-index: 8; background: #fff; opacity: 0; pointer-events: none; }
.reel-flash.go { animation: flash 0.2s steps(2) forwards; }
.reel-title { position: absolute; z-index: 6; left: 0; right: 0; bottom: calc(var(--cb, 0) * 9vh + 54px); text-align: center; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: #5f6d80; }

.shots { position: relative; width: 100%; }
.shot { position: relative; padding: calc(var(--nav-h) + 60px) 0 90px; }
.js .reel:not(.static) .shot { position: absolute; inset: 0; display: none; align-items: center; padding: 0; }
.js .reel:not(.static) .shot.active { display: flex; }
.shot .container { position: relative; z-index: 3; display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(24px, 5vw, 80px); align-items: center; }
.shot-bg { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: radial-gradient(ellipse 55% 70% at var(--gx, 70%) 50%, color-mix(in srgb, var(--hue) 34%, transparent), transparent 72%); }
.shot-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 45%, #000 120%); }
.ghost { position: absolute; right: -2%; top: 50%; transform: translateY(-50%) scale(calc(1 + var(--kb, 0) * 0.28)); font-family: var(--font-display); font-weight: 700; font-size: clamp(14rem, 44vw, 42rem); line-height: 0.8; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--hue) 55%, transparent); user-select: none; opacity: 0.9; }
.ghost-code { position: absolute; left: 0; top: 0; right: 0; bottom: 0; padding: 12vh 6vw; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.9; color: color-mix(in srgb, var(--hue) 70%, #fff); opacity: 0.2; white-space: pre; -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%); mask-image: linear-gradient(90deg, #000, transparent 70%); transform: translateY(calc(var(--kb, 0) * -40px)); }
.shot-no { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.22em; color: var(--hue); text-transform: uppercase; margin-bottom: 18px; display: flex; gap: 14px; align-items: center; }
.shot-no::after { content: ""; width: 54px; height: 1px; background: currentColor; }
.shot-word { font-size: clamp(3.4rem, 13.5vw, 11rem); font-weight: 700; letter-spacing: -0.055em; line-height: 0.88; color: #fff; text-transform: uppercase; transform: scale(calc(1 + var(--kb, 0) * 0.1)); transform-origin: 0 60%; }
.shot-word em { font-style: normal; color: var(--hue); }
.shot-copy { margin-top: 26px; max-width: 46ch; font-size: clamp(1rem, 1.7vw, 1.2rem); color: #a9b6c7; line-height: 1.6; }
.shot-copy strong { color: #fff; font-weight: 600; }
.shot-evidence { justify-self: end; width: min(100%, 330px); padding: 24px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(8, 12, 18, 0.7); backdrop-filter: blur(10px); }
.shot-evidence small { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: #6f8196; margin-bottom: 10px; }
.shot-evidence b { display: block; font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 3.8rem); letter-spacing: -0.05em; line-height: 1; color: var(--hue); }
.shot-evidence p { margin-top: 10px; color: #a9b6c7; font-size: 0.9rem; line-height: 1.5; }
.shot-evidence .tags { margin-top: 16px; }
.shot-evidence .chip { background: rgba(255, 255, 255, 0.04); }

/* The four cuts — each shot enters differently */
.js .reel:not(.static) .shot.active[data-cut="flash"] .shot-word { animation: cut-hard 0.34s steps(2); }
.js .reel:not(.static) .shot.active[data-cut="zoom"] .shot-word { animation: cut-zoom 0.6s cubic-bezier(0.1, 0.9, 0.2, 1); }
.js .reel:not(.static) .shot.active[data-cut="whip"] .container { animation: cut-whip 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reel:not(.static) .shot.active[data-cut="iris"] { animation: cut-iris 0.9s cubic-bezier(0.7, 0, 0.2, 1); }
.js .reel:not(.static) .shot.active .shot-evidence { animation: ev-in 0.7s 0.18s cubic-bezier(0.16, 1, 0.3, 1) both; }
.js .reel:not(.static) .shot.active .shot-copy, .js .reel:not(.static) .shot.active .shot-no { animation: fadeup 0.7s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes cut-hard { 0% { transform: translateX(-3%) scale(1.06); opacity: 0; } 50% { transform: translateX(2%) scale(1.02); opacity: 1; } 100% { transform: none; } }
@keyframes cut-zoom { 0% { transform: scale(2.6); filter: blur(18px); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(1); filter: none; } }
@keyframes cut-whip { 0% { transform: translateX(22%) scaleX(1.25); filter: blur(16px); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; filter: none; } }
@keyframes cut-iris { 0% { clip-path: circle(0% at 50% 50%); } 100% { clip-path: circle(80% at 50% 50%); } }
@keyframes ev-in { from { opacity: 0; transform: translateY(24px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Static fallback (reduced motion / no JS): stacked, each shot a normal block */
.reel.static .shot, .no-js .reel .shot { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.reel.static .reel-head, .reel.static .reel-progress, .reel.static .reel-ticks, .reel.static .reel-title,
.no-js .reel-head, .no-js .reel-progress, .no-js .reel-ticks, .no-js .reel-title { display: none; }
.reel.static .reel-stage, .no-js .reel-stage { display: block; }

/* ---------- Experience: scene slates, wipes, drawing line ---------- */
.role.current { padding: 0; }
.role .card { padding: clamp(22px, 3vw, 30px); }
.role.current .card { padding: clamp(24px, 3.4vw, 36px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.slate { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.slate i { display: inline-block; width: 22px; height: 14px; border-radius: 2px; background: repeating-linear-gradient(135deg, var(--text) 0 4px, transparent 4px 8px); opacity: 0.55; }
.role.current .slate { color: var(--accent); }
.role .wipe { clip-path: inset(0 100% 0 0 round 16px); transition: clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1); }
.role.in .wipe, .no-js .role .wipe { clip-path: inset(0 0 0 0 round 16px); }
.timeline::before { transform-origin: 50% 0; transform: scaleY(var(--tl, 0)); opacity: 0.8; }
.no-js .timeline::before { transform: none; }
.role::before { transform: scale(0); transition: transform 0.5s 0.3s cubic-bezier(0.2, 1.6, 0.4, 1); }
.role.in::before, .no-js .role::before { transform: scale(1); }

/* ---------- Detection panes: line-by-line cuts ---------- */

/* ---------- Projects: scroll zoom + lightbox ---------- */
.browser-view .zoomer { position: absolute; inset: 0; transform: scale(var(--z, 1.0)); transform-origin: 50% 0%; will-change: transform; }
.browser-view { cursor: zoom-in; }
.proj-media img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 350; display: none; place-items: center; background: rgba(2, 4, 8, 0.88); backdrop-filter: blur(10px); padding: 5vh 4vw; cursor: zoom-out; }
.lightbox.open { display: grid; animation: fadein 0.3s; }
.lightbox img { max-width: min(1400px, 100%); max-height: 82vh; border-radius: 12px; border: 1px solid var(--line-strong); box-shadow: 0 50px 140px -30px #000; animation: lb-zoom 0.65s cubic-bezier(0.16, 1, 0.3, 1) both; transform-origin: var(--ox, 50%) var(--oy, 50%); }
@keyframes lb-zoom { from { transform: scale(0.35); opacity: 0; filter: blur(10px); } to { transform: none; opacity: 1; filter: none; } }
.lightbox .cap { position: absolute; bottom: 4vh; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 0.78rem; color: #8b98a9; letter-spacing: 0.1em; text-transform: uppercase; }
.lightbox .x { position: absolute; top: 22px; right: 22px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: #fff; }
.project { transition: border-color 0.35s, transform 0.2s ease-out, box-shadow 0.45s; }

/* ---------- Contact: iris wipe + end credits ---------- */
.contact-card { clip-path: circle(0% at 50% 60%); transition: clip-path 1.5s cubic-bezier(0.7, 0, 0.2, 1); }
.contact-card.in, .no-js .contact-card { clip-path: circle(150% at 50% 60%); }
.contact-card h2 { transform: scale(1.3); filter: blur(10px); opacity: 0; transition: transform 1.4s 0.5s var(--ease), filter 1.4s 0.5s var(--ease), opacity 1.2s 0.5s; }
.contact-card.in h2, .no-js .contact-card h2 { transform: none; filter: none; opacity: 1; }

.credits { position: relative; height: 340px; overflow: hidden; border-top: 1px solid var(--line); background: #020406; color: #e8eef6; text-align: center; -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
:root[data-theme="light"] .credits { background: #04070b; }
.credits-roll { position: absolute; left: 0; right: 0; top: 100%; display: grid; gap: 38px; padding-bottom: 80px; animation: roll 30s linear infinite; animation-play-state: paused; }
.credits.in .credits-roll { animation-play-state: running; }
@keyframes roll { to { transform: translateY(calc(-100% - 340px)); } }
.credits small { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: #5f6d80; margin-bottom: 8px; }
.credits b { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 2.4vw, 1.6rem); letter-spacing: 0.04em; }
.credits .big b { font-size: clamp(1.8rem, 5vw, 3.2rem); }
.no-js .credits-roll, .credits.static .credits-roll { position: static; animation: none; padding: 40px 0; }
.credits.static, .no-js .credits { height: auto; -webkit-mask-image: none; mask-image: none; }

@media (max-width: 1040px) {
  .shot .container { grid-template-columns: 1fr; }
  .shot-evidence { justify-self: start; }
}
@media (max-width: 760px) {
  .hud { display: none; }
  #intro .count { bottom: 12vh; }
  #intro .boot { bottom: 24vh; }
  .shot-evidence { padding: 18px; }
  .shot-evidence b { font-size: 2.4rem; }
  .ghost { opacity: 0.3; }
  .reel-title { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .film, .glitch::before, .glitch::after { animation: none; }
  .hero-grid.pull { animation: none; }
  .contact-card, .role .wipe { clip-path: none !important; }
  .contact-card h2 { transform: none; filter: none; opacity: 1; }
  .reveal.focus, .reveal.snap { opacity: 1; filter: none; transform: none; }
  .role::before { transform: scale(1); }
  .timeline::before { transform: none; }
}

/* ---------- Late additions ---------- */
.bar.indet i { width: 42%; transform: none; background: linear-gradient(90deg, transparent, var(--warn), transparent); animation: indet 2.4s linear infinite; }
.in .bar.indet i { transform: none; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.reveal.in.settled { transition: border-color 0.35s, box-shadow 0.45s, transform 0.45s var(--ease); }
.tilt.reveal.in.settled { transition: border-color 0.35s, box-shadow 0.45s, transform 0.18s ease-out; }
.hero-copy .pill { max-width: 100%; }
@media (max-width: 1040px) { .nav-links a { padding: 9px 10px; } }
@media (max-width: 860px) { .nav-links a { padding: 14px 12px; } }

.me-wrap { margin-bottom: 56px; }
@media (max-width: 1040px) { .me-wrap { margin-bottom: 70px; } }

code, pre, kbd, .hud, .chip { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.featured h3 { margin-bottom: 4px; }
.proj-sub { font-family: var(--font-display); font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--muted); margin-bottom: 16px; letter-spacing: -0.01em; }

.proj-grid { grid-auto-flow: dense; }
.project.wide { grid-column: span 2; display: grid; grid-template-columns: 1.05fr 0.95fr; grid-template-rows: 1fr auto; }
.project.wide .proj-top { grid-column: 1; grid-row: 1; }
.project.wide .proj-bottom { grid-column: 1; grid-row: 2; }
.project.wide .proj-media { grid-column: 2; grid-row: 1 / 3; margin: 22px 22px 0 0; height: auto; min-height: 280px; align-self: stretch; padding: 16px 16px 0; gap: 10px; justify-content: center; }
.project.wide .proj-media img { width: calc(33.3% - 7px); height: 100%; max-height: 360px; object-fit: cover; object-position: top; }
@media (max-width: 1040px) { .project.wide { grid-column: span 2; } }
@media (max-width: 640px) {
  .project.wide { grid-column: auto; display: flex; flex-direction: column; }
  .project.wide .proj-media { margin: 0 26px 18px; height: 170px; min-height: 0; padding: 12px 12px 0; }
  .project.wide .proj-media img { width: auto; height: 220px; max-height: none; }
}
.featured > *, .about-grid > *, .os-grid > *, .hero-grid > * { min-width: 0; }
.shot-tabs { max-width: 100%; }

/* Click-to-reveal email */
.email-reveal { display: none; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.email-reveal.show { display: flex; animation: fadein 0.5s var(--ease); }
.email-addr { font-family: var(--font-mono); font-size: 1rem; padding: 12px 18px; border-radius: 12px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); user-select: all; word-break: break-all; }

/* ==========================================================================
   PRINCIPLES — walkthrough
   ========================================================================== */
.chain { border: 1px solid var(--line-strong); border-radius: 20px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); overflow: hidden; box-shadow: var(--shadow); }
.stages { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.stage { position: relative; text-align: left; padding: 20px 18px 20px; border-right: 1px solid var(--line); transition: background 0.3s; overflow: hidden; }
.stage:last-child { border-right: 0; }
.stage:hover { background: var(--surface-2); }
.stage .n { font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint); letter-spacing: 0.12em; transition: color 0.3s; }
.stage strong { display: block; font-family: var(--font-display); font-size: 1rem; margin: 7px 0 4px; line-height: 1.2; }
.stage .m { font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint); transition: color 0.3s; }
.stage[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.stage[aria-selected="true"] .n, .stage[aria-selected="true"] .m { color: var(--accent); }
.stage .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; }
.stage.done .fill { transform: scaleX(1); opacity: 0.5; }
.chain.playing .stage[aria-selected="true"] .fill { animation: fillbar 6.5s linear forwards; }
.stage[aria-selected="true"]:not(:hover) .fill { transform: scaleX(0); }
.chain:not(.playing) .stage[aria-selected="true"] .fill { transform: scaleX(1); opacity: 0.9; }
@keyframes fillbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.stage-pane { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 320px; }
.js .stage-pane:not(.active) { display: none; }
.stage-pane + .stage-pane { border-top: 1px solid var(--line); }
.side { padding: clamp(24px, 3.4vw, 40px); }
.side .kick { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; }
.side.pri .kick { color: var(--accent-3); }
.side.proof .kick { color: var(--accent); }
.side h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 12px; }
.side p { color: var(--muted); font-size: 1.02rem; max-width: 46ch; }
.side.pri { background: radial-gradient(520px 260px at 0% 0%, color-mix(in srgb, var(--accent-3) 10%, transparent), transparent 70%); }
.side.proof { background: radial-gradient(520px 260px at 100% 0%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%); }
.vs { position: relative; display: grid; place-items: center; padding: 0 8px; }
.vs::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: 50%; width: 1px; background: linear-gradient(transparent, var(--line-strong), transparent); }
.vs span { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--faint); }
.resp { display: grid; gap: 9px; margin-top: 20px; }
.resp li { position: relative; padding-left: 26px; color: var(--muted); font-size: 0.94rem; line-height: 1.5; }
.resp li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.chain-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.84rem; }
.play { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; transition: color 0.2s, border-color 0.2s; }
.play:hover { color: var(--text); border-color: var(--accent); }
.play .icon { width: 0.9em; height: 0.9em; }

/* each stage change is a cut: intruder glitches in, defender wipes in */
.js .stage-pane.active .side.pri { animation: atk-in 0.55s cubic-bezier(0.2, 0.9, 0.2, 1); }
.js .stage-pane.active .side.proof { animation: def-in 0.8s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.js .stage-pane.active .vs span { animation: pop 0.5s 0.1s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes atk-in { 0% { opacity: 0; transform: translateX(-28px) skewX(-6deg); filter: blur(6px); } 35% { opacity: 1; text-shadow: 3px 0 var(--accent-2), -3px 0 var(--danger); } 100% { transform: none; filter: none; text-shadow: none; } }
@keyframes def-in { from { clip-path: inset(0 0 0 100%); opacity: 0.4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

@media (max-width: 1040px) {
  .stages { grid-template-columns: repeat(3, 1fr); }
  .stage { border-bottom: 1px solid var(--line); }
  .stage:nth-child(3n) { border-right: 0; }
  .stage:nth-last-child(-n+3) { border-bottom: 0; }
}
@media (max-width: 820px) {
  .stage-pane { grid-template-columns: 1fr; min-height: 0; }
  .vs { padding: 4px 0; } .vs::before { top: 50%; bottom: auto; left: 22px; right: 22px; width: auto; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
}
@media (max-width: 640px) {
  .stages { grid-template-columns: repeat(2, 1fr); }
  .stage:nth-child(3n) { border-right: 1px solid var(--line); } .stage:nth-child(2n) { border-right: 0; }
  .stage:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); } .stage:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .js .stage-pane.active .side { animation: none; }
}

.test { margin-top: 26px; display: inline-flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent-3) 45%, transparent); background: color-mix(in srgb, var(--accent-3) 6%, transparent); font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.test small { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-3); font-weight: 500; }

/* ==========================================================================
   HERO — career-path card
   ========================================================================== */
.me-head { display: flex; align-items: center; gap: 16px; padding: 22px 26px 8px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; padding: 2px; background: var(--grad); flex: none; }
.avatar span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--bg-2); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.03em; }
.me-head strong { display: block; font-family: var(--font-display); font-size: 1.28rem; letter-spacing: -0.02em; line-height: 1.2; }
.me-head small { color: var(--muted); font-size: 0.84rem; }
.me-head .now { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ok); padding: 6px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); white-space: nowrap; }
.me-head .now i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: ping 2s infinite; }
.path { position: relative; list-style: none; margin: 12px 26px 4px; padding: 4px 0 4px 28px; }
.path::before { content: ""; position: absolute; left: 5px; top: 20px; bottom: 22px; width: 2px; background: linear-gradient(var(--accent), var(--accent-2) 70%, var(--accent-3)); transform-origin: 0 0; transform: scaleY(1); }
.js .path::before { transform: scaleY(0); transition: transform 1.9s cubic-bezier(0.65, 0, 0.35, 1) 0.2s; }
.js .path.go::before { transform: scaleY(1); }
.path li { position: relative; display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 9px 0; }
.path li::before { content: ""; position: absolute; left: -28px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--accent-2); }
.path li.current::before { border-color: var(--accent); background: var(--accent); animation: ping2 2.2s infinite; }
@keyframes ping2 { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 11px transparent; } }
.path time { font-family: var(--font-mono); font-size: 0.72rem; color: var(--faint); padding-top: 3px; letter-spacing: 0.02em; }
.path li.current time { color: var(--accent); }
.path b { display: block; font-size: 0.93rem; font-weight: 600; line-height: 1.3; }
.path small { color: var(--muted); font-size: 0.78rem; }
.js .path li { opacity: 0; transform: translateX(-14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .path li.show { opacity: 1; transform: none; }
.me-certs { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 26px 22px; margin-top: 6px; border-top: 1px dashed var(--line); }
.plink { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--accent); font-weight: 600; font-size: 0.92rem; }
.plink .icon { transition: transform 0.3s var(--ease); }
.plink:hover .icon { transform: translate(3px, -3px); }
.vs span { white-space: nowrap; }
@media (max-width: 640px) {
  .me-head { padding: 18px 18px 6px; } .me-head .now { display: none; }
  .path { margin: 10px 18px 2px; } .path li { grid-template-columns: 62px 1fr; gap: 8px; }
  .me-certs { padding: 12px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) { .js .path li { opacity: 1; transform: none; } .js .path::before { transform: scaleY(1); } }
.float-card.b { top: -52px; }
.stage { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
/* equal-height tabs */
.stage strong { min-height: 2.4em; }

/* Quick reveal (repeat visits) */
#intro .quick-mark { position: absolute; inset: 0; z-index: 5; display: none; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(3.4rem, 11vw, 6.5rem); letter-spacing: -0.05em; pointer-events: none; background: none; }
#intro .quick-mark { color: transparent; background: linear-gradient(120deg, #34d3c0, #5aa9ff 55%, #a78bfa); -webkit-background-clip: text; background-clip: text; }
#intro.quick .quick-mark { display: grid; animation: qm 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes qm { 0% { opacity: 0; transform: scale(1.6); filter: blur(14px); } 45% { opacity: 1; } 100% { opacity: 1; transform: none; filter: none; } }
#intro.quick .bar, #intro.quick .intro-stage, #intro.quick .skip { display: none; }
#intro.quick.out .quick-mark { animation: none; opacity: 0; transition: opacity 0.22s; }
.path-more { display: inline-flex; align-items: center; gap: 7px; margin: 2px 26px 6px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--accent); }
.path-more .icon { width: 0.95em; height: 0.95em; transition: transform 0.3s var(--ease); }
.path-more:hover .icon { transform: translate(2px, -2px); }
@media (max-width: 640px) { .path-more { margin-left: 18px; } }
