/* =========================================================
   Bhanu Chawla — bhanuchawla.com
   ========================================================= */

:root {
  --ink: #0A0A0A;
  --ink-2: #111111;
  --ink-3: #161616;
  --line: rgba(245, 241, 234, 0.08);
  --line-strong: rgba(245, 241, 234, 0.16);
  --cream: #F5F1EA;
  --cream-2: #FAF8F4;
  --paper: #0E0E0E;
  --text: #F5F1EA;
  --text-dim: rgba(245, 241, 234, 0.62);
  --text-meta: rgba(245, 241, 234, 0.42);
  --accent: #5B5BF5;
  --accent-soft: rgba(91, 91, 245, 0.12);
  --accent-line: rgba(91, 91, 245, 0.28);
  --warm: #E8743B;
  --good: #00E5A0;

  --font-display: "Newsreader", "Tiempos Headline", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11", "tnum";
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms var(--ease);
}

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

/* ---------- Typography utilities ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-meta);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}
.eyebrow.no-dot::before { display: none; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0;
  font-optical-sizing: auto;
}

h2 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.028em;
}
h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: background 300ms var(--ease), border-color 300ms var(--ease), backdrop-filter 300ms var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav.on-light {
  color: var(--ink);
}
.nav.on-light.scrolled {
  background: rgba(245, 241, 234, 0.78);
  border-bottom-color: rgba(14, 14, 14, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(255,255,255,0.5), transparent 50%),
    linear-gradient(135deg, #5B5BF5, #8E5BF5 60%, #E8743B);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 4px 12px rgba(91,91,245,0.4);
  position: relative;
}
.brand-mark::after {
  content: "B";
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: inherit;
  opacity: 0.6;
  transition: opacity 200ms var(--ease);
}
.nav-links a:hover { opacity: 1; }
.nav-links .nav-cta {
  opacity: 1;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav.on-light .nav-links .nav-cta { border-color: rgba(14,14,14,0.16); }
.nav-links .nav-cta::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--good);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--good);
}
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px var(--gutter) 80px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-mesh {
  position: absolute;
  inset: -10%;
  z-index: -1;
  opacity: 0.85;
  filter: blur(60px) saturate(120%);
  pointer-events: none;
}
.hero-mesh::before,
.hero-mesh::after,
.hero-mesh span {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.hero-mesh::before {
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(91,91,245,0.55), transparent 60%);
  top: -10%; left: -10%;
  animation: meshA 22s var(--ease) infinite alternate;
}
.hero-mesh::after {
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(232,116,59,0.32), transparent 60%);
  bottom: -20%; right: -10%;
  animation: meshB 28s var(--ease) infinite alternate;
}
.hero-mesh span {
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, rgba(0,229,160,0.18), transparent 60%);
  top: 30%; left: 40%;
  animation: meshC 32s var(--ease) infinite alternate;
}
@keyframes meshA { to { transform: translate(15%, 10%) scale(1.1); } }
@keyframes meshB { to { transform: translate(-10%, -8%) scale(1.05); } }
@keyframes meshC { to { transform: translate(-20%, 15%) scale(0.9); } }

.hero-grain {
  position: absolute; inset: 0;
  z-index: -1;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
  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.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.7'/></svg>");
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.hero-eyebrow {
  display: flex; gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-meta);
  text-transform: uppercase;
  margin-bottom: 32px;
}
.hero-eyebrow span { display: inline-flex; align-items: center; gap: 8px; }
.hero-eyebrow span::before {
  content: ""; width: 4px; height: 4px; background: var(--text-meta); border-radius: 50%;
}
.hero-eyebrow .live::before { background: var(--good); box-shadow: 0 0 8px var(--good); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

.hero h1 {
  font-size: clamp(44px, 7.4vw, 104px);
  font-weight: 380;
  letter-spacing: -0.035em;
  line-height: 0.98;
  max-width: 14ch;
  margin-bottom: 36px;
  font-optical-sizing: auto;
}
.hero h1 em {
  font-style: italic;
  font-weight: 380;
  color: var(--text);
  background: linear-gradient(110deg, #fff 0%, #BFBFFA 40%, #5B5BF5 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  max-width: 56ch;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-dim);
  margin-bottom: 48px;
  line-height: 1.55;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid rgba(245, 241, 234, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 0 rgba(0,0,0,0.4),
    0 8px 24px -12px rgba(91,91,245,0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 240ms var(--ease), transform 240ms var(--ease), box-shadow 240ms var(--ease);
}
.stat-pill:hover {
  border-color: var(--accent-line);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 0 rgba(0,0,0,0.4),
    0 14px 32px -14px rgba(91,91,245,0.45);
}
.stat-pill .num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  color: #fff;
  letter-spacing: -0.01em;
}
.stat-pill .label {
  font-size: 13px;
  color: rgba(245, 241, 234, 0.78);
  letter-spacing: 0.005em;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all 200ms var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--text);
  color: var(--ink);
}
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--text); background: rgba(255,255,255,0.04); }

.btn svg { width: 14px; height: 14px; }

/* Hero portrait */
.hero-portrait {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  aspect-ratio: 4/5;
  background: var(--ink-2);
}
.hero-portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.02) saturate(0.92);
}
.hero-portrait::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10,10,10,0.6) 100%);
  pointer-events: none;
}
.portrait-meta {
  position: absolute;
  bottom: 16px; left: 16px; right: 16px;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245,241,234,0.78);
  z-index: 1;
}

