﻿/* ============================================================
   Huzaifa Muhammad Zahid â€” Portfolio
   Design system: "Aurora Dark" â€” cinematic, glass, precision.
   Author: built fresh (no template). HTML + CSS + GSAP + Bootstrap 5.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces (deep, never pure black â€” avoids OLED smear) */
  --bg-deep: #050506;
  --bg-base: #08090c;
  --bg-elev: #0e1015;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --glass: rgba(10, 11, 15, 0.6);
  --glass-menu: rgba(10, 11, 15, 0.9);
  --dropdown-bg: rgba(14, 16, 21, 0.98);
  --shadow-elevated: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-dropdown: 0 24px 60px -20px rgba(0, 0, 0, 0.85);
  --flow-dot: rgba(255, 255, 255, 0.05);
  --flow-line: rgba(124, 92, 255, 0.05);
  --grain-opacity: 0.05;
  --option-bg: #0e1015;
  --option-fg: #f4f5f7;
  --input-bg: #0e1015;
  --form-wrap-bg: rgba(10, 11, 15, 0.55);
  --contact-card-glow: rgba(124, 92, 255, 0.16);
  --floater-bg: rgba(16, 18, 24, 0.6);
  --floater-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);

  /* Text */
  --fg: #f4f5f7;
  --fg-muted: #c4ccd8;
  --fg-dim: #9eabb9;

  /* Signature aurora accents */
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --amber: #ffb86b;
  --accent: var(--violet);
  --accent-glow: rgba(124, 92, 255, 0.28);
  --grad: linear-gradient(100deg, var(--violet), var(--cyan));
  --theme-color: #050506;
}

[data-theme="light"] {
  color-scheme: light;

  --bg-deep: #f4f5f8;
  --bg-base: #ffffff;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-2: #f1f3f7;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --glass: rgba(255, 255, 255, 0.78);
  --glass-menu: rgba(255, 255, 255, 0.94);
  --dropdown-bg: rgba(255, 255, 255, 0.98);
  --shadow-elevated: 0 10px 40px rgba(15, 23, 42, 0.1);
  --shadow-dropdown: 0 24px 60px -20px rgba(15, 23, 42, 0.14);
  --flow-dot: rgba(0, 0, 0, 0.06);
  --flow-line: rgba(124, 92, 255, 0.1);
  --grain-opacity: 0.035;
  --option-bg: #ffffff;
  --option-fg: #0d1117;
  --input-bg: #ffffff;
  --form-wrap-bg: rgba(255, 255, 255, 0.92);
  --contact-card-glow: rgba(124, 92, 255, 0.08);
  --floater-bg: rgba(255, 255, 255, 0.9);
  --floater-shadow: 0 20px 50px -18px rgba(15, 23, 42, 0.14);

  --fg: #0d1117;
  --fg-muted: #4b5563;
  --fg-dim: #6b7280;

  --violet: #6d4aff;
  --cyan: #0891b2;
  --amber: #d97706;
  --accent-glow: rgba(109, 74, 255, 0.2);
  --theme-color: #f4f5f8;
}

:root {
  --font-display: "Clash Display", "General Sans", "Inter", system-ui, sans-serif;
  --font-body: "General Sans", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Mobile-first fluid type â€” clamps keep rhythm across phones â†’ ultrawide */
  --step--1: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --step-0: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --step-body: clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);
  --step-1: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  --step-2: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --step-3: clamp(1.5rem, 1.2rem + 1.5vw, 1.85rem);
  --step-hero: clamp(1.875rem, 1.4rem + 4.5vw, 2.5rem);

  /* Spacing / radius / motion â€” mobile-first */
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --section-pad: clamp(2.75rem, 6vw, 3.5rem);
  --gutter: clamp(1rem, 4vw, 1.25rem);
  --maxw: min(1680px, 100%);
  --touch: 44px;
}

[data-theme="light"] .ambient__blob { opacity: 0.38; }
[data-theme="light"] .work-card__bar { background: rgba(255, 255, 255, 0.65); }
[data-theme="light"] .preloader { background: var(--bg-deep); }
[data-theme="light"] .contact__form-wrap { box-shadow: var(--shadow-elevated); }
[data-theme="light"] .about__portrait-badge,
[data-theme="light"] .work-card__cta { background: var(--glass); color: var(--fg); }
[data-theme="light"] .chip--accent { color: var(--violet); font-weight: 600; }

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
html.lenis-lock, body.no-scroll { overflow: hidden; }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

