/* ==========================================================================
   rajbharti.in — poster hero, calm dark body, one gold accent
   ========================================================================== */

:root {
  --bg: #0c0b0a;
  --surface: #151412;
  --surface-2: #1d1b18;
  --line: rgba(242, 236, 223, 0.09);
  --line-strong: rgba(242, 236, 223, 0.18);
  --text: #f2ecdf;
  --muted: #a59e92;
  --faint: #8a8378;
  --gold: #d9b45a;
  --gold-soft: rgba(217, 180, 90, 0.14);
  --ink: #12100c;

  --display: 'Tanker', 'Arial Narrow', sans-serif;
  --sans: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  scrollbar-color: #3a352d var(--bg);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; line-height: 1.05; text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--gold); color: var(--ink); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a352d; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #57503f; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
input, textarea { caret-color: var(--gold); }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 16px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.5rem; border-radius: 999px;
  font-weight: 500; font-size: 1rem; letter-spacing: 0.005em;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.2s var(--ease), border-color 0.3s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--solid { background: var(--text); color: var(--ink); }
.btn--solid:hover { background: var(--gold); }
.btn--ghost { background: rgba(21, 20, 18, 0.7); border: 1px solid var(--line-strong); color: var(--text); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

.arrow-link {
  display: inline-flex; align-items: center; gap: 0.45em;
  color: var(--gold); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em;
  text-decoration-color: rgba(217, 180, 90, 0.35);
  transition: text-decoration-color 0.3s var(--ease), color 0.3s var(--ease);
}
.arrow-link::after {
  content: ''; width: 0.7em; height: 0.7em; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9L9 3M4 3h5v5' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9L9 3M4 3h5v5' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.3s var(--ease);
}
.arrow-link:hover { text-decoration-color: currentColor; }
.arrow-link:hover::after { transform: translate(2px, -2px); }
.arrow-link--quiet { color: var(--text); text-decoration-color: var(--line-strong); }
.arrow-link--quiet:hover { color: var(--gold); }
.arrow-link--up::after { transform: rotate(-45deg); }
.arrow-link--up:hover::after { transform: rotate(-45deg) translate(1px, -1px); }

.text-btn {
  margin-top: 1.25rem; color: var(--gold); font-weight: 500;
  text-decoration: underline; text-underline-offset: 0.3em; text-decoration-color: rgba(217, 180, 90, 0.35);
}
.text-btn:hover { text-decoration-color: currentColor; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding-inline: var(--gutter);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(12, 11, 10, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav__mark {
  font-family: var(--display); font-size: 1.6rem; letter-spacing: 0.02em; line-height: 1;
  padding: 6px 2px;
}
.nav__menu { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); font-size: 0.95rem; font-weight: 500; }
.nav__menu a { position: relative; padding: 6px 0; color: var(--text); transition: color 0.3s var(--ease); }
.nav__menu a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.nav__menu a:hover, .nav__menu a.is-current { color: var(--gold); }
.nav__menu a:hover::after, .nav__menu a.is-current::after { transform: scaleX(1); }
.nav__menu .nav__cta { padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px; }
.nav__menu .nav__cta::after { display: none; }
.nav__menu .nav__cta:hover { border-color: var(--gold); }
.nav__toggle { display: none; }

/* ---------- Hero (the poster) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
}
.hero__stage { position: absolute; inset: 0; --shift: -52.3%; /* puts the face, not the body, on the centre line */ }
.hero__light {
  position: absolute; left: 50%; top: 56%; z-index: 0;
  width: min(1100px, 110vw); aspect-ratio: 1.15;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(217, 180, 90, 0.16), rgba(217, 180, 90, 0.05) 55%, transparent 100%);
  pointer-events: none;
}
.hero__word {
  position: absolute; z-index: 1; left: 0; right: 0; top: clamp(96px, 19vh, 200px);
  display: flex; justify-content: center; gap: 0.18em;
  padding-inline: var(--gutter);
  font-family: var(--display); font-weight: 400;
  font-size: clamp(4.5rem, 16.5vw, 19rem);
  line-height: 0.82; letter-spacing: 0; text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  will-change: transform;
}
.hero__word-line { display: block; }
.hero__portrait {
  position: absolute; z-index: 2; left: 50%; bottom: 0;
  height: min(88svh, 1000px); width: auto; max-width: none;
  transform: translateX(var(--shift));
  filter: saturate(0.94) contrast(1.03);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 97%);
          mask-image: linear-gradient(to bottom, #000 70%, transparent 97%);
  will-change: transform;
}
/* gold-dust portrait (dust.js): the canvas sits exactly where the photo does */
.hero__dust { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.dust .hero__portrait { animation: none; opacity: 0; transition: opacity 0.18s linear; }
.dust .hero__portrait.is-crisp { opacity: 1; transition: opacity 0.9s var(--ease); }

.hero__copy {
  position: absolute; z-index: 3; right: var(--gutter); bottom: clamp(32px, 7vh, 72px);
  width: min(34rem, 40vw);
  display: flex; flex-direction: column; gap: 1.75rem;
  pointer-events: none;
}
.hero__copy > * { pointer-events: auto; }
.hero__intro { max-width: 30rem; }
.hero__hey { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.hero__role {
  margin-top: 0.35rem;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25;
  color: var(--muted);
}
.hero__line { margin-top: 1rem; color: var(--muted); font-size: 1rem; max-width: 26rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; }
.hero__buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* the rotating role, set on a strip of gold tape */
.tape {
  position: relative; display: inline-block; vertical-align: bottom;
  padding: 0.02em 0.45em 0.06em;
  color: var(--ink); white-space: nowrap;
  transform: rotate(-2deg);
  transition: width 0.55s var(--ease);
}
.tape::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--gold);
  border-radius: 3px;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.7);
}
.tape__text { display: inline-block; transition: transform 0.45s var(--ease), opacity 0.3s var(--ease), filter 0.45s var(--ease); }
.tape.is-swapping .tape__text { transform: translateY(-60%); opacity: 0; filter: blur(4px); }
.tape.is-entering .tape__text { transform: translateY(60%); opacity: 0; filter: blur(4px); transition: none; }

