:root {
  --bg: #08080a;
  --bg-2: #101013;
  --bg-3: #16161a;
  --card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #6b6b74;
  --accent: #a78bfa;
  --accent-2: #22d3ee;
  --green: #4ade80;
  --max: 1240px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 90px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }

.noise {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 150;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 1000; color: var(--text); }
.loader-panels { position: absolute; inset: 0; display: flex; }
.loader-panels span { flex: 1; background: var(--bg-2); border-right: 1px solid rgba(255,255,255,0.03); }
.loader-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px clamp(20px, 4vw, 48px);
}
.loader-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.loader-words { position: relative; height: clamp(60px, 12vw, 150px); overflow: hidden; }
.lw {
  position: absolute; left: 0; top: 0;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em;
  font-size: clamp(56px, 12vw, 150px); line-height: 1;
  transform: translateY(110%);
}
.lw:last-child { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.loader-bottom { display: flex; align-items: flex-end; gap: 32px; }
.loader-count { font-family: var(--font-display); font-weight: 600; font-size: clamp(64px, 14vw, 180px); line-height: 0.85; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; min-width: 3.2ch; }
.loader-count sup { font-size: 0.3em; color: var(--dim); vertical-align: top; }
.loader-bar { flex: 1; height: 2px; background: var(--border); margin-bottom: 14px; }
.loader-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: 0 50%; transform: scaleX(0); }
html.loaded-fallback .loader { display: none; }
html.loaded-fallback body { overflow: auto; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), opacity 0.3s;
  opacity: 0;
}
.cursor.on { opacity: 1; }
.cursor.hover { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.cursor.label { width: 92px; height: 92px; margin: -46px 0 0 -46px; mix-blend-mode: normal; background: var(--text); }
.cursor-label { font-family: var(--font-mono); font-size: 12px; color: var(--bg); opacity: 0; transition: opacity 0.2s; }
.cursor.label .cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  width: min(var(--max), calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 10px 22px;
  background: rgba(16, 16, 19, 0.55);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border); border-radius: 999px;
  transition: background 0.3s, border-color 0.3s, transform 0.5s var(--ease);
}
.nav.scrolled { background: rgba(16, 16, 19, 0.85); border-color: var(--border-strong); }
.nav.hide { transform: translate(-50%, -150%); }
.nav-logo { font-family: var(--font-mono); font-weight: 500; font-size: 15px; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { font-size: 14px; color: var(--muted); padding: 8px 14px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-links a.nav-cta { background: var(--text); color: var(--bg); font-weight: 500; margin-left: 6px; }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 500; border: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, color 0.25s;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; box-shadow: 0 10px 40px -10px rgba(167, 139, 250, 0.7); }
.btn-ghost { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(167, 139, 250, 0.1); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Layout ---------- */
main { overflow-x: clip; }
.section { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 140px 0 0; }
.sec-label { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 28px; }
.sec-label span { color: var(--accent); }
.sec-label::after { content: ''; flex: 0 0 60px; height: 1px; background: var(--border-strong); }
.sec-title { font-size: clamp(38px, 6vw, 80px); letter-spacing: -0.035em; margin-bottom: 56px; max-width: 14ch; }
.split-words .w, .split-chars .c { display: inline-block; }
.split-words .wm { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  color: var(--accent); border: 1px solid rgba(167, 139, 250, 0.3); background: rgba(167, 139, 250, 0.08);
}
.badge.live { color: var(--green); border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.08); }
.badge.live i, .dot-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 640px;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 50% 55%, rgba(167, 139, 250, 0.16), transparent 70%);
}
.hero-name {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  pointer-events: none; user-select: none;
}
.hn-row {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(72px, 17.5vw, 300px); line-height: 0.82; letter-spacing: -0.05em;
  white-space: nowrap; overflow: hidden; padding: 0.04em 0.02em;
}
.hn-1 { color: var(--text); }
.hn-2 { color: transparent; -webkit-text-stroke: 1.5px rgba(244, 244, 245, 0.55); }
.hero-avatar {
  position: relative; z-index: 2;
  width: clamp(200px, 23vw, 340px); aspect-ratio: 4 / 5;
  border-radius: 999px 999px 28px 28px; overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, 0.9), 0 0 120px -20px rgba(167, 139, 250, 0.35);
  will-change: transform;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.15) contrast(1.05); transform: scale(1.1); }
