/* ============================================================
   AB9D — portfolio design system
   Dark, cinematic, aurora-accented. All motion GPU-friendly.
   ============================================================ */

@property --acc1 { syntax: "<color>"; inherits: true; initial-value: #4df2c5; }
@property --acc2 { syntax: "<color>"; inherits: true; initial-value: #7c8cff; }
:root { transition: --acc1 1.8s ease, --acc2 1.8s ease; }
:root {
  --bg: #030409;
  --bg-2: #090b16;
  --acc1: #4df2c5;
  --acc2: #7c8cff;
  --acc1-rgb: 77,242,197;
  --acc2-rgb: 124,140,255;
  --panel: linear-gradient(165deg, rgba(24, 28, 48, 0.62), rgba(10, 12, 22, 0.48));
  --line: rgba(148, 163, 197, 0.14);
  --line-2: rgba(148, 163, 197, 0.28);
  --ink: #f0f3fd;
  --ink-2: #9aa5c4;
  --ink-3: #5a6488;
  --teal: #4df2c5;
  --violet: #b48cff;
  --blue: #60a5fa;
  --pink: #ff8ad8;
  --amber: #fbbf24;
  --grad: linear-gradient(100deg, #4df2c5, #58a8ff 42%, #b48cff 72%, #ff8ad8);
  --font-d: "Unbounded", "Space Grotesk", system-ui, sans-serif;
  --font-b: "Space Grotesk", "Helvetica Neue", system-ui, sans-serif;
  --font-m: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --font-i: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; }
html, body { background: var(--bg); }

body {
  font-family: var(--font-b);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
@media (hover: none), (pointer: coarse) { body { cursor: auto; } }

::selection { background: rgba(var(--acc1-rgb), 0.28); color: #fff; }

/* ---- scrollbar ---- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2136; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3152; }

/* ============ WebGL canvas & atmosphere ============ */
#gl {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; display: block;
}
.atmosphere {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(58% 46% at 80% 8%, color-mix(in srgb, var(--acc2) 9%, transparent), transparent 68%),
    radial-gradient(46% 40% at 6% 90%, color-mix(in srgb, var(--acc1) 7%, transparent), transparent 70%),
    radial-gradient(95% 72% at 50% 122%, rgba(4, 5, 12, 0.9), transparent 60%),
    linear-gradient(180deg, rgba(7, 9, 20, 0.5), transparent 26%);
}
.noise {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 10% { transform: translate(-5%,-8%); }
  30% { transform: translate(3%,-6%); } 50% { transform: translate(-7%,4%); }
  70% { transform: translate(6%,7%); } 90% { transform: translate(-4%,3%); }
}

/* ============ preloader ============ */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-mark {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(40px, 9vw, 96px);
  letter-spacing: 0.06em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 34px rgba(122, 134, 250, 0.35));
}
.loader-bar {
  width: min(300px, 60vw); height: 1px; background: var(--line-2);
  position: relative; overflow: hidden;
}
.loader-bar i {
  position: absolute; inset: 0; transform: scaleX(0); transform-origin: left;
  background: var(--grad); display: block;
}
.loader-pct { font-family: var(--font-m); font-size: 12px; color: var(--ink-3); letter-spacing: 0.3em; }

/* ============ custom cursor ============ */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none;
  border-radius: 50%; will-change: transform;
}
.cursor { width: 6px; height: 6px; background: var(--acc1); margin: -3px 0 0 -3px; transition: background 1.2s ease; }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(148, 163, 197, 0.45);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease),
              border-color 0.3s, background 0.3s;
}
.cursor-ring.hot {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-color: var(--acc1); background: rgba(var(--acc1-rgb), 0.07);
}
@media (hover: none), (pointer: coarse) { .cursor, .cursor-ring { display: none; } }

