/* ============================================================
   SUPREET KOTHURI — PORTFOLIO v2
   Advanced motion · scroll-driven · futuristic
   ============================================================ */

:root {
  --bg: #06070a;
  --bg-2: #0c0e12;
  --fg: #f2f3f5;
  --fg-dim: #8b9099;
  --fg-dimmer: #5a6068;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: oklch(0.88 0.18 130);
  --accent-cyan: oklch(0.82 0.13 210);
  --accent-magenta: oklch(0.78 0.18 340);
  --accent-amber: oklch(0.84 0.15 75);
  --accent-lime: oklch(0.88 0.18 130);

  --maxw: 1360px;
  --pad: clamp(20px, 4vw, 56px);

  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv01";
  overflow-x: clip; /* `clip` instead of `hidden` so sticky positioning still works */
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--accent); font-feature-settings: "ss01"; }
strong { font-weight: 600; color: var(--fg); }

::selection { background: var(--accent); color: #0a0a0a; }

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.dim { color: var(--fg-dim); }

/* ============================================================
   CANVAS / GLOBAL FX
   ============================================================ */
.particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(180, 255, 100, 0.10), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(120, 200, 255, 0.08), transparent 70%),
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 80px 80px,
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============================================================
   SCROLL PROGRESS RAIL
   ============================================================ */
.scroll-rail {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 100;
  background: rgba(255,255,255,0.04);
}
.scroll-rail-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 12px var(--accent);
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.has-custom-cursor { cursor: none; }
.has-custom-cursor a, .has-custom-cursor button { cursor: none; }

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  margin-left: -3px;
  margin-top: -3px;
  transform: translate3d(-100px, -100px, 0);
}

.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.cursor-ring {
  width: 36px; height: 36px;
  margin-left: -18px;
  margin-top: -18px;
  border: 1px solid var(--accent);
  opacity: 0.55;
  transition: width .25s, height .25s, margin .25s, background .25s, border-color .25s;
}

.cursor-ring.is-hover {
  width: 64px; height: 64px;
  margin-left: -32px;
  margin-top: -32px;
  background: rgba(180, 255, 100, 0.12);
  border-color: var(--accent);
  opacity: 0.8;
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
  .has-custom-cursor, .has-custom-cursor a, .has-custom-cursor button { cursor: auto; }
}

/* ============================================================
   LAYOUT BASE
   ============================================================ */
main { position: relative; z-index: 1; }

.section {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 120px) var(--pad);
}

.section-title {
  font-size: clamp(38px, 5.5vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 clamp(28px, 4vw, 56px) 0;
  text-wrap: balance;
}

.section-title-tight { margin-bottom: 24px; }

.section-sub {
  max-width: 56ch;
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--fg-dim);
  line-height: 1.55;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-dim);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(8px);
}

.section-label .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: blink 2s ease-in-out infinite;
}