.avatar-ring { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), inset 0 -80px 80px -40px rgba(8,8,10,0.8); }
.hero-meta { position: absolute; z-index: 3; bottom: clamp(28px, 6vh, 64px); }
.hero-meta-left { left: clamp(20px, 4vw, 56px); max-width: 360px; }
.hero-meta-right { right: clamp(20px, 4vw, 56px); display: flex; flex-direction: column; align-items: flex-end; gap: 22px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; margin-bottom: 18px; border: 1px solid var(--border-strong); border-radius: 999px; background: rgba(16,16,19,0.6); backdrop-filter: blur(8px); font-size: 13px; color: var(--muted); }
.hero-line { font-family: var(--font-display); font-size: clamp(20px, 2vw, 26px); line-height: 1.25; letter-spacing: -0.01em; }
.hero-line em { font-style: normal; background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.line-mask { display: block; overflow: hidden; }
.line-mask > span { display: block; }
.hero-stats { display: flex; gap: 32px; text-align: right; }
.hero-stats b { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1.1; }
.hero-stats span { font-size: 12px; color: var(--dim); }
.scroll-hint { position: absolute; z-index: 3; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; color: var(--dim); letter-spacing: 0.15em; text-transform: uppercase; }
.scroll-hint i { width: 1px; height: 40px; background: linear-gradient(var(--text), transparent); animation: drip 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: 26px 0; border-block: 1px solid var(--border); background: var(--bg); position: relative; z-index: 2; }
.marquee-track { display: flex; gap: 56px; width: max-content; will-change: transform; }
.marquee-track span { font-family: var(--font-display); font-size: clamp(22px, 3vw, 36px); font-weight: 500; color: var(--dim); white-space: nowrap; }
.marquee-track span::after { content: '✦'; margin-left: 56px; color: var(--accent); font-size: 0.5em; vertical-align: middle; }

/* ---------- About ---------- */
.about-big { font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 50px); line-height: 1.2; letter-spacing: -0.025em; max-width: 22ch; max-width: 1100px; }
.about-big .w { opacity: 0.15; }
.about-cols { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 20px; margin-top: 80px; }
.about-photo-card { border-radius: 24px; padding: 32px; background: linear-gradient(160deg, rgba(167,139,250,0.14), rgba(34,211,238,0.05) 60%, transparent), var(--bg-2); border: 1px solid var(--border); }
.apc-inner { display: grid; gap: 4px; }
.apc-inner span { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 14px; }
.apc-inner span:first-child { margin-top: 0; }
.apc-inner b { font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skill-card { padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); transition: border-color 0.3s, background 0.3s; }
.skill-card:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.05); }
.skill-cat { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 30px 26px; min-height: 340px; border-radius: 24px;
  background: var(--bg-2); border: 1px solid var(--border);
  transition: border-color 0.4s, transform 0.5s var(--ease);
}
.service::before {
  content: ''; position: absolute; inset: auto -40% -60% -40%; height: 120%;
  background: radial-gradient(closest-side, rgba(167, 139, 250, 0.35), transparent);
  transform: translateY(40%); opacity: 0; transition: opacity 0.5s, transform 0.7s var(--ease);
}
.service:hover { border-color: var(--border-strong); transform: translateY(-6px); }
.service:hover::before { opacity: 1; transform: none; }
.service > * { position: relative; }
.svc-num { font-size: 13px; color: var(--accent); }
.service h3 { font-size: 24px; margin-top: auto; }
.service p { color: var(--muted); font-size: 15px; }