/* ============ chrome: top bar + rail ============ */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  mix-blend-mode: normal;
}
.bar::before {
  content: ""; position: absolute; inset: 0 0 auto;  height: 100%;
  background: linear-gradient(180deg, rgba(5,6,10,0.82), transparent);
  pointer-events: none;
}
.bar .brand {
  position: relative; font-family: var(--font-d); font-weight: 800; font-size: 18px;
  letter-spacing: 0.12em; color: var(--ink); text-decoration: none;
}
.bar .brand em { font-style: normal; color: var(--acc1); }
.bar-right { position: relative; display: flex; align-items: center; gap: 26px; }
.bar .status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.16em;
  color: var(--ink-2); text-transform: uppercase;
}
.bar .status i {
  width: 7px; height: 7px; border-radius: 50%; background: #34d399; display: block;
  box-shadow: 0 0 12px #34d399;
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.bar .cta {
  font-family: var(--font-m); font-size: 12px; letter-spacing: 0.14em;
  color: var(--bg); background: var(--ink); text-decoration: none;
  padding: 10px 18px; border-radius: 100px;
  transition: transform 0.35s var(--ease), background 0.35s;
}
.bar .cta:hover { background: var(--acc1); }

.rail {
  position: fixed; right: clamp(12px, 2.4vw, 34px); top: 50%; transform: translateY(-50%);
  z-index: 70; display: flex; flex-direction: column; gap: 14px;
}
.rail a {
  width: 10px; height: 10px; display: grid; place-items: center; position: relative;
}
.rail a i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); display: block;
  transition: all 0.4s var(--ease);
}
.rail a span {
  position: absolute; right: 22px; top: 50%; transform: translate(6px, -50%);
  font-family: var(--font-m); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-2); opacity: 0; white-space: nowrap;
  transition: all 0.35s var(--ease); pointer-events: none;
}
.rail a:hover span { opacity: 1; transform: translate(0, -50%); }
.rail a.on i { background: var(--acc1); box-shadow: 0 0 14px var(--acc1); transform: scale(1.5); }
@media (max-width: 760px) { .rail { display: none; } }

.progress {
  position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 75;
  transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--acc1), var(--acc2));
  box-shadow: 0 0 14px rgba(var(--acc1-rgb), 0.55);
}

/* ============ layout primitives ============ */
main { position: relative; z-index: 10; }
.section {
  position: relative;
  padding: clamp(90px, 14vh, 170px) clamp(20px, 6vw, 96px);
  max-width: 1560px; margin: 0 auto;
}
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(36px, 6vh, 72px); }
.sec-head .idx {
  font-family: var(--font-m); font-size: 13px; color: var(--acc1); letter-spacing: 0.2em;
  transition: color 1.2s ease;
}
.sec-head h2 {
  font-family: var(--font-d); font-weight: 700;
  font-size: clamp(30px, 5.4vw, 64px); letter-spacing: 0.01em; line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 24%, color-mix(in oklab, #a9b4dd 60%, var(--acc2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sec-head .rule { flex: 1; height: 1px; align-self: center;
  background: linear-gradient(90deg, rgba(var(--acc1-rgb), 0.45), rgba(var(--acc2-rgb), 0.12), transparent);
  transition: background 1.2s ease;
}
.kicker {
  font-family: var(--font-m); font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--acc1); display: block; transition: background 1.2s ease; }

/* reveal-on-scroll */
.rv { opacity: 0; transform: translateY(46px); filter: blur(6px); }
.in .rv, .rv.in {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
}
.rv.d1 { transition-delay: 0.08s; } .rv.d2 { transition-delay: 0.16s; }
.rv.d3 { transition-delay: 0.24s; } .rv.d4 { transition-delay: 0.32s; }

/* ============ hero ============ */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--nav-h) + 20px);
}
.hero .eyebrow {
  font-family: var(--font-m); font-size: clamp(11px, 1.3vw, 13px);
  letter-spacing: 0.4em; text-transform: uppercase; color: var(--ink-2);
  margin-bottom: clamp(18px, 3vh, 30px);
  display: flex; align-items: center; gap: 14px;
}
.hero .eyebrow::before { content: ""; width: 46px; height: 1px; background: var(--grad); }
.hero h1 {
  font-family: var(--font-d); font-weight: 800;
  font-size: clamp(44px, 9.6vw, 138px);
  line-height: 0.98; letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero h1 .fill {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 40px rgba(122, 134, 250, 0.22));
}
.hero h1 .ghost {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(178, 190, 226, 0.62);
  display: inline-block;
}
.hero .sub {
  margin-top: clamp(22px, 4vh, 38px);
  max-width: 640px; font-size: clamp(15px, 1.8vw, 19px); line-height: 1.75; color: var(--ink-2);
}
.hero .sub b { color: var(--ink); font-weight: 600; }
.hero .typer {
  display: block; min-height: 1.75em; margin-top: 6px;
  color: var(--acc1); font-family: var(--font-m); font-size: 0.92em;
}
.hero .typer::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: clamp(28px, 5vh, 48px); }

.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-m); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; padding: 16px 30px; border-radius: 100px; overflow: hidden;
  transition: transform 0.4s var(--ease), color 0.4s, border-color 0.4s;
  will-change: transform;
}
.btn .lab { position: relative; z-index: 1; }
.btn svg { position: relative; z-index: 1; transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { color: #041210; background: var(--acc1); transition: background 1.2s ease, transform 0.4s var(--ease); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; background: var(--grad);
  opacity: 0; transition: opacity 0.4s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-2); background: rgba(10,12,20,0.4); }
.btn-ghost:hover { border-color: var(--acc1); color: var(--acc1); }

