/* =========================================================================
   jigarpanchal.com — site styles
   Black · Orange · White. Dark default + light mode.
   ========================================================================= */

/* ---- Color tokens ---- */
:root {
  --brand-orange:        #FF5A1F;
  --brand-orange-bright: #FF7A45;
  --brand-orange-deep:   #E8500F;
  --brand-orange-tint:   #FFE7DA;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

[data-theme="dark"] {
  --bg:            #0A0A0B;
  --bg-elevated:   #141416;
  --bg-sunken:     #050506;
  --surface-line:  #232327;
  --text:          #FAFAFA;
  --text-muted:    #9A9A9F;
  --text-faint:    #5A5A60;
  --accent:        var(--brand-orange);
  --accent-hover:  var(--brand-orange-bright);
  --on-accent:     #0A0A0B;
  --selection-bg:  var(--brand-orange);
  --selection-fg:  #0A0A0B;
  --shadow:        0 24px 60px -20px rgba(0,0,0,.7);
  --grain-opacity: .05;
  --mesh-opacity:  .32;
}

[data-theme="light"] {
  --bg:            #FFFFFF;
  --bg-elevated:   #FFFFFF;
  --bg-sunken:     #F4F5F7;
  --surface-line:  #E6E8EC;
  --text:          #0A0A0B;
  --text-muted:    #5A5A5E;
  --text-faint:    #9A9A9F;
  --accent:        var(--brand-orange-deep);
  --accent-hover:  var(--brand-orange);
  --on-accent:     #FFFFFF;
  --selection-bg:  var(--brand-orange-tint);
  --selection-fg:  #0A0A0B;
  --shadow:        0 24px 60px -24px rgba(10,10,11,.18);
  --grain-opacity: .035;
  --mesh-opacity:  .28;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: "Satoshi", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(1.0625rem, 0.6vw + 0.95rem, 1.1875rem);
  overflow-x: clip;
  transition: background-color .3s var(--ease), color .3s var(--ease);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--selection-bg); color: var(--selection-fg); }

h1, h2, h3, .display { font-family: "Clash Display", system-ui, sans-serif; }

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  background: var(--accent); color: var(--on-accent);
  padding: .7rem 1.1rem; border-radius: 8px; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---- Atmosphere: grain + roaming gradient blobs ---- */