/* ---------- Experience (morph) ---------- */
.xp-list { display: grid; gap: 24px; }
.xp-card {
  position: relative; overflow: hidden; border-radius: 32px;
  background: var(--bg-2); border: 1px solid var(--border);
  padding: clamp(28px, 4vw, 56px);
  clip-path: inset(0 round 32px);
}
.xp-blob {
  position: absolute; z-index: 0; width: 520px; height: 520px; right: -140px; top: -180px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: blur(60px); opacity: 0.32;
  border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  animation: morph 12s ease-in-out infinite, spin 26s linear infinite;
}
.xp-blob.alt { left: -160px; right: auto; top: auto; bottom: -220px; background: linear-gradient(135deg, var(--accent-2), #f472b6); animation-delay: -5s, -9s; }
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
  25% { border-radius: 70% 30% 46% 54% / 30% 39% 61% 70%; }
  50% { border-radius: 30% 70% 38% 62% / 62% 30% 70% 38%; }
  75% { border-radius: 55% 45% 30% 70% / 40% 62% 38% 60%; }
}
@keyframes spin { to { rotate: 360deg; } }
.xp-content { position: relative; z-index: 1; max-width: 760px; }
.xp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.xp-year { font-size: 13px; color: var(--accent); }
.xp-card h3 { font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.03em; }
.xp-co { color: var(--muted); margin: 8px 0 24px; }
.xp-card ul { margin-bottom: 24px; }
.xp-card li { position: relative; padding-left: 24px; color: var(--muted); margin-bottom: 10px; font-size: 16px; }
.xp-card li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

/* ---------- Projects (stack) ---------- */
.stack { display: grid; gap: 40px; padding-bottom: 20px; }
.stack-card {
  position: sticky; top: calc(100px + var(--i) * 18px);
  display: grid; grid-template-columns: 1.2fr 1fr;
  height: min(76vh, 620px);
  border-radius: 32px; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--border-strong);
  box-shadow: 0 -30px 60px -30px rgba(0, 0, 0, 0.8);
  transform-origin: 50% 0%; will-change: transform;
}
.sc-media { position: relative; overflow: hidden; background: #0c0c0f; }
.sc-media img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; object-position: top center; will-change: transform; }
.sc-media.shots { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; background: var(--border); }
.sc-media.shots img { position: static; inset: auto; height: 100%; }
.sc-body { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(28px, 3.5vw, 48px); }
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sc-num { font-size: 13px; color: var(--dim); }
.stack-card h3 { font-size: clamp(36px, 4.5vw, 60px); letter-spacing: -0.035em; }
.sc-tag { font-weight: 500; margin-top: -8px; }
.sc-body > p:not(.sc-tag) { color: var(--muted); font-size: 15px; }
.sc-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Achievements ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ach-card { padding: 28px; border-radius: 24px; background: var(--card); border: 1px solid var(--border); transition: border-color 0.3s, transform 0.4s var(--ease); }
.ach-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.ach-num { display: block; font-family: var(--font-display); font-size: 56px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; margin-bottom: 26px; background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ach-card h3 { font-size: 19px; margin-bottom: 8px; }
.ach-card p { color: var(--muted); font-size: 14px; }

/* ---------- Contact ---------- */
.contact { padding: 160px 0 40px; overflow: hidden; }
.contact-marquee { overflow: hidden; }
.cm-track { display: flex; width: max-content; will-change: transform; }
.cm-track span { font-family: var(--font-display); font-weight: 700; font-size: clamp(64px, 12vw, 200px); letter-spacing: -0.05em; line-height: 1; white-space: nowrap; padding-right: 0.3em; }
.cm-track span:nth-child(even) { color: transparent; -webkit-text-stroke: 1.5px rgba(244,244,245,0.5); }
.contact-inner { width: min(var(--max), calc(100% - 32px)); margin: 60px auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 36px; }
.contact-inner > p { max-width: 520px; color: var(--muted); font-size: 18px; }
.contact-orb {
  width: 190px; height: 190px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg); font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.1;
  box-shadow: 0 30px 80px -20px rgba(167, 139, 250, 0.6);
  transition: box-shadow 0.3s;
}
.contact-orb:hover { box-shadow: 0 30px 100px -10px rgba(34, 211, 238, 0.7); }
.contact-mail { font-family: var(--font-display); font-size: clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--border-strong); padding-bottom: 4px; transition: border-color 0.3s; }
.contact-mail:hover { border-color: var(--accent); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.socials a { padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); font-size: 14px; transition: color 0.2s, border-color 0.2s; }
.socials a:hover { color: var(--text); border-color: var(--accent); }