.hero-meta {
  position: absolute; bottom: 34px; left: clamp(20px, 6vw, 96px); right: clamp(20px, 6vw, 96px);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3);
}
.scroll-cue { display: flex; align-items: center; gap: 10px; }
.scroll-cue .line {
  width: 1px; height: 44px; background: var(--line-2); position: relative; overflow: hidden;
}
.scroll-cue .line::after {
  content: ""; position: absolute; left: 0; top: -50%; width: 100%; height: 50%;
  background: var(--acc1); animation: drip 1.8s var(--ease) infinite;
}
@keyframes drip { to { top: 110%; } }

/* ============ marquee ============ */
.marquee {
  position: relative; z-index: 10; overflow: hidden; padding: 18px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 17, 0.5); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.marquee .track {
  display: flex; gap: 0; width: max-content;
  animation: slide 30s linear infinite;
}
.marquee:hover .track { animation-play-state: paused; }
.marquee span {
  font-family: var(--font-d); font-weight: 700; font-size: clamp(15px, 2vw, 22px);
  letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap;
  padding: 0 28px; color: var(--ink-3);
}
.marquee span b { color: transparent; -webkit-text-stroke: 1px var(--ink-3); font-weight: 700; }
.marquee em { color: var(--acc1); font-style: normal; padding: 0 4px; transition: color 1.2s ease; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ============ about ============ */
.about-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(30px, 5vw, 80px); align-items: start; }
.about-copy p {
  font-size: clamp(16px, 1.9vw, 21px); line-height: 1.62; max-width: 58ch;
  color: var(--ink-2); margin-bottom: 1.15em; font-weight: 300;
}
.about-copy p:first-child {
  font-size: clamp(19px, 2.4vw, 26px); line-height: 1.52; color: var(--ink);
}
@media (max-width: 700px) { .about-copy p { font-weight: 400; } }
.about-copy p b, .about-copy p a { color: var(--ink); font-weight: 600; }
.about-copy .hl {
  background: linear-gradient(100deg, rgba(var(--acc1-rgb), 0.16), rgba(var(--acc2-rgb), 0.16));
  border-radius: 4px; padding: 0 6px; color: var(--ink);
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.stat { background: rgba(11, 13, 22, 0.72); padding: clamp(20px, 2.6vw, 34px); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.stat .num {
  font-family: var(--font-d); font-weight: 800; font-size: clamp(34px, 4.6vw, 58px);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.stat .lbl { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* ============ stack ============ */
.stack-rows { display: flex; flex-direction: column; }
.stack-row {
  display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: center;
  padding: clamp(20px, 3vh, 30px) 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s, padding 0.4s var(--ease);
}
.stack-row:first-child { border-top: 1px solid var(--line); }
.stack-row:hover { background: rgba(var(--acc1-rgb), 0.04); padding-left: 18px; }
.stack-row .g {
  font-family: var(--font-m); font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-2);
}
.stack-row .items { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 14px; padding: 9px 18px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--ink);
  background: rgba(13, 16, 26, 0.5);
  transition: all 0.35s var(--ease);
}
.chip:hover {
  border-color: var(--acc1); color: var(--acc1);
  box-shadow: 0 0 24px rgba(var(--acc1-rgb), 0.18); transform: translateY(-2px);
}
@media (max-width: 700px) { .stack-row { grid-template-columns: 1fr; gap: 12px; } }

/* ============ work ============ */
.xp { display: flex; flex-direction: column; gap: clamp(22px, 3.4vh, 34px); }
.xp-card {
  position: relative; border: 1px solid var(--line); border-radius: 22px;
  background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: clamp(24px, 3.6vw, 46px);
  overflow: hidden;
  transition: border-color 0.45s, transform 0.45s var(--ease);
}
.xp-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--acc1-rgb), 0.09), transparent 44%);
  transition: opacity 0.45s;
}
.xp-card:hover { border-color: var(--line-2); transform: translateY(-4px); }
.xp-card:hover::before { opacity: 1; }
.xp-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.xp-top h3 { font-family: var(--font-d); font-size: clamp(20px, 2.6vw, 30px); font-weight: 700; }
.xp-top .period { font-family: var(--font-m); font-size: 12px; letter-spacing: 0.18em; color: var(--teal); }
.xp .role { font-size: 14px; color: var(--ink-2); font-family: var(--font-m); letter-spacing: 0.06em; margin-bottom: 18px; }
.xp .role em { font-style: normal; color: var(--violet); }
.xp p.body { color: var(--ink-2); line-height: 1.75; max-width: 74ch; margin-bottom: 18px; }
.xp ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.xp ul li { position: relative; padding-left: 26px; color: var(--ink-2); line-height: 1.65; }
.xp ul li::before {
  content: "▸"; position: absolute; left: 2px; color: var(--teal);
}