.atmosphere { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: var(--mesh-opacity);
  will-change: transform;
}
.blob-1 {
  width: 42vw; height: 42vw; top: -6vw; left: 2vw;
  background: radial-gradient(circle at 50% 50%, rgba(255,90,31,.5), rgba(255,90,31,0) 66%);
  animation: blobMove1 22s ease-in-out infinite alternate;
}
.blob-2 {
  width: 36vw; height: 36vw; top: -4vw; right: 0vw;
  background: radial-gradient(circle at 50% 50%, rgba(255,122,69,.4), rgba(255,122,69,0) 66%);
  animation: blobMove2 28s ease-in-out infinite alternate;
}
.blob-3 {
  width: 46vw; height: 46vw; bottom: -16vw; left: 32vw;
  background: radial-gradient(circle at 50% 50%, rgba(232,80,15,.38), rgba(232,80,15,0) 66%);
  animation: blobMove3 34s ease-in-out infinite alternate;
}
@keyframes blobMove1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(22vw, 16vh, 0) scale(1.18); }
  66%  { transform: translate3d(8vw, 40vh, 0) scale(.92); }
  100% { transform: translate3d(34vw, 22vh, 0) scale(1.1); }
}
@keyframes blobMove2 {
  0%   { transform: translate3d(0, 0, 0) scale(1.05); }
  40%  { transform: translate3d(-26vw, 28vh, 0) scale(.9); }
  70%  { transform: translate3d(-10vw, 8vh, 0) scale(1.22); }
  100% { transform: translate3d(-30vw, 44vh, 0) scale(1); }
}
@keyframes blobMove3 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  35%  { transform: translate3d(-22vw, -24vh, 0) scale(1.15); }
  65%  { transform: translate3d(18vw, -12vh, 0) scale(.9); }
  100% { transform: translate3d(-8vw, -34vh, 0) scale(1.1); }
}
.grain {
  position: absolute; inset: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
main, .site-nav, .site-footer { position: relative; z-index: 1; }

/* ---- Scroll progress + custom cursor ---- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--accent); z-index: 150; transition: width .08s linear;
  box-shadow: 0 0 14px rgba(255,90,31,.7);
}
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 300;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-dot { width: 7px; height: 7px; background: var(--brand-orange); }
.cursor-ring {
  width: 34px; height: 34px; border: 1.5px solid var(--brand-orange);
  transition: width .25s var(--ease), height .25s var(--ease), background-color .25s var(--ease), opacity .25s var(--ease);
  opacity: .7;
}
.cursor-ring.hovering { width: 58px; height: 58px; background: rgba(255,90,31,.12); opacity: 1; }
body.has-cursor { cursor: none; }
body.has-cursor a, body.has-cursor button { cursor: none; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
  body.has-cursor { cursor: auto; }
}

/* =========================================================================
   NAV
   ========================================================================= */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease), padding .4s var(--ease);
  border-bottom: 1px solid transparent;
  padding-block: 1.4rem;
}
.site-nav.scrolled {
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  padding-block: .7rem;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  border: 1px solid transparent; border-radius: 100px;
  transition: max-width .45s var(--ease), padding .45s var(--ease), background-color .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease), backdrop-filter .45s var(--ease);
}
.site-nav.scrolled .nav-inner {
  max-width: min(920px, 94vw);
  padding-block: .5rem; padding-inline: 1.4rem .6rem;
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-color: var(--surface-line);
  box-shadow: 0 12px 36px -16px rgba(0,0,0,.5);
}
.nav-left { display: flex; align-items: center; gap: clamp(1.75rem, 4vw, 3rem); }
.logo {
  font-family: "Clash Display", sans-serif; font-weight: 700;
  font-size: 1.85rem; letter-spacing: -0.02em; display: inline-flex; align-items: baseline;
}
.logo .dot { color: var(--accent); }
.logo:hover { color: var(--accent); }
.logo { transition: color .25s var(--ease); }

.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
  position: relative; font-size: .95rem; font-weight: 500; color: var(--text-muted);
  padding: .25rem 0; transition: color .25s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 1.25rem; }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--surface-line); color: var(--text);
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), background-color .25s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: rotate(18deg); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* hamburger */
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--surface-line); place-items: center; }
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; transition: .3s var(--ease); }
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); transition: .3s var(--ease); }
.nav-burger span::before { top: -6px; }
.nav-burger span::after { top: 6px; }

/* mobile overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 1.1rem;
  padding: var(--gutter); transform: translateY(-100%); transition: transform .5s var(--ease);
  visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu a {
  font-family: "Clash Display", sans-serif; font-size: clamp(2rem, 9vw, 3.25rem);
  font-weight: 600; letter-spacing: -0.02em; opacity: 0; transform: translateY(18px);
}
.mobile-menu.open a { animation: menuIn .5s cubic-bezier(0.22,1,0.36,1) forwards; }
.mobile-menu.open a:nth-child(1){animation-delay:.08s}
.mobile-menu.open a:nth-child(2){animation-delay:.14s}
.mobile-menu.open a:nth-child(3){animation-delay:.20s}
.mobile-menu.open a:nth-child(4){animation-delay:.26s}
.mobile-menu.open a:nth-child(5){animation-delay:.32s}
@keyframes menuIn { to { opacity: 1; transform: translateY(0); } }
.mobile-menu .menu-close { position: absolute; top: 1.5rem; right: var(--gutter); font-size: 2rem; line-height: 1; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-media { position: absolute; inset: -8% 0 0 0; z-index: 0; will-change: transform; }
.hero-media img {
  position: absolute; top: 0; left: 0;
  width: 140%; max-width: none; height: 122%; object-fit: cover; object-position: center 18%;
  transform: scale(1.06); transform-origin: center center;
}
/* theme image crossfade — both images stay mounted, no src swap (prevents flicker) */
/* theme image swap — both images stay mounted; instant swap avoids a
   compositing bug where the opacity transition could stick and show the
   wrong image. No flash since neither is unmounted. */
