/* =========================================================================
   Ayesha Khan — portfolio design system
   Dark-first, Apple-inspired: large type, glass surfaces, restrained colour.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #07080b;
  --bg-2: #0d0f14;
  --bg-3: #13161d;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-2: #b7b8c0;
  --text-3: #7d7f8a;
  --text-4: #55575f;

  --amber: #f5b544;
  --teal: #2dd4bf;
  --blue: #5b8def;
  --violet: #a78bfa;
  --rose: #fb7185;
  --green: #34d399;

  --grad: linear-gradient(90deg, var(--amber) 0%, var(--teal) 48%, var(--violet) 100%);
  --grad-soft: linear-gradient(135deg, rgba(245, 181, 68, 0.18), rgba(45, 212, 191, 0.14) 50%, rgba(167, 139, 250, 0.18));

  --glass-bg: rgba(22, 24, 30, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.5);

  --r-xl: 30px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --r-xs: 8px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.35, 0.64, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --nav-h: 56px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);

  --hero-hue: #2dd4bf;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-2: #ffffff;
  --bg-3: #eef0f4;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.9);
  --surface-3: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.07);
  --border-2: rgba(0, 0, 0, 0.13);
  --text: #1d1d1f;
  --text-2: #4b4b50;
  --text-3: #76767c;
  --text-4: #a0a0a6;

  --amber: #d9932a;
  --teal: #0f9f92;
  --blue: #3468d6;
  --violet: #7c5ce6;
  --rose: #e0475f;
  --green: #159a6a;

  --grad-soft: linear-gradient(135deg, rgba(245, 181, 68, 0.22), rgba(45, 212, 191, 0.18) 50%, rgba(167, 139, 250, 0.22));

  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "ss03";
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(45, 212, 191, 0.35); color: var(--text); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; background: var(--text); color: var(--bg); border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- Background ambience ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs .orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.32;
  animation: orbFloat 26s ease-in-out infinite alternate;
}
.bg-orbs .o1 { width: 60vw; height: 60vw; left: -18vw; top: -22vw; background: radial-gradient(circle, rgba(45, 212, 191, 0.7), transparent 65%); }
.bg-orbs .o2 { width: 55vw; height: 55vw; right: -20vw; top: 8vh; background: radial-gradient(circle, rgba(167, 139, 250, 0.65), transparent 65%); animation-delay: -8s; }
.bg-orbs .o3 { width: 50vw; height: 50vw; left: 25vw; bottom: -30vw; background: radial-gradient(circle, rgba(245, 181, 68, 0.5), transparent 65%); animation-delay: -16s; }
:root[data-theme="light"] .bg-orbs .orb { opacity: 0.22; }
@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vw, 5vh, 0) scale(1.12); }
}
.bg-grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding: clamp(84px, 11vw, 150px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3);
  margin-bottom: 18px;
}
.label::before { content: ""; width: 18px; height: 1px; background: var(--grad); }
.section-head.center .label::before, .label.center::before { display: none; }
.label.center { justify-content: center; }
.h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.06;
  text-wrap: balance;
}
.h2 em, .display em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.sub { margin-top: 18px; font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--text-2); line-height: 1.6; text-wrap: pretty; }
.mono { font-family: var(--font-mono); }

/* ---------- Glass ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
  transition: border-color 0.5s var(--ease-out), transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out), background-color 0.5s;
  overflow: hidden;
}
:root[data-theme="light"] .card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.05); }
.card.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.075), transparent 60%);
  transition: opacity 0.5s ease;
}
:root[data-theme="light"] .card.spot::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 0, 0, 0.035), transparent 60%); }
.card.spot:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; letter-spacing: -0.005em;
  transition: transform 0.45s var(--ease-spring), background-color 0.3s, color 0.3s, box-shadow 0.4s, border-color 0.3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); transition-duration: 0.12s; }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.btn-primary:hover { box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4); }
:root[data-theme="light"] .btn-primary { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn svg { width: 16px; height: 16px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--text-2);
  transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease-spring);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 18px; height: 18px; }


/* ---------- Preloader ---------- */
body.is-loading { overflow: hidden; }
.loader {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--bg); overflow: hidden;
  --spd: 1; --c: var(--teal);
  transition: clip-path 1.05s var(--ease-io) 0.35s;
}
.loader.is-fast { --spd: 0.4; }
.loader::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.7;
  background: radial-gradient(42% 42% at 50% 44%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 70%), radial-gradient(30% 30% at 22% 70%, color-mix(in srgb, var(--amber) 8%, transparent), transparent 70%), radial-gradient(30% 30% at 78% 30%, color-mix(in srgb, var(--violet) 10%, transparent), transparent 70%);
}
.loader-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(circle, var(--border-2) 1px, transparent 1.5px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000 20%, transparent 100%); mask-image: radial-gradient(60% 60% at 50% 50%, #000 20%, transparent 100%);
}
.loader-scene { position: relative; width: min(100vw, 720px); height: min(100svh, 640px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; transition: opacity 0.55s var(--ease-out), transform 0.7s var(--ease-out), filter 0.55s var(--ease-out); }

/* portrait + ring */
.loader-portrait { position: relative; width: clamp(160px, 26vh, 224px); aspect-ratio: 1; opacity: 0; transform: scale(0.86); filter: blur(10px); }
.loader.is-ready .loader-portrait { animation: ldIn calc(0.9s * var(--spd)) var(--ease-out) forwards; animation-delay: calc(120ms * var(--spd)); }
.loader-portrait .ring { position: absolute; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); transform: rotate(-90deg); overflow: visible; }
.loader-portrait .ring .track { fill: none; stroke: var(--border-2); stroke-width: 1.4; }
.loader-portrait .ring .prog { fill: none; stroke: url(#akg-ring); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.3s linear; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--teal) 55%, transparent)); }
.loader-portrait .photo { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.loader-portrait .photo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(120% 120% at 50% 0%, transparent 60%, rgba(7, 8, 11, 0.35)); pointer-events: none; }
.loader-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.02); }
:root[data-theme="light"] .loader-portrait .photo { box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
:root[data-theme="light"] .loader-portrait .photo::after { background: none; }

/* brand — one wordmark: "AK" that expands into "AYESHA KHAN" */
.loader-brand { display: flex; flex-direction: column; align-items: center; }
.wordmark {
  display: inline-flex; align-items: baseline; line-height: 1; white-space: nowrap;
  font-weight: 600; letter-spacing: 0.08em; color: var(--text);
}
.wordmark .l { display: inline-block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark .sp { display: inline-block; width: 0.46em; }
.wordmark .x { display: inline-grid; grid-template-columns: 0fr; transition: grid-template-columns 1.05s var(--ease-out); }
.wordmark .x > span { display: flex; overflow: hidden; min-width: 0; }
.wordmark .x i {
  font-style: normal; font-weight: 300; color: var(--text-2); opacity: 0; transform: translateX(-10px);
  transition: opacity 0.5s var(--ease-out), transform 0.65s var(--ease-out); transition-delay: calc(var(--i) * 55ms);
}
.wordmark.is-open .x { grid-template-columns: 1fr; }
.wordmark.is-open .x i { opacity: 1; transform: none; }

.loader-word { font-size: clamp(1.6rem, 6.4vw, 2.6rem); letter-spacing: 0.06em; opacity: 0; }
.loader.is-ready .loader-word { animation: fadeIn 0.9s var(--ease-out) forwards; animation-delay: calc(320ms * var(--spd)); }
@keyframes akDraw { to { stroke-dashoffset: 0; } }
@keyframes letterIn { to { opacity: 1; transform: none; filter: none; } }
@keyframes ldIn { to { opacity: 1; transform: none; filter: none; } }
.loader-tag { margin-top: 16px; font-size: 10.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-3); opacity: 0; transform: translateY(6px); }
.loader.is-ready .loader-tag { animation: letterIn calc(0.8s * var(--spd)) var(--ease-out) forwards; animation-delay: calc(1550ms * var(--spd)); }
.loader-timer { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-3); opacity: 0; }
.loader.is-ready .loader-timer { animation: fadeIn 0.8s var(--ease-out) forwards; animation-delay: 300ms; }
@keyframes fadeIn { to { opacity: 1; } }
.loader-timer .num { display: flex; align-items: baseline; gap: 3px; }
.loader-timer b { display: inline-block; font-size: 28px; font-weight: 500; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; transform-origin: center; }
.loader-timer b.tick { animation: timerTick 0.5s var(--ease-spring); }
@keyframes timerTick { 0% { transform: scale(1.28); color: var(--teal); } 100% { transform: scale(1); } }
.loader-timer span { font-size: 12px; color: var(--text-3); }
.loader-timer small { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-4); }