/* fancy cursor: hide native only on capable devices via JS adding .has-cursor */
body.has-cursor,
body.has-cursor a,
body.has-cursor button,
body.has-cursor [data-tilt] { cursor: none; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

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

/* Native layout grid (replaces Bootstrap) */
.layout-about { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
.layout-about__media, .layout-about__content { min-width: 0; }
.layout-about .section__lead { max-width: none; }
.skills-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.skills-grid__item { min-width: 0; }
.testimonials-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.testimonials-grid__item { min-width: 0; }

/* content-visibility breaks ScrollTrigger pin start/end math â€” keep off for motion sections */
.section:not(.hero) {
  content-visibility: visible;
  contain-intrinsic-size: none;
}

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

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 999;
  background: var(--violet); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- 3. Decorative layers ---------- */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient__blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
  will-change: transform;
}
.ambient__blob--a { width: 46vw; height: 46vw; left: -10vw; top: -8vw; background: radial-gradient(circle, rgba(124,92,255,0.5), transparent 70%); }
.ambient__blob--b { width: 42vw; height: 42vw; right: -12vw; top: 30vh; background: radial-gradient(circle, rgba(34,211,238,0.4), transparent 70%); }
.ambient__blob--c { width: 38vw; height: 38vw; left: 20vw; bottom: -14vw; background: radial-gradient(circle, rgba(255,184,107,0.22), transparent 70%); }

/* Continuous animated background pattern (drifts constantly + parallax on scroll) */
.bg-flow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-flow__dots, .bg-flow__lines { position: absolute; inset: 0; will-change: transform, background-position; }
.bg-flow__dots {
  background-image: radial-gradient(var(--flow-dot) 1px, transparent 1.6px);
  background-size: 30px 30px; opacity: .55;
  transform: translate3d(0, var(--flow-y, 0px), 0);
  animation: flowDrift 26s linear infinite;
}
.bg-flow__lines {
  background-image: repeating-linear-gradient(115deg, var(--flow-line) 0 1px, transparent 1px 130px);
  opacity: .5;
  transform: translate3d(0, calc(var(--flow-y, 0px) * 1.8), 0);
  animation: flowSlide 32s linear infinite;
}
@keyframes flowDrift { to { background-position: 300px 300px; } }
@keyframes flowSlide { to { background-position: 520px 0; } }

/* Everything sits above ambient/grain */
.nav, main, .footer, .preloader, .cursor, .scroll-progress, .panel { position: relative; z-index: 2; }

/* ---------- 4. Custom cursor ---------- */
.cursor { position: fixed; inset: 0; z-index: 900; pointer-events: none; display: none; }
body.has-cursor .cursor { display: block; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor__dot { width: 6px; height: 6px; background: var(--fg); }
.cursor__ring {
  width: 34px; height: 34px; border: 1px solid var(--border-strong);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.cursor.is-hover .cursor__ring { width: 56px; height: 56px; background: var(--surface-2); border-color: var(--violet); }
.cursor.is-hover .cursor__dot { opacity: 0; }

/* ---------- 5. Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%; z-index: 950;
  background: var(--grad); box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- 6. Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg-deep);
  display: grid; place-items: center;
}
.preloader__inner { display: grid; justify-items: center; gap: 22px; width: min(360px, 76vw); }
.preloader__name { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: .18em; color: var(--fg-muted); text-transform: uppercase; }
.preloader__bar { width: 100%; height: 2px; background: var(--border); overflow: hidden; border-radius: 2px; }
.preloader__bar-fill { display: block; height: 100%; width: 0%; background: var(--grad); }
.preloader__count { font-family: var(--font-display); font-size: clamp(3rem, 10vw, 6rem); font-weight: 600; line-height: 1; }
.preloader.is-done { opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }

/* ---------- 7. Nav ---------- */
.nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 800; padding: 18px 0; transition: padding .4s var(--ease); }
.nav__inner {
  max-width: var(--maxw); margin-inline: auto; padding: 10px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav.is-scrolled { padding: 8px 0; }
.nav.is-scrolled .nav__inner {
  background: var(--glass); backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border); border-radius: 100px;
  box-shadow: var(--shadow-elevated);
}
.nav__logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; }
.nav__logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; letter-spacing: .04em;
  background-image: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.nav__logo-text { font-size: 1.05rem; }
.dot { color: var(--violet); }
.nav__links { display: none; gap: 6px; }
.nav__actions .btn { display: none; }
.nav__burger { display: block; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.nav__burger span { display: block; width: 18px; height: 1.6px; background: var(--fg); margin: 4px auto; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav__links a { position: relative; padding: 8px 14px; font-size: var(--step--1); color: var(--fg-muted); border-radius: 100px; transition: color .3s var(--ease), background .3s var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: var(--fg); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-5.6px) rotate(-45deg); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  color: var(--fg-muted); transition: color .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.theme-toggle:hover { color: var(--fg); background: var(--surface-2); border-color: var(--border-strong); }
.theme-toggle:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.theme-toggle__icon { width: 18px; height: 18px; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
[data-theme="light"] .theme-toggle__icon--sun { display: none; }

.mobile-menu {
  position: fixed; inset: 0 0 auto 0; top: 78px; margin: 0 var(--gutter); z-index: 799;
  background: var(--glass-menu); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px;
  transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .35s var(--ease);
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
.mobile-menu nav { display: grid; }
.mobile-menu a { padding: 16px 14px; font-family: var(--font-display); font-size: var(--step-1); border-radius: 12px; min-height: 48px; display: flex; align-items: center; }
.mobile-menu a:hover { background: var(--surface-2); }

/* ---------- 8. Buttons ---------- */
.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--fg); --btn-bd: var(--border);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 100px; font-size: var(--step-0); font-weight: 500;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd);
  transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  white-space: nowrap; min-height: 48px;
}
.btn svg { transition: transform .3s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--lg { padding: 15px 26px; font-size: var(--step-0); }
.btn--primary {
  --btn-bg: var(--violet); --btn-fg: #fff; --btn-bd: transparent;
  box-shadow: 0 8px 30px -8px var(--accent-glow);
}
.btn--primary:hover { box-shadow: 0 14px 40px -8px var(--accent-glow); filter: brightness(1.06); }
.btn--ghost { --btn-bg: transparent; }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }

/* ---------- 9. Section shells ---------- */
.section { padding-block: var(--section-pad); position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono);
  font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 14px;
}
.eyebrow span { color: var(--violet); }
.section__title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-3); line-height: 1.15; letter-spacing: -0.02em; max-width: none; }
.section__title .muted { margin-left: 0.35em; }
.section__lead { color: var(--fg-muted); font-size: var(--step-body); max-width: 56ch; margin-top: 16px; line-height: 1.65; }

/* ---------- 10. Hero ---------- */
/* Pin target must NOT use overflow/perspective/filter â€” those break position:fixed pins.
   Clip & 3D live on the inner stage instead. */
.hero { position: relative; min-height: 100svh; min-height: 100dvh; display: flex; align-items: center; padding-top: 100px; padding-bottom: 56px; overflow: visible; }
.hero__grid-lines {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 35%, transparent 78%);
  opacity: .4;
}
.hero__content { position: relative; z-index: 2; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); width: 100%; }
.hero__status {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 14px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border); font-size: var(--step--1); color: var(--fg-muted);
  backdrop-filter: blur(8px); max-width: 100%;
}
.hero__status-sep { opacity: .4; }
.hero__tz { color: var(--fg-dim); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.5);} 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0);} 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0);} }

.hero__title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-hero); line-height: 1.08; letter-spacing: -0.03em; margin: 18px 0 0; max-width: 12ch; text-wrap: balance; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .word { display: inline-block; }
.hero__lead { margin-top: 20px; max-width: 52ch; font-size: var(--step-body); color: var(--fg-muted); line-height: 1.65; text-wrap: pretty; }
.hero__lead strong { color: var(--fg); font-weight: 600; }
.hero__cta { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; width: 100%; }
.hero__cta .btn { width: 100%; min-height: var(--touch); }

.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.hero__stat dt { font-size: var(--step--1); color: var(--fg-muted); margin-bottom: 4px; line-height: 1.35; }
.hero__stat dd { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 6vw, 2.8rem); line-height: 1; }