footer { width: min(var(--max), calc(100% - 32px)); margin: 40px auto 0; padding: 28px 0 36px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--dim); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services, .ach-grid { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .about-cols { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav { padding: 8px 8px 8px 20px; }
  .nav-toggle { display: grid; place-items: center; gap: 5px; align-content: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid var(--border); cursor: pointer; }
  .nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text); transition: transform 0.3s var(--ease); }
  .nav.open .nav-toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .nav-links {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: rgba(16,16,19,0.96); border: 1px solid var(--border-strong); border-radius: 22px;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 12px 16px; font-size: 16px; border-radius: 14px; }
  .nav-links a.nav-cta { margin: 6px 0 0; text-align: center; }

  .hero { place-items: start center; padding-top: 22vh; }
  .hero-avatar { width: clamp(180px, 52vw, 260px); }
  .hero-meta-left { left: 20px; right: 20px; max-width: none; bottom: 150px; }
  .hero-meta-right { left: 20px; right: 20px; align-items: stretch; bottom: 60px; }
  .hero-stats { justify-content: space-between; text-align: left; gap: 16px; }
  .hero-stats b { font-size: 26px; }
  .hero-meta-right .btn { display: none; }
  .scroll-hint { display: none; }
  .section { padding-top: 110px; }

  .stack-card { position: relative; top: auto; grid-template-columns: 1fr; height: auto; }
  .sc-media { aspect-ratio: 16 / 10; }
  .sc-media.shots { aspect-ratio: 4 / 3; }
}

@media (max-width: 560px) {
  .hero { min-height: 720px; padding-top: 120px; }
  .hn-row { font-size: 21vw; }
  .hero-meta-left { bottom: 140px; }
  .services, .ach-grid, .skills-grid { grid-template-columns: 1fr; }
  .service { min-height: 0; }
  .service h3 { margin-top: 18px; }
  .contact-orb { width: 150px; height: 150px; font-size: 19px; }
  .xp-card { border-radius: 24px; }
  .stack-card { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .about-big .w { opacity: 1; }
}

/* ======================================================
   v3 additions: framed screenshots, more-projects grid,
   spotlight hover, smoother stack dimming
   ====================================================== */

/* Screenshots sit in a browser frame over a blurred copy, so nothing is cropped */
.sc-media { isolation: isolate; }
.sc-media .sc-bg { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(40px) saturate(1.4) brightness(0.55); transform: scale(1.1); z-index: -1; }
.browser {
  position: absolute; left: 7%; right: 7%; top: 50%; transform: translateY(-50%);
  border-radius: 14px; overflow: hidden; background: #0c0c0f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
  will-change: transform;
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: rgba(255, 255, 255, 0.05); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.browser-bar i:nth-child(1) { background: #ff5f57; } .browser-bar i:nth-child(2) { background: #febc2e; } .browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin-left: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.browser img { position: static; inset: auto; width: 100%; height: auto; max-height: 52vh; object-fit: contain; object-position: top; display: block; }
.sc-media.cover img { object-fit: cover; object-position: center; }
.sc-shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; border-radius: inherit; }
.private-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); padding: 9px 14px; border: 1px dashed var(--border-strong); border-radius: 999px; }
.private-tag::before { content: ''; width: 8px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -24px 0 36px; }
.filter {
  font: 500 14px var(--font-body); color: var(--muted); cursor: pointer;
  padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}
