/* ==========================================================================
   Kritti Sharma — academic site
   Design language: the "dedispersion sweep" — the swept, curving signal of
   a Fast Radio Burst arriving at a telescope (high frequencies first, low
   frequencies last, delayed by intervening baryons) is the one motif this
   whole site is built around. It appears once, boldly, in the home hero,
   and quietly afterwards as a section divider and loading/active accent.
   ========================================================================== */

:root {
  /* ---- color ---- */
  --bg:         #0b0e14;
  --bg-raised:  #10141d;
  --bg-card:    #141a26;
  --bg-card-2:  #171e2c;
  --line:       rgba(232, 234, 240, 0.09);
  --line-strong:rgba(232, 234, 240, 0.16);

  --text:       #ffffff;
  --text-dim:   #9aa1b4;
  --text-faint: #e0e3e8;

  --violet:     #8c7cf0;
  --violet-soft:#8c7cf033;
  --cyan:       #3fe1d0;
  --cyan-soft:  #3fe1d033;
  --amber:      #f2a65a;

  --sweep: linear-gradient(115deg, var(--violet) 0%, #6fa3ef 45%, var(--cyan) 100%);

  /* ---- type ---- */
  /* --font-display: "STIX Two Text", "Iowan Old Style", Georgia, serif; */
  /* --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; */
  /* --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; */
  --font-display: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ---- layout ---- */
  --max-w: 1180px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --radius: 14px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: light) {
  /* Site is intentionally dark-only; no light-mode override. */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle fixed starfield / noise so the black isn't flat */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(140,124,240,0.10), transparent 60%),
    radial-gradient(900px 600px at 110% 10%, rgba(63,225,208,0.08), transparent 55%),
    var(--bg);
  pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 460; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

p { margin: 0 0 1.1em; color: var(--text); }
.lede { color: #ffffff; font-size: 1.15rem; line-height: 1.7; }

.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9em;
  font-weight: 700;
}
.eyebrow::before {
  content: "";
  width: 30px; height: 2px;
  background: var(--sweep);
  display: inline-block;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------------------------------------------------------------- nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 14, 20, 0.72);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}
.nav-links {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a {
  text-decoration: none;
  color: #ffffff;
  position: relative;
  padding: 0.35em 0;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--sweep);
  border-radius: 2px;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 40px; height: 40px;
  cursor: pointer;
}
@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--pad) 1.2rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 0.9em 0; }
}

/* ------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 6rem;
  padding: 2.5rem 0 3rem;
  color: var(--text-faint);
  font-size: 1rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: var(--text-faint); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.footer-links { display: flex; gap: 1.4rem; font-family: var(--font-mono); font-size: 1rem; }

/* --------------------------------------------------------- containers */
main { display: block; }
.section { padding: 5rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-tight { padding: 3rem 0; }

/* ------------------------------------------------------------ divider
   The quiet, recurring form of the sweep motif: used between major
   narrative beats on the Research page. */
.sweep-divider {
  width: 100%;
  height: 46px;
  margin: 0 auto 1rem;
  display: block;
  opacity: 0.85;
}
.sweep-divider path { fill: none; stroke-width: 1.6; }

/* ---------------------------------------------------------- home hero */
.home-hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.home-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.home-hero-photo-col { display: flex; }
.home-hero-photo {
  width: 90%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 1px rgba(140,124,240,0.05), 0 30px 80px -30px rgba(63,225,208,0.18);
}
.home-hero-text-col { display: flex; flex-direction: column; }
.home-hero-kicker {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 0.3em;
}
.home-hero-text-col h1 { margin-top: -0em; }
.home-hero-text-col h1 + .home-hero-kicker { margin-top: -0.9em; }
.home-hero-text-col .lede { margin: 1rem 0 2rem; max-width: 50ch; }
.hero-cta {
  display: flex; gap: 0.9rem; flex-wrap: wrap;
}
@media (max-width: 820px) {
  .home-hero-grid { grid-template-columns: 1fr; }
  .home-hero-photo { aspect-ratio: 5 / 4; max-width: 420px; margin: 0 auto; }
  .home-hero-text-col { text-align: center; align-items: center; }
  .home-hero-text-col .lede { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
}

/* --------------------------------------------------------------- cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
.nav-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--line);
  border-top: 2px solid var(--cyan);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.nav-card:hover { border-color: var(--cyan); transform: translateY(-3px); }
.nav-card h3 { margin-bottom: 0.15em; }
.nav-card p { color: var(--text-dim); font-size: 1.05rem; margin: 0; }
.nav-card p em { color: var(--text); font-style: italic; }

/* -------------------------------------------------------- research page */
.figure-block {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin: 2rem 0;
}
.figure-block img, .figure-block .placeholder {
  border-radius: var(--radius-sm);
  width: 100%;
}
.figure-caption {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #ffffff;
  margin-top: 0.8rem;
  line-height: 1.55;
}
.figure-caption b { color: var(--text-dim); font-weight: 500; }

.placeholder {
  aspect-ratio: 16 / 9;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.02) 0 10px, transparent 10px 20px);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
}
.placeholder .tag {
  color: var(--amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  display: block;
  margin-bottom: 0.4em;
}

.narrative-block { max-width: 160ch; }
.narrative-block.wide { max-width: 100%; }

blockquote.thesis {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  font-style: italic;
  color: var(--text);
  border-left: 2px solid transparent;
  border-image: var(--sweep) 1;
  padding-left: 1.4rem;
  margin: 2rem 0;
  max-width: 100ch;
}

.probe-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
  margin: 1.5rem 0;
}
.probe-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5em 1em;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-dim);
  text-align: center;
}