/* Floaters â€” hidden on mobile by default */
.hero__floaters { display: none; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.floater {
  position: absolute; padding: 16px; border-radius: var(--radius);
  background: var(--floater-bg); border: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--floater-shadow); will-change: transform;
}
.floater__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.floater__label { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
.floater__badge { font-size: var(--step--1); padding: 3px 8px; border-radius: 100px; background: rgba(52,211,153,.14); color: #34d399; }
.floater__sub { font-size: var(--step--1); color: var(--fg-dim); margin-top: 6px; text-align: center; }
.floater--perf { top: 14%; right: 6%; width: 180px; text-align: center; }
.gauge { position: relative; width: 110px; margin: 0 auto; }
.gauge svg { transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: var(--border); stroke-width: 8; }
.gauge__val { fill: none; stroke: url(#none); stroke: var(--cyan); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.6s var(--ease); }
.floater--perf.in .gauge__val { stroke-dashoffset: 0; }
.gauge__num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 26px; }
.floater--code { bottom: 16%; right: 10%; width: 260px; }
.floater__dots { display: flex; gap: 6px; margin-bottom: 10px; }
.floater__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.floater__code { font-family: var(--font-mono); font-size: var(--step--1); line-height: 1.7; color: var(--fg-muted); white-space: pre; overflow: hidden; }
.tok-c { color: var(--fg-dim); } .tok-k { color: var(--violet); } .tok-f { color: var(--cyan); } .tok-s { color: var(--amber); } .tok-n { color: #f472b6; }
.floater--stack { top: 30%; left: 4%; width: 210px; }
.floater__flow { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--fg-dim); }
.chip { padding: 6px 12px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); font-size: var(--step--1); }
.chip--accent { background: var(--accent-glow); border-color: transparent; color: #fff; }

.hero__scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; color: var(--fg-dim); }
.hero__scroll-line { width: 1px; height: 40px; background: var(--border-strong); overflow: hidden; position: relative; }
.hero__scroll-line span { position: absolute; top: 0; left: 0; width: 100%; height: 40%; background: var(--violet); animation: scrolldown 1.8s var(--ease) infinite; }
@keyframes scrolldown { 0% { transform: translateY(-100%);} 100% { transform: translateY(250%);} }
.hero__scroll-text { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: .2em; text-transform: uppercase; }

/* ---------- 11. Marquee ---------- */
.marquee { padding-block: 20px; border-block: 1px solid var(--border); overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: inline-flex; align-items: center; gap: 24px; font-family: var(--font-display); font-weight: 500; font-size: var(--step-1); color: var(--fg-muted); will-change: transform; }
.marquee__track .sep { color: var(--violet); font-size: .7em; }

/* ---------- 12. About ---------- */
.about__portrait { position: relative; aspect-ratio: 4/5; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; background: var(--bg-elev); transform-style: preserve-3d; }
.about__portrait-mask {
  position: absolute; inset: 0;
  clip-path: inset(100% 0 0 0);
  will-change: clip-path;
}
.about__portrait-img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; display: block; }
.about__portrait-mono { font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 12vw, 7rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: .9; }
.about__portrait-note { font-size: var(--step--1); color: var(--fg-dim); }
.about__portrait-note code { font-family: var(--font-mono); color: var(--fg-muted); }
.about__portrait-badge { position: absolute; left: 16px; bottom: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 100px; background: rgba(10,11,15,.7); border: 1px solid var(--border); font-size: var(--step--1); backdrop-filter: blur(8px); }
.about__portrait-frame {
  position: absolute; inset: 10px; z-index: 1; border: 1px dashed color-mix(in srgb, var(--violet) 40%, transparent);
  border-radius: calc(var(--radius-lg) - 6px); pointer-events: none; opacity: .5;
}
.trait-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.trait-list li { padding: 10px 18px; border-radius: 100px; background: var(--surface); border: 1px solid var(--border); font-size: var(--step-0); color: var(--fg-muted); }
.about__meta { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.about__meta dt { font-size: var(--step--1); color: var(--fg-dim); margin-bottom: 4px; }
.about__meta dd { font-family: var(--font-display); font-weight: 500; font-size: var(--step-1); }

/* ---------- 13. Journey ---------- */
.journey__layout { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 16px; }
.journey__sticky { position: static; align-self: start; }
.journey__path { display: none; }
.journey__steps { display: grid; gap: clamp(30px, 5vw, 64px); }
.journey__step { padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.journey__year { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase; color: var(--violet); }
.journey__step h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); margin: 12px 0 10px; letter-spacing: -0.01em; }
.journey__step p { color: var(--fg-muted); font-size: var(--step-body); line-height: 1.6; }

/* ---------- 14. Bento (specialize) ---------- */
.bento { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
.bento__card { grid-column: span 1; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease); transform-style: preserve-3d; position: relative; overflow: hidden; }
.bento__card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx,50%) var(--my,0%), var(--accent-glow), transparent 60%); opacity: 0; transition: opacity .4s var(--ease); pointer-events: none; }
.bento__card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.bento__card:hover::after { opacity: .5; }
.bento__card--wide { grid-column: span 1; }
.bento__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--violet); margin-bottom: 14px; }
.bento__icon svg { width: 24px; height: 24px; }
.bento__card h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); margin-bottom: 10px; letter-spacing: -0.01em; }
.bento__card p { color: var(--fg-muted); font-size: var(--step-body); line-height: 1.6; }

/* ---------- 15. Work / portfolio ---------- */
/* ---------- Work filmstrip + meter ---------- */
/* Must stay overflow:visible â€” overflow:clip breaks ScrollTrigger pin (position:fixed).
   Also disable content-visibility so pin distance / layout aren't estimated wrong.
   Specificity must beat `.section:not(.hero)`. */
#work.section.work {
  overflow: visible !important;
  content-visibility: visible !important;
  contain: none !important;
  contain-intrinsic-size: none;
}
.work__intro {
  position: relative; z-index: 1;
  background: var(--bg-deep);
  padding-bottom: clamp(20px, 3vw, 40px);
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.work.is-reel-active .work__intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.work__head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 0; }
.work__note { color: var(--fg-muted); max-width: none; font-size: var(--step-body); line-height: 1.6; }
.work__film {
  position: relative; z-index: 2;
  background: var(--bg-deep);
}
.work__film.is-reel {
  z-index: 6;
  isolation: isolate;
  background: var(--bg-deep);
}
#work.is-reel-active {
  position: relative;
  z-index: 6;
}
html.is-work-reel .lattice {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}
.work__film-pin { width: 100%; }
.work__film-hud {
  display: none; align-items: center; gap: 14px;
  padding: 0 var(--gutter) 18px;
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--fg-dim);
  letter-spacing: .06em; text-transform: uppercase;
}
.work__meter-track {
  flex: 1; height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; max-width: 220px;
}
.work__meter-track i {
  display: block; height: 100%; width: 0%; background: var(--grad);
  box-shadow: 0 0 12px var(--accent-glow);
}
.work__meter-count { margin-left: auto; color: var(--fg-muted); min-width: 5ch; text-align: right; }

.work__film-track,
.work__grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  padding-inline: var(--gutter);
}
.work-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .35s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease);
  transform-style: preserve-3d;
}
.work-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 28px 60px -28px rgba(0,0,0,.55), 0 0 0 1px color-mix(in srgb, var(--violet) 25%, transparent);
}

/* Signal beam + hero frame + mask reveals */
.signal {
  position: fixed; left: 0; right: 0; top: 0; z-index: 760; pointer-events: none;
  height: 0; opacity: 0; transition: opacity .4s var(--ease);
}
html.js-ready .signal { opacity: 1; }
.signal__beam {
  position: absolute; left: 0; top: 0; height: 1px; width: 0%;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  box-shadow: 0 0 18px var(--accent-glow);
}
.signal__label {
  position: absolute; right: var(--gutter); top: 10px;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--fg-dim);
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 100px;
  background: var(--glass); backdrop-filter: blur(10px);
}

.hero__frame {
  display: none;
  position: absolute; inset: 12% 8%; z-index: 0; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--violet) 35%, transparent);
  border-radius: 4px;
  opacity: .55;
  clip-path: inset(18% 22% 18% 22%);
  transition: none;
}
.hero__frame-edge {
  position: absolute; width: 18px; height: 18px;
  border: 2px solid var(--violet);
}
.hero__frame-edge--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero__frame-edge--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.hero__frame-edge--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.hero__frame-edge--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hero__frame-tag {
  position: absolute; top: -28px; left: 0;
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: .18em;
  color: var(--violet); text-transform: uppercase;
}