@media (max-width: 980px) {
  .hero-portrait { max-width: 320px; aspect-ratio: 4/5; }
}

/* ---------- Section base ---------- */
section {
  padding: 120px var(--gutter);
  position: relative;
}
@media (max-width: 720px) {
  section { padding: 80px var(--gutter); }
}

.section-head {
  max-width: var(--container);
  margin: 0 auto 64px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 48px; }
}
.section-head h2 { max-width: 22ch; }
.section-head .lede {
  color: var(--text-dim);
  max-width: 60ch;
  margin-top: 20px;
  font-size: 17px;
}

/* ---------- What I do tiles ---------- */
.tiles {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  padding: 28px;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 300ms var(--ease), transform 400ms var(--ease);
}
.tile:hover { border-color: var(--line-strong); }

.tile-stage {
  position: relative;
  height: 220px;
  margin: -28px -28px 0;
  border-bottom: 1px solid var(--line);
  background: var(--ink-2);
  overflow: hidden;
}
.tile-body {
  padding-top: 24px;
}
.tile-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-meta);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.tile h3 {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.3;
  margin-bottom: 10px;
}
.tile p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.55;
}

/* Tile 1 — terminal scene loop */
.scene-terminal {
  position: absolute; inset: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 18px 20px;
  color: var(--text-dim);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(91,91,245,0.18), transparent 70%),
    var(--ink-2);
}
.scene-terminal .row { display: flex; gap: 8px; opacity: 0; animation: termIn 0.4s var(--ease) forwards; }
.scene-terminal .row .prompt { color: var(--accent); }
.scene-terminal .row .out { color: var(--text); }
.scene-terminal .row .meta { color: var(--text-meta); }
.scene-terminal .caret {
  display: inline-block; width: 7px; height: 12px; background: var(--accent);
  vertical-align: -2px; margin-left: 2px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
@keyframes termIn { to { opacity: 1; } }
.scene-terminal .stack > * { animation-delay: var(--d, 0s); }

/* Tile 2 — funnel scene */
.scene-funnel {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(91,91,245,0.06), transparent 60%),
    var(--ink-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 28px;
  gap: 8px;
}
.funnel-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.funnel-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.funnel-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), #8E5BF5);
  width: var(--w, 100%);
  border-radius: 3px;
  animation: barPulse 6s var(--ease) infinite;
}
.funnel-row:nth-child(1) .funnel-bar::after { animation-delay: 0s; }
.funnel-row:nth-child(2) .funnel-bar::after { animation-delay: 0.4s; --w: 78%; }
.funnel-row:nth-child(3) .funnel-bar::after { animation-delay: 0.8s; --w: 52%; }
.funnel-row:nth-child(4) .funnel-bar::after { animation-delay: 1.2s; --w: 31%; }
.funnel-row:nth-child(5) .funnel-bar::after { animation-delay: 1.6s; --w: 18%; background: linear-gradient(90deg, var(--good), #5B5BF5); }
@keyframes barPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.funnel-num { color: var(--text); text-align: right; }

/* Tile 3 — verticals scene */
.scene-verticals {
  position: absolute; inset: 0;
  background: var(--ink-2);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.verticals-orbit {
  position: relative;
  width: 200px; height: 200px;
}
.verticals-orbit .center {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.verticals-orbit .ring {
  position: absolute;
  inset: 0;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: spin 30s linear infinite;
}
.verticals-orbit .ring.r2 { inset: 22px; animation-duration: 22s; animation-direction: reverse; opacity: 0.6; }
@keyframes spin { to { transform: rotate(360deg); } }
.vert {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--ink-2);
  color: var(--text);
  white-space: nowrap;
}
.vert { top: 50%; left: 50%; }
.vert.v1 { transform: translate(-50%, calc(-50% - 95px)); }
.vert.v2 { transform: translate(calc(-50% + 82px), calc(-50% - 48px)); }
.vert.v3 { transform: translate(calc(-50% + 82px), calc(-50% + 48px)); }
.vert.v4 { transform: translate(-50%, calc(-50% + 95px)); }
.vert.v5 { transform: translate(calc(-50% - 82px), calc(-50% + 48px)); }
.vert.v6 { transform: translate(calc(-50% - 82px), calc(-50% - 48px)); }
.vert::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 2px;
}

/* Tile 4 — team scene */
.scene-team {
  position: absolute; inset: 0;
  background: var(--ink-2);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.team-line {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.team-line .who { color: var(--text-dim); }
.team-line .msg {
  color: var(--text);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  opacity: 0;
  animation: msgIn 0.5s var(--ease) forwards;
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: -0.005em;
  font-size: 12px;
}
.team-line:nth-child(1) .msg { animation-delay: 0.4s; }
.team-line:nth-child(2) .msg { animation-delay: 1.2s; border-color: rgba(91,91,245,0.32); background: rgba(91,91,245,0.06); }
.team-line:nth-child(3) .msg { animation-delay: 2.0s; }
.team-line:nth-child(4) .msg { animation-delay: 2.8s; border-color: rgba(0,229,160,0.32); background: rgba(0,229,160,0.06); color: var(--good); }
@keyframes msgIn { to { opacity: 1; } }

/* ---------- Recent work ---------- */
.work-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

.work-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  display: flex;
  flex-direction: column;
  min-height: 360px;
  transition: border-color 300ms var(--ease);
}
.work-card:hover { border-color: var(--line-strong); }

.work-stage {
  position: relative;
  height: 200px;
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.work-body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.work-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}
.work-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.18;
}
.work-card p { color: var(--text-dim); font-size: 14.5px; }

/* Work scene 1 — second brain (graph) */
.scene-brain {
  position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 50% 50%, rgba(91,91,245,0.18), transparent 70%), var(--ink-2);
  display: grid; place-items: center;
}
.scene-brain svg { width: 100%; height: 100%; }
.scene-brain .node { fill: var(--text); }
.scene-brain .node.hub { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.scene-brain .edge { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.scene-brain .pulse {
  fill: var(--good);
  animation: pulseDot 3s var(--ease) infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1); }
}

/* Work scene 2 — masterbrand (9 → 1) */
.scene-merge {
  position: absolute; inset: 0;
  background: var(--ink-2);
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  align-items: center;
  padding: 20px 24px;
  gap: 16px;
}
.merge-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.merge-list span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  color: var(--text-dim);
  background: rgba(255,255,255,0.015);
  animation: mergeFade 6s var(--ease) infinite;
}
.merge-list span:nth-child(2) { animation-delay: 0.2s; }
.merge-list span:nth-child(3) { animation-delay: 0.4s; }
.merge-list span:nth-child(4) { animation-delay: 0.6s; }
.merge-list span:nth-child(5) { animation-delay: 0.8s; }
.merge-list span:nth-child(6) { animation-delay: 1s; }
.merge-list span:nth-child(7) { animation-delay: 1.2s; }
.merge-list span:nth-child(8) { animation-delay: 1.4s; }
.merge-list span:nth-child(9) { animation-delay: 1.6s; }
@keyframes mergeFade {
  0%, 30% { opacity: 1; transform: translateX(0); }
  60% { opacity: 0.2; transform: translateX(20px); }
  80%, 100% { opacity: 1; transform: translateX(0); }
}
.merge-arrow {
  display: grid; place-items: center; color: var(--accent);
  font-family: var(--font-mono); font-size: 18px;
}
.merge-final {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
}
.merge-final b {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  display: block;
}
.merge-final .merge-logo {
  display: block;
  width: 110px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 10px;
}
.merge-final span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-meta);
}