/* ============ builds ============ */
.builds-intro { display: grid; grid-template-columns: 1fr minmax(240px, 320px); gap: clamp(30px, 5vw, 70px); align-items: center; margin-bottom: clamp(40px, 7vh, 80px); }
.builds-intro p { color: var(--ink-2); font-size: clamp(15px, 1.8vw, 18px); line-height: 1.8; max-width: 58ch; }

/* DOM phone mockup with live screenshot cycle */
.phone {
  position: relative; width: 100%; aspect-ratio: 480 / 987;
  border-radius: 38px; border: 1px solid var(--line-2);
  background: #0b0e18;
  box-shadow:
    0 0 0 4px rgba(10, 12, 20, 0.9),
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(var(--acc2-rgb), 0.2);
  transition: box-shadow 1.4s ease;
  overflow: hidden;
  transform-style: preserve-3d; will-change: transform;
}
.phone::after {
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 20px; border-radius: 12px; background: #05060a; z-index: 3;
  border: 1px solid rgba(148,163,197,0.12);
}
.phone .screens { position: absolute; inset: 0; }
.phone .screens img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.9s var(--ease); filter: saturate(1.05);
}
.phone .screens img.on { opacity: 1; }
.phone .glass {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0.09), transparent 30%, transparent 65%, rgba(255,255,255,0.04));
}
.phone-caption {
  margin-top: 16px; text-align: center; font-family: var(--font-m); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3);
}
.phone-caption em { color: var(--acc1); font-style: normal; }

.builds-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(14px, 1.8vw, 24px);
}
.build {
  position: relative; grid-column: span 6;
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: border-color 0.45s, transform 0.45s var(--ease), box-shadow 0.45s;
  will-change: transform;
}
.build:hover {
  border-color: rgba(var(--acc1-rgb), 0.45); transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 60px rgba(var(--acc1-rgb), 0.09);
}
.build.wide { grid-column: span 12; flex-direction: row; }
@media (max-width: 980px) { .build, .build.wide { grid-column: span 12; flex-direction: column; } }
@media (max-width: 900px) {
  .builds-intro { grid-template-columns: 1fr; }
  .builds-intro > .rv.d2 { max-width: 250px; margin: 0 auto; width: 100%; }
}