/* Premium button micro-interactions */
.btn {
  overflow: hidden;
}
.btn::before {
  content: ""; position: absolute; inset: 0; left: -120%;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transition: left .7s var(--ease);
}
.btn:hover::before { left: 120%; }
.btn--primary span, .btn--ghost span { position: relative; z-index: 1; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

.work-card {
  --card-accent: var(--violet);
  grid-column: span 1; position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); text-align: left;
  transition: transform .5s var(--ease), border-color .4s var(--ease), box-shadow .5s var(--ease);
  will-change: transform;
}
.work-card--feature { grid-column: span 1; }
.work-card--tall { grid-column: span 1; }
.work-card:hover { border-color: color-mix(in srgb, var(--card-accent) 50%, transparent); box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--card-accent) 60%, transparent); }
.work-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-elev); }
.work-card--feature .work-card__media { aspect-ratio: 16/7; }
.work-card__frame { position: absolute; inset: 0; display: flex; flex-direction: column; }
.work-card__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(0,0,0,.35); border-bottom: 1px solid var(--border); }
.work-card__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.work-card__url { margin-left: 10px; font-family: var(--font-mono); font-size: var(--step--1); color: var(--fg-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-card__shot { position: relative; flex: 1; overflow: hidden; }
.work-card__shot img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .7s var(--ease), opacity .5s var(--ease); opacity: 0; }
.work-card__shot img.loaded { opacity: 1; }
.work-card:hover .work-card__shot img { transform: scale(1.06); }
.work-card__skeleton { position: absolute; inset: 0; z-index: 0; background: linear-gradient(110deg, var(--bg-elev) 30%, var(--surface-2) 50%, var(--bg-elev) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.work-card__fallback { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 3rem; color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--card-accent) 55%, #000), #0a0a0f); }

.work-card__body { padding: 20px 18px 22px; }
.work-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-card__name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); letter-spacing: -0.01em; }
.work-card__industry { font-family: var(--font-mono); font-size: var(--step-0); letter-spacing: .08em; text-transform: uppercase; color: var(--card-accent); }
.work-card__desc { color: var(--fg-muted); font-size: var(--step-body); margin-top: 12px; line-height: 1.6; }
.work-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.work-card__tags span { font-size: var(--step-0); padding: 7px 14px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); color: var(--fg-muted); }
.work-card__cta { position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,11,15,.6); border: 1px solid var(--border); backdrop-filter: blur(8px); color: #fff; opacity: 0; transform: translateY(-6px); transition: opacity .4s var(--ease), transform .4s var(--ease), background .3s var(--ease); }
.work-card:hover .work-card__cta { opacity: 1; transform: translateY(0); }
.work-card__cta:hover { background: var(--card-accent); }
.work-card__open { position: absolute; inset: 0; z-index: 2; } /* click target for modal */

/* ---------- 16. Skills ---------- */
.skills__cols { margin-top: 28px; }
.skills__group { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); height: 100%; }
.skills__group-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); margin-bottom: 18px; }
.skill-bars li { margin-bottom: 20px; }
.skill-bars__name { display: block; font-size: var(--step-body); color: var(--fg-muted); margin-bottom: 10px; line-height: 1.4; }
.skill-bars__track { display: block; height: 8px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.skill-bars__track i { display: block; height: 100%; width: 0; border-radius: 100px; background: var(--grad); transition: width 1.1s var(--ease); }

/* ---------- 17. Stack grid ---------- */
.stack__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.stack__item {
  min-height: 96px; padding: 16px 12px;
  display: grid; place-content: center; justify-items: center; gap: 10px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: transform .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
}
.stack__item:hover { transform: translateY(-4px); background: var(--surface-2); border-color: var(--border-strong); }
.stack__item span { font-size: var(--step-0); font-weight: 600; color: var(--fg); text-align: center; line-height: 1.3; }
.stack__glyph { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- 18. Timeline + Career Chronograph ---------- */
.experience .section__title { max-width: none; }
.experience__lead { max-width: 48ch; margin-bottom: 8px; }

.chrono {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 28px;
  align-items: start;
}
.chrono__stage { display: none; }
.chrono__sticky { position: sticky; top: 110px; }
.chrono__dial {
  position: relative;
  color: var(--fg);
  padding: 18px;
  border-radius: 28px;
  background: var(--floater-bg, var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--floater-shadow, var(--shadow-elevated));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.chrono__svg { display: block; width: 100%; height: auto; max-width: 340px; margin: 0 auto; }
.chrono__year-mark {
  fill: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.chrono__progress { transition: none; }
.chrono__balance { animation: chronoTick 1.1s ease-in-out infinite alternate; }
@keyframes chronoTick {
  from { transform: rotate(-12deg); }
  to { transform: rotate(12deg); }
}
.chrono__readout {
  margin-top: 8px; text-align: center; display: grid; gap: 4px; padding: 4px 8px 8px;
}
.chrono__calibre {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-dim);
}
.chrono__year {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.chrono__company { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: var(--fg); }
.chrono__role { font-size: var(--step--1); color: var(--fg-muted); }

.chrono__rail { position: relative; min-width: 0; }
.chrono__track {
  display: none; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.chrono__track-fill {
  display: block; width: 100%; height: 0%; background: var(--grad);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline { margin-top: 0; position: relative; padding-left: 0; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--violet), var(--cyan), transparent); }
.timeline__item {
  position: relative; padding: 0 0 36px 36px;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item.is-active .timeline__dot {
  background: var(--violet);
  box-shadow: 0 0 0 6px var(--accent-glow), 0 0 24px var(--accent-glow);
  transform: scale(1.15);
}
.timeline__item.is-active .timeline__role { color: var(--fg); }
.timeline__item.is-active .timeline__company { filter: brightness(1.15); }
.timeline__dot {
  position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg-base); border: 2px solid var(--violet);
  box-shadow: 0 0 0 4px rgba(124,92,255,.12);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease);
}
.timeline__item.is-current .timeline__dot { background: var(--violet); }
.timeline__head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.timeline__role { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.2; }
.timeline__company { color: var(--violet); font-weight: 600; font-size: var(--step-body); }
.timeline__period { margin-left: 0; font-family: var(--font-mono); font-size: var(--step--1); color: var(--fg-muted); font-weight: 500; letter-spacing: .02em; }
.timeline__desc { color: var(--fg-muted); margin-top: 10px; max-width: none; font-size: var(--step-body); line-height: 1.65; }

@media (prefers-reduced-motion: reduce) {
  .chrono__balance { animation: none; }
}

.testimonials .section__title {
  max-width: none;
  line-height: 1.22;
  margin-bottom: 0.65em;
  display: block;
}
.testimonials .section__title .muted {
  display: inline;
  margin-left: 0.3em;
  font-size: 0.68em;
  color: var(--fg-dim);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.quote { height: 100%; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 18px; }
.quote blockquote { font-size: var(--step-body); color: var(--fg); line-height: 1.65; }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote__avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--violet); font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; flex-shrink: 0; }
.quote figcaption strong { display: block; font-weight: 600; font-size: var(--step-0); }
.quote figcaption span:last-child { min-width: 0; }
.quote figcaption em { display: block; color: var(--fg-dim); font-style: normal; font-size: var(--step--1); line-height: 1.4; margin-top: 2px; }

/* ---------- 20. Learning ---------- */
.learning__grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
.learn-card { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.learn-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.learn-card__name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.learn-card__tag { font-size: var(--step--1); padding: 4px 10px; border-radius: 100px; background: rgba(255,184,107,.14); color: var(--amber); }
.learn-card p { color: var(--fg-muted); font-size: var(--step-0); }

/* ---------- 21. Philosophy ---------- */
.philosophy__grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; margin-top: 16px; }
.philosophy__lead { position: static; }
.philosophy__list { display: grid; gap: 8px; }
.philosophy__list li { display: flex; gap: 20px; padding: 26px; border-radius: var(--radius-lg); border: 1px solid transparent; transition: background .35s var(--ease), border-color .35s var(--ease); }
.philosophy__list li:hover { background: var(--surface); border-color: var(--border); }
.philosophy__num { font-family: var(--font-mono); color: var(--violet); font-size: var(--step--1); padding-top: 4px; }
.philosophy__list h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); margin-bottom: 6px; }
.philosophy__list p { color: var(--fg-muted); font-size: var(--step-body); line-height: 1.6; }

