/* ============================================================
   Shrishti Singh — Design Tokens
   Concept: near-infrared photoacoustic imaging — her signature
   research. Deep navy (tissue/dark field) + warm copper glow
   (the NIR wavelength itself) instead of a generic palette.
   ============================================================ */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f6f4ee;
  --color-surface: #ffffff;
  --color-surface-2: #f0ece2;
  --color-surface-offset: #e9e3d5;
  --color-border: #ddd6c6;
  --color-divider: #e3ddcf;

  /* Text */
  --color-text: #1a2230;
  --color-text-muted: #5c6472;
  --color-text-faint: #9aa1ab;
  --color-text-inverse: #f6f4ee;

  /* Primary accent — NIR copper */
  --color-primary: #a8471f;
  --color-primary-hover: #832f11;
  --color-primary-active: #6b2408;
  --color-primary-highlight: #f0ded2;

  /* Deep navy — secondary ink, used for labels/dark blocks */
  --color-ink: #12233a;
  --color-ink-2: #1c3049;

  /* Semantic (sparingly) */
  --color-success: #43784f;
  --color-warning: #96591b;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.03 45 / 0.07);
  --shadow-md: 0 6px 20px oklch(0.2 0.03 45 / 0.09);
  --shadow-lg: 0 16px 44px oklch(0.2 0.03 45 / 0.14);

  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1220px;
  --content-full: 100%;

  --font-display: 'Cabinet Grotesk', 'Georgia', serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #0d1420;
  --color-surface: #131b29;
  --color-surface-2: #182233;
  --color-surface-offset: #1c283b;
  --color-border: #2a3a52;
  --color-divider: #24314a;

  --color-text: #e9e5da;
  --color-text-muted: #9aa4b4;
  --color-text-faint: #626d80;
  --color-text-inverse: #12192a;

  --color-primary: #e08a4c;
  --color-primary-hover: #eda06b;
  --color-primary-active: #f4b785;
  --color-primary-highlight: #3a2c22;

  /* --color-ink intentionally NOT redefined here: the deep-navy
     accent blocks (hero, flagship paper, contact) stay a fixed
     dark surface in both themes -- it's a signature color, not
     a theme-following surface. Prevents low-contrast "washed out"
     backgrounds when dark mode is active. */

  --color-success: #7fb586;
  --color-warning: #d99a5c;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 20px 50px oklch(0 0 0 / 0.5);
}

/* ---- Fluid type scale ---- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.28vw, 1rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.2rem + 4vw, 4.75rem);
  --text-hero: clamp(2.75rem, 0.9rem + 6vw, 6.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ============================================================
   Base type
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.section-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.section-lede {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 62ch;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--wide {
  max-width: var(--content-wide);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.site-header--hidden { transform: translateY(-100%); }
.site-header--scrolled { box-shadow: var(--shadow-sm); }

.site-header__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--text-base);
}
.brand svg { width: 30px; height: 30px; color: var(--color-primary); }

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding-block: var(--space-1);
  border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--color-text); border-color: oklch(from var(--color-primary) l c h / 0.4); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.theme-toggle {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  color: var(--color-text-muted);
}
.theme-toggle:hover { color: var(--color-text); background: var(--color-surface-2); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  align-items: center; justify-content: center;
  color: var(--color-text);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff8f2;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: transparent;
  border: 1px solid oklch(from var(--color-text) l c h / 0.18);
  color: var(--color-text);
}
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-block: clamp(var(--space-20), 12vw, var(--space-32)) clamp(var(--space-16), 8vw, var(--space-24));
  overflow: clip;
  background: var(--color-ink);
  color: var(--color-text-inverse);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('./assets/hero-waveform.png');
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  mix-blend-mode: screen;
}
[data-theme='light'] .hero::before { opacity: 0.42; }
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, oklch(0.12 0.03 250 / 0.15), oklch(0.1 0.03 250 / 0.75) 85%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.hero .eyebrow { color: var(--color-primary); }
[data-theme='dark'] .hero .eyebrow { color: #f0ac74; }
.hero h1 {
  font-size: var(--text-hero);
  margin-block: var(--space-4) var(--space-5);
  color: #fbf8f2;
  max-width: 16ch;
}
.hero__role {
  font-size: var(--text-lg);
  color: #d7dae4;
  max-width: 46ch;
  margin-bottom: var(--space-3);
  font-weight: 500;
}
.hero__lede {
  font-size: var(--text-base);
  color: #b7bccb;
  max-width: 58ch;
  margin-bottom: var(--space-8);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero .btn-secondary { border-color: oklch(1 0 0 / 0.25); color: #fbf8f2; }
.hero .btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }

.hero__stats {
  position: relative;
  z-index: 2;
  max-width: var(--content-wide);
  margin: clamp(var(--space-12), 6vw, var(--space-20)) auto 0;
  padding-inline: var(--space-5);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  border-top: 1px solid oklch(1 0 0 / 0.12);
  padding-top: var(--space-8);
}
.stat dd {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: #fbf8f2;
  font-variant-numeric: tabular-nums;
}
.stat dt {
  font-size: var(--text-xs);
  color: #9aa1b3;
  margin-top: var(--space-1);
}

/* ============================================================
   About
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: start;
}
.about-grid p { margin-bottom: var(--space-4); color: var(--color-text); }
.about-grid p:last-of-type { margin-bottom: 0; }

.facts-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.09);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.facts-card h3 {
  font-size: var(--text-sm);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.facts-list { display: flex; flex-direction: column; gap: var(--space-4); }
.facts-list dt { font-size: var(--text-xs); color: var(--color-text-faint); margin-bottom: var(--space-1); }
.facts-list dd { font-size: var(--text-sm); font-weight: 500; }

/* ============================================================
   Timeline (Experience)
   ============================================================ */