/* floating data elements */
.ld {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  padding: 10px 12px; border-radius: 14px; background: var(--glass-bg); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.6), inset 0 1px 0 var(--glass-highlight);
  color: var(--text-2); font-size: 11px; line-height: 1.3; opacity: 0; --c: var(--teal);
}
.ld small { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.04em; color: var(--text-3); margin-bottom: 6px; }
.loader.is-ready .ld { animation: ldChipIn calc(0.9s * var(--spd)) var(--ease-out) forwards, ldFloat 6s ease-in-out infinite; animation-delay: calc(var(--d) * var(--spd)), calc(var(--d) + 0.9s); }
@keyframes ldChipIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.85) translateY(14px); filter: blur(8px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1) translateY(0); filter: blur(0); } }
@keyframes ldFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.ld-bars svg { width: 96px; height: 42px; display: block; }
.ld-bars rect { fill: var(--c); opacity: 0.55; transform: scaleY(0); transform-box: fill-box; transform-origin: bottom; }
.ld-bars rect.hi { fill: var(--amber); opacity: 1; }
.loader.is-ready .ld-bars rect { animation: growY calc(0.7s * var(--spd)) var(--ease-out) forwards; animation-delay: calc(var(--i) * 90ms * var(--spd) + var(--d) * var(--spd) + 300ms); }
@keyframes growY { to { transform: scaleY(1); } }
.ld-kpi b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--green); font-variant-numeric: tabular-nums; }
.ld-kpi span { display: block; font-size: 10px; color: var(--text-3); margin-top: 2px; }
.ld-code { font-size: 10.5px; line-height: 1.55; color: var(--text-2); white-space: nowrap; }
.ld-code .k { color: var(--violet); }
.ld-code .cc { display: inline-block; width: 6px; height: 11px; margin-left: 2px; vertical-align: -1px; background: var(--teal); animation: caretBlink 1s steps(1) infinite; }
.ld-spark svg { width: 104px; height: 40px; display: block; overflow: visible; }
.ld-spark polyline { fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.ld-spark circle { fill: var(--c); opacity: 0; }
.loader.is-ready .ld-spark polyline { animation: akDraw calc(1.1s * var(--spd)) var(--ease-out) forwards; animation-delay: calc(var(--d) * var(--spd) + 400ms); }
.loader.is-ready .ld-spark circle { animation: letterIn 0.4s var(--ease-out) forwards, pingDot 2s ease-out infinite; animation-delay: calc(var(--d) * var(--spd) + 1300ms), calc(var(--d) * var(--spd) + 1700ms); }
@keyframes pingDot { 0% { filter: drop-shadow(0 0 0 var(--c)); } 60% { filter: drop-shadow(0 0 6px var(--c)); } 100% { filter: drop-shadow(0 0 0 transparent); } }
.ld-donut { display: flex; align-items: center; gap: 10px; }
.ld-donut svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.ld-donut .track { fill: none; stroke: var(--border-2); stroke-width: 6; }
.ld-donut .arc { fill: none; stroke: var(--rose); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0 100; }
.loader.is-ready .ld-donut .arc { animation: donutArc calc(1.2s * var(--spd)) var(--ease-out) forwards; animation-delay: calc(var(--d) * var(--spd) + 400ms); }
@keyframes donutArc { to { stroke-dasharray: 27 100; } }
.ld-donut b { display: block; font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.ld-donut small { margin: 0; }
.ld-table svg { width: 104px; height: 48px; display: block; }
.ld-table rect { fill: var(--text-4); opacity: 0.45; }
.ld-table rect.hi { fill: var(--c); opacity: 0.9; }
.ld-table .r { opacity: 0; }
.loader.is-ready .ld-table .r { animation: letterIn 0.4s var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms * var(--spd) + var(--d) * var(--spd) + 300ms); }
.lf { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); font-size: 11px; letter-spacing: 0.06em; color: var(--text-4); opacity: 0; }
.loader.is-ready .lf { animation: lfIn 1.2s var(--ease-out) forwards, lfDrift 9s ease-in-out infinite; animation-delay: calc(var(--d) * var(--spd) + 600ms), var(--d); }
@keyframes lfIn { to { opacity: 0.8; } }
@keyframes lfDrift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* exit */
.loader.is-done .loader-scene { opacity: 0; transform: scale(1.06); filter: blur(10px); }
.loader.is-done .loader-timer, .loader.is-done .loader-grid { opacity: 0; transition: opacity 0.3s; }
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader.is-gone { display: none; }
body.is-loading .nav-wrap { opacity: 0; transform: translateY(-14px); }
.nav-wrap { transition: opacity 0.9s var(--ease-out) 0.55s, transform 0.9s var(--ease-out) 0.55s; }

