/* vibhachoudhary.com — personal site
   Aesthetic: deep ink, luminous mathematics, quiet confidence.
   No runtime JS. The flower is pure CSS 3D over Python-computed geometry. */

:root {
  --ink:        #07100e;
  --ink-2:      #0b1613;
  --panel:      #0e1a1790;
  --line:       #1e2b28;
  --text:       #e9efe9;
  --muted:      #9fb0ab;
  --faint:      #6d817b;
  --teal:       #2fbfa6;
  --cyan:       #35d6e0;
  --green:      #37d67a;
  --spectrum:   linear-gradient(90deg, #37d67a 0%, #2fd4c4 46%, #29b6d8 100%);
  /* legacy names kept as aliases so existing rules pick up the natural palette */
  --gold:       #34c9b0;
  --rose:       #35d6e0;
  --violet:     #37d67a;
  --serif:      "Fraunces", Georgia, "Times New Roman", serif;
  --sans:       "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw:       1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 80% -8%, #0f3a31 0%, transparent 55%),
              radial-gradient(900px 600px at 6% 10%, #0c2a26 0%, transparent 60%),
              var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.spectrum-text {
  background: var(--spectrum);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- nav ---- */
nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(#0a0b10ee, #0a0b1099);
  border-bottom: 1px solid var(--line);
}
nav .container { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.wordmark { font-family: var(--serif); font-weight: 500; font-size: 20px; letter-spacing: .2px; }
.wordmark b { font-weight: 600; }
.wordmark .dot { color: var(--gold); }
.navlinks { display: flex; gap: 30px; font-size: 15px; color: var(--muted); }
.navlinks a:hover { color: var(--text); }
.navlinks a { transition: color .2s; }
@media (max-width: 720px) { .navlinks { display: none; } }

/* ---- hero ---- */
.hero { position: relative; padding: 96px 0 40px; }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 22px;
}
h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 6.4vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
h1 .name { font-weight: 500; }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 30em; margin: 0 0 30px; }
.lede b { color: var(--text); font-weight: 500; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 500; font-size: 15px;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--text); color: var(--ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px -8px #37d67a66; }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--faint); background: #ffffff08; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero { padding-top: 60px; }
}

/* ---- the flower (CSS 3D, geometry from build/generate.py) ---- */
.flower-stage {
  perspective: 1000px;
  height: 500px; display: grid; place-items: center;
  position: relative;
}
.flower-stage::after {   /* soft bloom glow behind the head */
  content: ""; position: absolute; inset: 8% 14%;
  background: radial-gradient(circle at 50% 48%, #2fd4c433, #37d67a1c 45%, transparent 70%);
  filter: blur(26px); z-index: 0;
}
.hero-canvas {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important;
  z-index: 1; cursor: grab; touch-action: none;
}
.hero-canvas:active { cursor: grabbing; }
.flower {
  position: relative; width: 1px; height: 1px;
  transform-style: preserve-3d;
  animation: bloom-spin 34s linear infinite;
  will-change: transform;
}
/* When flower.js is alive it drives rotation itself — silence the CSS spin. */
.js .flower { animation: none; }
.flower-stage.interactive { cursor: grab; touch-action: none; }
.flower-stage.grabbing { cursor: grabbing; }
.drag-hint { display: none; }
.webgl .drag-hint { display: inline; color: var(--muted); }
.flower-caption .live-m { color: var(--cyan); font-variant: small-caps; letter-spacing: .04em; }
@keyframes bloom-spin {
  from { transform: rotateX(60deg) rotateZ(0deg); }
  to   { transform: rotateX(60deg) rotateZ(360deg); }
}
.p {
  position: absolute; top: 0; left: 0;
  transform-origin: center;
  border-radius: 62% 62% 68% 68% / 82% 82% 38% 38%;
  background: radial-gradient(120% 130% at 50% 14%,
              hsl(var(--h) var(--s) calc(var(--l) + 14%)),
              hsl(var(--h) var(--s) var(--l)) 55%,
              hsl(var(--h) var(--s) calc(var(--l) - 20%)));
  box-shadow: 0 0 12px -3px hsl(var(--h) var(--s) var(--l) / .55);
  backface-visibility: hidden;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { filter: brightness(0.92); }
  50%      { filter: brightness(1.28); }
}
.flower-caption {
  position: absolute; bottom: -14px; left: 0; right: 0; text-align: center;
  font-size: 12.5px; color: var(--faint); font-family: var(--sans);
  z-index: 3; pointer-events: none;
}
.flower-caption code { color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; }

@media (prefers-reduced-motion: reduce) {
  .flower { animation: none; transform: rotateX(60deg) rotateZ(24deg); }
  .p { animation: none; filter: brightness(1.08); }
  html { scroll-behavior: auto; }
}
@media (max-width: 860px) { .flower-stage { height: 360px; margin-top: 8px; } }

/* ---- logo wall ---- */
.logos-band { padding: 30px 0 10px; border-top: none; }
.logo-groups { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 54px; }
.logo-group { text-align: center; }
.band-label { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip {
  height: 44px; padding: 0 15px; display: inline-flex; align-items: center; gap: 9px;
  background: #ffffff0a; border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .2s, background .2s, transform .15s;
}
.chip:hover { border-color: var(--faint); background: #ffffff14; transform: translateY(-1px); }
.chip img { height: 20px; width: 20px; object-fit: contain; display: block; }
.chip img.wide { width: auto; height: 15px; }        /* wordmark-style logos (amazon) */
.chip .nm { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: .01em; }
.chip .wm { font-size: 16px; font-weight: 700; letter-spacing: .02em; }
@media (max-width: 520px) { .logo-groups { gap: 22px 28px; } .chip { height: 40px; padding: 0 12px; } }

/* ---- sections ---- */
section { padding: 78px 0; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.sec-label {
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 14px;
}
h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.02em; margin: 0 0 28px; }
.prose { max-width: 46em; color: var(--muted); font-size: 18px; }
.prose p { margin: 0 0 18px; }
.prose b { color: var(--text); font-weight: 500; }

/* timeline */
.timeline { display: grid; gap: 0; }
.role {
  display: grid; grid-template-columns: 190px 1fr; gap: 26px;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.role:first-child { border-top: none; }
.role .when { color: var(--faint); font-size: 14px; font-variant-numeric: tabular-nums; }
.role .what h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.role .what .org { color: var(--gold); font-weight: 500; }
.role .what p { margin: 6px 0 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 640px) { .role { grid-template-columns: 1fr; gap: 6px; } }

/* card grid for recognition */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; transition: border-color .2s, transform .15s;
}
.card:hover { border-color: var(--faint); transform: translateY(-2px); }
.card .k { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat .n { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 52px); }
.stat .n .spectrum-text { font-weight: 500; }
.stat .l { color: var(--muted); font-size: 14.5px; margin-top: 2px; }

/* manifesto */
.manifesto { background: linear-gradient(180deg, #10101c00, #14122060); }
.manifesto blockquote {
  font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.32; letter-spacing: -0.01em; margin: 0; max-width: 20em; color: var(--text);
}
.manifesto blockquote em { font-style: italic; }

/* contact */
.contact .prose { margin-bottom: 26px; }
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--faint); font-size: 14px; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
footer a:hover { color: var(--text); }