.build .media {
  position: relative; overflow: hidden; min-height: 230px; flex: 1;
  background: linear-gradient(140deg, #10131f, #0a0c14);
}
.build.wide .media { flex: 0 0 46%; min-height: 300px; }
/* --- project media stage: no more landscape crops --- */
.build .media { min-height: 320px; display: flex; align-items: center; justify-content: center; }
.build .media-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(75% 85% at 72% 22%, color-mix(in srgb, var(--cb, #7c8cff) 20%, transparent), transparent 70%),
    radial-gradient(60% 70% at 22% 82%, color-mix(in srgb, var(--ca, #4df2c5) 16%, transparent), transparent 72%);
}
.build .mini-phone {
  position: relative; height: 88%; aspect-ratio: 480 / 987; max-width: 68%;
  border-radius: 24px; overflow: hidden; background: #0b0e18;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 3px rgba(8, 10, 16, 0.9),
    0 26px 60px rgba(0, 0, 0, 0.6),
    0 0 70px color-mix(in srgb, var(--cb, #7c8cff) 26%, transparent);
  transform: rotate(-3deg) translateY(2%);
  transition: transform 0.9s var(--ease);
}
.build:hover .mini-phone { transform: rotate(0deg) translateY(0) scale(1.04); }
.build .mini-phone::after {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 13px; border-radius: 8px; background: rgba(5, 6, 10, 0.92); z-index: 2;
}
.build .mini-phone img, .build .poster-stack img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06) translateY(1.2%);
  transition: opacity 0.85s var(--ease), transform 1.35s var(--ease), filter 0.5s;
  filter: saturate(0.86) brightness(0.94);
}
.build .mini-phone img.on, .build .poster-stack img.on { opacity: 1; transform: none; }
.build:hover .mini-phone img, .build:hover .poster-stack img { filter: saturate(1.06) brightness(1); }
.build .poster-stack {
  position: relative; height: 88%; aspect-ratio: 1290 / 2796; max-width: 72%;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 60px color-mix(in srgb, var(--cb, #7c8cff) 20%, transparent);
  transform: rotate(2.5deg);
  transition: transform 0.9s var(--ease);
}
.build:hover .poster-stack { transform: rotate(0deg) scale(1.03); }
.build .media svg.art { position: absolute; inset: 0; width: 100%; height: 100%; }
.build .media .shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(5, 6, 10, 0.42));
  pointer-events: none;
}
.build .body { padding: clamp(20px, 2.4vw, 30px); display: flex; flex-direction: column; gap: 12px; }
.build .row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.build .n { font-family: var(--font-m); font-size: 11px; color: var(--ink-3); letter-spacing: 0.24em; }
.build h3 { font-family: var(--font-d); font-weight: 700; font-size: clamp(19px, 2.2vw, 26px); }
.build .tag { font-family: var(--font-m); font-size: 11px; letter-spacing: 0.16em; color: var(--violet); text-transform: uppercase; }
.build p { color: var(--ink-2); line-height: 1.7; font-size: 14.5px; }
.build .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.build .chips i {
  font-style: normal; font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--ink-2); border: 1px solid var(--line); border-radius: 100px; padding: 5px 12px;
}
.build .go {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  font-family: var(--font-m); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--acc1);
}
.build .go svg { transition: transform 0.35s var(--ease); }
.build:hover .go svg { transform: translate(3px, -3px); }
.build .go.mut { color: var(--ink-3); }

/* ============ lab ============ */
.lab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.lab-card {
  border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 2.6vw, 32px);
  background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.4s, transform 0.4s var(--ease);
}
.lab-card:hover { border-color: rgba(var(--acc1-rgb), 0.4); transform: translateY(-4px); }
.lab-card .k {
  display: inline-block; font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--acc1);
  border: 1px solid rgba(var(--acc1-rgb), 0.35); padding: 5px 12px; border-radius: 100px;
  margin-bottom: 16px;
}
.lab-card h3 { font-size: 17px; font-weight: 600; line-height: 1.45; margin-bottom: 10px; }
.lab-card p { color: var(--ink-2); font-size: 14px; line-height: 1.7; }

/* ============ research ============ */
.res-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(30px, 4vw, 60px); align-items: start; }
@media (max-width: 900px) { .res-grid { grid-template-columns: 1fr; } }
.paper {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 3vw, 36px);
  background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.4s, transform 0.4s var(--ease);
  margin-bottom: 18px; position: relative; overflow: hidden;
}
.paper:hover { border-color: rgba(var(--acc2-rgb), 0.45); transform: translateY(-4px); }
.paper .venue { font-family: var(--font-m); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--violet); margin-bottom: 12px; }
.paper h3 { font-size: clamp(17px, 2vw, 22px); font-weight: 600; line-height: 1.4; margin-bottom: 12px; }
.paper .meta { font-size: 13px; color: var(--ink-2); font-family: var(--font-m); }
.paper .arrow { position: absolute; top: 24px; right: 26px; color: var(--ink-3); transition: all 0.35s var(--ease); }
.paper:hover .arrow { color: var(--violet); transform: translate(3px, -3px); }

.solved { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.solved a {
  display: flex; justify-content: space-between; align-items: center; text-decoration: none;
  padding: 22px 26px; border-bottom: 1px solid var(--line); color: inherit;
  background: rgba(11, 13, 22, 0.6);
  transition: background 0.35s, padding 0.35s var(--ease);
}
.solved a:last-child { border-bottom: 0; }
.solved a:hover { background: rgba(var(--acc1-rgb), 0.05); padding-left: 34px; }
.solved .site { font-weight: 600; }
.solved .count { font-family: var(--font-m); color: var(--acc1); font-size: 15px; }
.solved-cap { font-family: var(--font-m); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin-top: 14px; }

.edu {
  margin-top: 26px; border-left: 2px solid var(--acc1); padding: 6px 0 6px 22px; transition: border-color 1.2s ease;
}
.edu .deg { font-weight: 600; margin-bottom: 6px; }
.edu .sch { color: var(--ink-2); font-size: 14px; margin-bottom: 6px; }
.edu .grd { font-family: var(--font-m); font-size: 12px; letter-spacing: 0.14em; color: var(--teal); }

/* ============ contact ============ */
.contact { text-align: center; padding-bottom: clamp(60px, 10vh, 120px); }
.contact .big {
  font-family: var(--font-d); font-weight: 800; text-transform: uppercase;
  font-size: clamp(38px, 8.4vw, 118px); line-height: 1.02; letter-spacing: -0.01em;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.contact .big .ghost { color: transparent; -webkit-text-stroke: 1.5px rgba(178, 190, 226, 0.62); }
.contact .big .fill {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact .mail {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-m); font-size: clamp(15px, 2.4vw, 24px); letter-spacing: 0.04em;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--line-2); padding-bottom: 8px;
  transition: color 0.35s, border-color 0.35s;
}
.contact .mail:hover { color: var(--acc1); border-color: var(--acc1); }
.contact .socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: clamp(30px, 5vh, 48px); }
/* socials → 3D glass tiles, styled in the v4 layer */