.accent-line { color: var(--accent); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 2px; left: 0; right: 0;
  z-index: 50;
  transition: backdrop-filter .3s, background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: rgba(6, 7, 10, 0.6);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.brand-mark {
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 16px var(--accent);
  transform: rotate(45deg);
  animation: pulse 3s ease-in-out infinite;
}

/* ============================================================
   MOTION CSS — animation primitives driven by .in-view class
   ============================================================ */
.reveal {
  opacity: 1; /* base: VISIBLE — animations enhance but never block */
  transform: translate3d(var(--rv-x, 0px), var(--rv-y, 32px), 0);
  transition:
    opacity var(--rv-duration, .9s) cubic-bezier(.16, 1, .3, 1) var(--rv-delay, 0s),
    transform var(--rv-duration, .9s) cubic-bezier(.16, 1, .3, 1) var(--rv-delay, 0s);
  will-change: transform;
}
.reveal:not(.in-view) {
  opacity: 0;
  transform: translate3d(var(--rv-x, 0px), var(--rv-y, 32px), 0);
}
.reveal.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.clip-reveal {
  clip-path: inset(100% 0 0 0);
  -webkit-clip-path: inset(100% 0 0 0);
  transition:
    clip-path var(--cv-duration, 1.2s) cubic-bezier(.77, 0, .18, 1) var(--cv-delay, 0s),
    -webkit-clip-path var(--cv-duration, 1.2s) cubic-bezier(.77, 0, .18, 1) var(--cv-delay, 0s);
}
.clip-reveal.clip-down { clip-path: inset(0 0 100% 0); -webkit-clip-path: inset(0 0 100% 0); }
.clip-reveal.clip-left { clip-path: inset(0 100% 0 0); -webkit-clip-path: inset(0 100% 0 0); }
.clip-reveal.clip-right { clip-path: inset(0 0 0 100%); -webkit-clip-path: inset(0 0 0 100%); }
.clip-reveal.in-view {
  clip-path: inset(0 0 0 0);
  -webkit-clip-path: inset(0 0 0 0);
}

@keyframes splitCharIn {
  from { opacity: 0; transform: translate3d(0, var(--split-y, 60px), 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Base: ALWAYS VISIBLE. Animation enhances but never required for visibility. */
.split-char {
  display: inline-block;
  opacity: 1;
  animation: splitCharIn .9s cubic-bezier(.16, 1, .3, 1) backwards;
  animation-delay: var(--char-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .clip-reveal { opacity: 1 !important; transform: none !important; clip-path: none !important; -webkit-clip-path: none !important; }
  .split-char { animation: none !important; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: rotate(45deg) scale(1); }
  50% { opacity: 0.55; transform: rotate(45deg) scale(0.8); }
}

.brand-dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  color: var(--fg-dim);
}

.nav-links a {
  position: relative;
  transition: color .2s;
}

.nav-links a:hover { color: var(--fg); }

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}

.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--fg);
  transition: background .25s, border-color .25s, color .25s;
}

.nav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(140px, 18vh, 200px) var(--pad) clamp(60px, 8vw, 100px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(40px, 6vw, 80px);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--fg-dim);
  transition: transform .15s linear, opacity .2s linear;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}

.status-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(64px, 16vw, 260px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
  text-align: center;
  will-change: transform, filter, opacity;
  transition: transform .1s linear, filter .1s linear, opacity .2s linear;
}

.hero-line { display: block; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  transition: transform .15s linear, opacity .2s linear;
}

@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-tagline p {
  margin: 0;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--fg);
  max-width: 50ch;
  font-weight: 400;
}

.hero-tagline em {
  font-style: normal;
  color: var(--accent);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

@media (max-width: 800px) {
  .hero-cta-row { justify-content: flex-start; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, border-color .25s, color .25s, transform .25s;
}

.has-custom-cursor .btn { cursor: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}

.btn-primary:hover {
  background: #fff;
  border-color: #fff;
}

.btn-ghost { color: var(--fg); background: rgba(255,255,255,0.02); }
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg { padding: 18px 28px; font-size: 14px; }

.hero-foot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--fg-dim);
}

.hero-foot-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-foot-col span:last-child { color: var(--fg); }

.scroll-hint {
  animation: scrollHint 2s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@media (max-width: 800px) {
  .hero-foot { grid-template-columns: repeat(2, 1fr); }
}

/* Hero corner labels */
.hero-corner-tl, .hero-corner-tr, .hero-corner-bl, .hero-corner-br {
  position: absolute;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--fg-dimmer);
  pointer-events: none;
}
.hero-corner-tl { top: 90px; left: var(--pad); }
.hero-corner-tr { top: 90px; right: var(--pad); }
.hero-corner-bl { bottom: 24px; left: var(--pad); }
.hero-corner-br { bottom: 24px; right: var(--pad); }
@media (max-width: 720px) {
  .hero-corner-tl, .hero-corner-tr, .hero-corner-bl, .hero-corner-br { display: none; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  gap: 32px;
  will-change: transform;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: clamp(16px, 1.4vw, 22px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}

.marquee-sep { color: var(--accent); font-size: 0.7em; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-sticky {
  position: sticky;
  top: 100px;
}

.about-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.005));
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.about-card-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}

.about-card-body { padding: 24px; }