/* ---------- 22. Fun facts ---------- */
.facts__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fact { padding: 22px 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); text-align: center; }
.fact__num { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 1.5rem + 3vw, 4rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.fact__label { display: block; margin-top: 12px; color: var(--fg-muted); font-size: var(--step-0); }

/* ---------- 23. Contact ---------- */
.contact__card { position: relative; padding: 28px 20px; border-radius: var(--radius-lg); background: radial-gradient(120% 140% at 50% 0%, var(--contact-card-glow), transparent 60%), var(--surface); border: 1px solid var(--border); overflow: hidden; text-align: center; }
.contact__card::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse 60% 60% at 50% 0%, #000, transparent 70%); -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 0%, #000, transparent 70%); opacity: .5; pointer-events: none; }
.contact__title { position: relative; font-family: var(--font-display); font-weight: 600; font-size: var(--step-3); line-height: 1.05; letter-spacing: -0.02em; max-width: 18ch; margin: 20px auto 0; }
.contact__lead { position: relative; color: var(--fg-muted); font-size: var(--step-1); max-width: 50ch; margin: 22px auto 0; }
.contact__actions { position: relative; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px; }
.contact__socials { position: relative; display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center; margin-top: 40px; }
.contact__socials a { color: var(--fg-muted); font-size: var(--step--1); position: relative; }
.contact__socials a::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 1px; background: var(--violet); transition: width .3s var(--ease); }
.contact__socials a:hover { color: var(--fg); }
.contact__socials a:hover::after { width: 100%; }

/* Contact: two-column (intro + form) */
.contact__grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 28px; text-align: left; align-items: start; }
.contact__grid .contact__title { margin: 16px 0 0; text-align: left; max-width: none; }
.contact__grid .contact__lead { margin: 20px 0 0; text-align: left; font-size: var(--step-body); max-width: none; line-height: 1.6; }
.contact__channels { display: grid; gap: 18px; margin: 34px 0; }
.contact__channels li { display: grid; gap: 3px; }
.contact__channel-label { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); }
.contact__channels a, .contact__channels li > span:not(.contact__channel-label) { color: var(--fg); font-size: var(--step-0); }
.contact__channels a { position: relative; width: max-content; transition: color .3s var(--ease); }
.contact__channels a:hover { color: var(--violet); }

/* Form */
.contact__form-wrap { position: relative; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--form-wrap-bg); border: 1px solid var(--border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cform { display: grid; gap: 18px; }
.cform__row { display: grid; grid-template-columns: 1fr; gap: 14px; }
.cform__field { display: grid; gap: 8px; }
.cform label { font-size: var(--step-0); color: var(--fg-muted); }
.cform label .req { color: var(--violet); }
.cform label .opt { color: var(--fg-dim); font-size: .85em; }
.cform input, .cform select, .cform textarea, .picker__control, .cselect__trigger {
  width: 100%; padding: 14px 16px; font: inherit; font-size: var(--step-0); color: var(--fg);
  background: var(--input-bg); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.cform textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.cform select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-color: var(--input-bg); color: var(--fg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa1ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
[data-theme="light"] .cform select,
[data-theme="light"] .cselect__trigger {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.cform select option { background: var(--option-bg); color: var(--option-fg); }

/* Custom dark select (replaces native dropdown UI) */
.cselect { position: relative; }
.cselect__native {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  pointer-events: none;
}
.cselect__trigger {
  width: 100%; text-align: left; padding: 14px 36px 14px 16px;
  cursor: pointer;
  background-color: var(--input-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa1ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.cselect__trigger:hover { background-color: var(--surface-2); }
.cselect.is-open .cselect__trigger,
.cselect__trigger:focus-visible {
  outline: none; border-color: var(--violet); background-color: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.cselect__list {
  position: absolute; z-index: 25; top: calc(100% + 6px); left: 0; right: 0;
  max-height: 240px; overflow-y: auto; padding: 6px; margin: 0; list-style: none;
  border-radius: 14px; background: var(--dropdown-bg); border: 1px solid var(--border-strong);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-dropdown);
}
.cselect__opt {
  padding: 10px 12px; border-radius: 9px; font-size: var(--step--1);
  color: var(--fg-muted); cursor: pointer;
}
.cselect__opt:hover,
.cselect__opt.is-active { background: var(--surface-2); color: var(--fg); }
.cselect__opt[aria-selected="true"] { background: var(--accent-glow); color: var(--violet); font-weight: 600; }
[data-theme="dark"] .cselect__opt[aria-selected="true"] { color: #fff; }
.cform input:focus, .cform select:focus, .cform textarea:focus, .cselect__trigger:focus-visible { outline: none; border-color: var(--violet); background: var(--surface-2); box-shadow: 0 0 0 3px var(--accent-glow); }
.cform input::placeholder, .cform textarea::placeholder { color: var(--fg-dim); }
.cform input.invalid, .cform textarea.invalid, .picker.invalid .picker__control { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.16); }
.cform__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.cform__status { font-size: var(--step--1); color: var(--fg-muted); margin: 0; }
.cform__status.ok { color: #34d399; }
.cform__status.err { color: #f87171; }
.cform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Searchable multi-select service picker */
.picker { position: relative; }
.picker__control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; cursor: text; min-height: 48px; }
.picker.is-open .picker__control { border-color: var(--violet); box-shadow: 0 0 0 3px var(--accent-glow); }
.picker__chips { display: contents; }
.picker__chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 6px 5px 11px; border-radius: 100px; background: var(--accent-glow); border: 1px solid color-mix(in srgb, var(--violet) 35%, transparent); color: var(--violet); font-size: var(--step--1); font-weight: 600; }
.picker__chip button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--violet) 18%, transparent); color: var(--violet); font-size: var(--step--1); line-height: 1; }
.picker__chip button:hover { background: color-mix(in srgb, var(--violet) 28%, transparent); }
.picker__input { flex: 1; min-width: 140px; border: 0 !important; background: transparent !important; padding: 6px 2px !important; box-shadow: none !important; }
.picker__input:focus { outline: none; box-shadow: none !important; }
.picker__list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-height: 240px; overflow-y: auto; padding: 6px; margin: 0; border-radius: 14px; background: var(--dropdown-bg); border: 1px solid var(--border-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-dropdown); }
.picker__opt { padding: 10px 12px; border-radius: 9px; font-size: var(--step--1); color: var(--fg-muted); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.picker__opt:hover, .picker__opt.active { background: var(--surface-2); color: var(--fg); }
.picker__opt[aria-selected="true"] { color: var(--fg); }
.picker__opt[aria-selected="true"]::after { content: "âœ“"; color: var(--violet); }
.picker__opt mark { background: transparent; color: var(--cyan); font-weight: 600; }
.picker__empty { padding: 12px; color: var(--fg-dim); font-size: var(--step--1); text-align: center; }
.picker__hint { margin: 8px 0 0; font-size: var(--step--1); color: var(--fg-dim); }
.footer__social { display: flex; gap: 8px 22px; flex-wrap: wrap; justify-content: center; }
.footer__social a { color: var(--fg-muted); font-size: var(--step--1); transition: color .3s var(--ease); padding: 6px 2px; min-height: var(--touch); display: inline-flex; align-items: center; }
.footer__social a:hover { color: var(--violet); }

/* ---------- 24. Footer ---------- */
.footer { padding-block: 50px 40px; border-top: 1px solid var(--border); }
.footer__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px 20px;
  padding-bottom: 30px;
}
.footer__logo { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); justify-self: start; }
.footer__social { justify-self: center; }
.footer__totop {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: var(--touch);
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--step--1);
  white-space: nowrap;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.footer__totop:hover { background: var(--surface-2); border-color: var(--border-strong); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; padding-top: 26px; border-top: 1px solid var(--border); color: var(--fg-muted); font-size: var(--step--1); text-align: center; }

/* Mobile footer: logo + to-top on one row, social centered below */
@media (max-width: 767px) {
  .footer { padding-block: 36px 28px; }
  .footer__top {
    grid-template-columns: 1fr auto;
    gap: 18px 12px;
  }
  .footer__logo { grid-column: 1; grid-row: 1; }
  .footer__totop { grid-column: 2; grid-row: 1; padding: 10px 14px; }
  .footer__social {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px 28px;
    padding-top: 4px;
  }
}

/* ---------- 25. Project panel (modal) ---------- */
.panel { position: fixed; inset: 0; z-index: 1000; display: grid; }
.panel[hidden] { display: none; }
.panel__backdrop { position: absolute; inset: 0; background: rgba(3,3,5,.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s var(--ease); }
.panel.is-open .panel__backdrop { opacity: 1; }
.panel__sheet { position: relative; justify-self: end; width: min(680px, 100%); height: 100%; overflow-y: auto; background: var(--bg-base); border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .55s var(--ease); }
.panel.is-open .panel__sheet { transform: translateX(0); }
.panel__close { position: sticky; top: 18px; float: right; margin: 18px 18px 0; z-index: 5; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); }
.panel__close:hover { background: var(--surface); border-color: var(--border-strong); }
.panel__body { padding: 0 clamp(24px, 4vw, 48px) clamp(40px, 6vw, 64px); }
.panel__hero { position: relative; margin: 0 calc(-1 * clamp(24px, 4vw, 48px)) 0; aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.panel__hero img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.panel__industry { display: inline-block; font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; color: var(--panel-accent, var(--violet)); margin-top: 30px; }
.panel__title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); margin: 10px 0 0; letter-spacing: -0.01em; }
.panel__body h4 { font-family: var(--font-display); font-weight: 600; font-size: var(--step-0); margin: 30px 0 10px; }
.panel__body p { color: var(--fg-muted); }
.panel__body ul.dashed { display: grid; gap: 8px; margin-top: 8px; }
.panel__body ul.dashed li { position: relative; padding-left: 20px; color: var(--fg-muted); }
.panel__body ul.dashed li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 1px; background: var(--panel-accent, var(--violet)); }
.panel__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.panel__tags span { font-size: var(--step--1); padding: 6px 12px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); color: var(--fg-muted); }
.panel__visit { margin-top: 34px; }