footer {
  position: relative; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  padding: 26px clamp(20px, 6vw, 96px);
  border-top: 1px solid var(--line);
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
}
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--acc1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   v2 · aurora background & glass polish
   The three blurred orbs take their colour from --acc1/--acc2,
   which main.js re-points at each section's particle palette —
   so the whole page atmosphere breathes with the 3D scene.
   ============================================================ */
.aurora { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.aurora i {
  position: absolute; border-radius: 50%; display: block;
  filter: blur(110px); will-change: transform;
}
.aurora i:nth-child(1) {
  width: 54vw; height: 54vw; left: 56%; top: -16%;
  background-color: var(--acc2); opacity: 0.11;
  animation: drift1 27s ease-in-out infinite alternate;
}
.aurora i:nth-child(2) {
  width: 46vw; height: 46vw; left: -16%; top: 48%;
  background-color: var(--acc1); opacity: 0.085;
  animation: drift2 34s ease-in-out infinite alternate;
}
.aurora i:nth-child(3) {
  width: 32vw; height: 32vw; left: 34%; top: 72%;
  background-color: color-mix(in oklab, var(--acc1) 55%, var(--acc2)); opacity: 0.065;
  animation: drift3 41s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(-16vw, 12vh) scale(1.18); } }
@keyframes drift2 { to { transform: translate(12vw, -10vh) scale(1.12); } }
@keyframes drift3 { to { transform: translate(-8vw, -14vh) scale(1.22); } }
@media (max-width: 760px) {
  .aurora i { filter: blur(70px); }
  .aurora i:nth-child(1) { width: 90vw; height: 90vw; opacity: 0.15; }
  .aurora i:nth-child(2) { width: 80vw; height: 80vw; opacity: 0.11; }
  .aurora i:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

/* hairline top-light on every glass card — catches the aurora */
.xp-card::after, .build::after, .lab-card::after, .paper::after, .stat::after {
  content: ""; position: absolute; top: 0; left: 7%; right: 7%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--acc1-rgb), 0.55), transparent);
  opacity: 0.55; pointer-events: none;
  transition: background 1.4s ease;
}
.lab-card, .stat { position: relative; overflow: hidden; }

/* stat numbers glow toward the live accent */
.stat .num {
  background: linear-gradient(100deg, var(--acc1), var(--acc2));
  -webkit-background-clip: text; background-clip: text;
  transition: background 1.4s ease;
}

/* deep-space vignette pinch at the very edges */
.atmosphere::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 95% at 50% 45%, transparent 58%, rgba(1, 2, 6, 0.72));
}

/* keep copy legible when particles drift behind it */
.hero .sub, .about-copy p, .xp p.body, .xp ul li,
.builds-intro p, .lab-card p, .paper h3 {
  text-shadow: 0 1px 14px rgba(4, 5, 12, 0.9), 0 0 34px rgba(4, 5, 12, 0.55);
}
.hero h1 { text-shadow: 0 2px 30px rgba(4, 5, 12, 0.4); }

/* ============ lab: linked cards + featured press story ============ */
a.lab-card { display: block; text-decoration: none; color: inherit; }
.lab-card .go {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  font-family: var(--font-m); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--acc1);
}
.lab-card .go svg { transition: transform 0.35s var(--ease); }
.lab-card:hover .go svg { transform: translate(3px, -3px); }

.lab-card.featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(280px, 44%) 1fr;
  padding: 0; align-items: stretch;
}
.lab-card.featured .lab-body { padding: clamp(24px, 3vw, 40px); align-self: center; }
.lab-card.featured h3 { font-size: clamp(18px, 2.3vw, 24px); line-height: 1.5; }
.lab-card.featured:hover { border-color: rgba(var(--acc1-rgb), 0.45); }