.filter sup { font-family: var(--font-mono); font-size: 10px; color: var(--accent); margin-left: 2px; }
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.active { color: var(--bg); background: var(--text); border-color: var(--text); }
.filter.active sup { color: var(--bg); }

/* More-projects grid */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pcard {
  --h: 260; --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; background: var(--bg-2); border: 1px solid var(--border);
  transform-style: preserve-3d; will-change: transform;
  transition: border-color 0.4s;
}
.pcard.hidden { display: none; }
.pcard:hover { border-color: var(--border-strong); }
.pc-cover {
  position: relative; height: 170px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 20px;
  background:
    radial-gradient(120% 90% at 0% 0%, hsla(var(--h), 85%, 62%, 0.55), transparent 60%),
    radial-gradient(90% 90% at 100% 100%, hsla(calc(var(--h) + 60), 85%, 55%, 0.4), transparent 60%),
    #0d0d11;
  border-bottom: 1px solid var(--border);
}
.pc-cover::before {
  content: ''; position: absolute; inset: 0; opacity: 0.35;
  background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
}
.pc-mono {
  position: absolute; right: 14px; top: 2px;
  font-family: var(--font-display); font-weight: 700; font-size: 96px; line-height: 1; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.8s var(--ease), -webkit-text-stroke-color 0.4s;
}
.pcard:hover .pc-mono { transform: translate(-8px, 8px) scale(1.08); -webkit-text-stroke-color: rgba(255, 255, 255, 0.7); }
.pc-cover code {
  position: relative; font-family: var(--font-mono); font-size: 11.5px; color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 10px; border-radius: 8px; align-self: flex-start; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.pc-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 24px; flex: 1; }
.pc-body h3 { font-size: 22px; }
.pc-body p { color: var(--muted); font-size: 14.5px; flex: 1; }
.pc-link { align-self: flex-start; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* Spotlight that follows the mouse */
.spot::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 3;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(167, 139, 250, 0.14), transparent 45%);
  opacity: 0; transition: opacity 0.4s;
}
.spot:hover::after { opacity: 1; }
.service.spot, .ach-card.spot, .skill-card.spot { position: relative; }

/* Hero aurora orbs */
.hero-orb { position: absolute; z-index: 0; width: 46vw; height: 46vw; max-width: 720px; max-height: 720px; border-radius: 50%; filter: blur(90px); opacity: 0.35; pointer-events: none; will-change: transform; }
.hero-orb.o1 { background: var(--accent); left: -12vw; top: -14vw; }
.hero-orb.o2 { background: var(--accent-2); right: -14vw; bottom: -18vw; opacity: 0.22; }

@media (max-width: 1024px) { .pgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .browser { left: 5%; right: 5%; }
  .browser img { max-height: none; }
  .sc-media:not(.shots):not(.cover) { aspect-ratio: auto; padding: 28px 0; }
  .sc-media:not(.shots):not(.cover) .browser { position: relative; top: auto; transform: none; margin: 0 auto; }
}
@media (max-width: 560px) {
  .pgrid { grid-template-columns: 1fr; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .filter { white-space: nowrap; }
}

/* ======================================================
   Case studies: sticky stage + scrolling steps
   ====================================================== */
.case-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; align-items: end; margin-bottom: 64px; }
.case-head .sec-title { margin-bottom: 0; }
.case-intro { color: var(--muted); font-size: 17px; }
.case-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.case-body { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: start; }
.case-stage { position: sticky; top: 90px; height: calc(100vh - 120px); max-height: 760px; display: grid; place-items: center; }
.stage-inner { position: relative; width: 100%; }
.case-steps { list-style: none; counter-reset: none; padding: 18vh 0 22vh; display: grid; gap: 34vh; }
.case-step { position: relative; padding: 28px 28px 28px 30px; border-radius: 22px; border: 1px solid var(--border); background: var(--bg-2); opacity: 0.35; transform: scale(0.97); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.6s; }
.case-step::before { content: ''; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2)); transform: scaleY(0); transform-origin: top; transition: transform 0.7s var(--ease); }
.case-step.is-active { opacity: 1; transform: none; border-color: var(--border-strong); }
.case-step.is-active::before { transform: none; }
.step-kicker { font-size: 12px; color: var(--accent); letter-spacing: 0.05em; }
.case-step h3 { font-size: 26px; margin: 10px 0 12px; letter-spacing: -0.02em; }
.case-step p { color: var(--muted); font-size: 15.5px; margin-bottom: 16px; }
.case-step code { font-family: var(--font-mono); font-size: 0.9em; color: var(--text); }