.socials { display: flex; gap: 0.4rem; }
.socials a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--muted); font-size: 1rem;
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.socials a:hover { color: var(--gold); background: var(--gold-soft); }

/* entrance: one authored moment */
@media (prefers-reduced-motion: no-preference) {
  .hero__word-line { animation: rise 1.1s var(--ease) both; }
  .hero__word-line + .hero__word-line { animation-delay: 0.08s; }
  .hero__portrait { animation: develop 1.4s var(--ease) 0.15s both; }
  .hero__copy { animation: fade 1s var(--ease) 0.55s both; }
  .hero__light { animation: fade 2s ease 0.3s both; }
}
@keyframes rise { from { transform: translateY(42%); opacity: 0; clip-path: inset(0 0 100% 0); } to { transform: none; opacity: 1; clip-path: inset(0 0 -10% 0); } }
@keyframes develop { from { opacity: 0; transform: translate(var(--shift), 4%); filter: saturate(0.94) contrast(1.03) brightness(0.4) blur(10px); } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(96px, 12vw, 168px); }
.section--alt { background: linear-gradient(to bottom, var(--bg), #100f0d 12%, #100f0d 88%, var(--bg)); }
.sec-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 1.25rem 3rem; align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.sec-head h2 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); letter-spacing: -0.04em; line-height: 0.98; }
.sec-head p { color: var(--muted); }

