/* samkitshah.in · vision theme */
:root {
  --bg: #07080f;
  --bg-2: #0d0f1c;
  --ink: #f3eee6;
  --muted: #a8a6b3;
  --faint: rgba(243, 238, 230, 0.08);
  --line: rgba(243, 238, 230, 0.12);
  --warm: #ffa577;
  --rose: #f472b6;
  --violet: #a78bfa;
  --sky: #7dd3fc;
  --grad: linear-gradient(100deg, var(--warm) 0%, var(--rose) 45%, var(--violet) 100%);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(244, 114, 182, 0.35); }
a { color: inherit; }
img { max-width: 100%; }

/* ---------- Background layers ---------- */
#synapse { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.aurora { position: fixed; inset: 0; z-index: -3; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.22; mix-blend-mode: screen;
  animation: drift 28s var(--ease) infinite alternate;
}
.aurora i:nth-child(1) { background: var(--violet); top: -25vmax; left: -15vmax; }
.aurora i:nth-child(2) { background: var(--rose); top: 30vh; right: -25vmax; animation-duration: 34s; opacity: 0.14; }
.aurora i:nth-child(3) { background: var(--warm); bottom: -35vmax; left: 20vw; animation-duration: 40s; opacity: 0.12; }
@keyframes drift { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.15); } }
.grain {
  position: fixed; inset: 0; z-index: -1; 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");
}
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 50; width: min(1100px, calc(100% - 28px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 20px; border-radius: 999px;
  background: rgba(13, 15, 28, 0.55); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: background 0.3s;
}
.nav.scrolled { background: rgba(13, 15, 28, 0.82); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.2px; text-decoration: none; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 14px var(--rose); }
.nav nav { display: flex; gap: 4px; }
.nav nav a {
  font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav nav a:hover, .nav nav a.active { color: var(--ink); background: var(--faint); }
@media (max-width: 720px) { .nav nav { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font: 500 15px/1 var(--sans);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transform: translate(var(--mx), var(--my));
  transition: transform 0.35s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.35s;
}
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 10px 40px -8px rgba(244, 114, 182, 0.6); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: rgba(243, 238, 230, 0.35); background: var(--faint); }

/* ---------- Layout ---------- */
main { width: min(1100px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 120px 0 40px; }
.eyebrow { font: 500 13px/1 var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h2 {
  font-family: var(--serif); font-size: clamp(36px, 5.2vw, 64px); line-height: 1.05;
  letter-spacing: -0.02em; max-width: 16ch;
}
h2 em, h1 em, .lede em {
  font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-lede { color: var(--muted); font-size: 19px; max-width: 60ch; margin: 24px 0 0; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 140px 0 60px; }
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); font: 500 13px/1 var(--mono); color: var(--muted); margin: 0 0 30px;
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #6ee7b7; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid #6ee7b7; animation: ping 2s var(--ease) infinite; }
@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
h1 {
  font-family: var(--serif); font-weight: 350; font-size: clamp(46px, 8.4vw, 112px);
  line-height: 0.98; letter-spacing: -0.035em; max-width: 13ch;
}
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.split.in .w > span { transform: none; }
.rotator { display: inline-block; }
.rotator-word {
  display: inline-block; font-style: italic;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), filter 0.45s;
}
.rotator-word.out { opacity: 0; transform: translateY(-0.25em); filter: blur(8px); }
.lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--muted); max-width: 58ch; margin: 34px 0 0; }
.lede em { font-style: normal; font-weight: 500; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 80px 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stats > div { background: rgba(10, 12, 22, 0.75); padding: 26px 24px; backdrop-filter: blur(10px); }
.stats dt { font-family: var(--serif); font-size: clamp(34px, 4vw, 48px); line-height: 1; letter-spacing: -0.02em; }
.stats dd { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Marquee ---------- */
.marquee {
  margin: 30px calc(50% - 50vw) 0; padding: 22px 0; overflow: hidden;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { font-family: var(--serif); font-style: italic; font-size: 26px; color: rgba(243, 238, 230, 0.55); white-space: nowrap; }
.marquee-track span::before { content: "✦"; font-style: normal; font-size: 14px; margin-right: 56px; color: var(--rose); vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Compression visual ---------- */
.compress {
  margin: 56px 0 0; padding: 32px; border-radius: var(--radius);
  border: 1px solid var(--line); background: rgba(13, 15, 28, 0.6); backdrop-filter: blur(12px);
  display: grid; gap: 22px;
}
.compress-row { display: grid; grid-template-columns: 170px 1fr 90px; align-items: center; gap: 20px; }
.compress-label { font: 500 13px/1.3 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.compress-track { height: 12px; border-radius: 99px; background: var(--faint); overflow: hidden; }
.compress-bar { height: 100%; border-radius: inherit; width: 0; transition: width 2.2s var(--ease) 0.2s; }
.compress-slow { background: repeating-linear-gradient(90deg, rgba(243,238,230,.35) 0 10px, rgba(243,238,230,.15) 10px 20px); }
.compress-fast { background: var(--grad); box-shadow: 0 0 24px rgba(244, 114, 182, 0.55); transition-delay: 1.1s; }
.compress.in .compress-slow { width: 100%; }
.compress.in .compress-fast { width: 12%; }
.compress-value { font-family: var(--serif); font-size: 22px; font-style: italic; text-align: right; }
.compress-value.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 640px) {
  .compress-row { grid-template-columns: 1fr auto; }
  .compress-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Bento + cards ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 16px; }
.tile, .card, .panel {
  --x: 50%; --y: 50%;
  position: relative; border-radius: var(--radius); border: 1px solid var(--line);
  background: rgba(13, 15, 28, 0.62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 30px; overflow: hidden; isolation: isolate;
  transition: border-color 0.3s, transform 0.5s var(--ease);
}
.tile::before, .card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(167, 139, 250, 0.16), transparent 60%);
}
.tile:hover::before, .card:hover::before { opacity: 1; }
.tile:hover, .card:hover { border-color: rgba(243, 238, 230, 0.24); }
.tile { grid-column: span 2; }
.tile-key { grid-column: span 6; display: grid; grid-template-columns: auto 1fr; column-gap: 26px; align-items: center;
  background: linear-gradient(120deg, rgba(255,165,119,.10), rgba(167,139,250,.10)), rgba(13,15,28,.62); }
.tile-key .tile-icon { grid-row: span 2; margin: 0; }
.tile-icon { width: 52px; height: 52px; margin-bottom: 22px; }
.tile-icon svg { width: 100%; height: 100%; fill: none; stroke: var(--warm); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile:nth-child(2) .tile-icon svg { stroke: var(--rose); }
.tile:nth-child(3) .tile-icon svg { stroke: var(--sky); }
.tile-key .tile-icon svg { stroke: var(--violet); }
.tile h3, .card h3 { font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em; }
.tile p, .card p { color: var(--muted); margin: 10px 0 0; font-size: 16px; }
@media (max-width: 860px) { .tile { grid-column: span 6; } .tile-key { grid-template-columns: 1fr; } .tile-key .tile-icon { margin-bottom: 22px; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.card { text-decoration: none; display: flex; flex-direction: column; min-height: 340px; transform-style: preserve-3d; }
.card-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 60px; flex-wrap: wrap; }
.tag, .badge { font: 500 12px/1 var(--mono); padding: 7px 11px; border-radius: 999px; letter-spacing: 0.4px; }
.tag { border: 1px solid var(--line); color: var(--muted); }
.badge { background: var(--grad); color: #1a0f1f; font-weight: 600; }
.card h3 { font-size: 32px; }
.card-link { margin-top: auto; padding-top: 26px; font-size: 14px; font-weight: 500; display: inline-flex; gap: 6px; }
.card-link span { transition: transform 0.3s var(--ease); }
.card:hover .card-link span { transform: translateX(5px); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } .card { min-height: 0; } }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 60px 0 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 190px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--rose), var(--violet) 40%, var(--line));
}
.t-item { display: grid; grid-template-columns: 190px 1fr; gap: 0 48px; padding: 0 0 46px; position: relative; }
.t-item::before {
  content: ""; position: absolute; left: 185px; top: 8px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--rose); box-shadow: 0 0 0 5px var(--bg), 0 0 18px rgba(244, 114, 182, 0.6);
}
.t-when { font: 500 13px/1.5 var(--mono); color: var(--muted); padding-top: 4px; }
.t-body h3 { font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em; }
.at { font-family: var(--sans); font-size: 16px; color: var(--muted); }
.at a { color: var(--ink); text-decoration-color: rgba(243, 238, 230, 0.3); text-underline-offset: 3px; }
.t-body ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.t-body li { margin: 6px 0; }
.t-body li::marker { color: var(--rose); }
.t-body li a { color: var(--ink); text-underline-offset: 3px; }
@media (max-width: 720px) {
  .timeline::before { left: 5px; }
  .t-item { grid-template-columns: 1fr; padding-left: 34px; }
  .t-item::before { left: 0; }
  .t-when { margin-bottom: 6px; }
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.panel h3 { font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 20px; }
.panel h3.mt { margin-top: 30px; }
.edu + .edu { margin-top: 20px; }
.edu p { margin: 2px 0; }
.edu-title { font-family: var(--serif); font-size: 24px; }
.muted { color: var(--muted); font-size: 15px; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Earlier work ---------- */
.earlier { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13, 15, 28, 0.5); }
.earlier summary {
  list-style: none; cursor: pointer; padding: 22px 30px; display: flex; justify-content: space-between; align-items: center;
  font-weight: 500;
}
.earlier summary::-webkit-details-marker { display: none; }
.plus { font-size: 22px; transition: transform 0.35s var(--ease); }
.earlier[open] .plus { transform: rotate(45deg); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 30px 28px; margin: 0; }
.chips li a, .chips li span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.2s, border-color 0.2s;
}
.chips li a:hover { color: var(--ink); border-color: rgba(243, 238, 230, 0.4); }

/* ---------- Contact / footer ---------- */
.contact { padding-bottom: 120px; text-align: center; }
.contact .eyebrow { text-align: center; }
.contact h2 { margin: 0 auto; max-width: 20ch; }
.contact .cta { justify-content: center; }
.footer {
  width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 40px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between;
  color: var(--muted); font-size: 14px;
}
.footer p { margin: 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.no-js .reveal { opacity: 1; transform: none; filter: none; }
.no-js .split .w > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .split .w > span { opacity: 1; transform: none; filter: none; }
  .compress-slow { width: 100%; } .compress-fast { width: 12%; }
  html { scroll-behavior: auto; }
}
@media (max-width: 480px) { .hide-sm { display: none; } }
