/* ------------------------------------------------------------------
   sumitkulkarni.com — mobile-first stylesheet
   ------------------------------------------------------------------ */

@property --accent {
  syntax: '<color>';
  inherits: true;
  initial-value: #c9ff3b;
}

:root {
  --bg: #07070b;
  --bg-2: #0e0e15;
  --fg: #f4f3ee;
  --muted: rgba(244, 243, 238, .62);
  --faint: rgba(244, 243, 238, .34);
  --line: rgba(244, 243, 238, .14);
  --acid: #c9ff3b;
  --violet: #7b61ff;
  --cyan: #3ee6ff;
  --coral: #ff5d3a;
  --accent: #c9ff3b;
  --pad: clamp(20px, 5vw, 72px);
  --nav-h: 64px;
  --radius: 24px;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  transition: --accent .9s ease;
}
html.is-locked, html.is-locked body { overflow: hidden; }

body {
  font-family: var(--body);
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
  min-height: 100svh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

::selection { background: var(--accent); color: #07070b; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img, svg, canvas { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.mono {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  will-change: transform;
}
.preloader.is-leaving {
  border-bottom-left-radius: 50% 12vh;
  border-bottom-right-radius: 50% 12vh;
  transition: border-radius .7s var(--ease);
}
.preloader__mark {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(72px, 22vw, 180px); line-height: 1; letter-spacing: -.05em;
  background: linear-gradient(120deg, var(--violet), var(--cyan) 50%, var(--acid));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.preloader__count { color: var(--muted); font-size: 12px; }
.preloader__bar { width: 140px; height: 1px; background: var(--line); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; width: 100%; background: var(--fg); transform: scaleX(0); transform-origin: left; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bg-fallback {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none; display: none;
  background:
    radial-gradient(60% 50% at 30% 30%, rgba(123, 97, 255, .35), transparent 70%),
    radial-gradient(50% 40% at 70% 60%, rgba(62, 230, 255, .25), transparent 70%),
    radial-gradient(40% 40% at 50% 90%, rgba(201, 255, 59, .18), transparent 70%);
  filter: blur(40px);
  animation: drift 18s ease-in-out infinite alternate;
}
html.no-webgl .bg { display: none; }
html.no-webgl .bg-fallback { display: block; }
@keyframes drift { to { transform: translate3d(-4%, 3%, 0) rotate(6deg) scale(1.08); } }

/* ---------- Progress + top bar ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70;
  background: var(--accent); transform: scaleX(0); transform-origin: left; pointer-events: none;
}
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: calc(var(--nav-h) + env(safe-area-inset-top)); z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: env(safe-area-inset-top) var(--pad) 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar::before {
  content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(7, 7, 11, .8) 0%, rgba(7, 7, 11, .35) 60%, rgba(7, 7, 11, 0) 100%);
}
.brand { display: inline-flex; align-items: baseline; gap: 3px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.05em; }
.brand__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.topbar__right { display: flex; align-items: center; gap: 18px; }
.topbar__time { color: var(--muted); display: none; }
.burger { width: 44px; height: 44px; display: grid; place-items: center; position: relative; border-radius: 50%; margin-right: -10px; }
.burger span {
  position: absolute; left: 12px; width: 20px; height: 1.5px; background: var(--fg);
  transition: transform .5s var(--ease), top .5s var(--ease);
}
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 25px; }
.burger.is-open span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

/* ---------- Menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(7, 7, 11, .86);
  -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2);
  visibility: hidden;
  clip-path: circle(0px at calc(100% - 44px) 32px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + 16px) var(--pad) calc(24px + env(safe-area-inset-bottom));
}
.menu__list { list-style: none; display: flex; flex-direction: column; gap: 2px; margin-bottom: auto; margin-top: 6vh; }
.menu__list li { overflow: hidden; }
.menu__list a {
  display: flex; align-items: baseline; gap: 14px; padding: 6px 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(38px, 10.5vw, 104px); line-height: 1.02; letter-spacing: -.04em; text-transform: uppercase;
  color: var(--fg); transition: color .3s;
}
.menu__list a:hover, .menu__list a:focus-visible { color: var(--accent); }
.menu__num { color: var(--accent); font-size: 12px; }
.menu__foot { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Shared ---------- */
main { position: relative; z-index: 1; }
section { position: relative; }
.label { color: var(--muted); margin-bottom: 20px; }
.h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 8.6vw, 88px); line-height: 1; letter-spacing: -.035em; max-width: 14ch;
}
.h2 em, .contact__title em, .card__title em {
  font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: 0;
}
.lead { color: var(--muted); font-size: clamp(16px, 4.2vw, 20px); max-width: 44ch; margin-top: 20px; line-height: 1.5; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; display: flex;
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + 8px) var(--pad) calc(28px + env(safe-area-inset-bottom));
}
.hero__inner {
  flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  width: 100%; max-width: 1400px; margin: 0 auto;
}
.hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 255, 59, .55); }
  100% { box-shadow: 0 0 0 12px rgba(201, 255, 59, 0); }
}
.hero__block { display: flex; flex-direction: column; gap: clamp(20px, 4vw, 40px); }
.hero__name {
  font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.04em;
  font-variation-settings: "wdth" 100, "opsz" 96;
  color: var(--fg);
}
.hero__line, .contact__line { display: block; overflow: hidden; padding-bottom: .04em; }
.fit { display: block; width: max-content; white-space: nowrap; line-height: .84; font-size: 24vw; }
.char { display: inline-block; will-change: transform; }
.hero__tag { font-size: clamp(24px, 6.2vw, 44px); line-height: 1.15; max-width: 24ch; color: var(--fg); }
.hero__tag em { color: var(--accent); }
.hero__tag .word { display: inline-block; }
.hero__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); flex-wrap: wrap; }
.hero__scroll { display: inline-flex; align-items: center; gap: 10px; }
.hero__scroll i { display: block; width: 40px; height: 1px; background: var(--faint); position: relative; overflow: hidden; }
.hero__scroll i::after {
  content: ""; position: absolute; inset: 0; background: var(--fg);
  transform: translateX(-100%); animation: slide 1.8s var(--ease) infinite;
}
@keyframes slide { 0% { transform: translateX(-100%); } 60% { transform: translateX(0); } 100% { transform: translateX(100%); } }