[data-theme-img] { transition: none; }
[data-theme="dark"] [data-theme-img="light"] { opacity: 0; }
[data-theme="light"] [data-theme-img="dark"] { opacity: 0; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, var(--bg) 2%, color-mix(in srgb, var(--bg) 68%, transparent) 26%, transparent 50%),
    linear-gradient(0deg, var(--bg) 1%, transparent 26%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent) 0%, transparent 20%);
}
[data-theme="light"] .hero-scrim {
  background:
    /* soft radial vignette blends the figure into the page */
    radial-gradient(120% 95% at 68% 42%, transparent 38%, color-mix(in srgb, var(--bg) 55%, transparent) 78%, var(--bg) 108%),
    /* left side — gradual fade for text legibility, no hard plateau */
    linear-gradient(90deg,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg) 90%, transparent) 20%,
      color-mix(in srgb, var(--bg) 60%, transparent) 36%,
      color-mix(in srgb, var(--bg) 26%, transparent) 50%,
      transparent 64%),
    /* bottom — dissolve the dark torso smoothly into the background */
    linear-gradient(0deg,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg) 72%, transparent) 16%,
      color-mix(in srgb, var(--bg) 30%, transparent) 32%,
      transparent 50%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-content { max-width: 40rem; }
.hero .eyebrow { display: block; margin-bottom: 1.6rem; color: var(--accent); }
.hero-eyebrow { line-height: 1.9; }
.hero h1 {
  font-size: clamp(2.75rem, 7vw, 6rem); line-height: .98; letter-spacing: -0.025em;
  font-weight: 600; margin-bottom: 1.6rem; text-wrap: balance;
  text-shadow: 0 1px 34px var(--bg), 0 1px 12px color-mix(in srgb, var(--bg) 75%, transparent);
}
.hero h1 .acc { color: var(--accent); }
.hero .subline { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--text-muted); max-width: 34rem; }