/* Work scene 3 — AI product launch */
.scene-launch {
  position: absolute; inset: 0;
  background: var(--ink-2);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background-color: var(--line);
}
.launch-cell {
  background: var(--ink-2);
  padding: 14px 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.launch-cell .label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-meta);
}
.launch-cell .name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}
.launch-cell::after {
  content: ""; position: absolute; bottom: 0; left: 0;
  height: 2px; width: 0%;
  background: var(--accent);
  animation: launchBar 6s var(--ease) infinite;
}
.launch-cell:nth-child(2)::after { animation-delay: 0.4s; background: var(--warm); }
.launch-cell:nth-child(3)::after { animation-delay: 0.8s; background: var(--good); }
.launch-cell:nth-child(4)::after { animation-delay: 1.2s; }
@keyframes launchBar {
  0% { width: 0%; }
  60% { width: 100%; }
  100% { width: 100%; opacity: 0.3; }
}

/* Work scene 4 — pipeline chart */
.scene-chart {
  position: absolute; inset: 0;
  background: var(--ink-2);
  padding: 20px;
}
.scene-chart svg { width: 100%; height: 100%; }
.chart-grid line { stroke: var(--line); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 800; stroke-dashoffset: 800; animation: drawLine 4s var(--ease) infinite; }
.chart-area { fill: url(#chartGrad); opacity: 0; animation: areaIn 4s var(--ease) infinite; }
.chart-dot { fill: var(--accent); r: 3; }
.chart-dot.last { fill: var(--good); r: 4; filter: drop-shadow(0 0 6px var(--good)); }
@keyframes drawLine {
  0% { stroke-dashoffset: 800; }
  60%, 100% { stroke-dashoffset: 0; }
}
@keyframes areaIn {
  0% { opacity: 0; }
  60%, 100% { opacity: 1; }
}
.chart-label {
  position: absolute; bottom: 16px; left: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-meta);
}
.chart-tag {
  position: absolute;
  top: 16px; right: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--good);
}