.about-avatar {
  aspect-ratio: 1;
  width: 100%;
  max-width: 240px;
  margin: 0 auto 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(180,255,100,0.12), transparent 70%);
  position: relative;
  box-shadow: 0 0 40px rgba(180, 255, 100, 0.15), inset 0 0 0 1px rgba(255,255,255,0.04);
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05);
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}

.about-card:hover .about-avatar img {
  transform: scale(1.05);
}

.about-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.about-card-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11px;
}

.about-card-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.about-card-stats > div:last-child { border-bottom: 0; padding-bottom: 0; }
.about-card-stats .tier { color: var(--accent); }

.about-body { display: flex; flex-direction: column; gap: 18px; }
.about-p {
  margin: 0;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--fg-dim);
}
.about-body strong { color: var(--fg); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
  overflow: hidden;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  background: rgba(6,7,10,0.95);
  transition: background .25s;
}
.stat:hover { background: rgba(180,255,100,0.04); }

.stat-num {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
}

.stat-label { color: var(--fg-dim); }

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
.timeline-wrap {
  position: relative;
  padding: clamp(28px, 4vw, 44px) 0 clamp(28px, 4vw, 44px) 60px;
  background:
    radial-gradient(ellipse 80% 60% at 0% 50%, rgba(180,255,100,0.06), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}

.timeline-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(180,255,100,0.04) 1px, transparent 1px);
  background-size: 80px 100%;
  pointer-events: none;
  opacity: 0.5;
}

.timeline-rail {
  position: absolute;
  left: 17px;
  top: 70px;
  bottom: 70px;
  width: 1px;
  background: var(--line-strong);
  overflow: hidden;
}
.timeline-rail-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--accent), var(--accent-cyan));
  transform: scaleY(0);
  transform-origin: top;
  box-shadow: 0 0 16px var(--accent);
}

.timeline {
  list-style: none;
  padding: 0 clamp(20px, 3vw, 32px) 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.timeline-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
}

.timeline-marker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 30px;
  position: relative;
  margin-left: -60px;
}

.timeline-node {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 0 14px var(--accent), inset 0 0 0 1px rgba(0,0,0,0.4);
  margin-left: 9px;
  position: relative;
}

.timeline-node::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-node::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.3;
  animation: nodePulse 2.4s ease-out infinite;
}

@keyframes nodePulse {
  0%   { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

.timeline-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 2.4vw, 32px);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  backdrop-filter: blur(6px);
  transition: border-color .3s, transform .3s, background .3s;
  overflow: hidden;
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 0% 0%, rgba(180,255,100,0.10), transparent 60%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}

.timeline-card:hover {
  border-color: var(--accent);
  transform: translateX(6px);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
}

.timeline-card:hover::before { opacity: 1; }

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.timeline-head h3 {
  margin: 0;
  font-size: clamp(20px, 1.9vw, 28px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.timeline-org {
  margin: 4px 0 0;
  color: var(--fg-dim);
  font-size: 14px;
}

.timeline-bullets {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-bullets li {
  position: relative;
  padding-left: 18px;
  color: var(--fg-dim);
  line-height: 1.6;
  font-size: 15px;
}

.timeline-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 8px; height: 1px;
  background: var(--accent);
}

@media (max-width: 700px) {
  .timeline-wrap { padding-left: 0; }
  .timeline-rail { left: 6px; }
  .timeline-row { grid-template-columns: 1fr; }
  .timeline-marker { margin-left: -20px; padding-top: 0; }
}

/* ============================================================
   CHIPS
   ============================================================ */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--fg-dim);
  background: rgba(255,255,255,0.015);
  transition: border-color .2s, color .2s, background .2s;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip-lg {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--fg);
}

/* ============================================================
   PROJECTS — PINNED HORIZONTAL SCROLL
   ============================================================ */
.projects-pin {
  position: relative;
  /* Tall section: each card ≈ 0.75 viewports of scroll */
  height: 360vh;
  width: 100%;
}

.projects-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(80px, 10vw, 120px) 0 40px;
  max-width: 100vw;
}

.projects-head {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px;
}