/* ---------- 26. Reveal animation base states ---------- */
.reveal-up, .reveal-stagger > *, .reveal-lines .rl-line { opacity: 0; transform: translateY(24px); }
.reveal-lines .rl-line { display: block; overflow: hidden; line-height: 1.22; padding-bottom: 0.1em; }
.reveal-lines .rl-line + .rl-line { margin-top: 0.1em; }
.js-ready .reveal-up.in, .js-ready .reveal-stagger > *.in, .js-ready .reveal-lines .rl-line.in { opacity: 1; transform: none; }
/* If JS/GSAP unavailable, show everything (progressive enhancement) */
html:not(.js-ready) .reveal-up,
html:not(.js-ready) .reveal-stagger > *,
html:not(.js-ready) .reveal-lines .rl-line { opacity: 1; transform: none; }

/* ---------- 27. Responsive (mobile-first, production) ---------- */

/* Large phone */
@media (min-width: 480px) {
  :root {
    --step--1: clamp(0.8125rem, 0.75rem + 0.2vw, 0.875rem);
    --step-body: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
    --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
    --step-2: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);
    --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.125rem);
    --step-hero: clamp(2.125rem, 1.6rem + 3.5vw, 2.875rem);
    --gutter: 1.5rem;
    --section-pad: clamp(3.25rem, 5vw, 4rem);
  }
  .stack__grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .hero__stats { gap: 20px; }
  .hero__title { max-width: 13ch; }
}