/* Work scene 5 — report stack */
.scene-reports {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 50% 30%, rgba(232,116,59,0.14), transparent 70%),
    var(--ink-2);
  display: grid; place-items: center;
  overflow: hidden;
}
.report {
  position: absolute;
  width: 130px; height: 170px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #1a1a1a, #0e0e0e);
  padding: 14px 12px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.8);
  transform-origin: center 110%;
}
.report .top { display: flex; flex-direction: column; gap: 6px; }
.report .top b {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.report .top span {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-meta);
}
.report .swatch {
  width: 24px; height: 24px;
  border-radius: 4px;
}
.report.r1 { transform: rotate(-8deg) translate(-46px, 0); }
.report.r1 .swatch { background: var(--accent); }
.report.r2 { transform: rotate(0deg) translateY(-8px); z-index: 2; }
.report.r2 .swatch { background: var(--warm); }
.report.r3 { transform: rotate(8deg) translate(46px, 0); }
.report.r3 .swatch { background: var(--good); }

/* Work scene 6 — page builder */
.scene-page {
  position: absolute; inset: 0;
  background: var(--ink-2);
  padding: 16px;
}
.page-frame {
  width: 100%; height: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.page-bar {
  height: 18px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px;
}
.page-bar i {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.18);
}
.page-content {
  flex: 1; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.page-content .h {
  height: 8px; background: rgba(255,255,255,0.12); border-radius: 3px; width: 60%;
  animation: build 5s var(--ease) infinite;
}
.page-content .l {
  height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px;
  animation: build 5s var(--ease) infinite;
}
.page-content .l:nth-child(2) { width: 90%; animation-delay: 0.3s; }
.page-content .l:nth-child(3) { width: 80%; animation-delay: 0.5s; }
.page-content .l:nth-child(4) { width: 65%; animation-delay: 0.7s; }
.page-content .cta { height: 18px; width: 80px; background: var(--accent); border-radius: 4px; margin-top: 6px; animation: build 5s var(--ease) infinite; animation-delay: 1s; }
@keyframes build {
  0% { transform: scaleX(0); transform-origin: left; opacity: 0; }
  20%, 100% { transform: scaleX(1); opacity: 1; }
}

/* ---------- Timeline (light section) ---------- */
.timeline-section {
  background: var(--cream);
  color: var(--ink);
}
.timeline-section .eyebrow { color: rgba(14,14,14,0.55); }
.timeline-section .eyebrow::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.timeline-section h2 { color: var(--ink); }
.timeline-section .lede { color: rgba(14,14,14,0.62); }

.timeline {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  padding-left: 0;
}
.role {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  padding: 36px 0;
  border-top: 1px solid rgba(14,14,14,0.10);
}
.role:last-child { border-bottom: 1px solid rgba(14,14,14,0.10); }
@media (max-width: 760px) {
  .role { grid-template-columns: 1fr; gap: 14px; padding: 28px 0; }
}
.role-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(14,14,14,0.55);
  letter-spacing: 0.04em;
  display: flex; flex-direction: column; gap: 6px;
}
.role-meta .dates { color: var(--ink); font-weight: 500; }
.role-meta .loc { color: rgba(14,14,14,0.45); }
.role-body h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 400;
  letter-spacing: -0.022em;
  margin-bottom: 4px;
  color: var(--ink);
}
.role-body .title {
  font-family: var(--font-sans);
  font-size: 15px;
  color: rgba(14,14,14,0.65);
  margin-bottom: 14px;
  font-weight: 400;
}
.role-body .ctx {
  color: rgba(14,14,14,0.72);
  margin-bottom: 18px;
  max-width: 64ch;
  font-size: 15.5px;
}
.role-bullets {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 32px;
}
@media (max-width: 600px) { .role-bullets { grid-template-columns: 1fr; } }
.role-bullets li {
  font-size: 14.5px;
  color: rgba(14,14,14,0.78);
  position: relative;
  padding-left: 18px;
  line-height: 1.45;
}
.role-bullets li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 1px;
  background: var(--accent);
}
.role-bullets li b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
}