.timeline {
  position: relative;
  margin-top: var(--space-10);
  padding-left: var(--space-8);
  border-left: 1px solid oklch(from var(--color-text) l c h / 0.14);
}
.timeline-item { position: relative; padding-bottom: var(--space-12); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-8) - 5px);
  top: 6px;
  width: 10px; height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-bg);
}
.timeline-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.timeline-item__date {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.timeline-item h3 {
  font-size: var(--text-lg);
  font-family: var(--font-body);
  font-weight: 700;
}
.timeline-item__org { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-2); }
.timeline-item p { color: var(--color-text); font-size: var(--text-sm); max-width: 68ch; }

/* ============================================================
   Research
   ============================================================ */
.research-section { background: var(--color-surface-2); }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-block: var(--space-8);
}
.kpi-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.kpi-card dd {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.kpi-card dt { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-1); }

.feature-paper {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-8);
  align-items: center;
  background: var(--color-ink);
  color: var(--color-text-inverse);
  border-radius: var(--radius-xl);
  overflow: clip;
  margin-block: var(--space-10);
}
.feature-paper img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.feature-paper__body { padding: var(--space-8) var(--space-8) var(--space-8) 0; }
.feature-paper .eyebrow { color: #f0ac74; }
.feature-paper h3 { font-size: var(--text-lg); color: #fbf8f2; margin-block: var(--space-2) var(--space-3); }
.feature-paper p { color: #c3c8d6; font-size: var(--text-sm); margin-bottom: var(--space-4); }
.feature-paper__meta { font-size: var(--text-xs); color: #8f96a8; }

.pub-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid oklch(from var(--color-text) l c h / 0.08); }
.pub-table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
.pub-table th {
  text-align: left;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: var(--space-4);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.1);
}
.pub-table td {
  padding: var(--space-4);
  font-size: var(--text-sm);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
  vertical-align: top;
}
.pub-table tr:last-child td { border-bottom: none; }
.pub-table .pub-title { font-weight: 600; max-width: 42ch; }
.pub-table td.num { font-variant-numeric: tabular-nums; color: var(--color-text-muted); }

.scholar-note { margin-top: var(--space-4); font-size: var(--text-xs); color: var(--color-text-faint); }

/* ============================================================
   Ventures
   ============================================================ */
.venture-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.venture-card, .patent-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.09);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.venture-card h3, .patent-card h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.venture-card p, .patent-card p { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.tag-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); }
.tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.patent-card { display: flex; flex-direction: column; justify-content: center; background: var(--color-surface-offset); }

/* ============================================================
   Press
   ============================================================ */
.press-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.press-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: border-color var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.press-card:hover {
  border-color: oklch(from var(--color-primary) l c h / 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.press-card__tag {
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.press-card h4 { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); line-height: 1.4; }
.press-card__meta { font-size: var(--text-xs); color: var(--color-text-muted); }
@media (max-width: 860px) { .press-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Recognition
   ============================================================ */
.recognition-section { background: var(--color-surface-2); }
.award-list { display: flex; flex-direction: column; gap: var(--space-5); margin-top: var(--space-6); }
.award-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-4);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
}
.award-item:last-child { border-bottom: none; }
.award-item__year { font-size: var(--text-xs); color: var(--color-primary); font-weight: 700; }
.award-item h4 { font-family: var(--font-body); font-size: var(--text-base); font-weight: 700; }
.award-item p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }

.cred-grid {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: var(--space-3);
}
.cred-chip {
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  color: var(--color-text-muted);
}

.two-col-recognition {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(var(--space-8), 6vw, var(--space-16));
}

/* ============================================================
   Contact
   ============================================================ */
.contact-section {
  background: var(--color-ink);
  color: var(--color-text-inverse);
  text-align: left;
}
.contact-section h2 { color: #fbf8f2; font-size: var(--text-2xl); max-width: 14ch; }
.contact-section p { color: #b7bccb; max-width: 52ch; margin-block: var(--space-4) var(--space-8); }
.contact-links { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid oklch(1 0 0 / 0.14);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fbf8f2;
}
.contact-link:hover { border-color: var(--color-primary); color: var(--color-primary); background: oklch(1 0 0 / 0.04); }
.contact-link svg { width: 18px; height: 18px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding-block: var(--space-8);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
}
.site-footer__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.site-footer a:hover { color: var(--color-primary); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .venture-grid { grid-template-columns: 1fr; }
  .two-col-recognition { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .about-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .feature-paper { grid-template-columns: 1fr; }
  .feature-paper__body { padding: var(--space-6); }
  .feature-paper img { min-height: 200px; }
}

@media (max-width: 560px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .kpi-row { grid-template-columns: 1fr; }
  .site-header__inner { padding-block: var(--space-3); }
  .pub-table th, .pub-table td { padding: var(--space-2); font-size: var(--text-xs); }
  .pub-table .pub-title { max-width: 18ch; }
}

/* Mobile nav sheet */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--color-bg);
  display: none;
  flex-direction: column;
  padding: var(--space-6);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-10); }
.mobile-nav a { font-size: var(--text-xl); font-family: var(--font-display); padding-block: var(--space-3); border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08); }