@media (max-width: 640px) {
  .loader-scene { width: 100vw; height: min(100svh, 600px); gap: 16px; }
  .ld { padding: 8px 10px; border-radius: 12px; scale: 0.86; }
  .ld-code, .ld-table, .lf { display: none; }
  .ld-bars { --x: 20% !important; --y: 16% !important; }
  .ld-kpi { --x: 80% !important; --y: 16% !important; }
  .ld-spark { --x: 79% !important; --y: 84% !important; }
  .ld-donut { --x: 22% !important; --y: 84% !important; }
}

/* Brand marks (nav + footer) */
.foot-brand { display: inline-flex; align-items: center; }
.foot-wordmark { font-size: 13px; letter-spacing: 0.2em; }

/* ---------- Navigation (liquid-glass pill) ---------- */
.nav-wrap { position: fixed; top: 14px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 8px 8px 12px; border-radius: 999px;
  transition: padding 0.5s var(--ease-out), transform 0.5s var(--ease-out), background-color 0.4s;
  will-change: transform;
}
.nav::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.06));
  mix-blend-mode: screen;
}
:root[data-theme="light"] .nav::after { opacity: 0.6; }
.nav-wrap.is-scrolled .nav { padding: 6px 6px 6px 10px; }
.nav-wrap.is-hidden .nav { transform: translateY(-120%); }
.nav-logo {
  display: inline-flex; align-items: center; height: 36px; padding: 0 10px; border-radius: 12px; margin-right: 2px;
  font-size: 15px; letter-spacing: 0.1em; transition: background-color 0.35s;
}
.nav-logo:hover { background: var(--surface-3); }
.nav-logo .x { transition: grid-template-columns 0.65s var(--ease-out); }
.nav-logo:hover .x, .nav-logo:focus-visible .x { grid-template-columns: 1fr; }
.nav-logo:hover .x i, .nav-logo:focus-visible .x i { opacity: 1; transform: none; }
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative; z-index: 1; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }
.nav-ind {
  position: absolute; top: 0; left: 0; height: 100%; width: 0; border-radius: 999px; background: var(--surface-3);
  transition: transform 0.55s var(--ease-spring), width 0.55s var(--ease-spring), opacity 0.3s; opacity: 0;
}
.nav-ind.is-visible { opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.nav-menu { display: none; }
.theme-toggle svg { transition: transform 0.6s var(--ease-spring), opacity 0.3s; }
.theme-toggle .sun { position: absolute; }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
:root[data-theme="light"] .theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-toggle { position: relative; }

.nav-sheet {
  pointer-events: auto; position: absolute; top: calc(100% + 10px); left: 12px; right: 12px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-radius: var(--r-lg); padding: 10px; display: none; flex-direction: column; gap: 2px;
  transform-origin: top center; opacity: 0; transform: translateY(-8px) scale(0.98);
  transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-spring);
}
.nav-sheet a { padding: 14px 16px; border-radius: 14px; font-size: 17px; font-weight: 500; color: var(--text-2); }
.nav-sheet a:hover { background: var(--surface-3); color: var(--text); }
.nav-wrap.is-open .nav-sheet { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 72px) 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
}
.eyebrow { padding-left: 6px; }
.eyebrow .avatar-wrap { position: relative; width: 30px; height: 30px; flex: none; }
.eyebrow .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 26%; box-shadow: 0 0 0 1.5px var(--border-2), 0 2px 8px rgba(0, 0, 0, 0.3); }
.eyebrow .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: pulseDot 2.4s ease-out infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.display {
  margin-top: 26px;
  font-size: clamp(2.6rem, 5.5vw, 4.7rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.04;
  text-wrap: balance;
}
.display .line { display: block; }
.tw-line { white-space: nowrap; }
.tw { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.015em; color: var(--hero-hue); transition: color 0.6s ease; }
.caret {
  display: inline-block; width: 3px; height: 0.86em; margin-left: 3px; vertical-align: -0.08em; border-radius: 2px;
  background: var(--hero-hue); transition: background-color 0.6s ease;
}
.caret.blink { animation: caretBlink 1.05s steps(1) infinite; }
:root[data-theme="light"] .tw, :root[data-theme="light"] .hero-state .dot { color: color-mix(in srgb, var(--hero-hue) 70%, #1d1d1f); }
:root[data-theme="light"] .caret { background: color-mix(in srgb, var(--hero-hue) 70%, #1d1d1f); }
@keyframes caretBlink { 50% { opacity: 0; } }
.lead { margin-top: 28px; max-width: 560px; font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--text-2); line-height: 1.62; text-wrap: pretty; }
.lead strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.hero-chips li { font-size: 13px; color: var(--text-3); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.hero-chips li b { color: var(--text-2); font-weight: 600; }

.hero-visual { position: relative; display: grid; place-items: center; }
.hero-canvas-wrap {
  position: relative; width: min(100%, 560px); aspect-ratio: 1;
  transform: translate3d(0, var(--hero-py, 0px), 0); opacity: var(--hero-op, 1);
}
.hero-canvas-wrap::before {
  content: ""; position: absolute; inset: 12%; border-radius: 50%; filter: blur(70px); opacity: 0.35;
  background: radial-gradient(circle, var(--hero-hue), transparent 70%); transition: background 0.8s ease;
  pointer-events: none;
}
.hero-canvas-wrap canvas { position: relative; width: 100% !important; height: 100% !important; }
.hero-fallback { position: absolute; inset: 18%; border-radius: 50%; border: 1px dashed var(--border-2); opacity: 0; animation: spin 40s linear infinite; background: radial-gradient(circle, color-mix(in srgb, var(--hero-hue) 22%, transparent), transparent 66%); }
.hero-canvas-wrap.no-webgl .hero-fallback { opacity: 0.6; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-state {
  position: absolute; bottom: 1%; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--text-2);
  white-space: nowrap;
}
.hero-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hero-hue); box-shadow: 0 0 12px var(--hero-hue); transition: background 0.6s, box-shadow 0.6s; }
.hero-state span.txt { transition: opacity 0.3s; }
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4);
}
.scroll-hint .mouse { width: 22px; height: 34px; border: 1.5px solid var(--text-4); border-radius: 12px; position: relative; }
.scroll-hint .mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--text-3); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