.timeline-section .nav-anchor { background: var(--cream); }

/* ---------- Stack ---------- */
.stack-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
@media (max-width: 760px) { .stack-grid { grid-template-columns: 1fr; } }

.stack-cluster {
  background: var(--ink);
  padding: 28px 30px;
  display: flex; flex-direction: column; gap: 16px;
}
.stack-cluster h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-meta);
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.stack-cluster h4::before {
  content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}
.stack-cluster .lede { color: var(--text-dim); font-size: 14px; max-width: 56ch; }
.tools {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.tool {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  background: rgba(255,255,255,0.015);
}
.tool .dot {
  width: 5px; height: 5px;
  background: var(--text-dim);
  border-radius: 50%;
}
.tool.deep .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.tool.deep { border-color: var(--accent-line); background: var(--accent-soft); color: #fff; }

/* ---------- Builds / Advisory ---------- */
.builds {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .builds { grid-template-columns: 1fr; max-width: 560px; } }

.build {
  --b-accent: 91, 91, 245;
  position: relative;
  border: 1px solid rgba(245, 241, 234, 0.08);
  border-radius: 20px;
  padding: 30px 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(140% 90% at 0% 0%, rgba(var(--b-accent), 0.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  overflow: hidden;
  isolation: isolate;
  transition: transform 360ms var(--ease), border-color 360ms var(--ease), box-shadow 360ms var(--ease);
  min-height: 240px;
}
.build > * { position: relative; z-index: 1; }

/* animated conic-gradient border on hover */
.build::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 200deg at 50% 50%,
    rgba(var(--b-accent), 0) 0deg,
    rgba(var(--b-accent), 0.7) 80deg,
    rgba(255,255,255,0.18) 180deg,
    rgba(var(--b-accent), 0) 360deg);
  -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 360ms var(--ease);
  pointer-events: none;
  z-index: 0;
}

/* soft accent glow blob inside the card */
.build::after {
  content: "";
  position: absolute;
  right: -25%; bottom: -35%;
  width: 70%; height: 70%;
  background: radial-gradient(circle at center, rgba(var(--b-accent), 0.28), transparent 65%);
  filter: blur(40px);
  opacity: 0;
  transition: opacity 480ms var(--ease);
  pointer-events: none;
  z-index: 0;
}

.build:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow:
    0 32px 64px -32px rgba(var(--b-accent), 0.45),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.build:hover::before,
.build:hover::after { opacity: 1; }

/* per-card brand accents */
.build:nth-child(1) { --b-accent: 91, 91, 245; }   /* YouSquared — violet */
.build:nth-child(2) { --b-accent: 255, 61, 107; }  /* Penfold — magenta */
.build:nth-child(3) { --b-accent: 0, 168, 232; }   /* Tidio — blue */

.build-head {
  display: flex; justify-content: flex-start; align-items: center; gap: 12px;
}

/* Legacy build-icon (unused now but kept for safety) */
.build-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.02em;
}
.build-icon.b1 { background: linear-gradient(135deg, #5B5BF5, #8E5BF5); }
.build-icon.b2 { background: linear-gradient(135deg, #E8743B, #F2A66B); }
.build-icon.b3 { background: linear-gradient(135deg, #00E5A0, #5B5BF5); }
.build-icon.b4 { background: linear-gradient(135deg, #1a1a1a, #444); border: 1px solid var(--line-strong); }

/* Cream logo plate */
.build-logo {
  display: block;
  height: 24px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  padding: 10px 14px;
  background: linear-gradient(180deg, #FAF8F4 0%, #EFEAE0 100%);
  border-radius: 12px;
  box-sizing: content-box;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.55),
    0 8px 24px -10px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.85);
  transition: transform 360ms var(--ease), box-shadow 360ms var(--ease);
}
.build:hover .build-logo {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.55),
    0 16px 32px -12px rgba(var(--b-accent), 0.55),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.build h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 6px 0 -2px;
}
.build .domain {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-meta);
  letter-spacing: 0.06em;
}
.build .domain::before {
  content: "↗ ";
  color: rgba(var(--b-accent), 0.9);
  font-weight: 500;
  margin-right: 2px;
  transition: transform 240ms var(--ease);
  display: inline-block;
}
.build:hover .domain::before { color: rgba(var(--b-accent), 1); }
.build p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.55;
  flex: 1;
}
.build .chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 6px;
}
.build .chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(245, 241, 234, 0.10);
  border-radius: 999px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.02);
  transition: color 240ms var(--ease), border-color 240ms var(--ease), background 240ms var(--ease);
}
.build:hover .chip {
  border-color: rgba(var(--b-accent), 0.35);
  background: rgba(var(--b-accent), 0.08);
  color: #fff;
}
.status-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.status-pill::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
}
.status-pill.live { color: var(--good); border-color: rgba(0,229,160,0.32); }
.status-pill.live::before { background: var(--good); box-shadow: 0 0 6px var(--good); }
.status-pill.build::before { background: var(--warm); }
.status-pill.build { color: var(--warm); border-color: rgba(232,116,59,0.32); }
.status-pill.plan::before { background: var(--text-meta); }
.status-pill.plan { color: var(--text-dim); }

/* ---------- Expertise ---------- */
.expertise {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.expertise span {
  font-size: 14px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  transition: all 200ms var(--ease);
}
.expertise span:hover {
  color: var(--text);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* ---------- Education ---------- */
.education {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (max-width: 720px) { .education { grid-template-columns: 1fr; } }
.edu {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.edu .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-meta);
  margin-bottom: 8px;
}
.edu h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.018em;
  margin-bottom: 6px;
  color: var(--text);
}
.edu p {
  color: var(--text-dim);
  font-size: 14.5px;
}

/* ---------- Footer / contact ---------- */
.footer {
  padding: 140px var(--gutter) 60px;
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(91,91,245,0.18), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
}
.footer h2 {
  font-size: clamp(36px, 5.6vw, 76px);
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 48px;
  font-weight: 380;
}
.footer h2 em {
  font-style: italic;
  background: linear-gradient(110deg, #fff, #BFBFFA 50%, #5B5BF5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.footer-lede {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  align-items: center;
  margin-bottom: 48px;
}
.footer-lede h2 { margin-bottom: 0; }
.footer-photo {
  margin: 0;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 3/4;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--ink-2);
  position: relative;
}
.footer-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.92);
  display: block;
}
.footer-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10,10,10,0.45) 100%);
  pointer-events: none;
}
@media (max-width: 860px) {
  .footer-lede { grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px; }
  .footer-photo { width: 280px; }
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 60px;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}
@media (max-width: 720px) { .footer-contact { grid-template-columns: 1fr; } }
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-item .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-meta);
}
.contact-item a, .contact-item span {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--text);
  transition: color 200ms var(--ease);
}
.contact-item a:hover { color: var(--accent); }

.footer-base {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-meta);
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