/* hero load stagger (transition-based for reliability) */
.stagger > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s cubic-bezier(0.22,1,0.36,1), transform .7s cubic-bezier(0.22,1,0.36,1);
}
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(2){ transition-delay: .12s; }
.stagger.in > *:nth-child(3){ transition-delay: .24s; }
.stagger.in > *:nth-child(4){ transition-delay: .36s; }

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .7rem; z-index: 3;
  color: var(--text-muted); transition: opacity .4s var(--ease);
}
.scroll-cue .cue-arrow { width: 22px; height: 22px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* =========================================================================
   SECTION SHELL
   ========================================================================= */
section { position: relative; }
.section-pad { padding-block: clamp(6rem, 13vh, 11rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .eyebrow { display: block; margin-bottom: 1.1rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.02em;
  font-weight: 600; text-wrap: balance;
}
.section-head .lede { margin-top: 1.1rem; color: var(--text-muted); font-size: 1.15rem; max-width: 40rem; text-wrap: pretty; }

/* reveal util */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* =========================================================================
   INTERSTITIAL — DON'T QUIT -> DO IT  &  generic pinned type
   ========================================================================= */
.interstitial { height: 200vh; position: relative; }
.interstitial .pin {
  position: sticky; top: 0; height: 100svh; display: grid; place-items: center;
  overflow: hidden; text-align: center;
}

/* DO IT illusion — single line: DON'T QUIT -> DO IT */
.dontquit {
  font-family: "Clash Display", sans-serif; font-weight: 600; line-height: .9;
  letter-spacing: -0.02em; user-select: none;
  display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap;
}
.dq-word { display: inline-flex; align-items: baseline; }
.dq-sp { display: inline-block; width: clamp(.6rem, 2.5vw, 2.2rem); }
.dontquit .glyph { font-size: clamp(2.6rem, 12vw, 9.5rem); display: inline-block; }
.dontquit .sharp { color: var(--text); }
.dontquit .ghost {
  color: var(--text-muted); filter: blur(0px); opacity: 1;
  transition: filter .15s linear, opacity .15s linear;
}

/* NOWHERE — NOW crossfades/blurs into HERE in place */
.nowhere { font-family: "Clash Display", sans-serif; font-weight: 600; letter-spacing: -0.02em; text-align: center; }
.nowhere .pre { display: block; font-size: clamp(1rem, 2.4vw, 1.6rem); color: var(--text-muted); margin-bottom: 1rem; font-weight: 500; }
.nowhere .word.stack { display: inline-grid; line-height: 1; }
.nowhere .word.stack > * { grid-area: 1 / 1; font-size: clamp(3.4rem, 15vw, 12rem); }
.nowhere .nw-now { color: var(--accent); }
.nowhere .nw-here { color: var(--text); opacity: 0; filter: blur(22px); }

/* =========================================================================
   INTRO VIDEO
   ========================================================================= */
.iv-stage { margin: 2.75rem 0 0; }
.iv-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden; background: #050506;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06);
}
.iv-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #050506; }

/* theme-aware poster — sits over the video until playback begins */
.iv-poster { position: absolute; inset: 0; z-index: 2; }
.iv-poster-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.iv-frame.is-playing .iv-poster,
.iv-frame.is-playing .iv-launch { display: none; }

.iv-launch {
  position: absolute; left: 0; bottom: 0; z-index: 3; cursor: pointer;
  display: inline-flex; align-items: center; gap: .85rem;
  margin: 0; padding: 1.4rem 1.6rem; border: 0; background: transparent;
  color: #fff; text-align: left;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
/* soft readability wash anchored to the bottom-left, not the whole frame */
.iv-launch::before {
  content: ""; position: absolute; left: 0; bottom: 0; z-index: -1;
  width: 360px; max-width: 100%; height: 160px;
  background: radial-gradient(120% 140% at 8% 100%, rgba(5,5,6,.72), transparent 72%);
  pointer-events: none;
}
.iv-launch:hover { transform: translateX(3px); }
.iv-play {
  display: inline-flex; color: var(--accent, #FF5A1F);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.45));
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.iv-play svg { width: 40px; height: 40px; display: block; }
.iv-launch:hover .iv-play { transform: scale(1.12); }
.iv-launch-meta {
  display: inline-flex; align-items: center; gap: .65rem;
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.iv-dur {
  padding: .15rem .5rem; border-radius: 999px; letter-spacing: .12em;
  background: rgba(255,255,255,.18); color: #fff;
}
@media (max-width: 680px) {
  .iv-launch { padding: 1rem 1.1rem; gap: .7rem; }
  .iv-play svg { width: 32px; height: 32px; }
}

/* =========================================================================
   INTERESTS
   ========================================================================= */
.interest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.interest-card {
  position: relative; padding: 2.1rem 1.9rem 2.2rem; border-radius: 14px;
  background: var(--bg-elevated); border: 1px solid var(--surface-line);
  overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.interest-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px; padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 55%);
  -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 .35s var(--ease);
}
.interest-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
[data-theme="light"] .interest-card { box-shadow: 0 1px 2px rgba(10,10,11,.04), 0 14px 30px -22px rgba(10,10,11,.18); }
[data-theme="light"] .contact-card { box-shadow: 0 1px 2px rgba(10,10,11,.04), 0 18px 40px -26px rgba(10,10,11,.2); }
.interest-card:hover::before { opacity: 1; }
.interest-card h3 {
  font-size: 1.5rem; font-weight: 600; margin: 0 0 .7rem; letter-spacing: -0.01em;
  transition: transform .35s var(--ease), color .35s var(--ease);
}
.interest-card:hover h3 { transform: translateX(5px); color: var(--accent); }
.interest-card p { color: var(--text-muted); font-size: 1.02rem; }

/* =========================================================================
   THE GAP / APPROACH — sticky stacking cards
   ========================================================================= */
.gap { position: relative; }
.gap-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.gap-arrow {
  position: absolute; top: 8%; left: -14%;
  font-family: "Clash Display", sans-serif; font-weight: 700;
  font-size: 70vw; line-height: .7; color: var(--accent);
  opacity: .06; will-change: transform;
}
.gap-wrap { position: relative; z-index: 1; }
.gap-list { margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 52rem; }
.gap-spacer { height: 45vh; pointer-events: none; }

.gap-pair {
  position: sticky;
  background: var(--bg-elevated);
  border: 1px solid var(--surface-line);
  border-radius: 18px;
  padding: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 2.2rem;
  box-shadow: 0 -8px 40px -22px rgba(0,0,0,.6), var(--shadow);
}
[data-theme="light"] .gap-pair { box-shadow: 0 1px 2px rgba(10,10,11,.04), 0 24px 50px -28px rgba(10,10,11,.22); }
/* each card sticks a little lower than the last, so the title of the one beneath peeks through */
.gap-pair:nth-child(1) { top: 6rem; z-index: 1; }
.gap-pair:nth-child(2) { top: 8.6rem; z-index: 2; }
.gap-pair:nth-child(3) { top: 11.2rem; z-index: 3; }
.gap-pair:nth-child(4) { top: 13.8rem; z-index: 4; }
.gap-pair:last-child { margin-bottom: 0; }

/* neutralize the global reveal on the pair itself; stagger its children instead */
.gap-pair[data-reveal] { opacity: 1; transform: none; }
.gap-pair-head { margin-bottom: 1.5rem; }
.gap-pair-head h3 {
  font-family: "Clash Display", sans-serif; font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600; letter-spacing: -0.015em; line-height: 1.1;
}
.gap-problem { margin-bottom: 1.5rem; }
.gap-problem p { color: var(--text-muted); font-size: 1.12rem; max-width: 46ch; text-wrap: pretty; }
.gap-tag { display: block; margin-bottom: .7rem; font-size: .7rem; }
.gap-answer { border-left: 2px solid var(--accent); padding-left: 1.5rem; }
.gap-answer .gap-tag { color: var(--accent); }
.gap-answer p { color: var(--text); font-size: 1.18rem; font-weight: 500; max-width: 46ch; text-wrap: pretty; }

/* staggered reveal: title, then problem, then answer rises in */
.gap-pair-head, .gap-problem, .gap-answer {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .8s var(--ease);
}
.gap-pair.in .gap-pair-head { opacity: 1; transform: none; transition-delay: 0s; }
.gap-pair.in .gap-problem  { opacity: 1; transform: none; transition-delay: .14s; }
.gap-pair.in .gap-answer   { opacity: 1; transform: none; transition-delay: .32s; }

.gap-close {
  position: relative; z-index: 2;
  margin-top: clamp(3rem, 6vw, 4.5rem); max-width: 52rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 2rem; padding-top: clamp(2rem, 4vw, 2.8rem); border-top: 1px solid var(--surface-line);
}
.gap-close p {
  font-family: "Clash Display", sans-serif; font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; color: var(--text); flex: 1 1 22rem;
}

/* =========================================================================
   ABOUT
   ========================================================================= */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start; }
.about-main .section-head { margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.about-copy p { margin-bottom: 1.4rem; color: var(--text-muted); max-width: 60ch; }
.about-copy p:first-child { color: var(--text); font-size: 1.2rem; }
/* blur + fade each line in as the section enters */
.about-line { filter: blur(12px); transition: opacity .8s var(--ease), transform .8s var(--ease), filter .9s var(--ease); }
.about-line.in { filter: blur(0); }
.about-copy .about-line:nth-of-type(1) { transition-delay: .04s; }
.about-copy .about-line:nth-of-type(2) { transition-delay: .18s; }
.about-copy .about-line:nth-of-type(3) { transition-delay: .32s; }
.about-aside { position: sticky; top: 6rem; }
.about-portrait {
  position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--surface-line);
  aspect-ratio: 3 / 4; box-shadow: var(--shadow);
}
.about-portrait .ap-inner { position: absolute; inset: 0; will-change: transform; }
.about-portrait .ap-img { position: absolute; top: -7%; left: 0; width: 100%; height: 114%; object-fit: cover; object-position: 64% 50%; }
.pull-quote {
  position: relative; padding-left: 1.6rem; border-left: 2px solid var(--accent);
  margin-top: 2.6rem;
}
.pull-quote blockquote { font-family: "Clash Display", sans-serif; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }

/* =========================================================================
   TIMELINE — even weight, chronological
   ========================================================================= */
.timeline { position: relative; max-width: 56rem; margin-inline: auto; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px;
  background: var(--surface-line);
}
.tl-progress {
  position: absolute; left: 9px; top: 6px; width: 2px; height: 0;
  background: linear-gradient(var(--accent), var(--accent-hover)); transform-origin: top;
}
.tl-item { position: relative; padding-left: 3.6rem; padding-block: 2.7rem; border-bottom: 1px solid var(--surface-line); }
.tl-item:last-of-type { border-bottom: none; }
.tl-node {
  position: absolute; left: 0; top: 3.05rem; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--surface-line);
  display: grid; place-items: center; transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.tl-node::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); transition: background-color .3s var(--ease); }
.tl-item.now .tl-node { border-color: var(--accent); }
.tl-item.now .tl-node::after { background: var(--accent); }
.tl-item.now .tl-node { box-shadow: 0 0 0 0 rgba(255,90,31,.5); animation: nodePulse 2.4s cubic-bezier(0.22,1,0.36,1) infinite; }
@keyframes nodePulse { 0%{ box-shadow: 0 0 0 0 rgba(255,90,31,.45);} 70%{ box-shadow: 0 0 0 9px rgba(255,90,31,0);} 100%{ box-shadow: 0 0 0 0 rgba(255,90,31,0);} }
.tl-item:hover .tl-node { transform: scale(1.25); border-color: var(--accent); }

.tl-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.1rem; }
.tl-period {
  display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace; font-size: .8rem; color: var(--text-muted);
  letter-spacing: .04em; margin-bottom: 1.1rem;
}
.tl-now-tag {
  font-family: "JetBrains Mono", monospace; font-size: .62rem; letter-spacing: .14em;
  color: var(--on-accent); background: var(--accent); padding: .15rem .5rem; border-radius: 4px;
}
.tl-role { font-family: "Clash Display", sans-serif; font-size: 1.4rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
.tl-org { margin-top: .7rem; font-size: 1.05rem; color: var(--text-muted); display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .55rem; }
.tl-dot { color: var(--text-faint); }
.tl-loc { color: var(--text-faint); }
.tl-company { color: var(--text); font-weight: 500; transition: color .25s var(--ease); }
.tl-item:hover .tl-company { color: var(--accent); }
.tl-note { color: var(--text-muted); font-size: 1.02rem; margin-top: 1.1rem; max-width: 52ch; }
.tl-edu { font-family: "JetBrains Mono", monospace; color: var(--text-muted); font-size: .95rem; margin-top: 2.8rem; padding-left: 3.6rem; letter-spacing: .03em; }

/* =========================================================================
   CLIENTS
   ========================================================================= */
.clients-logos { position: relative; margin-top: clamp(1rem, 3vw, 2.5rem); }
.clients-img { display: block; width: 100%; height: auto; }
.clients-img[data-theme-img="light"] { position: absolute; inset: 0; }
/* reveal: starts tilted in perspective + blurred, resolves to a flat, sharp image */
[data-reveal].clients-logos {
  transform: perspective(1500px) rotateX(24deg) scale(.93);
  transform-origin: center 78%;
  filter: blur(15px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease);
}
[data-reveal].clients-logos.in {
  transform: perspective(1500px) rotateX(0deg) scale(1);
  filter: blur(0);
}

/* =========================================================================
   CONNECT
   ========================================================================= */
.connect { background: transparent; }
.connect-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.connect h2 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); line-height: 1; letter-spacing: -0.025em; font-weight: 600; }
.connect h2 .acc { color: var(--accent); }
.connect .lede { color: var(--text-muted); font-size: 1.2rem; max-width: 32rem; margin-top: 1.4rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.6rem; border-radius: 10px;
  font-weight: 600; font-size: 1rem; white-space: nowrap; flex: 0 0 auto;
  transition: transform .2s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.03); }