.lab-media { position: relative; min-height: 250px; overflow: hidden; }
.lab-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-media img.bg {
  object-fit: cover; transform: scale(1.18);
  filter: blur(22px) saturate(1.15) brightness(0.55);
}
.lab-media img.fg {
  object-fit: contain; padding: 10px;
  filter: saturate(0.98);
  transition: transform 1.1s var(--ease), filter 0.6s;
  box-sizing: border-box;
}
.lab-card.featured:hover .lab-media img.fg { transform: scale(1.03); filter: saturate(1.08) brightness(1.03); }
.lab-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 55%, rgba(8, 10, 18, 0.45));
}
.lab-badge {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.18em;
  color: var(--ink); background: rgba(6, 8, 14, 0.68);
  border: 1px solid var(--line-2); border-radius: 100px; padding: 6px 14px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
@media (max-width: 820px) {
  .lab-card.featured { grid-template-columns: 1fr; }
  .lab-media { min-height: 210px; }
}

/* ============================================================
   v3 · critique round: hero portrait, ghost numerals, choreography
   ============================================================ */

/* --- hero two-column with portrait card --- */
.hero-grid { display: flex; align-items: center; gap: clamp(28px, 5vw, 80px); }
.hero-copy { flex: 1 1 auto; min-width: 0; }
.hero-photo {
  position: relative; flex: 0 0 clamp(240px, 24vw, 330px);
  aspect-ratio: 4 / 5; border-radius: 30px; padding: 2px;
  background: linear-gradient(160deg, var(--acc1), transparent 38%, transparent 62%, var(--acc2));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55), 0 0 90px rgba(var(--acc2-rgb), 0.16);
  will-change: transform;
  animation: bob 7s ease-in-out infinite alternate;
}
@keyframes bob { to { translate: 0 -12px; } }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 12%;
  border-radius: 28px; display: block;
  filter: saturate(0.96) contrast(1.03);
}
.hero-photo::after {
  content: ""; position: absolute; inset: 2px; border-radius: 28px; pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(5, 6, 12, 0.5));
}
.ph-badge {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink); background: rgba(6, 8, 14, 0.72);
  border: 1px solid var(--line-2); border-radius: 100px; padding: 7px 14px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ph-badge i {
  width: 7px; height: 7px; border-radius: 50%; background: #34d399;
  box-shadow: 0 0 10px #34d399; animation: pulse 2.2s infinite;
}
@media (max-width: 900px) {
  .hero-grid { flex-direction: column-reverse; align-items: flex-start; }
  .hero-photo { flex: 0 0 auto; width: min(58vw, 230px); margin-bottom: 6px; animation: none; }
}

/* --- serif italic ghost lines --- */
.hero h1 .ghost, .contact .big .ghost {
  font-family: var(--font-i); font-weight: 400; font-style: italic;
  text-transform: none; font-size: 1.1em; letter-spacing: 0.01em;
  -webkit-text-stroke: 1px rgba(178, 190, 226, 0.72);
}

/* --- giant ghost section numerals, tinted by the live accent --- */
.section[data-num]::before {
  content: attr(data-num);
  position: absolute; top: clamp(20px, 5vh, 54px); right: clamp(4px, 3vw, 48px);
  z-index: -1; pointer-events: none; user-select: none;
  font-family: var(--font-d); font-weight: 800; line-height: 0.8;
  font-size: clamp(110px, 20vw, 300px); letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--acc1-rgb), 0.14);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 88%);
  mask-image: linear-gradient(180deg, #000, transparent 88%);
}

/* --- reveal choreography: rules draw, ticks grow, highlighter paints --- */
.sec-head .rule { transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease) 0.35s; }
.section.in .sec-head .rule { transform: scaleX(1); }
.kicker::before { width: 0; transition: width 0.9s var(--ease) 0.4s; }
.section.in .kicker::before { width: 34px; }
.hero .eyebrow::before { width: 0; transition: width 1s var(--ease) 0.3s; }
.section.in .eyebrow::before { width: 46px; }
.about-copy .hl { background-repeat: no-repeat; background-size: 0% 100%; transition: background-size 1.2s var(--ease) 0.55s; }
.section.in .hl { background-size: 100% 100%; }

/* --- blueprint corner ticks on glass cards --- */
.build::before, .paper::before, .lab-card::before {
  content: ""; position: absolute; inset: 12px; z-index: 3; pointer-events: none;
  --tk: rgba(var(--acc1-rgb), 0.9);
  background-image:
    linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk)),
    linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk)),
    linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk)),
    linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk));
  background-position:
    top left, top left, top right, top right,
    bottom left, bottom left, bottom right, bottom right;
  background-size:
    10px 1px, 1px 10px, 10px 1px, 1px 10px,
    10px 1px, 1px 10px, 10px 1px, 1px 10px;
  background-repeat: no-repeat;
  opacity: 0.22; transition: opacity 0.45s;
}
.build:hover::before, .paper:hover::before, .lab-card:hover::before { opacity: 0.85; }

/* --- accent-duotone wash over project imagery --- */
.build .media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--cb, #7c8cff) 40%, transparent),
    color-mix(in srgb, var(--ca, #4df2c5) 14%, transparent) 55%, transparent 80%);
  mix-blend-mode: soft-light; opacity: 0.9; transition: opacity 0.45s;
}
.build:hover .media::after { opacity: 0.25; }

/* --- contact climax lighting + underline sweeps --- */
.contact::before {
  content: ""; position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%);
  width: min(900px, 92vw); height: min(520px, 70vh);
  background: radial-gradient(50% 50% at 50% 50%, rgba(var(--acc2-rgb), 0.16), transparent 70%);
  pointer-events: none; z-index: -1;
}
.contact .big .fill { filter: drop-shadow(0 6px 40px rgba(var(--acc2-rgb), 0.25)); }
.contact .mail {
  border-bottom: none;
  background:
    linear-gradient(90deg, var(--acc1), var(--acc2)) no-repeat left bottom / 0% 1px,
    linear-gradient(var(--line-2), var(--line-2)) no-repeat left bottom / 100% 1px;
  transition: color 0.35s, background-size 0.7s var(--ease);
}
.contact .mail:hover { color: var(--acc1); background-size: 100% 1px, 100% 1px; text-shadow: 0 0 26px rgba(var(--acc1-rgb), 0.5); }
footer a {
  padding-bottom: 3px;
  background: linear-gradient(90deg, var(--acc1), var(--acc2)) no-repeat left bottom / 0% 1px;
  transition: color 0.35s, background-size 0.5s var(--ease);
}
footer a:hover { color: var(--ink); background-size: 100% 1px; }

