/* =========================================================
   Shipra Gupta · interactive cover letter
   ========================================================= */
:root {
  --bg: #06070c;
  --bg2: #0b0d16;
  --panel: rgba(255, 255, 255, .035);
  --panel2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .15);
  --text: #eceef6;
  --muted: #a0a7bd;
  --dim: #6b7290;
  --blue: #4f8cff;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --grad: linear-gradient(120deg, #4f8cff 0%, #8b5cf6 48%, #ec4899 100%);
  --radius: 18px;
  --maxw: 1180px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --hand: 'Caveat', 'Segoe Script', cursive;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(139, 92, 246, .13), transparent 60%),
    radial-gradient(900px 520px at -10% 35%, rgba(79, 140, 255, .10), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, rgba(236, 72, 153, .08), transparent 60%);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; color: #fff; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: rgba(139, 92, 246, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.container { width: min(var(--maxw), 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .85rem; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- progress + cursor glow ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); box-shadow: 0 0 12px rgba(139, 92, 246, .8); }
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle, rgba(139, 92, 246, .10), rgba(79, 140, 255, .05) 40%, transparent 70%);
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }

/* ---------- buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; line-height: 1; white-space: nowrap;
  transform: translate(var(--mx), var(--my));
  transition: transform .25s var(--ease), box-shadow .3s, background-color .3s, border-color .3s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { box-shadow: 0 14px 40px -8px rgba(236, 72, 153, .7), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .3); }
.btn-sm { padding: 10px 16px; font-size: .88rem; }
.btn-xs { padding: 7px 12px; font-size: .78rem; border-radius: 8px; background: rgba(79, 140, 255, .15); border: 1px solid rgba(79, 140, 255, .4); color: #cfe0ff; margin-left: auto; font-family: var(--mono); }
.btn-xs:hover { background: rgba(79, 140, 255, .28); }
.btn-xs:disabled { opacity: .55; cursor: default; }
.btn-approve { background: linear-gradient(120deg, #16a34a, #22c55e 60%, #4ade80); color: #04140a; font-size: 1.02rem; padding: 16px 26px; box-shadow: 0 12px 34px -10px rgba(34, 197, 94, .8); }
.btn-approve:hover { box-shadow: 0 16px 44px -8px rgba(34, 197, 94, .9); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(6, 7, 12, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); font-size: .85rem; font-weight: 700; color: #fff; box-shadow: 0 6px 18px -6px rgba(139, 92, 246, .8); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: .92rem; transition: color .2s, background-color .2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255, 255, 255, .06); }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, top .3s; }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .8s var(--ease) var(--d, 0s), translate .8s var(--ease) var(--d, 0s); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- spotlight cards ---------- */
.spot { --sx: 50%; --sy: 50%; position: relative; isolation: isolate; }
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(380px circle at var(--sx) var(--sy), rgba(139, 92, 246, .14), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.spot:hover::after { opacity: 1; }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.kicker { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
.section-head p:not(.kicker) { color: var(--muted); font-size: 1.1rem; margin: 14px 0 0; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 110px 0 70px; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .9; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
}
.hero > .container { position: relative; z-index: 1; }
.hero-inner { display: grid; grid-template-columns: 1.35fr .85fr; gap: 48px; align-items: center; }
.prepared { display: inline-block; margin: 0 10px 14px 0; padding: 6px 14px; border-radius: 999px; font-size: .85rem; color: #ffd9ef; border: 1px dashed rgba(236, 72, 153, .5); background: rgba(236, 72, 153, .08); }
.prepared[hidden] { display: none; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 12px; border-radius: 999px; font-size: .86rem; color: #c9f7d8; background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .3); }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.hello { font-family: var(--hand); font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: #f5c2e0; margin: 0 0 6px; }
.hero-title { font-size: clamp(2.1rem, 5.4vw, 4.3rem); font-weight: 700; line-height: 1.05; letter-spacing: -.035em; }
.scramble-line { white-space: nowrap; }
.scramble { color: #fff; position: relative; }
.scramble .sc { color: var(--violet); opacity: .8; }
.caret { display: inline-block; width: .08em; height: .9em; margin-left: .06em; background: var(--pink); vertical-align: -.08em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lede { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 640px; margin: 26px 0 32px; }
.hl { color: #fff; background: linear-gradient(transparent 62%, rgba(236, 72, 153, .35) 62%); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.logo-row { display: flex; gap: 14px; list-style: none; padding: 0; margin: 34px 0 0; font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--dim); letter-spacing: .02em; }

.hero-side { position: relative; }
.term { position: relative; z-index: 2; border-radius: 16px; overflow: hidden; background: rgba(10, 12, 20, .82); border: 1px solid var(--line2); box-shadow: 0 40px 90px -30px rgba(79, 140, 255, .35), 0 0 0 1px rgba(255, 255, 255, .02) inset; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font: 12px var(--mono); color: var(--dim); }
.term-body { min-height: 312px; padding: 18px 18px 22px; font: 13px/1.75 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.term-body .cmd { color: #fff; }
.term-body .cmd::before { content: "❯ "; color: var(--green); }
.term-body .out { color: var(--muted); }
.term-body .ok { color: #86efac; }
.term-body .warn { color: #fcd34d; }
.term-body .cur { display: inline-block; width: 8px; height: 1.1em; background: #fff; vertical-align: -3px; animation: blink 1s steps(1) infinite; }
.float-chip { position: absolute; z-index: 3; padding: 7px 13px; border-radius: 999px; font: 600 12px var(--mono); background: rgba(14, 16, 28, .9); border: 1px solid var(--line2); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); animation: float 6s ease-in-out infinite; }
.fc1 { top: -15px; left: 34%; color: #93c5fd; }
.fc2 { top: -15px; right: 6%; color: #fdba74; animation-delay: -1.5s; }
.fc3 { bottom: -15px; right: 8%; color: #f9a8d4; animation-delay: -3s; }
.fc4 { bottom: -15px; left: 8%; color: #86efac; animation-delay: -4.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 64px; border-radius: 16px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.hero-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 18px 22px; background: rgba(8, 10, 16, .85); }
.hero-stats b { font: 700 1.8rem/1.1 var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats > div > span { color: var(--muted); font-size: .9rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; z-index: 2; width: 26px; height: 42px; margin-left: -13px; border: 2px solid var(--line2); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* =========================================================
   LETTER
   ========================================================= */
.letter-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: start; }
.letter {
  position: relative; padding: clamp(28px, 4vw, 52px); border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid var(--line2); font-size: 1.08rem; color: #d5d9e6;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8);
}
.letter::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad); opacity: .35; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.letter p { margin: 0 0 16px; }
.salutation { font-family: var(--display); font-size: 1.35rem; color: #fff; }
.signoff { margin-top: 26px !important; color: var(--muted); }
.signature { font-family: var(--hand); font-size: 2.6rem; line-height: 1; margin: 0 !important; color: #fff; }
.signature span { display: inline-block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; clip-path: inset(0 100% 0 0); transition: clip-path 2.2s var(--ease) .4s; padding-right: 8px; }
.letter.in .signature span, html:not(.js) .signature span { clip-path: inset(0 0 0 0); }
.tldr { display: grid; gap: 14px; position: sticky; top: 96px; }
.tldr .kicker { margin-bottom: 4px; }
.tldr-card { display: flex; gap: 14px; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.tldr-card p { margin: 4px 0 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.tldr-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(139, 92, 246, .14); font-size: 1.2rem; }

/* =========================================================
   IMPACT / BENTO
   ========================================================= */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(200px, auto); grid-auto-flow: dense; gap: 16px; }
.c2 { grid-column: span 2; }
.r2 { grid-row: span 2; }
.card { position: relative; padding: 22px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .018)); border: 1px solid var(--line); display: flex; flex-direction: column; transition: border-color .3s, translate .8s var(--ease) var(--d, 0s), opacity .8s var(--ease) var(--d, 0s); }
.card:hover { border-color: var(--line2); }
.card-label { margin: 0 0 12px; font: 500 .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.metric { font: 700 clamp(2.3rem, 4vw, 3.1rem)/1 var(--display); letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.metric.small { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.metric-sub { color: var(--muted); font-size: .93rem; line-height: 1.5; margin: 10px 0 0; }
.metric-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.metric-row .metric-sub { margin: 0; flex: 1 1 200px; }
.center-card { align-items: center; text-align: center; }
.center-card .card-label { align-self: stretch; text-align: left; }

.cmp { display: grid; gap: 12px; margin-top: auto; padding-top: 18px; }
.cmp.tight { gap: 8px; padding-top: 14px; }
.cmp-row { display: grid; grid-template-columns: 86px 1fr auto; gap: 12px; align-items: center; font-size: .85rem; color: var(--muted); }
.cmp.tight .cmp-row { grid-template-columns: 52px 1fr; }
.cmp-row em { font: 600 .82rem var(--mono); font-style: normal; color: #fff; min-width: 74px; text-align: right; }
.cmp-track { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.cmp-fill { display: block; height: 100%; width: 0; min-width: 0; border-radius: inherit; background: var(--grad); transition: width 1.8s var(--ease) .3s; }
.muted-fill { background: repeating-linear-gradient(45deg, rgba(160, 167, 189, .55) 0 6px, rgba(160, 167, 189, .35) 6px 12px); }
.in .cmp-fill { width: var(--w); min-width: 8px; }

.cells { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin-top: auto; padding-top: 16px; }
.cells i { aspect-ratio: 1; border-radius: 2px; background: rgba(255, 255, 255, .07); }
.in .cells i { animation: cellOn .35s var(--ease) forwards; animation-delay: calc(var(--i) * 14ms + .2s); }
@keyframes cellOn { to { background: var(--c, #8b5cf6); box-shadow: 0 0 6px var(--c, #8b5cf6); } }

.ring { position: relative; width: 132px; height: 132px; margin: 4px auto 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: rgba(255, 255, 255, .07); }
.ring-fg { stroke: url(#grad-main); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset 2s var(--ease) .3s; }
.in .ring-fg { stroke-dashoffset: calc(326.73 * (1 - var(--p) / 100)); }
.ring-val { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.7rem var(--display); }

.gauge { position: relative; width: 190px; margin: 0 auto; }
.gauge svg { width: 100%; overflow: visible; }
.gauge path { fill: none; stroke-width: 14; stroke-linecap: round; }
.gauge-bg { stroke: rgba(255, 255, 255, .06); }
.gauge-fg { stroke: url(#grad-gauge); opacity: .85; }
.needle { transform-origin: 100px 100px; transform: rotate(54deg); transition: transform 2s var(--ease) .3s; }
.needle line { stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.needle circle { fill: #fff; }
.in .needle { transform: rotate(-32.4deg); }
.gauge-val { display: block; margin-top: 4px; font: 700 1.5rem var(--display); }

.db-viz { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 16px; font: 600 .75rem var(--mono); }
.db-ico, .db-cache { padding: 6px 10px; border-radius: 8px; }
.db-ico { background: rgba(255, 255, 255, .06); color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(239, 68, 68, .7); }
.db-cache { background: rgba(239, 68, 68, .14); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .35); }
.db-flow { position: relative; flex: 1; height: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.db-flow i { position: absolute; top: -2px; width: 18px; height: 6px; border-radius: 3px; background: var(--pink); animation: flow 1.6s linear infinite; }
.db-flow i:nth-child(2) { animation-delay: -.53s; }
.db-flow i:nth-child(3) { animation-delay: -1.06s; }
@keyframes flow { from { left: 100%; } to { left: -18px; } }

.donut-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; flex: 1; }
.donut { position: relative; width: min(240px, 100%); aspect-ratio: 1; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 22; transition: stroke-dasharray 1.6s var(--ease), stroke-width .25s; }
.donut circle.seg:hover { stroke-width: 28; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font: 700 2.6rem/1 var(--display); }
.donut-center > span { color: var(--muted); font-size: .9rem; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; flex: 1 1 200px; }
.legend li { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; }
.legend i { width: 14px; height: 14px; border-radius: 4px; }
.legend b { font-family: var(--display); font-size: 1.05rem; }
.legend small { display: block; color: var(--muted); font-size: .82rem; }
.legend em { font: 600 .9rem var(--mono); font-style: normal; color: #fff; }
.donut-note { color: var(--muted); font-size: .92rem; margin: 18px 0 0; }

.svc-dots { display: grid; grid-template-columns: repeat(22, 1fr); gap: 6px; margin-top: auto; padding-top: 18px; }
.svc-dots i { aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.in .svc-dots i { animation: dotOn .5s var(--ease) forwards; animation-delay: calc(var(--i) * 35ms + .3s); }
@keyframes dotOn { 60% { background: #4f8cff; transform: scale(1.4); } 100% { background: #22c55e; transform: scale(1); box-shadow: 0 0 8px rgba(34, 197, 94, .6); } }

.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: end; margin-top: auto; padding-top: 14px; height: 92px; }
.week i { height: 46px; border-radius: 6px 6px 2px 2px; background: repeating-linear-gradient(45deg, rgba(245, 158, 11, .6) 0 5px, rgba(245, 158, 11, .35) 5px 10px); transition: height 1.4s var(--ease); transition-delay: calc(var(--i, 0) * 120ms + .4s); }
.week i:nth-child(1) { --i: 0; } .week i:nth-child(2) { --i: 1; } .week i:nth-child(3) { --i: 2; } .week i:nth-child(4) { --i: 3; } .week i:nth-child(5) { --i: 4; }
.in .week i { height: 4px; background: var(--green); }
.week span { text-align: center; font: 600 .7rem var(--mono); color: var(--dim); }

.millions .ecg { width: 100%; height: 60px; margin-top: auto; padding-top: 14px; overflow: visible; }
.ecg path { fill: none; stroke: url(#grad-main); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: ecg 3.2s linear infinite; filter: drop-shadow(0 0 6px rgba(236, 72, 153, .7)); }
@keyframes ecg { to { stroke-dashoffset: -900; } }

/* =========================================================
   TRACE (journey)
   ========================================================= */
.badge { padding: 4px 10px; border-radius: 999px; font: 600 .75rem var(--mono); border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.badge.running { color: #93c5fd; border-color: rgba(79, 140, 255, .5); background: rgba(79, 140, 255, .1); }
.badge.waiting { color: #fcd34d; border-color: rgba(245, 158, 11, .5); background: rgba(245, 158, 11, .1); }
.badge.success { color: #86efac; border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .1); }
.verb { display: inline-block; min-width: 42px; text-align: center; padding: 2px 7px; border-radius: 5px; font: 700 .68rem/1.5 var(--mono); letter-spacing: .02em; }
.verb.post { background: rgba(34, 197, 94, .15); color: #86efac; }
.verb.get { background: rgba(79, 140, 255, .16); color: #93c5fd; }

.trace { border-radius: 20px; background: rgba(10, 12, 20, .78); border: 1px solid var(--line2); overflow: hidden; box-shadow: 0 50px 100px -50px rgba(79, 140, 255, .35); }
.trace-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.trace-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: .92rem; }
.trace-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(34, 211, 238, .14); color: #67e8f9; }
.trace-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font: .8rem var(--mono); color: var(--muted); }
.trace-meta .mono { font-size: inherit; color: #c4b5fd; }

.waterfall { --yr: 8%; padding: 12px 0 4px; }
.wf-row { display: grid; grid-template-columns: 300px 1fr; align-items: center; width: 100%; min-height: 42px; padding: 6px 22px 6px 19px; text-align: left; background: none; border: 0; border-left: 3px solid transparent; transition: background-color .2s, border-color .2s; }
.wf-row:hover { background: rgba(255, 255, 255, .03); }
.wf-row[aria-pressed="true"] { background: rgba(139, 92, 246, .09); border-left-color: var(--violet); }
.sp-label { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: calc(var(--depth) * 20px); font: .8rem var(--mono); position: relative; }
.wf-row:not(.root) .sp-label::before { content: ""; position: absolute; left: 6px; top: -14px; width: 9px; height: 22px; border-left: 1px solid var(--line2); border-bottom: 1px solid var(--line2); border-bottom-left-radius: 4px; }
.sp-label i { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.sp-label b { color: #fff; font-weight: 600; flex: 0 0 auto; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-label .op { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex-shrink: 2; }
.sp-track { position: relative; height: 24px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px var(--yr)); }
.sp-now { position: absolute; top: -10px; bottom: -10px; width: 0; border-left: 1px dashed rgba(236, 72, 153, .55); }
.sp-bar { position: absolute; top: 5px; height: 14px; border-radius: 4px; background: var(--c); box-shadow: 0 0 14px -2px var(--c); transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s var(--ease); }
.wf-row.loaded .sp-bar { transform: scaleX(1); }
.root .sp-bar { height: 6px; top: 9px; opacity: .7; box-shadow: none; }
.sp-bar.live::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 26px; border-radius: 0 4px 4px 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55)); animation: shimmer 1.6s infinite; }
.sp-bar.pending { background: repeating-linear-gradient(45deg, rgba(236, 72, 153, .85) 0 5px, rgba(236, 72, 153, .3) 5px 10px); background-size: 14px 14px; animation: stripes .8s linear infinite; outline: 1px dashed rgba(236, 72, 153, .8); outline-offset: 2px; }
.wf-row.approved .sp-bar.pending { background: var(--green); outline-color: rgba(34, 197, 94, .8); animation: none; box-shadow: 0 0 14px var(--green); }
@keyframes stripes { to { background-position: 14px 0; } }
@keyframes shimmer { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.sp-dur { position: absolute; top: 4px; font: .7rem/16px var(--mono); color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity .4s .6s; }
.sp-dur.in { position: absolute; right: 6px; top: -1px; color: rgba(255, 255, 255, .9); font-weight: 700; }
.wf-row.loaded .sp-dur { opacity: 1; }
.wf-axis { display: grid; grid-template-columns: 300px 1fr; padding: 6px 22px 14px; }
.wf-ticks { position: relative; height: 22px; border-top: 1px solid var(--line); }
.wf-ticks span { position: absolute; top: 5px; transform: translateX(-50%); font: .68rem var(--mono); color: var(--dim); }
.wf-nowlabel { position: absolute; top: 5px; transform: translateX(-50%); font: 600 .62rem var(--mono); color: var(--pink); font-style: normal; background: var(--bg2); padding: 0 4px; border-radius: 4px; }

.span-detail { border-top: 1px solid var(--line); background: rgba(0, 0, 0, .3); padding: 18px 22px 20px; min-height: 250px; }
.sd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: .82rem var(--mono); }
.sd-head i { width: 9px; height: 9px; border-radius: 3px; }
.sd-head b { color: #fff; }
.sd-head .op { color: var(--muted); }
.sd-dur { margin-left: auto; color: var(--dim); }
.sd-title { margin: 12px 0 2px; font: 600 1.2rem var(--display); color: #fff; }
.sd-sub { color: var(--muted); font-size: .9rem; }
.sd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.sd-tags span { padding: 3px 8px; border-radius: 6px; font: .72rem var(--mono); color: #93c5fd; background: rgba(79, 140, 255, .08); border: 1px solid rgba(79, 140, 255, .22); }
.sd-tags em { font-style: normal; color: #93c5fd; }
.sd-tags b { color: #fff; font-weight: 500; }
.sd-events { font: 13px/1.85 var(--mono); }
.log-line { display: grid; grid-template-columns: 62px 22px minmax(0, 1fr); gap: 6px; animation: logIn .3s var(--ease) both; }
.log-line .msg { overflow-wrap: anywhere; }
.log-line .ts { color: var(--dim); }
.log-line .lv { text-align: center; }
.lv.ok { color: var(--green); } .lv.info { color: var(--blue); } .lv.warn { color: var(--amber); } .lv.done { color: #c4b5fd; }
.log-line.done .msg { color: #c4b5fd; font-weight: 600; }
.log-line.warn .msg { color: #fcd34d; }
@keyframes logIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* JSON highlighting (terminal + request) */
.jk { color: #93c5fd; } .js { color: #f9a8d4; } .jn { color: #fcd34d; } .jb { color: #86efac; }
.term-body .json { color: var(--muted); }

/* Paytm endpoints card */
.endpoints { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font: .76rem var(--mono); color: #dfe3ee; }
.endpoints li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.endpoints small { margin-left: auto; color: var(--dim); font-size: .66rem; }
.in .endpoints li { animation: logIn .45s var(--ease) both; }
.in .endpoints li:nth-child(2) { animation-delay: .12s; } .in .endpoints li:nth-child(3) { animation-delay: .24s; } .in .endpoints li:nth-child(4) { animation-delay: .36s; }

/* design doc card */
.doc { display: grid; gap: 16px; padding: 18px 18px 8px; }
.doc-sec { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: start; }
.doc-h { padding-top: 3px; font: 600 .68rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #c4b5fd; }
.doc-sec p { margin: 0; color: #cfd3e1; font-size: .9rem; line-height: 1.5; }
.tradeoff { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font: .7rem var(--mono); color: var(--muted); }
.tradeoff i { position: relative; flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #4f8cff, #ec4899); }
.tradeoff b { position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .6); animation: balance 5s ease-in-out infinite; }
@keyframes balance { 0%, 100% { left: 38%; } 50% { left: 62%; } }
.rollout { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; font-size: .86rem; color: #cfd3e1; }
.rollout li::before { content: "✔ "; color: var(--green); font-weight: 700; }
.in .rollout li { animation: logIn .45s var(--ease) both; }
.in .rollout li:nth-child(2) { animation-delay: .25s; } .in .rollout li:nth-child(3) { animation-delay: .5s; } .in .rollout li:nth-child(4) { animation-delay: .75s; }

/* =========================================================   CASES / DEMOS
   ========================================================= */
.case { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.case:first-of-type { border-top: 0; padding-top: 0; }
.case.flip .case-copy { order: 2; }
.case-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 500 .78rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; }
.tag-dot.ms { background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.tag-dot.pay { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.tag-dot.sam { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.case h3, .case-mini h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 16px; }
.case-problem { color: var(--muted); margin: 0 0 16px; }
.case-points { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.case-points li { position: relative; padding-left: 26px; color: #cfd3e1; }
.case-points li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); transform: rotate(45deg); }
.case-result { display: inline-block; margin: 0 0 18px; padding: 10px 14px; border-radius: 12px; background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .25); color: #c9f7d8; }
.case-result b { color: #86efac; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 5px 11px; border-radius: 999px; font: 500 .76rem var(--mono); color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }

.demo { position: relative; border-radius: 18px; overflow: hidden; background: #090b13; border: 1px solid var(--line2); box-shadow: 0 40px 80px -40px rgba(79, 140, 255, .35); }
.demo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); font: .76rem var(--mono); color: var(--muted); background: rgba(255, 255, 255, .025); }
.demo-bar b { color: #fff; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 2s infinite; }

/* agent */
.race { display: grid; gap: 10px; padding: 18px 18px 6px; }
.race-row { display: grid; grid-template-columns: 62px 1fr 54px; gap: 12px; align-items: center; font: .78rem var(--mono); color: var(--muted); }
.race-row time { text-align: right; color: #fff; }
.track { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.track i { display: block; height: 100%; width: 0; border-radius: inherit; background: repeating-linear-gradient(45deg, rgba(160, 167, 189, .7) 0 6px, rgba(160, 167, 189, .45) 6px 12px); }
.track.agent i { background: var(--grad); box-shadow: 0 0 12px rgba(139, 92, 246, .8); }
.agent-log { min-height: 186px; padding: 12px 18px 16px; font: 12.5px/1.8 var(--mono); color: var(--muted); }
.agent-log .row { display: flex; gap: 10px; animation: logIn .3s var(--ease) both; }
.agent-log .row .t { color: var(--dim); flex: none; }
.agent-log .row.ok .m::before { content: "✔ "; color: var(--green); }
.agent-log .row.warn .m::before { content: "⚠ "; color: var(--amber); }
.agent-log .row.run .m::before { content: "› "; color: var(--blue); }
.agent-log .row.fin .m { color: #86efac; font-weight: 700; }
.report { margin: 0 18px 18px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line2); animation: logIn .4s var(--ease) both; }
.report[hidden] { display: none; }
.report-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pill { padding: 3px 9px; border-radius: 999px; font: 600 .7rem var(--mono); }
.pill.ok { background: rgba(34, 197, 94, .15); color: #86efac; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.report-grid small { display: block; color: var(--dim); font: .68rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.report-grid b { font-size: .88rem; }
.report-grid b.ok { color: #86efac; } .report-grid b.warn { color: #fcd34d; }
.report-note { margin: 10px 0 0; font-size: .74rem; color: var(--dim); }

/* migration flow */
.flow { width: 100%; height: auto; padding: 8px 6px 0; }
.flow text { font: 600 10px var(--mono); fill: var(--muted); text-anchor: middle; }
.flow .legacy rect { fill: rgba(255, 255, 255, .04); stroke: rgba(255, 255, 255, .18); stroke-dasharray: 4 3; }
.flow .legacy rect, .flow .legacy text:not(.cap) { animation: fadeLegacy 4s ease-in-out infinite; }
.flow .legacy rect:nth-of-type(2), .flow .legacy text:nth-of-type(2) { animation-delay: .4s; }
.flow .legacy rect:nth-of-type(3), .flow .legacy text:nth-of-type(3) { animation-delay: .8s; }
.flow .legacy rect:nth-of-type(4), .flow .legacy text:nth-of-type(4) { animation-delay: 1.2s; }
@keyframes fadeLegacy { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.flow .cap { fill: var(--dim); font-weight: 500; }
.flow .migrate { stroke: var(--violet); stroke-width: 2; stroke-dasharray: 5 5; animation: dash 1s linear infinite; }
.flow .migrate-head { fill: var(--violet); }
@keyframes dash { to { stroke-dashoffset: -10; } }
.flow .tpl rect { fill: rgba(139, 92, 246, .16); stroke: var(--violet); }
.flow .tpl text { fill: #ddd6fe; }
.flow .lane { stroke: rgba(255, 255, 255, .12); stroke-width: 3; }
.flow .gate rect { fill: #0f1220; stroke: rgba(79, 140, 255, .55); }
.flow .gate text { fill: #cfe0ff; font-size: 15px; }
.flow .gate text.g-l { font-size: 8.5px; fill: var(--muted); }
.flow .gate { animation: gatePing 3.2s infinite; }
.flow .g1 { animation-delay: .35s; } .flow .g2 { animation-delay: 1.05s; } .flow .g3 { animation-delay: 1.75s; }
@keyframes gatePing { 0%, 12%, 100% { filter: none; } 4% { filter: drop-shadow(0 0 8px #22c55e); } }
.flow .ship circle { fill: rgba(34, 197, 94, .18); stroke: var(--green); }
.flow .ship text { font-size: 13px; }
.flow .pkt { fill: var(--pink); filter: drop-shadow(0 0 6px #ec4899); }
.flow .pkt.p2 { fill: var(--blue); filter: drop-shadow(0 0 6px #4f8cff); }
.flow .pkt.p3 { fill: var(--cyan); filter: drop-shadow(0 0 6px #22d3ee); }
.flow-stats text { text-anchor: start; font-size: 10px; }
.flow-stats .big { font: 700 22px var(--display); fill: #fff; }

/* pair */
.case-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 56px 0; border-top: 1px solid var(--line); }
.case-mini { display: flex; flex-direction: column; gap: 4px; padding: 26px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); }
.hero-copy, .hero-side, .case > *, .case-mini, .case-pair > *, .demo, .card, .letter, .tldr, .gate, .contact { min-width: 0; }
.prepared, .status-pill, .hello, .salutation, .letter, .sd-title, .sd-sub, .sd-tags span, .gate-meta dd, .term-body, .checks li { overflow-wrap: anywhere; }
.prepared, .status-pill { max-width: 100%; }
.case-mini h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 10px; }
.case-mini > p:not(.case-tag) { color: var(--muted); margin: 0 0 18px; }
.case-mini .demo { margin-bottom: 18px; flex: 1; }
.demo.compact { box-shadow: none; }

.svc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; padding: 16px; }
.svc { position: relative; height: 34px; border-radius: 8px; display: grid; place-items: center; font: 600 .62rem var(--mono); color: var(--dim); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: background-color .3s, border-color .3s, color .3s, box-shadow .3s; }
.svc.deploying { color: #cfe0ff; background: rgba(79, 140, 255, .16); border-color: rgba(79, 140, 255, .6); animation: blink .5s infinite; }
.svc.ready { color: #04140a; background: var(--green); border-color: var(--green); box-shadow: 0 0 10px rgba(34, 197, 94, .45); }
.svc.nc.ready { background: #4ade80; }

.chat-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 290px; }
.bubble { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: .86rem; line-height: 1.5; animation: logIn .3s var(--ease) both; }
.bubble.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: #dfe3ee; border-bottom-left-radius: 4px; }
.bubble .src { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.bubble .src span { padding: 2px 8px; border-radius: 6px; font: .68rem var(--mono); background: rgba(79, 140, 255, .14); color: #bcd3ff; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* cache sim */
#cache-canvas { width: 100%; height: 280px; }
.cache-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.cache-stats div { padding: 12px 16px; border-left: 1px solid var(--line); }
.cache-stats div:first-child { border-left: 0; }
.cache-stats small { display: block; font: .68rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.cache-stats b { font: 700 1.3rem var(--display); }
.switch { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { position: relative; width: 36px; height: 20px; border-radius: 99px; background: rgba(255, 255, 255, .15); transition: background-color .25s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked + .sw { background: #dc2626; }
.switch input:checked + .sw::after { transform: translateX(16px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--violet); outline-offset: 2px; }
.sw-label { color: #fff; }

/* watch */
.watch-stage { display: grid; place-items: center; padding: 24px 0 28px; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, .18), transparent 60%); }
.watch { width: min(260px, 70%); height: auto; overflow: visible; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)); }
.watch .strap { fill: #161a28; stroke: #262b3d; }
.watch .bezel { fill: #1b1f2e; stroke: #3a4058; stroke-width: 4; }
.watch .screen { fill: #000; }
.watch text { font-family: var(--display); text-anchor: middle; fill: #fff; }
.w-title { font: 600 10px var(--mono); letter-spacing: .12em; fill: var(--muted) !important; }
.w-big { font-size: 38px; font-weight: 700; }
.w-unit { font-size: 20px; fill: var(--muted); }
.w-sub { font-size: 11px; fill: var(--muted) !important; }
.w-screen { opacity: 0; transition: opacity .6s; }
.w-screen.on { opacity: 1; }
.w-gauge-bg, .w-gauge { fill: none; stroke-width: 10; stroke-linecap: round; }
.w-gauge-bg { stroke: rgba(255, 255, 255, .1); }
.w-gauge { stroke: url(#grad-gauge); stroke-dasharray: 188.5; stroke-dashoffset: 188.5; }
.w-stress.on .w-gauge { animation: wGauge 1.4s var(--ease) forwards; }
@keyframes wGauge { to { stroke-dashoffset: 140; } }
.breath { fill: rgba(34, 211, 238, .8); animation: breath 4s ease-in-out infinite; transform-origin: 130px 236px; }
@keyframes breath { 0%, 100% { transform: scale(.6); opacity: .5; } 50% { transform: scale(1.4); opacity: 1; } }
.pleth { fill: none; stroke: var(--pink); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; animation: pleth 2.4s linear infinite; filter: drop-shadow(0 0 4px #ec4899); }
@keyframes pleth { to { stroke-dashoffset: -260; } }

/* =========================================================
   PRINCIPLES
   ========================================================= */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.principle { padding: 26px 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, transform .3s var(--ease); }
.principle:hover { border-color: var(--line2); transform: translateY(-4px); }
.p-num { display: inline-block; font: 700 2.4rem/1 var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 18px; }
.principle h3 { font-size: 1.2rem; margin-bottom: 10px; }
.principle p { color: var(--muted); margin: 0; font-size: .95rem; }

/* =========================================================
   SKILLS
   ========================================================= */
.skill-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.skill-tabs button { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); color: var(--muted); font-size: .9rem; transition: all .25s; }
.skill-tabs button:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.skill-tabs button[aria-selected="true"] { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 8px 24px -10px rgba(139, 92, 246, .9); }
.skill-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.skill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font-weight: 500; background: var(--panel); border: 1px solid var(--line); transition: opacity .35s, transform .35s var(--ease), border-color .35s, background-color .35s, filter .35s; }
.skill i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.skill.dim { opacity: .22; filter: grayscale(1); transform: scale(.96); }
.skill.hot { border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); transform: translateY(-2px); }
.skill.featured { font-size: 1.08rem; padding: 12px 20px; }
.marquee { margin-top: 70px; overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 50s linear infinite; font: 600 1.6rem var(--display); color: rgba(255, 255, 255, .16); }
.marquee-track span:nth-child(3n) { color: rgba(139, 92, 246, .55); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   BEYOND
   ========================================================= */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, transform .3s var(--ease); }
a.project:hover { border-color: var(--line2); transform: translateY(-5px); }
.project h3 { font-size: 1.3rem; margin-top: 8px; }
.project p { color: var(--muted); margin: 4px 0 12px; font-size: .95rem; }
.proj-link { margin-top: auto; padding-top: 14px; font: 600 .82rem var(--mono); color: #c4b5fd; }
.proj-viz { height: 118px; border-radius: 14px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); margin-bottom: 8px; overflow: hidden; position: relative; }
.badge-pub { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font: 600 .72rem var(--mono); color: #fdba74; background: rgba(249, 115, 22, .12); border: 1px solid rgba(249, 115, 22, .35); }
.tabs-viz { display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 12px; }
.ftab { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; font: .78rem var(--mono); color: var(--muted); background: rgba(255, 255, 255, .04); }
.ftab.active { color: #fff; background: rgba(139, 92, 246, .18); border: 1px solid rgba(139, 92, 246, .4); }
.ftab time { color: #fdba74; }
.url-viz { display: grid; place-items: center; padding: 14px; font: .74rem var(--mono); }
.url-viz span { grid-area: 1 / 1; text-align: center; word-break: break-all; transition: opacity .5s; }
.long-url { color: var(--muted); animation: urlA 5s infinite; }
.short-url { color: #86efac; font-size: 1.25rem; font-weight: 700; animation: urlB 5s infinite; }
@keyframes urlA { 0%, 40% { opacity: 1; filter: blur(0); transform: scale(1); } 50%, 90% { opacity: 0; filter: blur(4px); transform: scale(.9); } 100% { opacity: 1; } }
@keyframes urlB { 0%, 40% { opacity: 0; transform: scale(1.2); } 50%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.eq-viz { display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding: 16px; }
.eq-viz i { width: 10px; height: 20%; border-radius: 3px 3px 1px 1px; background: var(--grad); animation: eq 1.1s ease-in-out infinite alternate; }
.eq-viz i:nth-child(2n) { animation-duration: .8s; } .eq-viz i:nth-child(3n) { animation-duration: 1.3s; } .eq-viz i:nth-child(5n) { animation-duration: .65s; }
.eq-viz i:nth-child(4n) { animation-delay: -.4s; } .eq-viz i:nth-child(7n) { animation-delay: -.9s; }
@keyframes eq { to { height: 92%; } }
.achievements { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.ach { display: flex; gap: 16px; align-items: center; padding: 20px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.ach-ico { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 1.5rem; background: rgba(255, 255, 255, .05); }
.ach b { font-family: var(--display); font-size: 1.1rem; }
.ach p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

/* =========================================================
   APPROVE
   ========================================================= */
.approve::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(700px 400px at 50% 30%, rgba(245, 158, 11, .08), transparent 70%); transition: background .8s; }
.approve.approved::before { background: radial-gradient(700px 400px at 50% 30%, rgba(34, 197, 94, .14), transparent 70%); }
.gate { position: relative; max-width: 860px; margin: 0 auto; padding: clamp(26px, 4vw, 46px); border-radius: 24px; background: rgba(12, 14, 22, .85); border: 1px solid rgba(245, 158, 11, .45); box-shadow: 0 0 0 6px rgba(245, 158, 11, .05), 0 50px 100px -40px rgba(245, 158, 11, .35); transition: border-color .6s, box-shadow .6s; }
.approved .gate { border-color: rgba(34, 197, 94, .6); box-shadow: 0 0 0 6px rgba(34, 197, 94, .06), 0 50px 100px -40px rgba(34, 197, 94, .45); }
.gate-head { display: flex; gap: 20px; align-items: flex-start; }
.gate-icon { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; font-size: 1.5rem; color: #1d1300; background: var(--amber); animation: waitPulse 1.8s infinite; transition: background-color .4s; }
.approved .gate-icon { background: var(--green); color: #04140a; animation: none; }
.gate h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.req { margin: 28px 0 24px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: #090b13; }
.req-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03); font: .85rem var(--mono); }
.req-path { color: #fff; }
.req-status { margin-left: auto; padding: 3px 10px; border-radius: 999px; font: 600 .74rem var(--mono); color: #fcd34d; background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .45); transition: all .4s; }
.req-status.ok { color: #86efac; background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .5); }
.req-body { margin: 0; padding: 14px 18px 16px; font: 13px/1.7 var(--mono); color: var(--muted); overflow-x: auto; }
.gate-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 28px 0 22px; border-radius: 14px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.gate-meta div { padding: 12px 16px; background: rgba(10, 12, 20, .95); }
.gate-meta dt { font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.gate-meta dd { margin: 4px 0 0; font-weight: 600; color: #fff; word-break: break-word; }
.checks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; }
.checks li { display: flex; gap: 10px; color: #d5d9e6; }
.checks li > span:first-child { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .72rem; background: rgba(34, 197, 94, .18); color: #86efac; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.gate-note { min-height: 1.5em; margin: 16px 0 0; color: #86efac; font-family: var(--mono); font-size: .88rem; }
.contact-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; max-width: 1080px; margin: 34px auto 0; }
.contact { display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, transform .3s var(--ease); min-width: 0; }
.contact:hover { border-color: var(--line2); transform: translateY(-4px); }
.c-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; margin-bottom: 10px; font: 700 .9rem var(--mono); background: rgba(139, 92, 246, .16); color: #ddd6fe; }
.contact small { color: var(--dim); font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.contact b { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .88rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer a:hover { color: #fff; }

/* toast + confetti */
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 80; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; padding: 12px 18px; border-radius: 12px; background: #11141f; border: 1px solid var(--line2); box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .7); font-size: .92rem; transition: transform .45s var(--ease), visibility 0s .45s; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  /* Put the proof stats right under the pitch; the terminal follows. */
  .hero-inner { display: contents; }
  .hero-copy, .hero-side { width: min(var(--maxw), 100% - 40px); margin-inline: auto; position: relative; z-index: 1; }
  .hero-copy { order: 1; }
  .hero > .container:not(.hero-inner) { order: 2; }
  .hero-stats { margin-top: 36px; }
  .hero-side { order: 3; width: min(620px, 100% - 40px); margin-top: 44px; }
  .letter-grid { grid-template-columns: 1fr; }
  .tldr { position: static; grid-template-columns: 1fr 1fr; }
  .tldr .kicker { grid-column: 1 / -1; }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .case, .case-pair { grid-template-columns: 1fr; }
  .case.flip .case-copy { order: 0; }
  .projects, .achievements { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: absolute; top: 68px; left: 12px; right: 12px; flex-direction: column; gap: 2px; padding: 10px; border-radius: 16px;
    background: rgba(12, 14, 22, .97); border: 1px solid var(--line2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
    opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s, visibility 0s .25s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .25s, transform .25s, visibility 0s; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
  .nav-cta { margin-left: auto; }
  .menu-btn { display: block; }
  .wf-row, .wf-axis { grid-template-columns: 230px 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(var(--maxw), 100% - 28px); }
  .hero { padding-top: 96px; }
  .hero-stats { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .hero-stats > div { padding: 14px 16px; }
  .hero-stats b { font-size: 1.45rem; }
  .float-chip { display: none; }
  .term-body { font-size: 12px; min-height: 300px; }
  .bento { grid-template-columns: 1fr; }
  .c2 { grid-column: span 1; }
  .r2 { grid-row: span 1; }
  .tldr { grid-template-columns: 1fr; }
  .principles, .projects, .achievements { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .gate-meta { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .nav-cta { display: none; }
  .nav-links { margin-left: 0; }
  .menu-btn { margin-left: auto; }
  .svc-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); padding: 12px; }
  .svc { font-size: .56rem; }
  .hero-copy, .hero-side { width: min(var(--maxw), 100% - 28px); }
  .report-grid { grid-template-columns: 1fr; }
  .cmp-row { grid-template-columns: 70px 1fr auto; }
  .scroll-cue { display: none; }
  .gate-head { flex-direction: column; gap: 14px; }
  .btn-approve { width: 100%; white-space: normal; }
  .wf-row { grid-template-columns: 1fr; gap: 4px; padding: 8px 14px 8px 11px; }
  .wf-axis { grid-template-columns: 1fr; padding: 6px 14px 14px; }
  .wf-axis > span { display: none; }
  .wf-ticks span:nth-child(even) { display: none; }
  .trace-head, .span-detail { padding-left: 14px; padding-right: 14px; }
  .log-line { grid-template-columns: 54px 18px minmax(0, 1fr); }
  .doc-sec { grid-template-columns: 1fr; gap: 4px; }
  .rollout { grid-template-columns: 1fr; }
  .req-status { margin-left: 0; }
  .req-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
}
@media (max-width: 420px) {
  .scramble-line { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; translate: none; }
  .cursor-glow { display: none; }
  .ecg path, .pleth { stroke-dasharray: none; stroke-dashoffset: 0; }
}
@media print {
  .nav, .progress, .cursor-glow, #hero-canvas, .scroll-cue, #confetti, .toast, .marquee { display: none !important; }
  .js .reveal { opacity: 1; translate: none; }
}