/* Tablet */
@media (min-width: 768px) {
  :root {
    --step--1: clamp(0.875rem, 0.8rem + 0.15vw, 0.9375rem);
    --step-0: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
    --step-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
    --step-1: clamp(1.1875rem, 1.05rem + 0.4vw, 1.375rem);
    --step-2: clamp(1.5rem, 1.25rem + 0.7vw, 1.875rem);
    --step-3: clamp(2rem, 1.5rem + 1.2vw, 2.5rem);
    --step-hero: clamp(2.5rem, 1.8rem + 2.2vw, 3.75rem);
    --gutter: 2rem;
    --section-pad: clamp(4rem, 6vw, 5rem);
    --radius: 16px;
    --radius-lg: 22px;
  }
  .hero { padding-top: 120px; padding-bottom: 64px; }
  .hero__grid-lines { background-size: 60px 60px; opacity: .45; }
  .hero__title { margin-top: 22px; max-width: 15ch; }
  .hero__cta { flex-direction: row; flex-wrap: wrap; width: auto; }
  .hero__cta .btn { width: auto; min-width: 10rem; }
  .hero__stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 48px); margin-top: 44px; padding-top: 28px; }
  .hero__stat dt { font-size: var(--step-0); }
  .section__title { max-width: 22ch; text-wrap: balance; }
  .eyebrow { margin-bottom: 18px; letter-spacing: .13em; }
  .section__lead { margin-top: 20px; }
  .bento { grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 36px; }
  .bento__card { padding: 26px; }
  .bento__card--wide { grid-column: span 2; }
  .work__head { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; }
  .work__note { max-width: 34ch; }
  .layout-about { grid-template-columns: 5fr 7fr; gap: 2.5rem; align-items: center; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .work__film-track,
  .work__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stack__grid { grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
  .stack__item { min-height: 108px; padding: 18px 14px; }
  .skills__cols { margin-top: 36px; }
  .skills__group { padding: 24px; }
  .skills__group-title { font-size: var(--step-2); }
  .chrono { margin-top: 40px; gap: 28px; }
  .chrono__stage { display: block; max-width: 320px; margin-inline: auto; }
  .timeline__item { padding: 0 0 40px 40px; }
  .timeline__head { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
  .timeline__role { font-size: var(--step-2); }
  .timeline__company { font-size: var(--step-1); }
  .timeline__period { margin-left: auto; font-size: var(--step-0); }
  .timeline__desc { max-width: 62ch; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .fact { padding: 26px 20px; }
  .learning__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 36px; }
  .journey__layout { gap: 40px; margin-top: 20px; }
  .journey__step { padding: 26px; }
  .work-card__body { padding: 22px 24px 24px; }
  .work-card__name { font-size: var(--step-2); }
  .bento__card h3 { font-size: var(--step-2); }
  .about__meta { grid-template-columns: repeat(2, 1fr); gap: 22px 32px; margin-top: 32px; padding-top: 28px; }
  .cform__row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .quote { padding: 28px; gap: 20px; }
  .contact__card { padding: 40px 32px; border-radius: 28px; }
  .marquee { padding-block: 24px; }
  .marquee__track { gap: 28px; font-size: var(--step-2); }
  .nav__actions .btn--ghost { display: inline-flex; }
}

/* Desktop */
@media (min-width: 1024px) {
  :root {
    --step--1: clamp(0.875rem, 0.8rem + 0.12vw, 0.95rem);
    --step-0: clamp(1.0625rem, 1rem + 0.15vw, 1.125rem);
    --step-body: clamp(1.0625rem, 1rem + 0.12vw, 1.125rem);
    --step-1: clamp(1.25rem, 1.1rem + 0.35vw, 1.5rem);
    --step-2: clamp(1.625rem, 1.35rem + 0.5vw, 2rem);
    --step-3: clamp(2.25rem, 1.7rem + 1vw, 2.875rem);
    --step-hero: clamp(3rem, 2.2rem + 1.6vw, 4.5rem);
    --gutter: 2.5rem;
    --section-pad: clamp(5.5rem, 6vw, 6.5rem);
    --maxw: min(1680px, 94vw);
    --radius-lg: 24px;
  }
  .nav__links { display: flex; }
  .nav__actions .btn { display: inline-flex; }
  .nav__burger { display: none; }
  .hero { padding-top: 130px; padding-bottom: 72px; }
  .hero__grid-lines { background-size: 72px 72px; opacity: .5; }
  .hero__floaters { display: block; }
  .hero__title { margin-top: 26px; max-width: 15ch; }
  .hero__lead { margin-top: 26px; }
  .hero__cta { margin-top: 32px; gap: 14px; }
  .hero__stats { margin-top: 52px; padding-top: 32px; }
  .bento { grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
  .bento__card { padding: 30px; }
  .bento__icon { width: 48px; height: 48px; margin-bottom: 16px; }
  .work__film-track,
  .work__grid { grid-template-columns: none; display: flex; flex-wrap: nowrap; gap: 22px; width: max-content; padding-inline: var(--gutter); padding-bottom: 12px; }
  .work-card { flex: 0 0 min(72vw, 520px); width: min(72vw, 520px); grid-column: auto; }
  .work-card--feature { flex: 0 0 min(84vw, 720px); width: min(84vw, 720px); }
  .work-card--tall { flex: 0 0 min(72vw, 520px); width: min(72vw, 520px); }
  .work__head { margin-bottom: 0; }
  .work__film {
    min-height: calc(100svh - 100px);
    height: calc(100svh - 100px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-deep);
  }
  .work__film.is-reel .work__film-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    max-width: none !important;
    grid-template-columns: none !important;
  }
  .work__film.is-reel .work-card {
    flex: 0 0 min(72vw, 520px) !important;
    width: min(72vw, 520px) !important;
    max-width: min(72vw, 520px) !important;
    transition: none !important;
  }
  .work__film.is-reel .work-card--feature {
    flex: 0 0 min(84vw, 720px) !important;
    width: min(84vw, 720px) !important;
    max-width: min(84vw, 720px) !important;
    transition: none !important;
  }
  .work__film-pin { width: 100%; padding-block: 12px 28px; padding-top: 8px; }
  .work__film-hud { display: flex; }
  .hero__frame { display: block; }
  .work-card__body { padding: 24px 26px 26px; }
  .stack__grid { grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 44px; }
  .stack__item { min-height: 118px; padding: 20px 16px; gap: 12px; }
  .stack__item span { font-size: var(--step-1); }
  .skills__cols { margin-top: 44px; }
  .skills-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); gap: 1.125rem; }
  .layout-about { gap: 3rem; }
  .skills__group { padding: 26px; }
  .experience .section__title { max-width: 22ch; }
  .chrono {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
    margin-top: 48px;
  }
  .chrono__stage { display: block; max-width: none; margin-inline: 0; }
  .chrono__track { display: block; }
  .timeline::before { display: none; }
  .timeline { margin-top: 0; }
  .timeline__item { padding: 0 0 44px 44px; }
  .timeline__desc { max-width: 68ch; margin-top: 12px; }
  .journey__layout { grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); }
  .journey__sticky { position: sticky; top: 120px; }
  .journey__path { display: block; position: absolute; right: 8%; top: 0; height: 300px; width: 40px; opacity: .6; }
  .philosophy__grid { grid-template-columns: 1fr 1.3fr; gap: clamp(30px, 5vw, 64px); margin-top: 20px; }
  .philosophy__lead { position: sticky; top: 120px; }
  .facts__grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .fact { padding: 28px; }
  .learning__grid { grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
  .learn-card { padding: 24px; }
  .contact__grid { grid-template-columns: 1fr 1.05fr; gap: clamp(30px, 5vw, 60px); }
  .contact__grid .contact__title { max-width: 16ch; margin-top: 20px; }
  .contact__card { padding: clamp(40px, 5vw, 80px) clamp(28px, 4vw, 64px); border-radius: clamp(24px, 4vw, 36px); }
  .quote { padding: 32px; }
  .marquee { padding-block: 26px; }
  .marquee__track { gap: 32px; }
  .btn { padding: 11px 20px; font-size: var(--step--1); min-height: 44px; }
  .btn--lg { padding: 15px 26px; font-size: var(--step-0); min-height: 48px; }
}

/* 1280â€“1439 */
@media (min-width: 1280px) {
  :root {
    --step-body: clamp(1.0625rem, 1rem + 0.15vw, 1.125rem);
    --step-1: clamp(1.375rem, 1.15rem + 0.35vw, 1.625rem);
    --step-2: clamp(1.75rem, 1.4rem + 0.5vw, 2.25rem);
    --step-3: clamp(2.5rem, 1.9rem + 0.9vw, 3.25rem);
    --step-hero: clamp(3.25rem, 2.4rem + 1.4vw, 5rem);
    --section-pad: clamp(6rem, 7vw, 7.5rem);
    --gutter: 3rem;
  }
  .section__title { line-height: 1.12; }
  .work__film-track,
  .work__grid { gap: 24px; }
  .work-card__body { padding: 26px 28px 28px; }
  .work-card__name { font-size: var(--step-2); }
  .bento__card h3 { font-size: var(--step-2); }
  .stack__item { min-height: 124px; gap: 14px; }
}

/* 1440â€“1599 */
@media (min-width: 1440px) {
  :root {
    --maxw: min(1600px, 92vw);
    --step-hero: clamp(3.5rem, 2.5rem + 1.2vw, 5.25rem);
    --step-3: clamp(2.75rem, 2.1rem + 0.7vw, 3.35rem);
  }
}

/* 1600â€“1919 */
@media (min-width: 1600px) {
  :root {
    --maxw: min(1680px, 90vw);
    --gutter: clamp(2.5rem, 2vw + 1rem, 4rem);
    --step-0: 1.125rem;
    --step-body: 1.125rem;
    --step-1: clamp(1.5rem, 1.25rem + 0.3vw, 1.75rem);
    --step-2: clamp(2rem, 1.6rem + 0.4vw, 2.5rem);
    --step-3: clamp(2.875rem, 2.2rem + 0.6vw, 3.5rem);
    --step-hero: clamp(3.75rem, 2.6rem + 1vw, 5.5rem);
    --section-pad: clamp(7rem, 7vw, 8rem);
  }
  .work__film-track,
  .work__grid { gap: 28px; }
  .bento { gap: 26px; }
  .stack__grid { gap: 20px; }
  .facts__grid { gap: 22px; }
  .learning__grid { gap: 22px; }
}

/* 1920+ â€” cap growth; donâ€™t let type dominate ultrawide */
@media (min-width: 1920px) {
  :root {
    --maxw: min(1720px, 86vw);
    --step-hero: clamp(4rem, 3rem + 0.8vw, 5.5rem);
    --step-3: clamp(3rem, 2.4rem + 0.4vw, 3.5rem);
    --section-pad: 8rem;
  }
}

@media (min-width: 2560px) {
  :root {
    --maxw: min(1800px, 72vw);
    --step-hero: 5.25rem;
    --step-3: 3.5rem;
  }
}

/* ============================================================
   DEVICE-CLASS OVERRIDES (mobile / tablet experience)
   ============================================================ */