/* Saath devices */
.saath-stage .stage-inner { padding-bottom: 60px; }
.device-laptop { position: relative; width: 92%; border-radius: 14px; overflow: hidden; background: #0c0c0f; border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 50px 100px -30px rgba(0,0,0,0.9), 0 0 120px -40px rgba(74, 222, 128, 0.35); }
.device-laptop .screen { position: relative; aspect-ratio: 16 / 10; }
.device-phone { position: absolute; right: 0; bottom: 0; width: 30%; aspect-ratio: 390 / 844; border-radius: 30px; padding: 8px; background: #050506; border: 1px solid rgba(255,255,255,0.18); box-shadow: 0 40px 80px -20px rgba(0,0,0,0.9); }
.device-phone .screen { position: relative; width: 100%; height: 100%; border-radius: 23px; overflow: hidden; background: #eef5f1; }
.device-phone .notch { position: absolute; z-index: 3; top: 13px; left: 50%; width: 30%; height: 14px; transform: translateX(-50%); border-radius: 10px; background: #050506; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.04); transition: opacity 0.7s var(--ease), transform 1.2s var(--ease); }
[data-active="0"] .screen img[data-show="0"], [data-active="1"] .screen img[data-show="1"], [data-active="2"] .screen img[data-show="2"], [data-active="3"] .screen img[data-show="3"], [data-active="4"] .screen img[data-show="4"] { opacity: 1; transform: none; }
.stage-dots { position: absolute; left: 0; bottom: 8px; display: flex; gap: 8px; }
.stage-dots i { width: 22px; height: 4px; border-radius: 4px; background: var(--border-strong); transition: background 0.4s, width 0.4s var(--ease); }
[data-active="0"] .stage-dots i:nth-child(1), [data-active="1"] .stage-dots i:nth-child(2), [data-active="2"] .stage-dots i:nth-child(3), [data-active="3"] .stage-dots i:nth-child(4), [data-active="4"] .stage-dots i:nth-child(5) { width: 44px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Deep Research OS pipeline */
.pipeline { width: 100%; max-height: 64vh; display: block; overflow: visible; }
.pipeline .edge { fill: none; stroke: url(#edgeGrad); stroke-width: 2; stroke-dasharray: 400; stroke-dashoffset: 400; opacity: 0.25; transition: stroke-dashoffset 1.1s var(--ease), opacity 0.6s; }
.pipeline .edge.loop { stroke-dasharray: 6 6; stroke-dashoffset: 0; opacity: 0; }
.pipeline .node rect { fill: #121217; stroke: rgba(255,255,255,0.14); stroke-width: 1; transition: fill 0.6s, stroke 0.6s, filter 0.6s; }
.pipeline .node text, .pipeline .loop-label { font: 500 15px var(--font-display); fill: var(--dim); text-anchor: middle; transition: fill 0.6s; }
.pipeline .loop-label { font: 11px var(--font-mono); fill: var(--accent); opacity: 0; transition: opacity 0.6s; transform: rotate(-90deg); transform-box: fill-box; transform-origin: center; }
.pipeline .node.on rect { fill: rgba(167, 139, 250, 0.16); stroke: var(--accent); filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.55)); }
.pipeline .node.on text { fill: var(--text); }
.pipeline .node.report.on rect { fill: rgba(34, 211, 238, 0.18); stroke: var(--accent-2); filter: drop-shadow(0 0 16px rgba(34, 211, 238, 0.6)); }
.pipeline .edge.on { stroke-dashoffset: 0; opacity: 1; }
.pipeline .edge.loop.on { opacity: 0.9; animation: dash 1s linear infinite; }
.pipeline .loop-label.on { opacity: 1; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.dro-shot { position: absolute; right: -6%; bottom: -4%; width: 46%; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.9); opacity: 0; transform: translateY(20px) scale(0.95); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.dro-shot .browser-bar { padding: 6px 8px; } .dro-shot .browser-bar i { width: 6px; height: 6px; }
[data-active="4"] .dro-shot { opacity: 1; transform: none; }
.dro-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dro-stats div { padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); }
.dro-stats b { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1.1; background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dro-stats span { font-size: 12px; color: var(--dim); }

@media (max-width: 960px) {
  .case-head { grid-template-columns: 1fr; }
  .case-body { grid-template-columns: 1fr; gap: 0; }
  .case-stage { top: 72px; height: auto; z-index: 2; padding: 14px 0 18px; background: linear-gradient(var(--bg) 82%, transparent); }
  .saath-stage .stage-inner { max-width: 440px; margin: 0 auto; padding-bottom: 40px; }
  .dro-stage .stage-inner { max-width: 340px; margin: 0 auto; }
  .pipeline { max-height: 40vh; }
  .dro-shot { display: none; }
  .case-steps { padding: 4vh 0 10vh; gap: 16vh; }
  .case-step h3 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .case-step { opacity: 1; transform: none; } }
@media (min-width: 861px) and (max-width: 1140px) { .nav-links a[href="#services"], .nav-links a[href="#about"] { display: none; } }

/* ======================================================
   v5: neural canvas, spin badge, xp progress line,
   big footer name, back-to-top ring, scramble labels
   ====================================================== */
.neural { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.55; }

.spin-badge {
  position: absolute; z-index: 4; width: 120px; height: 120px;
  left: calc(50% - clamp(200px, 23vw, 340px) / 2 - 70px); top: calc(50% + clamp(200px, 23vw, 340px) * 0.38);
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(16, 16, 19, 0.7); border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.spin-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spinSlow 14s linear infinite; }
.spin-badge text { font: 500 10.5px var(--font-mono); letter-spacing: 0.12em; fill: var(--text); }
.sb-core { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--bg); font-size: 20px; font-weight: 600; transition: transform 0.5s var(--ease); }
.spin-badge:hover .sb-core { transform: rotate(45deg) scale(1.1); }
.spin-badge:hover svg { animation-duration: 4s; }
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* Experience progress line */
.xp-list { position: relative; padding-left: 44px; }
.xp-line { position: absolute; left: 12px; top: 24px; bottom: 24px; width: 2px; background: var(--border); border-radius: 2px; }
.xp-line i { position: absolute; inset: 0; background: linear-gradient(var(--accent), var(--accent-2)); transform-origin: top; transform: scaleY(0); border-radius: 2px; box-shadow: 0 0 14px rgba(167, 139, 250, 0.6); }
.xp-dot { position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border-strong); transition: background 0.5s, border-color 0.5s, box-shadow 0.5s, transform 0.5s var(--ease); }
.xp-dot.lit { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px rgba(167, 139, 250, 0.18); transform: scale(1.15); }

/* Big footer name */
.big-name { width: min(var(--max), calc(100% - 32px)); margin: 120px auto 0; display: flex; flex-direction: column; line-height: 0.82; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.055em; font-size: clamp(64px, 15.5vw, 230px); overflow: hidden; user-select: none; }
.big-name .split-chars { display: block; white-space: nowrap; }
.big-name .outline { color: transparent; -webkit-text-stroke: 1.5px rgba(244, 244, 245, 0.4); align-self: flex-end; }
.big-name .c { display: inline-block; transition: color 0.3s; }
.big-name .split-chars:not(.outline) .c:hover { color: var(--accent); }

/* Back to top */
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 95; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: rgba(16, 16, 19, 0.8); border: 1px solid var(--border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transform: translateY(20px) scale(0.8); pointer-events: none; transition: opacity 0.4s, transform 0.5s var(--ease), border-color 0.3s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--accent); }
.to-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top circle { fill: none; stroke-width: 2; }
.tt-track { stroke: var(--border); }
.tt-ring { stroke: url(#edgeGrad); stroke: var(--accent); stroke-dasharray: 132; stroke-dashoffset: 132; stroke-linecap: round; }
.to-top span { font-size: 18px; }

/* Shine sweep on primary buttons */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(167, 139, 250, 0.45), transparent); transform: skewX(-20deg); transition: left 0.7s var(--ease); }
.btn-primary:hover::after { left: 130%; }

/* Animated gradient border on hovered cards */
.service, .ach-card, .pcard, .case-step.is-active { --angle: 0deg; }
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.pcard::before, .service::before { content: none; }
.glow-border { position: relative; }
.glow-border::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: 4; pointer-events: none;
  background: conic-gradient(from var(--angle), transparent 0 70%, var(--accent) 80%, var(--accent-2) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s; animation: spinAngle 3s linear infinite;
}
.glow-border:hover::before { opacity: 1; }
@keyframes spinAngle { to { --angle: 360deg; } }

@media (max-width: 860px) {
  .spin-badge { width: 92px; height: 92px; left: calc(50% - clamp(180px, 52vw, 260px) / 2 - 36px); top: calc(22vh + clamp(180px, 52vw, 260px) * 0.95); }
  .spin-badge text { font-size: 10px; }
  .sb-core { width: 34px; height: 34px; font-size: 16px; }
  .xp-list { padding-left: 30px; }
  .xp-line { left: 6px; }
  .neural { opacity: 0.35; }
}
@media (max-width: 560px) { .spin-badge { top: calc(120px + clamp(180px, 52vw, 260px) * 1.0); } .to-top { right: 14px; bottom: 14px; width: 46px; height: 46px; } }
@media (prefers-reduced-motion: reduce) { .neural { display: none; } .xp-line i { transform: none; } }
@media (max-width: 860px) {
  .spin-badge { left: calc(50% + clamp(180px, 52vw, 260px) / 2 - 58px); top: calc(22vh + clamp(180px, 52vw, 260px) * 0.62); }
  footer { padding-right: 64px; }
}
@media (max-width: 560px) { .spin-badge { top: calc(120px + clamp(180px, 52vw, 260px) * 0.66); } }

/* Formula achievement card */
.ach-num.formula { font-family: 'Times New Roman', Georgia, serif; font-style: normal; font-weight: 400; font-size: 34px; letter-spacing: 0; white-space: nowrap; display: flex; align-items: center; gap: 2px; }
.ach-num.formula i { font-style: italic; }
.ach-num.formula sup { font-size: 0.5em; align-self: flex-start; margin-top: -2px; }
.formula .integral { position: relative; display: inline-flex; align-items: center; font-size: 1.5em; line-height: 1; margin: 0 10px 0 2px; }
.formula .integral sub, .formula .integral sup { position: absolute; left: 0.6em; font-size: 0.32em; }
.formula .integral sup { top: -0.2em; margin: 0; } .formula .integral sub { bottom: -0.15em; }
.ach-num.formula { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text); -webkit-text-fill-color: currentColor; padding: 6px 0; overflow: visible; }
.ach-num.formula i { color: var(--accent); }
.formula .integral { color: var(--accent-2); }
.formula .integral sub, .formula .integral sup { color: var(--muted); font-style: italic; }
.formula .integral { margin: 0 16px 0 8px; }
.formula .integral sup { left: 0.62em; top: -0.42em; }
.formula .integral sub { left: 0.3em; bottom: -0.3em; }
.formula .integral sup { left: 0.78em; top: -0.38em; }
.formula .integral sub { left: 0.5em; bottom: -0.38em; }