/* ---------- Featured work slider ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: "stage tabs" "stage panels" "stage controls";
  grid-template-rows: auto 1fr auto;
  gap: 0 clamp(32px, 5vw, 72px);
  align-items: start;
}
.feature__stage { grid-area: stage; position: relative; aspect-ratio: 16 / 11; perspective: 1600px; }
.shot {
  position: absolute; inset: 6% 0 0; margin: 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform-origin: 50% 100%;
  transition: transform 0.9s var(--ease), opacity 0.6s var(--ease), filter 0.9s var(--ease);
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.js .shot { opacity: 0; transform: translateY(6%) scale(0.92); pointer-events: none; }
.js .shot.is-active { opacity: 1; transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); z-index: 3; }
.feature__stage.is-tilting .shot.is-active { transition: transform 0.25s var(--ease), opacity 0.6s var(--ease), filter 0.9s var(--ease); }
.shot::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 244, 220, 0.12), transparent 45%);
  transition: opacity 0.4s var(--ease);
}
.feature__stage.is-tilting .shot.is-active::after { opacity: 1; }
.js .shot.is-next { opacity: 0.55; transform: translate(4%, -5%) scale(0.92) rotate(2.5deg); z-index: 2; filter: brightness(0.55) saturate(0.7); }
.js .shot.is-next2 { opacity: 0.3; transform: translate(7%, -9%) scale(0.85) rotate(5deg); z-index: 1; filter: brightness(0.4) saturate(0.5); }
.js .shot.is-leaving { opacity: 0; transform: translate(-6%, 4%) scale(0.96) rotate(-3deg); z-index: 4; }

.feature__tabs { grid-area: tabs; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin-top: 4%; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.feature__tab {
  padding: 4px 0; font-size: 0.95rem; font-weight: 500; color: var(--faint);
  transition: color 0.3s var(--ease);
}
.feature__tab:hover { color: var(--text); }
.feature__tab[aria-selected="true"] { color: var(--gold); }

.feature__panels { grid-area: panels; padding-top: 1.75rem; }
.js .panel:not(.is-active) { display: none; }
.panel + .panel { margin-top: 3rem; }
.js .panel + .panel { margin-top: 0; }
.panel.is-active { animation: panelIn 0.7s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }
.panel h3 { font-size: clamp(2rem, 3.4vw, 2.9rem); letter-spacing: -0.035em; }
.panel > p { margin-top: 1rem; color: var(--muted); max-width: 34rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.facts div { display: flex; flex-direction: column-reverse; gap: 0.35rem; }
.facts dt { font-size: 0.85rem; line-height: 1.35; color: var(--faint); }
.facts dd { font-family: var(--display); font-size: clamp(2.2rem, 3.6vw, 3rem); line-height: 0.9; color: var(--text); font-variant-numeric: tabular-nums; }
.panel__links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; margin-top: 2rem; }

.feature__controls { grid-area: controls; display: flex; align-items: center; gap: 0.6rem; padding-top: 2rem; }
.round-btn {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.round-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.round-btn:hover { border-color: var(--gold); }
.round-btn:hover svg { stroke: var(--gold); }
.round-btn:active { transform: scale(0.94); }
.feature__progress { flex: 1; max-width: 120px; height: 2px; margin-left: 0.75rem; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.feature__progress span { display: block; height: 100%; width: 20%; background: var(--gold); transition: transform 0.6s var(--ease); }
.feature__count { margin-left: 0.5rem; font-size: 0.85rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.no-js-hide { display: none; }
html:not(.js) .feature__controls, html:not(.js) .feature__tabs { display: none; }

/* ---------- More things I've built (index list) ---------- */
.more { margin-top: clamp(96px, 11vw, 150px); }
.more__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.more__head h3 { font-size: clamp(1.75rem, 3vw, 2.4rem); letter-spacing: -0.035em; }
.index { border-top: 1px solid var(--line); }
.index__row { border-bottom: 1px solid var(--line); }
.index__row a {
  display: grid; grid-template-columns: minmax(11rem, 16rem) minmax(0, 1fr) 7.5rem 24px; gap: 1.5rem; align-items: baseline;
  padding: 1.15rem 0.25rem;
  transition: background-color 0.35s var(--ease), padding 0.35s var(--ease);
}
.index__name { font-weight: 500; font-size: 1.1rem; letter-spacing: -0.01em; }
.index__desc { color: var(--muted); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.index__lang { color: var(--faint); font-size: 0.85rem; text-align: right; }
.index__arrow { width: 16px; height: 16px; align-self: center; justify-self: end; fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s var(--ease), transform 0.35s var(--ease); }
.index__row a:hover { background: var(--surface); padding-inline: 1rem; }
.index__row a:hover .index__name { color: var(--gold); }
.index__row a:hover .index__arrow { stroke: var(--gold); transform: translate(2px, -2px); }
.index__empty { padding: 1.25rem 0.25rem; color: var(--faint); }

/* ---------- Competitions ledger & certificates ---------- */
.ledger { border-top: 1px solid var(--line); margin-bottom: clamp(56px, 7vw, 96px); }
.ledger:empty { display: none; }
.ledger li {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 1.5rem; align-items: center;
  padding: 1.4rem 0.25rem; border-bottom: 1px solid var(--line);
}
.ledger__date { color: var(--faint); font-size: 0.9rem; }
.ledger__title { font-weight: 500; font-size: 1.1rem; }
.ledger__title small { display: block; margin-top: 0.15rem; color: var(--muted); font-weight: 400; font-size: 0.92rem; }
.ledger__rank { display: flex; align-items: baseline; gap: 0.5rem; justify-content: flex-end; }
.ledger__rank strong { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 4.4vw, 3.6rem); line-height: 0.9; color: var(--gold); font-variant-numeric: tabular-nums; }
.ledger__rank span { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }

.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; }
.cert {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.5s var(--ease);
}
.cert:hover { border-color: rgba(217, 180, 90, 0.4); transform: translateY(-4px); }
.cert__img { aspect-ratio: 16 / 10; background: #0f0e0c; overflow: hidden; }
.cert__img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.8s var(--ease); }
.cert:hover .cert__img img { transform: scale(1.03); }
.cert__body { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.25rem 1.4rem 1.4rem; flex: 1; }
.cert__title { font-size: 1.08rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.cert__meta { color: var(--muted); font-size: 0.9rem; }
.cert__body .arrow-link { margin-top: auto; padding-top: 0.75rem; font-size: 0.95rem; }
.cert--latest { border-color: rgba(217, 180, 90, 0.45); }
.cert__flag { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }

/* ---------- Writing ---------- */
.writing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px); }
.writing__label { font-size: 1.1rem; font-weight: 500; color: var(--muted); padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.entries li { border-bottom: 1px solid var(--line); }
.entries li[hidden] { display: none; }
.entries a, .entries__static { display: block; padding: 1.25rem 0.25rem; transition: padding 0.35s var(--ease); }
.entries a:hover { padding-left: 0.75rem; }
.entries time, .entries .entries__src { color: var(--faint); font-size: 0.85rem; }
.entries h4 { margin-top: 0.3rem; font-size: 1.12rem; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; transition: color 0.3s var(--ease); }
.entries a:hover h4 { color: var(--gold); }
.entries p { margin-top: 0.35rem; color: var(--muted); font-size: 0.93rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.about__text p { color: var(--muted); max-width: 38rem; }
.about__text p + p { margin-top: 1.1rem; }
.about__text .about__lead { color: var(--text); font-size: clamp(1.4rem, 2.3vw, 1.9rem); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; margin-bottom: 1.75rem; }
.signals { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); }
.signals h3 { font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: 1.1rem; }
.signals li { position: relative; padding-left: 1.25rem; color: var(--muted); font-size: 0.97rem; }
.signals li + li { margin-top: 0.85rem; }
.signals li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.toolkit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; margin-top: clamp(56px, 7vw, 96px); padding-top: 2rem; border-top: 1px solid var(--line); }
.toolkit dt { font-weight: 500; margin-bottom: 0.4rem; }
.toolkit dd { color: var(--muted); font-size: 0.93rem; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact h2 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); letter-spacing: -0.04em; line-height: 0.98; }
.contact__intro > p { margin-top: 1.25rem; color: var(--muted); max-width: 30rem; }
.contact__links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.contact__links a {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem;
  border: 1px solid var(--line); border-radius: 999px; font-size: 0.92rem; color: var(--muted);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact__links a:hover { color: var(--gold); border-color: rgba(217, 180, 90, 0.45); }
.form { display: grid; gap: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); }
.field { display: grid; gap: 0.45rem; }
.field span { font-size: 0.9rem; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line-strong); color: var(--text);
  font: inherit; font-size: 1rem;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field textarea:hover { border-color: rgba(242, 236, 223, 0.3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: #0f0e0c; }
.form .btn { justify-self: start; margin-top: 0.4rem; }
.form { position: relative; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 0.4rem; }
.form__foot .btn { margin-top: 0; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.form__status { font-size: 0.95rem; color: var(--muted); }
.form__status:empty { display: none; }
.form__status[data-kind="ok"] { color: var(--gold); }
.form__status[data-kind="error"] { color: #f0a08c; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--faint); font-size: 0.9rem; }
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* ---------- Film grain (laptops and desktops only) ----------
   Phones get none: a fixed, blended, full-screen layer exhausts mobile GPU tile memory
   and the browser stops painting everything below the first screen. On desktop the layer
   is exactly screen-sized and only its background moves, so no oversized layer is made. */
@media (hover: hover) and (pointer: fine) and (min-width: 861px) {
  body::after {
    content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.08; mix-blend-mode: overlay;
    animation: grain 0.8s steps(5) infinite;
  }
}
@keyframes grain {
  0% { background-position: 0 0; }
  20% { background-position: -37px 23px; }
  40% { background-position: 29px -51px; }
  60% { background-position: -58px -11px; }
  80% { background-position: 41px 37px; }
  100% { background-position: 0 0; }
}

/* ==========================================================================
   After the hero: story, flagship pipeline, systems matrix, closing CTA
   ========================================================================== */

/* ---------- Background & philosophy ---------- */
.story__title, .cta__title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3.4rem, 11.5vw, 11rem); line-height: 0.86; letter-spacing: 0;
  color: var(--text);
}
.story__title em, .cta__title em { font-style: normal; color: var(--gold); }
.story__line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.story__line > span { display: inline-block; transition: transform 1.1s var(--ease); }
.will-reveal:not(.is-in) .story__line > span { transform: translateY(105%); }
.will-reveal .story__line + .story__line > span { transition-delay: 0.12s; }

.story__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); margin-top: clamp(56px, 7vw, 104px); }
.story__col h3 { font-size: 1rem; font-weight: 500; color: var(--gold); margin-bottom: 1.1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.story__col p { color: var(--muted); max-width: 36rem; }
.story__col p + p { margin-top: 1rem; }
.story__col .story__lead { color: var(--text); font-size: clamp(1.25rem, 1.9vw, 1.55rem); line-height: 1.35; letter-spacing: -0.015em; font-weight: 500; }

.signals-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); margin-top: clamp(56px, 7vw, 96px); }
.signals-strip li { position: relative; padding: 1.1rem 0 1.1rem 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.signals-strip li::before { content: ''; position: absolute; left: 0; top: 1.62rem; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---------- Flagship: the live pipeline ---------- */
.flagship .sec-head p strong { color: var(--text); font-weight: 500; }
.pipeline {
  position: relative;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 56px) clamp(32px, 4vw, 56px) clamp(64px, 6vw, 88px);
  background: radial-gradient(90% 70% at 50% 0%, rgba(217, 180, 90, 0.06), transparent 70%), var(--surface);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
}
.pipeline__prompt {
  position: relative; z-index: 2;
  display: inline-flex; align-items: baseline; gap: 0.75rem; max-width: 100%;
  margin-bottom: clamp(48px, 6vw, 72px); padding: 0.85rem 1.1rem;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 14px;
  font-size: clamp(0.95rem, 1.4vw, 1.08rem); color: var(--text);
}
.pipeline__you { flex: none; padding: 2px 9px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 0.75rem; font-weight: 700; }
.pipeline__text { min-height: 1.6em; }
.pipeline__prompt.is-typing .pipeline__text::after {
  content: ''; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em;
  background: var(--gold); animation: caret 0.8s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.flow {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(56px, 6vw, 88px) clamp(28px, 3.4vw, 52px);
  align-items: center;
}
/* snake: row one runs left to right, row two comes back right to left */
.stage:nth-child(6) { grid-area: 2 / 5; }
.stage:nth-child(7) { grid-area: 2 / 4; }
.stage:nth-child(8) { grid-area: 2 / 3; }
.stage:nth-child(9) { grid-area: 2 / 2; }
.stage:nth-child(10) { grid-area: 2 / 1; }
.stage { display: flex; flex-direction: column; gap: 12px; }
.node {
  position: relative;
  padding: 0.85rem 1rem; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line-strong);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.35s var(--ease);
}
.node b { display: block; font-weight: 500; font-size: 1rem; letter-spacing: -0.01em; transition: color 0.35s var(--ease); }
.node span { display: block; margin-top: 0.2rem; color: var(--faint); font-size: 0.8rem; line-height: 1.35; }
.node.is-busy { border-color: var(--gold); background: #15120b; box-shadow: 0 0 0 1px rgba(217, 180, 90, 0.35), 0 10px 30px -10px rgba(217, 180, 90, 0.45); }
.node.is-busy b { color: var(--gold); }
.node--deploy, .node--memory { border-style: dashed; }

.flow__wires { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: visible; }
.wire { fill: none; stroke: rgba(242, 236, 223, 0.16); stroke-width: 1.5; }
.wire--loop { stroke: rgba(217, 180, 90, 0.4); stroke-dasharray: 4 6; animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -20; } }

.flow__agents { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.agent { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)); }
.agent svg { display: block; width: 18px; height: 18px; fill: var(--c); stroke: #0c0b0a; stroke-width: 1.2; stroke-linejoin: round; }
.agent__tag {
  position: absolute; left: 14px; top: 15px; white-space: nowrap;
  padding: 2px 8px; border-radius: 6px; background: var(--c); color: var(--ink);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em;
}
.agent__tag:empty { display: none; }

.facts--big { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 5vw, 64px); }
.facts--big dd { font-size: clamp(2.8rem, 5vw, 4.4rem); color: var(--gold); }
.flagship .panel__links { margin-top: 1.75rem; }