.projects-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--fg-dim);
}

.proj-progress {
  flex: 1;
  max-width: 360px;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}

.proj-progress-fill {
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 8px var(--accent);
}

.proj-track-mask {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 0;
}

.proj-track {
  display: flex;
  gap: 24px;
  padding: 0 var(--pad);
  height: 100%;
  align-items: center;
  will-change: transform;
}

.proj-cell {
  flex: 0 0 min(760px, 88vw);
  height: min(560px, 70vh);
  display: flex;
}

.proj-cell-end {
  flex-basis: min(560px, 80vw);
  align-items: center;
  justify-content: center;
}

.proj-end {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
}
.proj-end h3 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.proj-end p { margin: 0; color: var(--fg-dim); max-width: 36ch; }

/* Project Card */
.proj.accent-lime    { --accent: var(--accent-lime); }
.proj.accent-cyan    { --accent: var(--accent-cyan); }
.proj.accent-magenta { --accent: var(--accent-magenta); }
.proj.accent-amber   { --accent: var(--accent-amber); }

.proj {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.005));
  backdrop-filter: blur(8px);
  transition: border-color .3s;
  transform-style: preserve-3d;
  will-change: transform;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.proj:hover { border-color: var(--accent); }

.proj-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}

.proj:hover .proj-glow { opacity: 1; }

.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--fg-dim);
}

.proj-cat { color: var(--accent); }

.proj-visual {
  border: 1px solid var(--line);
  border-radius: 14px;
  flex: 1;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.04), transparent 70%);
  min-height: 180px;
}

.proj-svg { width: 100%; height: 100%; display: block; }
.proj-svg .proj-mono {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.proj-body { display: flex; flex-direction: column; gap: 14px; }

.proj-title {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.proj-blurb {
  margin: 0;
  font-size: 15px;
  color: var(--fg-dim);
  line-height: 1.55;
}

.proj-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.metric { display: flex; flex-direction: column; gap: 4px; }
.metric-v { color: var(--fg); font-size: 15px; font-weight: 500; }

@media (max-width: 800px) {
  /* Disable pin on mobile — too laggy. Stack instead. */
  .projects-pin { height: auto; }
  .projects-sticky {
    position: static;
    height: auto;
    padding: 80px 0;
  }
  .proj-track-mask { overflow: visible; }
  .proj-track {
    flex-direction: column;
    transform: none !important;
    width: 100%;
    height: auto;
  }
  .proj-cell { flex: 0 0 auto; width: 100%; height: auto; min-height: 480px; }
}

/* ============================================================
   ACHIEVEMENTS
   ============================================================ */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
}

.ach-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
  transition: border-color .3s, transform .3s, background .3s;
  overflow: hidden;
}

.ach-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(180,255,100,0.10), transparent 50%);
  opacity: 0;
  transition: opacity .3s;
}

.ach-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.ach-card:hover::before { opacity: 1; }

.ach-n {
  font-size: clamp(40px, 4vw, 60px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}

.ach-prefix {
  font-size: 0.45em;
  margin-right: 6px;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.ach-l {
  font-size: 17px;
  color: var(--fg);
  font-weight: 500;
}

.ach-s {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.5;
  margin-top: auto;
}

.ach-corner {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 10px;
  color: var(--fg-dimmer);
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 800px) {
  .skills-grid { grid-template-columns: 1fr; }
}

.skill-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.015);
  backdrop-filter: blur(6px);
  transition: border-color .3s;
}

.skill-col:hover { border-color: var(--accent); }

.skill-head { color: var(--fg-dim); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  text-align: center;
  padding-bottom: clamp(120px, 16vw, 200px);
}

.contact-title {
  font-size: clamp(48px, 9vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 500;
  margin: 16px 0 48px 0;
  text-wrap: balance;
}

.contact-line { display: block; }

.contact-cta-row {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px 40px;
  color: var(--fg-dim);
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: color .25s;
}

.contact-links a:hover { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 28px var(--pad);
  color: var(--fg-dim);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .clip-reveal, .split-char {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    animation: none !important;
  }
}