/* ---------- Flow: Data → Insight → Decision ---------- */
.flow-widget { border-radius: var(--r-xl); padding: clamp(20px, 3vw, 36px); }
.flow-track { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 10px; }
.flow-node {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  transition: background-color 0.4s, border-color 0.4s, color 0.4s, transform 0.5s var(--ease-spring), box-shadow 0.4s;
  position: relative;
}
.flow-node:hover { transform: translateY(-2px); }
.flow-node .ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text); transition: background 0.4s, color 0.4s; }
.flow-node .ic svg { width: 18px; height: 18px; }
.flow-node .t { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.flow-node .t b { font-size: 15px; font-weight: 600; color: var(--text); }
.flow-node .t small { font-size: 12px; color: var(--text-3); }
.flow-node.is-active { border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 16%, transparent), 0 10px 30px color-mix(in srgb, var(--c) 18%, transparent); }
.flow-node.is-active .ic { background: var(--c); color: #0b0b0e; }
.flow-node .ring { position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; }
.flow-link { position: relative; height: 2px; background: var(--border-2); border-radius: 2px; overflow: visible; }
.flow-link::after { content: ""; position: absolute; inset: 0; background: var(--grad); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease-out); }
.flow-link.is-done::after { transform: scaleX(1); }
.flow-link .pulse { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--text); box-shadow: 0 0 12px var(--text); opacity: 0; }
.flow-link.is-running .pulse { animation: pulseMove 1.4s var(--ease-io) infinite; }
@keyframes pulseMove { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.flow-panels { position: relative; margin-top: 26px; min-height: 250px; }
.flow-panel {
  position: absolute; inset: 0; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: center;
  opacity: 0; transform: translateY(14px) scale(0.99); filter: blur(8px); pointer-events: none;
  transition: opacity 0.55s var(--ease-out), transform 0.7s var(--ease-out), filter 0.55s var(--ease-out);
}
.flow-panel.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.flow-copy h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.flow-copy p { margin-top: 12px; color: var(--text-2); font-size: 1rem; }
.flow-copy .kicker { font-family: var(--font-mono); font-size: 12px; color: var(--c); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.flow-demo { border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--border); padding: 16px; min-height: 210px; box-shadow: var(--shadow-sm); overflow: hidden; }
:root[data-theme="light"] .flow-demo { background: #fff; }
.mini-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; }
.mini-table th { text-align: left; color: var(--text-3); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.mini-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); color: var(--text-2); opacity: 0; transform: translateX(-6px); }
.flow-panel.is-active .mini-table td { animation: rowIn 0.5s var(--ease-out) forwards; animation-delay: calc(var(--i) * 70ms + 200ms); }
@keyframes rowIn { to { opacity: 1; transform: none; } }
.mini-table .bad { color: var(--rose); background: color-mix(in srgb, var(--rose) 12%, transparent); border-radius: 4px; }
.mini-table .dup { color: var(--amber); }
.mini-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 10px 4px 0; }
.mini-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.mini-chart .bar i { width: 100%; border-radius: 8px 8px 4px 4px; background: var(--surface-3); height: var(--h); transform: scaleY(0); transform-origin: bottom; transition: transform 0.9s var(--ease-out); }
.flow-panel.is-active .mini-chart .bar i { transform: scaleY(1); transition-delay: calc(var(--i) * 80ms + 200ms); }
.mini-chart .bar.hi i { background: var(--c); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 45%, transparent); }
.mini-chart .bar span { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.mini-note { margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.mini-note b { color: var(--c); font-weight: 600; }
.decision { display: flex; flex-direction: column; gap: 10px; }
.decision .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--text-2); opacity: 0; transform: translateY(8px); }
.flow-panel.is-active .decision .row { animation: rowIn 0.55s var(--ease-out) forwards; animation-delay: calc(var(--i) * 90ms + 200ms); }
.decision .row b { color: var(--text); font-weight: 600; }
.decision .row .ok { color: var(--green); font-weight: 600; }
.decision .stamp { align-self: flex-start; margin-top: 4px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #0b0b0e; background: var(--c); }
.flow-foot { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.flow-foot .dots { display: flex; gap: 6px; }
.flow-foot .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-2); transition: background 0.3s, transform 0.3s; }
.flow-foot .dots i.on { background: var(--text); transform: scale(1.25); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.portrait { position: relative; perspective: 1200px; }
.portrait-card {
  position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 5;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s;
  box-shadow: var(--shadow-lg);
}
.portrait-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transform: scale(1.02); transition: transform 1.2s var(--ease-out); }
.portrait-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(7, 8, 11, 0.55), transparent 45%), linear-gradient(105deg, rgba(255, 255, 255, 0.14) 0%, transparent 35%);
}
.portrait-card .sheen {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22), transparent 55%);
  transition: opacity 0.4s;
}
.portrait:hover .portrait-card .sheen { opacity: 1; }
.portrait:hover .portrait-card img { transform: scale(1.06); }
.portrait-badge {
  position: absolute; border-radius: 16px; padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 10px; z-index: 2; white-space: nowrap;
  animation: floatY 6s ease-in-out infinite;
}
.portrait-badge .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #0b0b0e; }
.portrait-badge .ic svg { width: 15px; height: 15px; }
.portrait-badge small { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; }
.pb-1 { top: 22px; left: -18px; }
.pb-2 { bottom: 80px; right: -22px; animation-delay: -2s; }
.pb-3 { bottom: -14px; left: 26px; animation-delay: -4s; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.story p { font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--text-2); line-height: 1.65; text-wrap: pretty; }
.story p + p { margin-top: 18px; }
.story p strong { color: var(--text); font-weight: 600; }
.overlap { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.venn { position: relative; height: 210px; grid-column: 1 / -1; display: none; }
.pillar { border-radius: var(--r-md); padding: 20px; background: var(--surface); border: 1px solid var(--border); }
.pillar .label { margin-bottom: 8px; }
.pillar .label::before { background: var(--c); }
.pillar h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.pillar p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.pillar.join { grid-column: 1 / -1; background: var(--grad-soft); border-color: transparent; position: relative; overflow: hidden; }
.pillar.join::before { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: 0.35; pointer-events: none; }
.pillar.join > * { position: relative; }
.pillar.join h4 { font-size: 1.15rem; }

/* Journey stepper */
.journey { margin-top: clamp(56px, 8vw, 96px); }
.journey-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.journey-head h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 600; letter-spacing: -0.03em; }
.journey-head p { color: var(--text-3); font-size: 14px; }
.stepper { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stepper::before { content: ""; position: absolute; left: 24px; right: 24px; top: 21px; height: 2px; background: var(--border-2); border-radius: 2px; }
.stepper .fill { position: absolute; left: 24px; top: 21px; height: 2px; width: calc((100% - 48px) * var(--p, 0)); background: var(--grad); border-radius: 2px; transition: width 1.6s var(--ease-out); box-shadow: 0 0 16px rgba(45, 212, 191, 0.5); }
.stage { position: relative; padding-top: 0; }
.stage-btn { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 14px; }
.stage .node {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-left: 2px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-3);
  background: var(--bg-2); border: 1.5px solid var(--border-2);
  transition: transform 0.5s var(--ease-spring), border-color 0.4s, color 0.4s, background 0.4s, box-shadow 0.4s;
}
.stage.done .node { border-color: var(--teal); color: var(--text); }
.stage.current .node { border-color: var(--teal); background: var(--teal); color: #0b0b0e; box-shadow: 0 0 0 6px color-mix(in srgb, var(--teal) 18%, transparent); }
.stage.current .node::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--teal); opacity: 0.5; animation: ringOut 2.2s ease-out infinite; }
@keyframes ringOut { 0% { transform: scale(0.8); opacity: 0.6; } 100% { transform: scale(1.5); opacity: 0; } }
.stage-btn:hover .node, .stage.is-open .node { transform: scale(1.08); }
.stage .meta b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.stage .meta small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-3); }
.stage .meta .short { display: block; margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.stage .pill { display: inline-block; margin-top: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); }
.stage.current .pill { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }
.stage.next .pill { color: var(--violet); background: color-mix(in srgb, var(--violet) 14%, transparent); }
.journey-detail { margin-top: 22px; border-radius: var(--r-lg); padding: 22px 26px; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; min-height: 96px; }
.journey-detail .num { font-family: var(--font-mono); font-size: 13px; color: var(--teal); padding-top: 4px; }
.journey-detail h4 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; }
.journey-detail p { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.journey-detail .inner { transition: opacity 0.35s ease, transform 0.45s var(--ease-out), filter 0.35s; }
.journey-detail.is-switching .inner { opacity: 0; transform: translateY(8px); filter: blur(6px); }

/* ---------- Skills ---------- */
.seg {
  display: inline-flex; position: relative; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%); mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
}
.seg.no-fade { -webkit-mask-image: none; mask-image: none; }
.seg::-webkit-scrollbar { display: none; }
.seg .thumb { position: absolute; top: 4px; left: 0; height: calc(100% - 8px); border-radius: 999px; background: var(--text); opacity: 0; transition: transform 0.55s var(--ease-spring), width 0.55s var(--ease-spring), opacity 0.2s; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.seg .thumb.is-visible { opacity: 1; }
.seg button { position: relative; z-index: 1; padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: color 0.3s; }
.seg button.is-active { color: var(--bg); }
.seg button:hover:not(.is-active) { color: var(--text); }
.skills-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: clamp(20px, 3vw, 36px); align-items: start; margin-top: 32px; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.skill { padding: 16px 16px 14px; border-radius: var(--r-md); --c: var(--teal); transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out), border-color 0.4s; }
.skill:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-2px); }
.skill.is-out { opacity: 0; transform: scale(0.96); pointer-events: none; }
.skill.pre { opacity: 0; transform: translateY(12px) scale(0.97); }
.skill .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.skill h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.skill .lvl { display: flex; gap: 3px; }
.skill .lvl i { width: 14px; height: 5px; border-radius: 3px; background: var(--border-2); transform: scaleX(0); transform-origin: left; }
.skill .lvl i.on { background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 50%, transparent); }
.skill.in .lvl i { animation: growX 0.6s var(--ease-out) forwards; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes growX { to { transform: scaleX(1); } }
.skill .lvl-label { font-family: var(--font-mono); font-size: 11px; color: var(--c); margin-top: 10px; letter-spacing: 0.04em; }
.skill p { margin-top: 4px; font-size: 13px; color: var(--text-3); line-height: 1.45; }
.radar-card { padding: 22px; border-radius: var(--r-lg); position: sticky; top: 90px; }
.radar-card h4 { font-size: 15px; font-weight: 600; }
.radar-card .hint { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.radar { width: 100%; height: auto; margin-top: 8px; }
.radar .grid { fill: none; stroke: var(--border-2); stroke-width: 1; }
.radar .axis { stroke: var(--border-2); stroke-width: 1; }
.radar .poly { fill: rgba(45, 212, 191, 0.18); stroke: var(--teal); stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 12px rgba(45, 212, 191, 0.35)); transition: fill 0.5s, stroke 0.5s; }
.radar .pt { fill: var(--bg); stroke: var(--teal); stroke-width: 2; transition: r 0.3s, stroke 0.4s, fill 0.4s; }
.radar .pt.hi { r: 6; fill: var(--teal); }
.radar .lbl { font-size: 11.5px; font-weight: 600; fill: var(--text-3); letter-spacing: 0.02em; transition: fill 0.3s; }
.radar .lbl.hi { fill: var(--text); }
.legend { display: grid; gap: 8px; margin-top: 12px; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.legend .bar { flex: 1; height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.legend .bar b { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 3px; transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-out); }
.legend.in .bar b { transform: scaleX(1); }
.legend span.v { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); width: 34px; text-align: right; }

/* ---------- Projects ---------- */
.projects-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.4s var(--ease-spring); }
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip:active { transform: scale(0.96); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: transparent; }
.chip .n { font-family: var(--font-mono); font-size: 11px; opacity: 0.7; margin-left: 6px; }
.projects-count { font-size: 13px; color: var(--text-3); }
.project-list { display: flex; flex-direction: column; gap: 14px; }
.project { --hue: var(--teal); border-radius: var(--r-xl); transition: opacity 0.45s var(--ease-out), transform 0.55s var(--ease-out), border-color 0.5s, box-shadow 0.6s, max-height 0.5s; }
.project.is-filtered { opacity: 0; transform: scale(0.985); }
.project.is-open { border-color: color-mix(in srgb, var(--hue) 40%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--hue) 10%, transparent), 0 30px 80px -30px color-mix(in srgb, var(--hue) 35%, transparent); }
.project-head { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 18px; cursor: pointer; }
.project-thumb {
  position: relative; aspect-ratio: 16 / 11; border-radius: 18px; overflow: hidden; background: color-mix(in srgb, var(--hue) 12%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--hue) 20%, transparent);
  transition: transform 0.7s var(--ease-out);
}
.project-thumb svg { width: 100%; height: 100%; color: var(--text); }
.project.is-open .project-thumb { transform: scale(1.03); }
.project-thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--hue) 30%, transparent), transparent 60%); pointer-events: none; }
.project-meta { min-width: 0; }
.project-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.tag { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--hue) 16%, transparent); color: var(--hue); }
.tag.ghost { background: var(--surface-3); color: var(--text-3); letter-spacing: 0.02em; text-transform: none; font-weight: 500; font-size: 12px; }
.project-title { font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.project-tagline { margin-top: 6px; color: var(--text-2); font-size: 15px; text-wrap: pretty; }
.tech-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tech { position: relative; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); transition: transform 0.4s var(--ease-spring); }
.tech:hover { transform: translateY(-2px) scale(1.06); z-index: 2; }
.tech::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px); padding: 4px 8px; border-radius: 6px; background: var(--text); color: var(--bg); font-family: var(--font); font-size: 11px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.3s var(--ease-out); }
.tech:hover::after { opacity: 1; transform: translate(-50%, 0); }
.switch { display: flex; flex-direction: column; align-items: center; gap: 8px; justify-self: end; }
.switch-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.toggle { position: relative; width: 52px; height: 32px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-2); transition: background 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s; flex: none; }
.toggle .knob { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 0 0 0.5px rgba(0, 0, 0, 0.08); transition: transform 0.5s var(--ease-spring), width 0.25s; }
.toggle:active .knob { width: 30px; }
.toggle[aria-checked="true"] { background: var(--hue); border-color: transparent; box-shadow: 0 0 20px color-mix(in srgb, var(--hue) 40%, transparent); }
.toggle[aria-checked="true"] .knob { transform: translateX(20px); }
.toggle[aria-checked="true"]:active .knob { transform: translateX(16px); }
.project-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.75s var(--ease-out); }
.project.is-open .project-body { grid-template-rows: 1fr; }
.project-body-inner { overflow: hidden; min-height: 0; }
.project-body-content { padding: 6px 18px 24px; }
.project-body-content::before { content: ""; display: block; height: 1px; background: linear-gradient(90deg, transparent, var(--border-2), transparent); margin: 0 0 22px; }
.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.pb-block { padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); opacity: 0; transform: translateY(16px); filter: blur(6px); transition: opacity 0.6s var(--ease-out), transform 0.75s var(--ease-spring), filter 0.6s var(--ease-out); transition-delay: 0s; }
.project.is-open .pb-block { opacity: 1; transform: none; filter: none; transition-delay: calc(var(--i) * 70ms + 140ms); }
.pb-block h4 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.pb-block h4 i { width: 6px; height: 6px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 10px var(--hue); }
.pb-block p { font-size: 15px; color: var(--text-2); line-height: 1.6; }
.pb-problem { grid-column: span 6; }
.pb-solution { grid-column: span 6; }
.pb-tech { grid-column: span 4; }
.pb-process { grid-column: span 8; }
.pb-insights { grid-column: span 7; }
.pb-results { grid-column: span 5; }
.tech-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-list li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.tech-list li i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: step; }
.process li { position: relative; padding: 12px 12px 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); line-height: 1.45; }
.process li::before { counter-increment: step; content: "0" counter(step); display: block; font-family: var(--font-mono); font-size: 11px; color: var(--hue); margin-bottom: 6px; }
.process li::after { content: ""; position: absolute; right: -8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--hue); opacity: 0.6; }
.process li:nth-child(3n)::after, .process li:last-child::after { display: none; }
.insights li { position: relative; padding: 10px 0 10px 22px; font-size: 14.5px; color: var(--text-2); border-bottom: 1px solid var(--border); }
.insights li:last-child { border-bottom: 0; }
.insights li::before { content: ""; position: absolute; left: 0; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--hue) 25%, transparent); border: 2px solid var(--hue); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { padding: 14px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.metric b { display: block; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.03em; color: var(--hue); font-variant-numeric: tabular-nums; }
.metric span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--text-3); line-height: 1.3; }
.learned { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--hue) 8%, transparent); border-left: 2px solid var(--hue); font-size: 14px !important; color: var(--text) !important; font-style: italic; }
.project-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.project-links .note { font-size: 12.5px; color: var(--text-3); margin-left: auto; }
.btn-link { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); transition: background 0.3s, transform 0.4s var(--ease-spring); }
.btn-link:hover { background: var(--surface-3); transform: translateY(-1px); }
.btn-link svg { width: 14px; height: 14px; }