/* ---------- The systems matrix ---------- */
.matrix__filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.95rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); font-size: 0.9rem; font-weight: 500;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.chip span { color: var(--faint); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--text); border-color: rgba(242, 236, 223, 0.35); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.chip[aria-pressed="true"] span { color: rgba(18, 16, 12, 0.7); }

.matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.matrix .index__empty { background: var(--bg); grid-column: 1 / -1; }
.sys {
  display: flex; flex-direction: column; gap: 0.6rem; min-height: 220px;
  padding: 1.5rem 1.4rem 1.25rem; background: var(--bg);
  transition: background-color 0.35s var(--ease);
  animation: sysIn 0.5s var(--ease) both;
}
@keyframes sysIn { from { opacity: 0; transform: translateY(8px); } }
.sys__name { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.015em; transition: color 0.3s var(--ease); }
.sys__desc { color: var(--muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sys__foot { margin-top: auto; padding-top: 0.75rem; display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; }
.sys__cat { padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(217, 180, 90, 0.4); color: var(--gold); }
.sys__lang { color: var(--faint); }
.sys .index__arrow { margin-left: auto; width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s var(--ease), transform 0.35s var(--ease); }
.sys:hover { background: var(--surface); }
.sys:hover .sys__name { color: var(--gold); }
.sys:hover .index__arrow { stroke: var(--gold); transform: translate(2px, -2px); }
.matrix__all { margin-top: 1.5rem; }

/* ---------- Closing call to action ---------- */
.cta { position: relative; overflow: hidden; text-align: center; }
.cta__glow {
  position: absolute; left: 50%; top: 18%; width: min(1100px, 120vw); aspect-ratio: 1.6; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(217, 180, 90, 0.13), transparent 75%); pointer-events: none;
}
.cta__wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.cta__title { font-size: clamp(3rem, 9.5vw, 9rem); }
.cta__sub { margin-top: 1.75rem; max-width: 34rem; color: var(--muted); }
.cta .form { width: min(640px, 100%); margin-top: 2.5rem; text-align: left; }
.cta__links { justify-content: center; margin-top: 2rem; }

@media (max-width: 1000px) {
  .pipeline { padding-left: clamp(48px, 9vw, 64px); }
  .flow { grid-template-columns: 1fr; gap: 36px; }
  .stage:nth-child(n) { grid-area: auto; }
  .stage--pair { flex-direction: row; }
  .stage--pair .node { flex: 1; }
  .facts--big { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
@media (max-width: 720px) {
  .story__cols, .signals-strip { grid-template-columns: 1fr; }
  .pipeline__prompt { display: flex; flex-direction: column; gap: 0.5rem; }
  .pipeline__you { align-self: flex-start; }
  .sys { min-height: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .feature { grid-template-columns: 1fr; grid-template-areas: "tabs" "stage" "panels" "controls"; }
  .feature__tabs { margin-top: 0; margin-bottom: 1.5rem; }
  .feature__stage { max-width: 760px; }
  .toolkit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav__toggle {
    display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px;
    border: 1px solid var(--line-strong); font-weight: 500; font-size: 0.92rem; position: relative; z-index: 2;
    background: rgba(12, 11, 10, 0.6);
  }
  .nav__menu {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.25rem;
    padding: 96px var(--gutter) 48px;
    background: var(--bg);
    font-size: 2.2rem; letter-spacing: -0.03em;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    /* only the opening animates, so resizing past the breakpoint never flashes the menu */
  }
  /* the blurred bar would become the menu's containing block, so drop the blur while the menu is open */
  .nav.is-open { backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; border-bottom-color: transparent; }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; transform: none; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
  .nav__menu .nav__cta { padding: 0; border: 0; }
  .nav__mark { position: relative; z-index: 2; }

  .sec-head { grid-template-columns: 1fr; }
  .writing, .about, .contact__grid { grid-template-columns: 1fr; }
  .index__row a { grid-template-columns: minmax(0, 1fr) 20px; gap: 0.35rem 1rem; }
  .index__name { grid-column: 1; }
  .index__desc { grid-column: 1; grid-row: 2; }
  .index__lang { display: none; }
  .index__arrow { grid-column: 2; grid-row: 1 / span 2; }
  .ledger li { grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1rem; }
  .ledger__date { grid-column: 1; grid-row: 1; }
  .ledger__title { grid-column: 1; grid-row: 2; }
  .ledger__rank { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
}

@media (max-width: 720px) {
  .hero { min-height: auto; display: flex; flex-direction: column; }
  .hero__stage { position: relative; height: min(138vw, 80svh); min-height: 480px; }
  .hero__word { flex-direction: column; align-items: flex-start; gap: 0; top: 84px; font-size: 31vw; line-height: 0.84; z-index: auto; will-change: auto; }
  .hero__portrait { will-change: auto; } /* no parallax on phones, so no need to hold an extra GPU layer */
  /* poster layering: RAJ sits behind the portrait, BHARTI crosses in front of the jacket */
  .hero__word-line { position: relative; z-index: 1; }
  .hero__word-line + .hero__word-line { z-index: 3; }
  .hero__portrait { height: 86%; }
  .hero__light { top: 62%; }
  .hero__copy { position: relative; left: auto; right: auto; bottom: auto; width: auto; padding: 1.5rem var(--gutter) 3rem; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__buttons .btn { flex: 1 1 auto; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; }
  .facts dt { font-size: 0.78rem; }
  .toolkit { grid-template-columns: 1fr; }
  .footer__row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
