/* ==========================================================================
   Yashvardhan Thanvi, portfolio
   Single-mode, dark-first, hairline UI with an interactive ASCII field.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist.woff2") format("woff2-variations"), url("../fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono.woff2") format("woff2-variations"), url("../fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-raised: #0e0e0e;
  --surface: #121212;
  --surface-2: #181818;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-3: rgba(255, 255, 255, 0.24);
  --text: #ededed;
  --text-2: #a8a8a8;
  --text-3: #8a8a8a;
  --accent: #e3916c;
  --live: #6fcf97;
  --spot: rgba(255, 255, 255, 0.06);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --ascii-fg: 236 236 236;
  --ascii-accent: 227 145 108;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 60px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf8;
  --bg-raised: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #f3f3f0;
  --line: rgba(10, 10, 10, 0.08);
  --line-2: rgba(10, 10, 10, 0.14);
  --line-3: rgba(10, 10, 10, 0.26);
  --text: #121212;
  --text-2: #4d4d4d;
  --text-3: #6b6b6b;
  --accent: #b5532c;
  --live: #1f8a4c;
  --spot: rgba(0, 0, 0, 0.035);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 20px 50px -28px rgba(0, 0, 0, 0.25);
  --ascii-fg: 30 30 30;
  --ascii-accent: 181 83 44;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #fafaf8;
    --bg-raised: #f4f4f1;
    --surface: #ffffff;
    --surface-2: #f3f3f0;
    --line: rgba(10, 10, 10, 0.08);
    --line-2: rgba(10, 10, 10, 0.14);
    --line-3: rgba(10, 10, 10, 0.26);
    --text: #121212;
    --text-2: #4d4d4d;
    --text-3: #6b6b6b;
    --accent: #b5532c;
    --live: #1f8a4c;
    --spot: rgba(0, 0, 0, 0.035);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 20px 50px -28px rgba(0, 0, 0, 0.25);
    --ascii-fg: 30 30 30;
    --ascii-accent: 181 83 44;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 100;
  padding: 10px 14px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px;
  transform: translateY(-150%); transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-2); }
.accent { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; font-size: 15px; white-space: nowrap; }
.brand-mark { width: 24px; height: 24px; }
:root[data-theme="light"] .brand-mark,
.theme-light-mark .brand-mark { filter: invert(1) brightness(0.25); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .brand-mark { filter: invert(1) brightness(0.25); } }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--text-2);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--text); background: var(--spot); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  color: var(--text-2); border: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--spot); }
.icon-btn svg { width: 16px; height: 16px; }
.kbd-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px;
  border-radius: 9px; border: 1px solid var(--line); color: var(--text-2); font-size: 13px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.kbd-btn:hover { color: var(--text); border-color: var(--line-2); }
kbd, .kbd {
  font-family: var(--font-mono); font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 5px;
  border: 1px solid var(--line-2); color: var(--text-2); background: var(--surface);
}
.theme-icon-light { display: none; }
:root[data-theme="light"] .theme-icon-dark { display: none; }
:root[data-theme="light"] .theme-icon-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-icon-dark { display: none; }
  :root:not([data-theme="dark"]) .theme-icon-light { display: block; }
}
.menu-btn { display: none; }

/* Scroll progress hairline */
.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--text); transform-origin: 0 50%; transform: scaleX(0); opacity: 0.5;
}

/* ---------- Buttons, chips ---------- */
.btn {
  --h: 44px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 12px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--text); background: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}
.btn:hover { border-color: var(--line-3); background: var(--spot); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: color-mix(in srgb, var(--text) 88%, var(--bg)); border-color: transparent; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.arrow { transition: transform 0.25s var(--ease); }
a:hover > .arrow, button:hover > .arrow { transform: translate(2px, -2px); }

.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2); white-space: nowrap;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: none; position: relative; }
.dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--live);
  opacity: 0; animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.7; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 7px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--line);
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }

.link {
  color: var(--text); text-decoration: underline; text-decoration-color: var(--line-3);
  text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 0.2s ease;
}
.link:hover { text-decoration-color: var(--accent); }