/* ---------- Playground (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.tile { padding: 22px; border-radius: var(--r-xl); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tile-head h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.015em; }
.tile-head p { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.tile-head .tag { flex: none; }
.t-dash { grid-column: span 8; --hue: var(--amber); }
.t-clt { grid-column: span 4; --hue: var(--blue); }
.t-sql { grid-column: span 6; --hue: var(--teal); }
.t-nn { grid-column: span 6; --hue: var(--violet); }
.t-etl { grid-column: span 12; --hue: var(--green); }

/* Dashboard tile */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.kpi small { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.kpi b { display: block; margin-top: 4px; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi .delta { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.kpi .delta.up { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.kpi .delta.down { color: var(--rose); background: color-mix(in srgb, var(--rose) 14%, transparent); }
.dash-charts { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.chart-box { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; position: relative; }
.chart-box h5 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.chart-box svg { width: 100%; height: auto; overflow: visible; }
#dashDonut { max-width: 170px; margin: 0 auto; }
.chart-box .bar { fill: var(--hue); opacity: 0.85; transition: opacity 0.2s, transform 0.9s var(--ease-out); transform-origin: bottom; transform-box: fill-box; }
.chart-box .bar:hover { opacity: 1; }
.chart-box .tip { position: absolute; padding: 5px 8px; border-radius: 6px; background: var(--text); color: var(--bg); font-family: var(--font-mono); font-size: 11px; pointer-events: none; opacity: 0; transform: translate(-50%, -6px); transition: opacity 0.15s; white-space: nowrap; }
.chart-box .tip.on { opacity: 1; }
.chart-box .axis-lbl { font-size: 10px; fill: var(--text-4); font-family: var(--font-mono); }
.donut-legend { display: grid; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--text-2); }
.donut-legend div { display: flex; align-items: center; gap: 8px; }
.donut-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.donut-legend span.v { margin-left: auto; font-family: var(--font-mono); color: var(--text-3); }
.dash-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); }
.dash-foot .live { display: inline-flex; align-items: center; gap: 6px; }
.dash-foot .live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: caretBlink 1.6s steps(1) infinite; }

/* CLT tile */
.clt-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.clt-hist { height: 170px; display: flex; align-items: flex-end; gap: 2px; padding-top: 10px; border-bottom: 1px solid var(--border-2); position: relative; }
.clt-hist i { flex: 1; background: var(--hue); border-radius: 3px 3px 0 0; height: var(--h, 0%); transition: height 0.6s var(--ease-out); opacity: 0.85; min-height: 0; }
.clt-hist .curve { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.clt-hist .curve path { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: 0.5; }
.clt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.clt-stats div { padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.clt-stats small { display: block; font-size: 11px; color: var(--text-3); }
.clt-stats b { display: block; font-family: var(--font-mono); font-size: 14px; margin-top: 2px; font-weight: 500; }
.clt-note { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.seg.small button { padding: 6px 11px; font-size: 12.5px; }

/* SQL tile */
.code { border-radius: 14px; background: #0b0d12; border: 1px solid rgba(255, 255, 255, 0.08); padding: 14px 16px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: #d7dae3; overflow: auto; min-height: 196px; white-space: pre; position: relative; }
:root[data-theme="light"] .code { background: #1a1d26; }
.code .k { color: #c792ea; } .code .f { color: #82aaff; } .code .s { color: #c3e88d; } .code .n { color: #f78c6c; } .code .c { color: #676e95; font-style: italic; } .code .t { color: #ffcb6b; }
.code .cc { display: inline-block; width: 7px; height: 14px; background: var(--teal); vertical-align: -2px; animation: caretBlink 1s steps(1) infinite; }
.sql-stages { display: flex; flex-wrap: wrap; gap: 6px; }
.sql-stages span { font-family: var(--font-mono); font-size: 11px; padding: 5px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-3); transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.4s var(--ease-spring); }
.sql-stages span.on { background: color-mix(in srgb, var(--hue) 18%, transparent); color: var(--hue); border-color: color-mix(in srgb, var(--hue) 40%, transparent); transform: translateY(-2px); }
.sql-stages span.done { color: var(--text-2); }
.result { border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.result table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.result th { text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--text-3); padding: 8px 10px; background: var(--surface-2); }
.result td { padding: 8px 10px; border-top: 1px solid var(--border); color: var(--text-2); opacity: 0; transform: translateY(6px); }
.result tr.in td { animation: rowIn 0.45s var(--ease-out) forwards; }
.result td b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.result .bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--hue); width: var(--w); vertical-align: middle; margin-right: 8px; opacity: 0.8; }
.result td.num { font-family: var(--font-mono); }
.sql-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-3); }

/* NN tile */
.nn-stage { position: relative; border-radius: 14px; padding: 8px 2px 2px; background: radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--hue) 8%, transparent), transparent 72%); }
.nn-svg { width: 100%; height: auto; display: block; overflow: visible; }
.nn-svg .link { stroke: var(--border-2); stroke-width: 1.4; fill: none; }
.nn-svg .pulse { stroke: var(--hue); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-dasharray: 9 91; stroke-dashoffset: 100; opacity: 0; }
.nn-svg.is-running .pulse { animation: nnFlow 0.85s var(--ease-io) forwards; animation-delay: calc(var(--layer) * 0.8s); }
@keyframes nnFlow { 0% { stroke-dashoffset: 100; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.nn-svg .node { stroke-width: 2.5; transition: fill 0.45s var(--ease-out), stroke 0.45s var(--ease-out), r 0.5s var(--ease-spring); }
.nn-svg .halo { fill: none; stroke-width: 2; opacity: 0; transition: opacity 0.45s var(--ease-out), r 0.7s var(--ease-out); }
.nn-svg .lbl { font-size: 15px; font-weight: 500; fill: var(--text-2); font-family: var(--font); }
.nn-svg .val { font-size: 12px; fill: var(--text-3); font-family: var(--font-mono); }
.nn-readout { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); --risk: var(--green); }
.nn-readout small { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.nn-readout b { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--risk); font-variant-numeric: tabular-nums; min-width: 64px; transition: color 0.6s var(--ease-out); }
.nn-readout .meter { flex: 1; height: 5px; border-radius: 3px; background: var(--border-2); overflow: hidden; min-width: 40px; }
.nn-readout .meter i { display: block; height: 100%; width: 0%; border-radius: 3px; background: var(--risk); transition: width 0.8s var(--ease-out), background-color 0.6s var(--ease-out); }
.nn-readout em { font-style: normal; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.nn-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; }
.nn-controls label { position: relative; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-3); padding-left: 12px; }
.nn-controls label::before { content: ""; position: absolute; left: 0; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px color-mix(in srgb, var(--teal) 70%, transparent); }
.nn-controls label span { display: flex; justify-content: space-between; }
.nn-controls label span b { color: var(--text); font-family: var(--font-mono); font-weight: 500; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; background: var(--border-2); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); cursor: pointer; transition: transform 0.2s; }
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); cursor: pointer; }
.nn-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-3); }