/* research project cards (the PhD progression) */
.project {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.2rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
}
.project:first-of-type { border-top: none; }
.project-index {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--cyan);
  padding-top: 0.3rem;
}
.project-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.7em;
}
.project-status-row + .project-status-row {
  margin-top: -0.5em;
}
.project-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.25em 0.7em;
  margin-bottom: 0.7em;
  transition: border-color 0.2s ease;
  margin-bottom: 0em;
}
.project-status:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.project-links { display: flex; gap: 1rem; margin-top: 0.9rem; flex-wrap: wrap; font-size: 0.9rem; margin-right: 2rem;}
.link-pill {
  font-family: var(--font-mono);
  font-size: 1rem;
  text-decoration: none;
  color: var(--cyan);
  border-bottom: 1px solid transparent;
}
.link-pill:hover { border-color: var(--cyan); }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.4em;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.home-hero-text-col .btn { font-size: 1.05rem; }
.btn:hover { border-color: var(--cyan); }
.btn-primary {
  background: var(--sweep);
  color: #0b0e14;
  border: none;
  font-weight: 400;
}
.btn-primary:hover { filter: brightness(1.08); }

/* --------------------------------------------------------- publications */
.pub-year {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 2.6rem 0 0.6rem;
  letter-spacing: 0.05em;
}
.pub-year:first-child { margin-top: 0; }
.pub {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}
.pub-title { font-weight: 500; font-size: 1.2rem; }
.pub-meta { color: var(--text-faint); font-size: 1.1rem; }
.pub-venue { color: var(--text-faint); }
.pub-venue-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.15em 0.75em;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
  margin-left: 0.3em;
}
.pub-venue-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.pub-links { display: flex; gap: 1rem; margin-top: 0.15rem; }
.pub-links a { font-family: var(--font-mono); font-size: 1rem; color: var(--cyan); text-decoration: none; }
.pub-links a:hover { text-decoration: underline; }
.role-badge {
  font-family: var(--font-mono);
  font-size: 1rem;
  border-radius: 999px;
  padding: 0.2em 0.7em;
  margin-left: 0.5em;
}
/* Most catchy — solid gradient fill, matching the site's primary CTA buttons */
.role-badge.role-first {
  background: var(--sweep);
  color: #0b0e14;
  font-weight: 500;
  border: none;
}
/* Middle — solid accent outline, matches the site's cyan links */
.role-badge.role-coauthor {
  color: var(--cyan);
  border: 1px solid var(--cyan-soft);
  background: var(--cyan-soft);
}
/* Least catchy — quiet, muted */
.role-badge.role-supporting {
  color: var(--violet);
  border: 1px solid var(--violet-soft);
  background: var(--violet-soft);
}
.filter-row {
  display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  cursor: pointer;
}
.filter-btn.active { color: var(--bg); background: var(--cyan); border-color: var(--cyan); }

/* ---------------------------------------------------------------- press */
.press-item {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.4rem;
}
.press-outlet { font-family: var(--font-mono); font-size: 1.1rem; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500}
.press-date { color: var(--text-faint); font-size: 1.0rem; font-family: var(--font-mono); }
.press-title { font-size: 1.2rem; margin: 0.1em 0 0.3em; }
.press-summary { color: var(--text-light); }

/* ------------------------------------------------------------ outreach */
.outreach-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); }
.outreach-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.role-list {
  margin: 0.6em 0 0;
  padding-left: 1.25em;
  color: var(--text-faint);
}
.role-list li {
  margin-bottom: 0.3em;
}
.outreach-card .eyebrow { margin-bottom: 0.6em; }
.outreach-meta { font-family: var(--font-faint); font-size: 1.1rem; color: var(--text-faint); margin-top: 0.9rem; }
.outreach-media-note {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-faint);
  margin-top: 1rem;
}

/* ------------------------------------------------------------------ cv */
.cv-embed {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  height: 82vh;
  min-height: 500px;
}
.cv-embed iframe, .cv-embed object { width: 100%; height: 100%; border: none; }
.cv-fallback {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
}

/* -------------------------------------------------------------- contact */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.contact-list li {
  display: flex; align-items: baseline; gap: 0.8rem;
  padding: 1rem 0; border-top: 1px solid var(--line);
}
.contact-list li:first-child { border-top: none; }
.contact-label { font-family: var(--font-faint); font-size: 1.1rem; color: var(--text-faint); width: 8em; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value a { color: var(--text-faint); font-size: 1.1rem; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.contact-value a:hover { color: var(--cyan); border-color: var(--cyan); }

/* --------------------------------------------------------- scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ utilities */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.center { text-align: center; }
.text-dim { color: var(--text-dim); }
.mt-0 { margin-top: 0; }
.small { font-size: 1rem; }
.callout {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 1.5rem 0;
}
.callout.warn { border-color: rgba(242,166,90,0.35); }
.callout .tag { font-family: var(--font-mono); font-size: 0.7rem; color: var(--amber); text-transform: uppercase; letter-spacing: 0.08em; }
.figure-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.figure-trio .figure-block {
  margin: 0;
}
@media (max-width: 700px) {
  .figure-trio { grid-template-columns: 1fr; }
}