/* ---------- Section scaffolding ---------- */
.section { position: relative; padding-block: clamp(80px, 11vw, 136px); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
}
.eyebrow b { color: var(--accent); font-weight: 500; }
.h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 600; text-wrap: balance; }
.h2 em { font-style: normal; color: var(--text-3); }
.lede { font-size: clamp(16px, 1.6vw, 18px); color: var(--text-2); max-width: 64ch; text-wrap: pretty; }
.h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-fade {
  position: absolute; inset: auto 0 0 0; height: 140px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero .container {
  min-height: min(880px, calc(100svh - var(--header-h)));
  display: grid; align-content: center; gap: 40px;
  padding-block: clamp(56px, 9vw, 104px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.hero-title {
  font-size: clamp(46px, 8.2vw, 104px); line-height: 0.95; letter-spacing: -0.055em; font-weight: 600;
  margin-bottom: 26px;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line > span { display: inline-block; animation: rise 1s var(--ease) both; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.08s; color: var(--text-3); }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero-sub { font-size: clamp(17px, 1.9vw, 21px); line-height: 1.5; color: var(--text-2); max-width: 36em; text-wrap: pretty; animation: fade-up 0.9s 0.18s var(--ease) both; }
.hero-sub strong { color: var(--text); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; animation: fade-up 0.9s 0.26s var(--ease) both; }
.hero-social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; animation: fade-up 0.9s 0.32s var(--ease) both; }
.hero-social a {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 9px;
  font-size: 13.5px; color: var(--text-2); transition: color 0.2s ease, background-color 0.2s ease;
}
.hero-social a:hover { color: var(--text); background: var(--spot); }
.hero-social svg { width: 15px; height: 15px; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Terminal card (Claude Code style) */
.term {
  position: relative; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-raised) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow); font-family: var(--font-mono); font-size: 13px; line-height: 1.7;
  animation: fade-up 1s 0.3s var(--ease) both; overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line);
  color: var(--text-3); font-size: 12px;
}
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: block; }
.term-bar span { margin-left: 8px; }
.term-body { padding: 16px 16px 18px; min-height: 300px; }
.term-welcome {
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px; color: var(--text-2); font-size: 12.5px;
}
.term-welcome b { color: var(--accent); font-weight: 500; }
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line .p { color: var(--accent); }
.term-line .c { color: var(--text); }
.term-line .o { color: var(--text-2); }
.term-line .g { color: var(--live); }
.term-line .k { color: var(--text-3); }
.caret { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: var(--text); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-spin { margin-top: 10px; color: var(--accent); }
.term-spin .k { color: var(--text-3); }

/* Proof stats */
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-up 1s 0.4s var(--ease) both; }
.proof > div { padding: 18px 20px; border-left: 1px solid var(--line); }
.proof > div:first-child { border-left: 0; }
.proof dt { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.proof dd { margin-top: 6px; font-size: 13px; color: var(--text-2); line-height: 1.45; }

/* ---------- Programs marquee ---------- */
.programs { padding-block: 40px 44px; border-top: 0; }
.programs-label { display: flex; justify-content: center; text-align: center; margin-bottom: 20px; padding-inline: var(--gutter); }
.marquee { position: relative; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 10px; padding-right: 10px; }
.marquee li {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 11px; white-space: nowrap; font-size: 14px; color: var(--text-2);
  background: var(--bg-raised);
}
.marquee li b { font-weight: 600; color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Cards ---------- */
.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised);
  transition: border-color 0.3s ease, transform 0.4s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 60%);
}
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }

/* ---------- Ventures ---------- */
.ventures { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.venture { padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.venture-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.venture-id { display: flex; align-items: center; gap: 12px; }
.venture-logo {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line-2); background: var(--surface-2); font-family: var(--font-mono); font-weight: 600; font-size: 14px;
}
.venture-logo img { width: 28px; height: 28px; object-fit: contain; }
.venture h3 { font-size: 26px; letter-spacing: -0.03em; font-weight: 600; line-height: 1.1; }
.venture .role { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); margin-top: 2px; }
.venture p { color: var(--text-2); text-wrap: pretty; }
.venture p strong { color: var(--text); font-weight: 500; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.metrics > div { background: var(--bg-raised); padding: 14px 16px; }
.metrics b { display: block; font-size: 24px; letter-spacing: -0.03em; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metrics span { display: block; font-size: 13px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }
.metrics small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-top: 4px; }
.mail-list { display: grid; gap: 8px; }
.mail {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 11px; font-size: 14px; background: var(--bg);
  transition: border-color 0.2s ease;
}
.mail:hover { border-color: var(--line-2); }
.mail-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.mail-addr { font-family: var(--font-mono); font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.mail-actions { display: flex; gap: 4px; flex: none; }
.mail-actions a, .mail-actions button {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--text-3);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.mail-actions a:hover, .mail-actions button:hover { color: var(--text); background: var(--spot); }
.mail-actions svg { width: 15px; height: 15px; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.services li { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; color: var(--text-2); }
.services li::before { content: "+"; font-family: var(--font-mono); color: var(--accent); }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.project { grid-column: span 3; display: flex; flex-direction: column; }
.project.is-feature { grid-column: span 6; flex-direction: row; }
.project.is-third { grid-column: span 2; }
.project-media {
  position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.project.is-feature .project-media { flex: 1.25; aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--line); }
.project-media img, .project-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease), opacity 0.4s ease; }
.project:hover .project-media img { transform: scale(1.025); }
.project-media .ascii-poster {
  position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px;
  color: var(--text-3); white-space: pre; line-height: 1.2; text-align: left; padding: 16px; overflow: hidden;
}
.play {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px 0 10px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  color: #fff; background: rgba(10, 10, 10, 0.62); border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.2s ease, transform 0.3s var(--ease);
}
.play:hover { background: rgba(10, 10, 10, 0.8); transform: translateY(-1px); }
.play svg { width: 18px; height: 18px; }
.project-badge { position: absolute; right: 12px; top: 12px; }
.project-body { padding: clamp(20px, 2.6vw, 28px); display: flex; flex-direction: column; gap: 14px; flex: 1; }
.project.is-feature .project-body { flex: 1; justify-content: center; }
.project-kicker { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.project h3 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.03em; font-weight: 600; line-height: 1.1; }
.project.is-third h3 { font-size: 21px; }
.project p { color: var(--text-2); font-size: 15px; text-wrap: pretty; }
.project ul.points { display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.project ul.points li { display: flex; gap: 10px; }
.project ul.points li::before { content: "›"; color: var(--accent); font-family: var(--font-mono); }
.project ul.points b { color: var(--text); font-weight: 500; }
.project .link-row { padding-top: 4px; }

/* ---------- Open source ---------- */
.oss-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; align-items: start; }
.oss-side { padding: 24px; display: grid; gap: 18px; }
.oss-side .big { font-size: 56px; line-height: 1; font-weight: 600; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.pr-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-raised); }
.pr {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px;
  border-top: 1px solid var(--line); transition: background-color 0.2s ease;
}
.pr:first-child { border-top: 0; }
.pr:hover { background: var(--spot); }
.pr-icon { width: 18px; height: 18px; color: #a371f7; }
:root[data-theme="light"] .pr-icon { color: #8250df; }
.pr-title { font-size: 14.5px; line-height: 1.4; color: var(--text); }
.pr-repo { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.pr-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); text-align: right; white-space: nowrap; }
.pr-state { color: #a371f7; }

/* ---------- Experience ---------- */
.xp-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.timeline { position: relative; display: grid; }
.xp { display: grid; grid-template-columns: 132px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.xp:first-child { border-top: 0; padding-top: 0; }
.xp-when { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); padding-top: 4px; }
.xp h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.xp .org { color: var(--text-2); font-size: 15px; margin-top: 2px; }
.xp p { color: var(--text-2); font-size: 14.5px; margin-top: 10px; text-wrap: pretty; }
.roles { padding: 24px; }
.roles h3 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 400; margin-bottom: 10px; }
.role { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.role:first-of-type { border-top: 0; }
.role b { display: block; font-weight: 500; font-size: 15px; }
.role span { display: block; font-size: 13.5px; color: var(--text-2); }
.role time, .role .when { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; padding-top: 3px; }
.badge-now { color: var(--live); }

/* ---------- Recognition ---------- */
.awards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.award { padding: 24px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.award.is-wide { grid-column: span 2; }
.award-top { display: flex; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.award h3 { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; line-height: 1.25; }
.award p { color: var(--text-2); font-size: 14.5px; text-wrap: pretty; }
.award .rank { font-size: 44px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; margin-top: auto; }
.award .rank small { font-size: 14px; letter-spacing: 0; font-weight: 400; color: var(--text-3); margin-left: 6px; }
.award a.link { font-size: 14px; margin-top: auto; }

/* ---------- About / skills ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.about-copy { display: grid; gap: 18px; font-size: 17px; color: var(--text-2); }
.about-copy strong { color: var(--text); font-weight: 500; }
.edu { padding: 22px; display: grid; gap: 6px; }
.edu b { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.edu .cgpa { font-size: 40px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin-top: 10px; }
.stack { display: grid; gap: 18px; align-content: start; }
.stack-row { display: grid; grid-template-columns: 140px 1fr; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.stack-row:first-child { border-top: 0; padding-top: 0; }
.stack-row h3 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); font-weight: 400; padding-top: 3px; }

.certs { margin-top: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
.certs summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; font-weight: 500;
}
.certs summary::-webkit-details-marker { display: none; }
.certs summary .plus { font-family: var(--font-mono); color: var(--text-3); transition: transform 0.3s var(--ease); }
.certs[open] summary .plus { transform: rotate(45deg); }
.cert-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; padding: 4px 22px 18px; }
.cert-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cert-list li > span { color: var(--text); }
.cert-list li .muted { color: var(--text-3); }
.cert-list time { color: var(--text-3); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }

/* ---------- Contact ---------- */
.contact { overflow: hidden; isolation: isolate; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.contact-side { display: grid; gap: 16px; }
.channels { padding: 22px; display: grid; gap: 12px; }
.call { padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.call b { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.call span { display: block; color: var(--text-2); font-size: 14px; }
.form { padding: clamp(22px, 3vw, 28px); display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--text-2); }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line-2); border-radius: 11px; background: var(--bg);
  padding: 11px 13px; font-size: 15px; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 3px var(--spot); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-status { font-size: 14px; color: var(--text-2); min-height: 1.4em; }
.form-status.ok { color: var(--live); }
.form-status.err { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { position: relative; isolation: isolate; border-top: 1px solid var(--line); overflow: hidden; }
.footer-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.footer .container { padding-block: 56px 36px; display: grid; gap: 40px; }
.footer-big { font-size: clamp(40px, 9vw, 120px); font-weight: 600; letter-spacing: -0.06em; line-height: 0.9; }
.footer-big span { color: var(--text-3); }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 13.5px; color: var(--text-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-links a { color: var(--text-2); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--text); }

/* ---------- Dialogs: video + command palette ---------- */
dialog { padding: 0; border: 0; background: transparent; color: var(--text); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(0, 0, 0, 0.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.video-dialog { width: min(1100px, calc(100vw - 32px)); }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line-2); }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; color: #f2f2f2; font-size: 14px; }
.dialog-bar .icon-btn { color: #f2f2f2; border-color: rgba(255, 255, 255, 0.2); }
.dialog-bar a { color: #cfcfcf; font-size: 13.5px; }

.cmdk { width: min(620px, calc(100vw - 24px)); margin-top: 12vh; }
.cmdk-box { border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-raised); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.7); overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cmdk-input svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.cmdk-input input { flex: 1; height: 54px; border: 0; background: transparent; font-size: 16px; outline: none; }
.cmdk-list { max-height: min(420px, 60vh); overflow-y: auto; padding: 8px; }
.cmdk-group { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); padding: 10px 10px 6px; }
.cmdk-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px;
  font-size: 14.5px; color: var(--text-2); text-align: left;
}
.cmdk-item svg { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.cmdk-item .hint { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); }
.cmdk-item[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.cmdk-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 14px; }
.cmdk-foot { display: flex; gap: 14px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; border-radius: 12px; font-size: 14px; background: var(--text); color: var(--bg);
  transition: opacity 0.25s ease, transform 0.35s var(--ease); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal (enabled by JS only when motion is available) ---------- */
.has-motion [data-reveal] { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .project.is-third { grid-column: span 3; }
}
@media (max-width: 960px) {
  .hero-grid, .ventures, .oss-grid, .xp-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof > div:nth-child(3) { border-left: 0; }
  .proof > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .project.is-feature { flex-direction: column; }
  .project.is-feature .project-media { min-height: 0; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--line); flex: none; }
  .awards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term-body { min-height: 0; }
}
@media (max-width: 680px) {
  :root { --header-h: 56px; }
  .kbd-btn kbd { display: none; }
  .kbd-btn .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .kbd-btn { width: 34px; padding: 0; justify-content: center; }
  .work-grid { grid-template-columns: 1fr; }
  .project, .project.is-third, .project.is-feature { grid-column: auto; }
  .awards { grid-template-columns: 1fr; }
  .award.is-wide { grid-column: auto; }
  .award { min-height: 0; }
  .xp { grid-template-columns: 1fr; gap: 6px; }
  .stack-row { grid-template-columns: 1fr; gap: 10px; }
  .cert-list { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .metrics b { font-size: 21px; }
  .pr { grid-template-columns: auto 1fr; }
  .pr-meta { grid-column: 2; text-align: left; }
  .hero .container { gap: 32px; }
  .brand-name { display: none; }
}
@media (max-width: 340px) {
  .proof { grid-template-columns: 1fr; }
  .proof > div { border-left: 0; }
  .proof > div + div { border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee-track ul + ul { display: none; }
  .marquee ul { flex-wrap: wrap; justify-content: center; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
}

@media print {
  .site-header, .hero-canvas, .footer-canvas, .term, .play, .toast, dialog { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Additions ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.venture-media { display: block; border: 1px solid var(--line); border-radius: 12px; }
.term-line.bench { display: flex; align-items: center; white-space: pre; }
.bar { display: inline-block; height: 8px; width: 0; max-width: 34%; border-radius: 2px; background: var(--accent); margin-left: 2px; transition: width 0.9s var(--ease); }
.bar.dim { background: var(--text-3); opacity: 0.6; }
.term-line.bench .k { margin-left: 8px; }
.js .term-line, .js .term-spin { visibility: hidden; animation: term-failsafe 0s 4.5s forwards; }
.js .term.is-typing .term-line, .js .term.is-typing .term-spin { animation: none; }
.js .term.is-typing .is-shown { visibility: visible; }
@keyframes term-failsafe { to { visibility: visible; } }

.more { margin-top: 40px; }
.more-title { margin-bottom: 14px; }
.more-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.more-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.more-list b { display: block; font-weight: 600; letter-spacing: -0.01em; }
.more-list span { display: block; color: var(--text-2); font-size: 14.5px; margin-top: 2px; text-wrap: pretty; }
.more-links { display: flex; gap: 12px; flex: none; font-family: var(--font-mono); font-size: 12.5px; padding-top: 3px; }
.more-links a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; transition: color 0.2s ease, text-decoration-color 0.2s ease; }
.more-links a:hover { color: var(--text); text-decoration-color: var(--accent); }

.review-label { margin: 22px 0 10px; }
.roles-note { font-size: 13.5px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 4px; }
.edu .eyebrow { margin-bottom: 4px; }
.cgpa small { font-size: 14px; letter-spacing: 0; font-weight: 400; }

@media (max-width: 680px) {
  .more-list { grid-template-columns: 1fr; }
  .term { font-size: 12px; }
  .bar { max-width: 22%; }
  .term-line.bench .k { display: none; }
}

.process { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.process li { flex: 1 1 0; min-width: 0; padding: 10px 12px; background: var(--bg-raised); font-size: 13px; color: var(--text); line-height: 1.35; }
.process b { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--accent); margin-bottom: 2px; }
@media (max-width: 520px) {
  .process li { flex: 1 1 30%; }
}

@media (max-width: 680px) {
  .hide-sm { display: none; }
  .hero-cta { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-cta .btn-primary { grid-column: 1 / -1; }
  .proof > div { padding: 14px 16px; }
  .proof dd { font-size: 12.5px; }
}

.hero-canvas, .footer-canvas { opacity: 0; transition: opacity 1.2s ease; }
.hero-canvas.is-on, .footer-canvas.is-on { opacity: 1; }