/* ---------- Manifesto ---------- */
.manifesto { padding: clamp(120px, 22vh, 260px) var(--pad); max-width: 1180px; margin: 0 auto; }
.manifesto__text {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(28px, 6.6vw, 68px); line-height: 1.1; letter-spacing: -.03em;
}
.manifesto__text .word { display: inline-block; opacity: .14; }
.manifesto__text em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: 0; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; padding: 22px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transform: rotate(-2.5deg) scale(1.06);
  margin: 24px 0 clamp(80px, 12vh, 160px);
  background: rgba(7, 7, 11, .35);
}
.marquee__track { display: flex; align-items: center; gap: 28px; width: max-content; will-change: transform; padding-right: 28px; }
.marquee span {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(44px, 10vw, 128px); text-transform: uppercase; line-height: 1; letter-spacing: -.04em; white-space: nowrap;
}
.marquee span:nth-child(4n+3) { -webkit-text-stroke: 1px var(--fg); color: transparent; }
.marquee i { font-style: normal; color: var(--accent); font-size: clamp(18px, 4vw, 40px); }

/* ---------- Work ---------- */
.work { height: 100svh; overflow: hidden; }
.work__inner {
  height: 100%; display: flex; flex-direction: column; justify-content: center;
  gap: clamp(20px, 4vh, 40px); padding-top: calc(var(--nav-h) + env(safe-area-inset-top));
}
.work__head { padding: 0 var(--pad); }
.work__track { display: flex; gap: 14px; width: max-content; padding: 0 var(--pad); will-change: transform; perspective: 1200px; }
.card {
  position: relative; overflow: hidden; flex: 0 0 auto;
  width: min(76vw, 400px); height: clamp(340px, 54svh, 520px);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: rgba(14, 14, 21, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; justify-content: flex-end;
  transform-style: preserve-3d;
}
.card__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.card__body { position: relative; padding: 22px; background: linear-gradient(to top, rgba(7, 7, 11, .9), rgba(7, 7, 11, 0)); }
.card__num { color: var(--accent); display: block; margin-bottom: 10px; }
.card__title { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 6vw, 34px); letter-spacing: -.03em; line-height: 1.05; margin-bottom: 10px; }
.card__text { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 30ch; }
.card--cta { justify-content: center; background: var(--accent); color: #07070b; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background .9s ease; }
.card--cta .card__body { background: none; }
.card--cta .card__num { color: #07070b; }
.card--cta .card__title { font-size: clamp(30px, 8vw, 44px); }
.card--cta em { color: #07070b; }

/* Static fallback (reduced motion / no JS) */
.work.is-static { height: auto; padding: clamp(80px, 12vh, 160px) 0; overflow: visible; }
.work.is-static .work__inner { padding-top: 0; height: auto; }
.work.is-static .work__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
.work.is-static .card { scroll-snap-align: center; }

/* ---------- Playground ---------- */
.play { padding-top: clamp(100px, 16vh, 200px); }
.play__head { padding: 0 var(--pad); max-width: 1180px; margin: 0 auto 28px; }
.play__stage {
  position: relative; height: min(72svh, 720px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 11, .25);
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.play__stage.is-locked #particles { touch-action: none; }
.play__hint { position: absolute; top: 16px; left: var(--pad); color: var(--faint); pointer-events: none; }
.play__controls {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgba(14, 14, 21, .7); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  white-space: nowrap;
}
.chip { padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); transition: background .3s, color .3s; min-height: 36px; }
.chip.is-active { background: var(--fg); color: #07070b; }
.chip--ghost { border: 1px solid var(--line); }
.chip--ghost[aria-pressed="true"] { background: var(--accent); color: #07070b; border-color: transparent; }

/* ---------- Principles ---------- */
.principles { padding: clamp(120px, 18vh, 220px) var(--pad) clamp(80px, 12vh, 160px); max-width: 1180px; margin: 0 auto; }
.principles__head { margin-bottom: 40px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack__card {
  --i: 0;
  position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top) + 12px + var(--i) * 10px);
  min-height: min(50svh, 480px);
  overflow: hidden;
  border-radius: var(--radius); padding: 24px;
  background: linear-gradient(160deg, #15151f, #0b0b11);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  transform-origin: 50% 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .35);
}
.stack__card::before {
  content: attr(data-n); position: absolute; right: 10px; top: -6px; pointer-events: none;
  font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: -.06em;
  font-size: clamp(150px, 42vw, 300px);
  color: transparent; -webkit-text-stroke: 1px rgba(244, 243, 238, .11);
}
.stack__card > * { position: relative; }
.stack__card:nth-child(2) { --i: 1; }
.stack__card:nth-child(3) { --i: 2; }
.stack__card:nth-child(4) { --i: 3; }
.stack__num { color: var(--accent); }
.stack__title { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 8vw, 64px); letter-spacing: -.035em; line-height: 1; margin-bottom: 14px; }
.stack__text { color: var(--muted); font-size: clamp(15px, 4vw, 19px); max-width: 40ch; }

/* ---------- Contact ---------- */
.contact {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 40px) var(--pad) 80px; max-width: 1400px; margin: 0 auto; width: 100%;
}
.contact__title {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-variation-settings: "opsz" 96;
  line-height: .92; letter-spacing: -.045em; margin-bottom: clamp(32px, 6vh, 64px);
}
.contact__title .fit { line-height: .9; }
.contact__title em { text-transform: none; }
.contact__row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.magnet {
  position: relative; width: clamp(140px, 36vw, 220px); aspect-ratio: 1; border-radius: 50%;
  background: var(--accent); color: #07070b;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: clamp(22px, 5.6vw, 34px); line-height: .95; letter-spacing: -.04em;
  text-align: center; text-transform: uppercase;
  will-change: transform; transition: background .9s ease;
}
.magnet__core { position: relative; z-index: 1; }
.magnet__ring { position: absolute; inset: -14%; width: 128%; height: 128%; animation: spin 16s linear infinite; overflow: visible; }
.magnet__ring text { font-family: var(--mono); font-size: 12.5px; letter-spacing: .3em; text-transform: uppercase; fill: var(--fg); }
@keyframes spin { to { transform: rotate(360deg); } }
.contact__note { display: flex; flex-direction: column; gap: 8px; }
.contact__mail { font-size: clamp(16px, 4.4vw, 22px); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 6px; }
.contact__note .mono { color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  padding: 22px var(--pad) calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--bg);
}
.footer__time { display: none; }
.totop { color: var(--fg); border-bottom: 1px solid var(--faint); padding-bottom: 2px; }

/* ---------- HUD / chips / cursor / ripple ---------- */
.hud {
  position: fixed; left: var(--pad); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 10px; color: var(--muted); pointer-events: none; transition: opacity .4s;
}
.hud.is-hidden { opacity: 0; }
.hud__bar { width: 28px; height: 1px; background: var(--line); overflow: hidden; }
.hud__bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

.cursor { position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none; display: none; opacity: 0; }
@media (pointer: fine) {
  .cursor { display: block; }
  html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
}
.cursor__dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); transform: translate(-50%, -50%); }
.cursor__ring {
  position: absolute; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--fg);
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease), height .35s var(--ease), background .35s, opacity .35s, border-color .35s;
}
.cursor.is-active .cursor__ring { width: 64px; height: 64px; background: rgba(244, 243, 238, .08); }
.cursor.is-hidden .cursor__ring, .cursor.is-hidden .cursor__dot { opacity: 0; }
.cursor__label {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; transition: opacity .3s; white-space: nowrap;
}
.cursor.is-label .cursor__label { opacity: 1; }

.ripple {
  position: fixed; z-index: 99; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--accent); pointer-events: none;
  transform: translate(-50%, -50%) scale(0); opacity: 1;
  animation: ripple .75s var(--ease) forwards;
}
@keyframes ripple { to { transform: translate(-50%, -50%) scale(7); opacity: 0; } }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  :root { --nav-h: 80px; }
  .topbar__time { display: inline; }
  .footer__time { display: inline; }
  .hero__meta { font-size: 12px; }
  .hero__tag { max-width: 26ch; }
  .work__track { gap: 24px; }
  .card { width: 420px; height: min(60svh, 560px); }
  .card__body { padding: 28px; }
  .stack__card { padding: 40px; flex-direction: row; align-items: flex-end; gap: 60px; }
  .stack__card > div { max-width: 640px; }
  .contact__row { gap: 48px; }
  .play__hint { font-size: 12px; }
  .menu__list { margin-top: 0; }
}
@media (max-width: 420px) {
  .hero__clock { display: none; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__scroll i::after, .magnet__ring, .pulse, .bg-fallback { animation: none; }
  .marquee { transform: none; }
}