/* --- top-bar clock --- */
.bar .clock { font-family: var(--font-m); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; position: relative; }
.bar .clock b { font-weight: 400; color: var(--acc1); }
@media (max-width: 640px) { .bar .clock { display: none; } }

/* --- wrap quality --- */
.sec-head h2, .contact .big, .build h3, .paper h3, .lab-card h3, .xp-top h3, .stat .lbl { text-wrap: balance; }
.hero .sub, .about-copy p, .xp p.body, .xp ul li, .builds-intro p, .build p, .lab-card p { text-wrap: pretty; }

/* ============================================================
   v4 · 3D glass social tiles
   ============================================================ */
.contact .socials { gap: 16px; perspective: 900px; }
.contact .socials .soc {
  position: relative; display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-m); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  padding: 15px 24px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(30, 35, 58, 0.85), rgba(10, 12, 22, 0.92));
  border: 1px solid var(--line-2);
  transform-style: preserve-3d; will-change: transform;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -8px 18px rgba(0, 0, 0, 0.32);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact .socials .soc::before {          /* cursor-tracking inner glow */
  content: ""; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  background: radial-gradient(130px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--acc1-rgb), 0.24), transparent 62%);
  opacity: 0; transition: opacity 0.3s;
}
.contact .socials .soc::after {           /* shine sweep */
  content: ""; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.09) 48%, transparent 62%);
  background-size: 240% 100%; background-position: 120% 0;
  transition: background-position 0.9s var(--ease);
}
.contact .socials .soc:hover::before { opacity: 1; }
.contact .socials .soc:hover::after { background-position: -60% 0; }
.contact .socials .soc:hover {
  border-color: rgba(var(--acc1-rgb), 0.55);
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(var(--acc1-rgb), 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.contact .socials .soc svg {
  width: 19px; height: 19px; flex: 0 0 auto;
  color: var(--ink-2); transform: translateZ(22px);
  transition: color 0.3s;
}
.contact .socials .soc span { transform: translateZ(14px); }
.contact .socials .soc:hover svg { color: var(--acc1); filter: drop-shadow(0 0 8px rgba(var(--acc1-rgb), 0.6)); }
@media (hover: none), (pointer: coarse) {
  .contact .socials .soc:active { transform: scale(0.96); }
}

/* hero CTAs join the 3D language */
.hero-ctas { perspective: 700px; }
.hero-ctas .btn { transform-style: preserve-3d; }
.hero-ctas .btn .lab, .hero-ctas .btn svg { transform: translateZ(14px); }

/* ============================================================
   v5 · scroll-driven 3D (progressive enhancement, mobile-safe)
   ============================================================ */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* ghost numerals counter-drift as a deeper parallax plane */
    .section[data-num]::before {
      animation: numDrift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    /* hero dollies back into the particle field on scroll-away */
    .hero-grid, .hero-meta {
      animation: heroDolly linear both;
      animation-timeline: scroll(root);
      animation-range: 0 90vh;
      transform-origin: 50% 30%;
    }
    /* contact headline hinges up from the ground plane */
    .contact .big {
      transform-origin: 50% 100%;
      animation: bigRise cubic-bezier(0.22, 1, 0.36, 1) both;
      animation-timeline: view();
      animation-range: entry 10% entry 95%;
    }
  }
}
@keyframes numDrift {
  from { transform: translateY(14vh) scale(1.08); opacity: 0.45; }
  to   { transform: translateY(-20vh); opacity: 1; }
}
@keyframes heroDolly {
  to { transform: perspective(1100px) translateZ(-160px) translateY(7vh); opacity: 0; }
}
@keyframes bigRise {
  from { transform: perspective(800px) rotateX(34deg) translateY(9vh); opacity: 0; }
}

/* marquee leans like a conveyor belt (standalone rotate composes with slide) */
.marquee { perspective: 700px; transform-style: preserve-3d; }
.marquee .track { rotate: x 9deg; will-change: transform; }