.btn-ghost { border: 1px solid var(--surface-line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.03); }
.btn-vcard {
  display: none; /* mobile-only — shown in the max-width:680px query below */
  border: 1px solid var(--accent); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent); cursor: pointer;
}
.btn-vcard:hover { background: var(--accent); color: var(--on-accent); transform: scale(1.03); }
.btn-vcard.saved { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-ic { width: 18px; height: 18px; flex: none; }

.contact-card { background: var(--bg-elevated); border: 1px solid var(--surface-line); border-radius: 14px; padding: 1.9rem; display: flex; flex-direction: column; gap: 1.5rem; }
/* desktop: drop the card so its top lines up with the "Still building." headline (past the eyebrow) */
@media (min-width: 921px) {
  .contact-card { margin-top: 1.9rem; }
}
.contact-item .label { display: block; margin-bottom: .4rem; }
.copy-email {
  display: inline-flex; align-items: center; gap: .6rem; font-family: "JetBrains Mono", monospace;
  font-size: clamp(.85rem, 2.2vw, 1.02rem); color: var(--text); position: relative;
  transition: color .2s var(--ease);
}
.copy-email:hover { color: var(--accent); }
.copy-email .copy-ic { width: 15px; height: 15px; opacity: .6; }
.copy-email.copied { color: var(--accent); }
.contact-item a.tel { font-family: "JetBrains Mono", monospace; font-size: .98rem; white-space: nowrap; transition: color .2s var(--ease); }
.contact-item a.tel:hover { color: var(--accent); }
.tel-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .7rem; }
.tel-row + .tel-row { margin-top: .85rem; }
.wa-link { font-size: .82rem; color: var(--text-muted); white-space: nowrap; }
.wa-link:hover { color: var(--accent); }
.social-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.6rem; }
.social-row a {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--surface-line); color: var(--text-muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), background-color .2s var(--ease);
}
.social-row a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-4px); }
.social-row svg { width: 20px; height: 20px; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: transparent; padding-block: 2.6rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-inner .mono { font-size: .72rem; color: var(--text-faint); }
.back-top {
  display: inline-flex; align-items: center; gap: .5rem; font-family: "JetBrains Mono", monospace;
  font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
  transition: color .2s var(--ease);
}
.back-top:hover { color: var(--accent); }

.interlude { text-align: center; padding-block: clamp(4rem, 9vh, 7rem); }
.interlude p { font-family: "Clash Display", sans-serif; font-size: clamp(1.4rem, 3.4vw, 2.4rem); font-weight: 500; letter-spacing: -0.01em; color: var(--text); max-width: 30rem; margin-inline: auto; line-height: 1.18; }
.interlude .accent-dot { color: var(--accent); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 920px) {
  .interest-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-aside { position: static; }
  .about-portrait { max-width: 24rem; margin-inline: auto; aspect-ratio: 4 / 5; }
  .connect-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  .interest-grid { grid-template-columns: 1fr; }
  .interstitial { height: 160vh; }
  .tl-period { min-width: 100%; }
  .tl-role { flex-basis: 100%; }

  /* --- Mobile hero: image on top fading into bg, text below, full viewport --- */
  .hero {
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100svh; height: 100svh;
    overflow: hidden;
  }
  .hero-media {
    position: relative; inset: auto;
    flex: none; width: 100%; height: 62svh; z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 96%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 96%);
  }
  .hero-media img, .hero-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 20%;
    transform: none !important;
  }
  .hero-scrim { display: none; }
  .hero-inner {
    position: relative; z-index: 2; flex: 1 1 auto;
    display: flex; align-items: flex-start;
    margin-top: -13svh;
  }
  .hero-content { max-width: none; }
  .hero .eyebrow { margin-bottom: 1.1rem; }
  .hero-eyebrow { line-height: 1.7; font-size: .72rem; }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.25rem); margin-bottom: 1.1rem; text-shadow: none; }
  .hero .subline { font-size: 1.02rem; }
  .scroll-cue { display: none; }

  /* The Gap: trim to three pairs on mobile, tighter stack offsets, stack the CTA */
  .gap-pair--opt { display: none; }
  .gap-pair:nth-child(1) { top: 5rem; }
  .gap-pair:nth-child(2) { top: 6.6rem; }
  .gap-pair:nth-child(3) { top: 8.2rem; }
  .gap-spacer { height: 32vh; }
  .gap-answer { padding-left: 1.1rem; }
  .gap-close { flex-direction: column; align-items: flex-start; }
  .gap-close .btn { width: 100%; justify-content: center; }
  .gap-arrow { font-size: 110vw; opacity: .05; }
  .btn-vcard { display: inline-flex; width: 100%; justify-content: center; }
}

/* =========================================================================
   REDUCED MOTION
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .blob { animation: none; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .stagger > * { opacity: 1 !important; transform: none !important; }
  .hero-media, #aboutPortrait { transform: none !important; }
  .scroll-cue .cue-arrow { animation: none; }
  .cursor-dot, .cursor-ring { display: none !important; }
}