/* ETL tile */
.etl-wrap { position: relative; height: 300px; border-radius: 16px; overflow: hidden; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--hue) 6%, transparent)); }
.etl-wrap canvas { width: 100% !important; height: 100% !important; }
.etl-labels { position: absolute; inset: 0; pointer-events: none; }
.etl-labels span { position: absolute; transform: translate(-50%, -50%); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-3); padding: 4px 8px; border-radius: 8px; background: var(--glass-bg); border: 1px solid var(--border); white-space: nowrap; }
.etl-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.etl-stage { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); transition: border-color 0.3s, background 0.3s; }
.etl-stage.on { border-color: color-mix(in srgb, var(--hue) 45%, transparent); background: color-mix(in srgb, var(--hue) 9%, transparent); }
.etl-stage b { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.etl-stage b i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); transition: background 0.3s, box-shadow 0.3s; }
.etl-stage.on b i { background: var(--hue); box-shadow: 0 0 10px var(--hue); }
.etl-stage small { display: block; font-size: 12px; color: var(--text-3); margin-top: 3px; }
.etl-stage .cnt { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ---------- Experience ---------- */
.exp-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 14px; }
.exp-card { padding: 26px; border-radius: var(--r-xl); }
.exp-card h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 18px; }
.exp-item { position: relative; padding: 0 0 22px 26px; }
.exp-item::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: -8px; width: 1px; background: var(--border-2); }
.exp-item:last-child::before { display: none; }
.exp-item::after { content: ""; position: absolute; left: 2px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--teal); }
.exp-item .row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.exp-item h4 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.015em; }
.exp-item .org { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.exp-item .when { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); white-space: nowrap; }
.exp-item ul { margin-top: 10px; display: grid; gap: 6px; }
.exp-item li { position: relative; padding-left: 14px; font-size: 14px; color: var(--text-2); }
.exp-item li::before { content: ""; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--text-4); }
.exp-photo { margin: 14px 0 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.exp-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 60%; transition: transform 1.2s var(--ease-out); }
.exp-photo:hover img { transform: scale(1.03); }
.exp-photo figcaption { padding: 9px 12px; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.exp-photo figcaption::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.edu h4 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.015em; }
.edu .org { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.edu .majors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.edu .majors li { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.certs { display: grid; gap: 8px; margin-top: 8px; }
.cert { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.cert .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); flex: none; }
.cert .ic svg { width: 15px; height: 15px; }
.cert b { display: block; font-size: 13.5px; font-weight: 600; }
.cert small { display: block; font-size: 12px; color: var(--text-3); }
.cert .yr { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); }
.learning { margin-top: 18px; }
.learning h5 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.learning ul { display: flex; flex-wrap: wrap; gap: 6px; }
.learning li { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 10%, transparent); border: 1px solid color-mix(in srgb, var(--teal) 25%, transparent); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.learning li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }

/* ---------- Contact ---------- */
.contact-card { position: relative; border-radius: var(--r-xl); padding: clamp(36px, 6vw, 80px) clamp(24px, 5vw, 64px); text-align: center; overflow: hidden; }
.contact-card::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 180deg at 50% 50%, rgba(245, 181, 68, 0.14), rgba(45, 212, 191, 0.14), rgba(167, 139, 250, 0.16), rgba(245, 181, 68, 0.14)); filter: blur(60px); animation: spin 30s linear infinite; pointer-events: none; }
.contact-card > * { position: relative; }
.contact-card .h2 { max-width: 14ch; margin-inline: auto; }
.contact-card .sub { max-width: 560px; margin-inline: auto; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.contact-actions .btn { min-width: 160px; }
.contact-meta { margin-top: 26px; font-size: 13px; color: var(--text-3); display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.contact-meta span { display: inline-flex; align-items: center; gap: 6px; }
footer { padding: 40px 0 36px; color: var(--text-3); font-size: 13px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 14px 24px; flex-wrap: wrap; }
.foot-row .mono { color: var(--text-4); font-size: 12px; }
.foot-links { display: flex; gap: 16px; }
.foot-links a:hover { color: var(--text); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); filter: blur(8px); transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out), filter 0.9s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal-scale { opacity: 0; transform: scale(0.96) translateY(16px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal-scale.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pb-problem, .pb-solution { grid-column: span 12; }
  .pb-tech { grid-column: span 5; }
  .pb-process { grid-column: span 7; }
  .pb-insights, .pb-results { grid-column: span 12; }
  .t-dash { grid-column: span 12; }
  .t-clt { grid-column: span 12; }
  .t-sql, .t-nn { grid-column: span 12; }
  .skills-layout { grid-template-columns: 1fr; }
  .radar-card { position: static; }
  .etl-wrap { height: 250px; }
}
@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 28px); padding-bottom: 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-visual { order: -1; }
  .hero-canvas-wrap { width: min(84%, 300px); }
  .hero-state { bottom: 2%; font-size: 11.5px; }
  .display { margin-top: 18px; }
  .lead { margin-top: 20px; }
  .hero-cta { margin-top: 26px; }
  .hero-chips { margin-top: 22px; }
  .eyebrow { font-size: 12.5px; }
  .tile-head .tag { display: none; }
  .scroll-hint { display: none; }
  .nav-links, .nav-actions .btn { display: none; }
  .nav-menu { display: inline-grid; }
  .nav-sheet { display: flex; }
  .nav-wrap:not(.is-open) .nav-sheet { pointer-events: none; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .stepper { grid-template-columns: 1fr; gap: 6px; }
  .stepper::before { left: 23px; right: auto; top: 24px; bottom: 24px; width: 2px; height: auto; }
  .stepper .fill { left: 23px; top: 24px; width: 2px; height: calc((100% - 48px) * var(--p, 0)); transition: height 1.6s var(--ease-out); }
  .stage-btn { flex-direction: row; align-items: flex-start; gap: 16px; padding: 8px 0; }
  .stage .node { flex: none; }
  .flow-track { grid-template-columns: 1fr; gap: 6px; }
  .flow-link { width: 2px; height: 22px; margin-left: 28px; }
  .flow-link::after { transform: scaleY(0); transform-origin: top; }
  .flow-link.is-done::after { transform: scaleY(1); }
  .flow-link .pulse { display: none; }
  .flow-panel { grid-template-columns: 1fr; position: relative; display: none; }
  .flow-panel.is-active { display: grid; }
  .flow-panels { min-height: 0; }
  .project-head { grid-template-columns: 1fr; gap: 14px; }
  .project-thumb { aspect-ratio: 16 / 7; }
  .switch { flex-direction: row; justify-self: start; }
  .process { grid-template-columns: 1fr; }
  .process li::after { display: none; }
  .exp-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-charts { grid-template-columns: 1fr; }
  .etl-stages { grid-template-columns: repeat(2, 1fr); }
  .nn-controls { grid-template-columns: 1fr 1fr; }
  .nn-controls label.in2 { grid-column: 1 / -1; }
  .nn-readout { flex-wrap: wrap; gap: 8px 12px; padding: 12px; }
  .nn-readout .meter { order: 3; flex-basis: 100%; }
  .nn-readout b { font-size: 22px; min-width: 56px; }
  .nn-svg .lbl { font-size: 20px; }
  .nn-svg .val { font-size: 15.5px; }
  .overlap { grid-template-columns: 1fr; }
  .pb-1 { left: 8px; } .pb-2 { right: 8px; } .pb-3 { left: 16px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .display { font-size: clamp(2.2rem, 10.5vw, 3rem); }
  .tw-line { white-space: normal; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .etl-stages { grid-template-columns: 1fr; }
  .etl-wrap { height: 210px; }
  .etl-labels span { font-size: 9.5px; padding: 3px 6px; }
  .tile { padding: 18px; }
  .section-head { margin-bottom: 28px; }
  .clt-stats { grid-template-columns: 1fr 1fr; }
  .hero-chips li { font-size: 12px; }
  .portrait-badge { font-size: 12px; padding: 8px 10px; }
  .pb-3 { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal, .reveal-scale { opacity: 1; transform: none; filter: none; }
  .loader-timer { display: none; }
  .ld-spark polyline { stroke-dashoffset: 0; } .loader-word, .loader-tag, .loader-portrait, .ld, .lf, .ld-table .r, .ld-spark circle { opacity: 1; filter: none; } .loader-portrait, .loader-tag { transform: none; } .wordmark .x { grid-template-columns: 1fr; } .wordmark .x i { opacity: 1; transform: none; } .ld-bars rect { transform: none; }
}
