/* ==========================================================================
   Kishan Sah — Portfolio
   Cinematic, full-bleed layout: black canvas, uppercase DIN-style type,
   outlined buttons, video-backed sections.
   ========================================================================== */

@font-face { font-family: "Barlow"; font-weight: 300; font-display: swap; src: url("../fonts/barlow-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }

:root {
  /* If D-DIN is installed on the viewer's machine it is used first; Barlow is the bundled match. */
  --font: "D-DIN", "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-cond: "Barlow Condensed", "D-DIN", "Arial Narrow", sans-serif;
  --bg: #000;
  --fg: #fff;
  --muted: #a7a9ac;
  --dim: #6d6e71;
  --line: rgba(255, 255, 255, 0.18);
  --line-strong: rgba(255, 255, 255, 0.55);
  --panel: #0b0c0e;
  --accent: #ff7a2f;            /* used sparingly: progress, award marks */
  --go: #3ddc84;
  --gutter: clamp(16px, 7vw, 120px);
  --header-h: 96px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: #fff; color: #000; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: transform .45s var(--ease), background .3s;
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-solid { background: linear-gradient(#000 0%, rgba(0,0,0,.85) 70%, rgba(0,0,0,0) 100%); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .32em; font-size: 18px; text-transform: uppercase; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: clamp(18px, 2.2vw, 36px); margin-left: 48px; margin-right: auto; }
.nav a {
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  position: relative; padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #fff;
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.menu-btn { width: 44px; height: 44px; display: grid; place-items: center; margin-right: -10px; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 26px; height: 2px; background: #fff; position: relative; transition: transform .3s var(--ease), background .3s;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -8px; }
.menu-btn span::after { top: 8px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Side drawer ---------- */
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .4s; z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 45;
  width: min(420px, 100vw); background: #000; border-left: 1px solid var(--line);
  padding: calc(var(--header-h) + 16px) 48px 48px;
  transform: translateX(100%); transition: transform .5s var(--ease);
  display: flex; flex-direction: column; overflow-y: auto;
}
.menu-open .drawer { transform: none; }
.menu-open .drawer-scrim { opacity: 1; pointer-events: auto; }
.drawer a.drawer-link {
  display: block; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: right;
  opacity: 0; transform: translateX(24px); transition: opacity .4s, transform .4s var(--ease), color .2s;
}
.drawer a.drawer-link:hover { color: var(--muted); }
.menu-open .drawer a.drawer-link { opacity: 1; transform: none; }
.drawer .drawer-sub { margin-top: auto; padding-top: 32px; text-align: right; color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.drawer .drawer-sub a { color: #fff; }

/* ---------- Full-bleed sections ---------- */
.panel {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 0 var(--gutter) clamp(72px, 13vh, 140px);
  overflow: hidden; isolation: isolate;
}
.panel-media { position: absolute; inset: 0; z-index: -2; }
.panel-media video, .panel-media img { width: 100%; height: 100%; object-fit: cover; }
.panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 38%, rgba(0,0,0,0) 62%),
    linear-gradient(to right, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 55%);
}
.panel-copy { max-width: 600px; }
.kicker { font-size: 15px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 10px; }
.kicker .sep { color: var(--muted); margin: 0 .5em; }
.panel h1, .panel h2 {
  font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.04;
  font-size: clamp(36px, 5.2vw, 64px); margin: 0 0 12px;
}
.panel h1 { font-size: clamp(48px, 8vw, 104px); letter-spacing: .02em; }
.panel .sub { color: #e6e6e6; font-size: clamp(16px, 1.4vw, 19px); margin: 0 0 28px; max-width: 520px; }
.panel .org { font-family: var(--font-cond); font-weight: 500; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* outlined button with fill on hover */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 184px; padding: 17px 32px;
  border: 2px solid #fff; color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  overflow: hidden; isolation: isolate; transition: color .35s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; background: #fff; z-index: -1;
  transform: translateY(101%); transition: transform .35s var(--ease);
}
.btn:hover, .btn:focus-visible { color: #000; }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn.ghost { border-color: var(--line-strong); }
.btn svg { width: 14px; height: 14px; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* scroll cue */
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 22px; height: 36px; border: 2px solid rgba(255,255,255,.6); border-radius: 12px;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; background: #fff; border-radius: 2px;
  animation: cue 1.8s infinite var(--ease);
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* section divider labels (like a mission index) */
.index-tag {
  position: absolute; top: calc(var(--header-h) + 8px); right: var(--gutter);
  font-family: var(--font-cond); font-weight: 600; letter-spacing: .2em; font-size: 13px; color: var(--muted); text-transform: uppercase;
}
.index-tag b { color: #fff; font-weight: 600; }

/* ---------- Coming soon / loading ---------- */
.panel.soon::before { background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,.2) 60%), radial-gradient(ellipse at 30% 80%, rgba(0,0,0,.5), transparent 60%); }
.soon .status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.soon .status i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.loader { width: min(420px, 100%); margin: 6px 0 26px; }
.loader-track { height: 2px; background: var(--line); position: relative; overflow: hidden; }
.loader-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.7); }
.loader-meta { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--font-cond); font-weight: 500; font-size: 14px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.loader-meta .pct { color: #fff; font-variant-numeric: tabular-nums; }
.title-glitch { position: relative; }
.title-glitch .dots::after { content: ""; animation: dots 1.6s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- Content sections (black) ---------- */
.block { padding: clamp(80px, 12vw, 160px) var(--gutter); position: relative; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 64px); }
.block h2 { font-weight: 700; text-transform: uppercase; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; margin: 0; letter-spacing: .01em; }
.block .lede { color: var(--muted); max-width: 520px; margin: 0; }
.eyebrow { font-family: var(--font-cond); font-weight: 600; letter-spacing: .22em; font-size: 13px; color: var(--muted); text-transform: uppercase; margin: 0 0 14px; }

/* stats band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 36px 24px 8px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat .num { font-size: clamp(44px, 6vw, 84px); font-weight: 700; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat .num small { font-size: .42em; font-weight: 500; margin-left: 4px; color: var(--muted); }
.stat .lbl { margin-top: 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* spec table with tabs */
.spec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.spec > *, .mission-body > *, .edu > * { min-width: 0; }
.spec-media { position: sticky; top: calc(var(--header-h) + 24px); aspect-ratio: 4 / 5; overflow: hidden; background: var(--panel); }
.spec-media video { width: 100%; height: 100%; object-fit: cover; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 14px 18px 12px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .2s, border-color .2s;
}
.tab:first-child { padding-left: 0; }
.tab[aria-selected="true"] { color: #fff; border-color: #fff; }
.tab:hover { color: #fff; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.rows li .k { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; padding-top: 2px; }
.rows li .v { color: var(--muted); text-align: right; }
.rows li.award .k::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--accent); margin-right: 10px; transform: rotate(45deg) translateY(-2px); }

/* education card */
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 96px); border-top: 1px solid var(--line); padding-top: 36px; }
.edu h3 { font-size: clamp(24px, 2.6vw, 34px); text-transform: uppercase; margin: 0 0 6px; line-height: 1.1; }
.edu .meta { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line-strong); padding: 8px 14px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* contact */
.contact { min-height: 80vh; }
.contact .panel-copy { max-width: 760px; }
.contact h2 { font-size: clamp(40px, 6.5vw, 88px); }
.contact-lines { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 8px 0 30px; color: var(--muted); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.contact-lines a { color: #fff; border-bottom: 1px solid var(--line-strong); }

/* footer */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px var(--gutter); border-top: 1px solid var(--line);
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.site-footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-footer a:hover { color: #fff; }

/* ---------- Mission (detail) page ---------- */
.mission-hero { min-height: 100vh; min-height: 100svh; }
.mission-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 110px); }
.mission-body .overview { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; color: #e9e9e9; margin: 0; font-weight: 300; }
.highlights { list-style: none; margin: 0; padding: 0; counter-reset: h; }
.highlights li { counter-increment: h; display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--line); color: #ddd; }
.highlights li:first-child { border-top: 1px solid var(--line); }
.highlights li::before { content: counter(h, decimal-leading-zero); font-family: var(--font-cond); font-weight: 600; letter-spacing: .1em; color: var(--muted); padding-top: 1px; }
.mission-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--line); margin-top: clamp(48px, 7vw, 96px); }
.mission-stats .stat:first-child { padding-left: 0; }
.mission-next { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 32px; margin-top: clamp(48px, 7vw, 96px); }
.mission-next .eyebrow { margin: 0 0 6px; }
.mission-next h3 { margin: 0; text-transform: uppercase; font-size: clamp(22px, 2.4vw, 32px); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  :root { --header-h: 72px; }
  .brand { font-size: 15px; letter-spacing: .26em; }
  .spec, .mission-body, .edu { grid-template-columns: minmax(0, 1fr); }
  .hero .panel-media video { object-position: 74% 50%; transform: scale(1.4); transform-origin: 74% 100%; }
  .spec-media { position: relative; top: 0; aspect-ratio: 16 / 10; }
  .panel { padding-bottom: 88px; }
  .panel::before { background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,.05) 75%); }
  .btn { flex: 1 1 100%; }
  .rows li { flex-direction: column; gap: 4px; }
  .rows li .v { text-align: left; }
  .index-tag { display: none; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .drawer { padding-left: 24px; padding-right: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::after, .soon .status i { animation: none; }
}