/* Phones + small tablets: kill heavy desktop chrome */
@media (max-width: 1023px) {
  .hero__typewall,
  .hero__measure,
  .orbit,
  .lattice,
  .hero__frame,
  .signal,
  .cursor,
  .floater { display: none !important; }

  .ambient__blob { filter: blur(64px); opacity: 0.32; }
  .bg-flow { opacity: 0.45; }
  .grain { opacity: 0.35; }

  .work__film {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
  .work__film-hud { display: none !important; }
}

/* Phone-only refinements */
@media (max-width: 767px) {
  .nav { padding: 12px 0; }
  .nav__inner { gap: 12px; padding: 8px var(--gutter); }
  .nav__logo-text { font-size: 1rem; }
  .hero__status { font-size: 0.75rem; padding: 7px 12px; gap: 6px; }
  .hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .hero__stat dd { font-size: clamp(1.35rem, 5vw, 1.75rem); }
  .trait-list { gap: 8px; }
  .trait-list li { padding: 10px 14px; font-size: var(--step--1); }
  .section__title { max-width: 18ch; }
  .work-card__tags span { padding: 6px 10px; }
  .contact__channels a,
  .contact__channels li > span:not(.contact__channel-label) { word-break: break-word; }
  .cform__actions .btn { width: 100%; }
  .footer__bottom { gap: 10px 16px; }
  .panel__body { padding-inline: 20px; }
  .marquee__track { font-size: var(--step-0); gap: 18px; }

  /* Thumb-friendly form controls */
  .cform input,
  .cform textarea,
  .cform select,
  .picker__field { min-height: var(--touch); }
}

/* Tiny phones */
@media (max-width: 359px) {
  :root {
    --gutter: 0.875rem;
    --step-hero: clamp(1.75rem, 8vw, 2.125rem);
  }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .hero__stat:last-child { grid-column: 1 / -1; }
  .nav__logo-text { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Mobile / tablet landscape â€” donâ€™t force full-viewport hero */
@media (max-width: 1023px) and (orientation: landscape) {
  .hero,
  .hero__stage {
    min-height: auto;
    padding-top: 88px;
    padding-bottom: 36px;
  }
  :root { --section-pad: clamp(2.25rem, 5vh, 3.25rem); }
  .hero__stats { margin-top: 24px; padding-top: 16px; }
  .preloader .cal { width: min(480px, 92vw); }
}

/* iPad Pro-ish portrait polish (1024-1180 often reports as desktop width) */
@media (min-width: 1024px) and (max-width: 1180px) and (pointer: coarse) {
  .nav__links a { padding: 8px 10px; }
  .hero__title { max-width: 14ch; }
  .work-card { flex-basis: min(78vw, 480px); width: min(78vw, 480px); }
  .work-card--feature { flex-basis: min(88vw, 640px); width: min(88vw, 640px); }
}

/* ---------- 28. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal-up, .reveal-stagger > *, .reveal-lines .rl-line { opacity: 1 !important; transform: none !important; }
  .ambient__blob { animation: none !important; }
  .bg-flow__dots, .bg-flow__lines { animation: none !important; transform: none !important; }
  body.has-cursor, body.has-cursor * { cursor: auto !important; }
  .cursor { display: none !important; }
  .lattice { display: none !important; }
}

/* ============================================================
   PRECISION PROTOCOL — experience layer
   ============================================================ */
.grain { z-index: 1; }
.lattice { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.9; }
.ambient, .bg-flow { z-index: 0; }
.signal { z-index: 760; }

/* Calibration boot */
.preloader .cal { width: min(520px, 88vw); display: grid; gap: 22px; justify-items: stretch; text-align: left; }
.cal__brand {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.22em;
  color: var(--violet); text-transform: uppercase;
}
.cal__rulers { position: relative; height: 48px; }
.cal__ruler { display: flex; gap: 8px; align-items: flex-end; height: 100%; }
.cal__ruler span {
  display: block; height: 2px; width: 100%; background: var(--border-strong);
  transform-origin: left center; transform: scaleX(0.15);
  transition: transform .45s var(--ease);
}
.cal__ruler span:nth-child(2) { height: 12px; width: 2px; transform: scaleY(0.3); transform-origin: bottom; }
.cal__ruler span:nth-child(3) { height: 2px; }
.cal__metrics {
  display: grid; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--fg-dim); text-transform: uppercase;
}
.cal__metrics li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface);
}
.cal__metrics li.is-hot { border-color: var(--violet); color: var(--fg); box-shadow: 0 0 0 1px var(--accent-glow); }
.cal__metrics strong { color: var(--cyan); font-weight: 500; }
.cal__status {
  font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600;
  letter-spacing: -0.02em; min-height: 1.2em;
}

/* Type architecture hero â€” perspective/overflow on INNER stage only */
.hero--protocol { perspective: none; }
.hero__stage {
  position: relative; width: 100%; min-height: 100svh; min-height: 100dvh;
  display: flex; align-items: center;
  overflow: hidden;
  perspective: 1400px;
  transform-style: preserve-3d;
}
.hero__typewall {
  position: absolute; inset: -10%; z-index: 0; pointer-events: none;
  display: grid; gap: 0.15em; align-content: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(4rem, 12vw, 9rem); line-height: 0.9;
  letter-spacing: -0.04em; color: var(--fg);
  opacity: 0.2; user-select: none; will-change: transform;
}
.typewall__row {
  display: flex; gap: 0.35em; white-space: nowrap;
  will-change: transform;
}
.typewall__word { opacity: 0.35; }
.typewall__word:nth-child(odd) { opacity: 0.55; }
.hero__measure {
  position: absolute; inset: 18% 12%; z-index: 1; pointer-events: none; opacity: 0;
}
.hero__measure-x, .hero__measure-y {
  position: absolute; background: color-mix(in srgb, var(--violet) 55%, transparent);
}
.hero__measure-x { left: 0; right: 0; top: 0; height: 1px; }
.hero__measure-y { top: 0; bottom: 0; left: 0; width: 1px; }
.hero__measure-label {
  position: absolute; top: 10px; left: 12px;
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.16em;
  color: var(--violet); text-transform: uppercase;
}
.hero--protocol .hero__content { z-index: 3; }
.hero--protocol .hero__floaters { z-index: 4; }
.hero--protocol .hero__frame { display: block; z-index: 2; }

/* Work media (wireframe overlay removed) */
.work-card__media { position: relative; }

/* Skill orbit constellation */
.orbit {
  --spin: 0;
  position: relative; width: min(520px, 100%); aspect-ratio: 1;
  margin: 36px auto 48px; border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--border-strong) 80%, transparent);
}
.orbit__core {
  position: absolute; inset: 38%; border-radius: 50%;
  display: grid; place-content: center; text-align: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 0 40px var(--accent-glow);
}
.orbit__core span {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.orbit__core em { font-style: normal; font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.18em; color: var(--fg-dim); }
.orbit__node {
  position: absolute; left: 50%; top: 50%;
  padding: 8px 12px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
  color: var(--fg); background: var(--bg-elev); border: 1px solid var(--border);
  transform:
    rotate(calc(var(--a) + var(--spin) * 1turn))
    translateX(min(38vw, 210px))
    rotate(calc(-1 * (var(--a) + var(--spin) * 1turn)));
  transform-origin: center;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.orbit__node:hover {
  border-color: var(--violet); box-shadow: 0 0 0 3px var(--accent-glow); color: var(--violet);
}

.nav { --nav-compact: 0; }
.nav.is-dense .nav__inner { padding-block: 6px; }
.nav.is-dense .nav__logo-text { letter-spacing: -0.03em; }

