/* ============================================================
   Pavani Malla — Evidence Profile
   Design tokens
   ============================================================ */
:root {
  --paper: #faf8f3;
  --sage: #edf2ee;
  --ink: #1c2b2a;
  --ink-soft: #4e6360;
  --ink-faint: #7c8c89;
  --teal: #1f6f64;
  --teal-deep: #144f47;
  --gold: #a8771f;
  --line: #ddd6c6;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(28, 43, 42, 0.04), 0 8px 24px rgba(28, 43, 42, 0.05);

  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --measure: 42rem;
  --measure-wide: 56rem;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  /* Intentionally not switching to a dark theme — the paper/teal
     palette is the brand, not a light-mode default. */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration-color: rgba(31, 111, 100, 0.35); text-underline-offset: 2px; }
a:hover { color: var(--teal-deep); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; font-weight: 600; color: var(--ink); }

.container { max-width: var(--measure-wide); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--measure); }

/* ---------- Eyebrow / mono labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: rgba(31, 111, 100, 0.09);
  border: 1px solid rgba(31, 111, 100, 0.18);
  border-radius: var(--radius);
  padding: 0.22em 0.55em;
  white-space: nowrap;
}
.tag--gold {
  color: var(--gold);
  background: rgba(168, 119, 31, 0.1);
  border-color: rgba(168, 119, 31, 0.22);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  max-width: var(--measure-wide);
  margin: 0 auto;
}
.nav-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-links { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav-links a:hover { color: var(--teal); }
@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 5.5rem 0 4rem;
  overflow: hidden;
}
.hero-plot {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: min(36vw, 420px);
  height: 380px;
  z-index: 0;
  pointer-events: none;
}
.hero-plot-axis { stroke: var(--teal); stroke-width: 1; opacity: 0.22; }
.hero-plot-lines line { stroke: var(--teal); stroke-width: 1.3; opacity: 0.2; }
.hero-plot-markers rect { fill: var(--teal); opacity: 0.28; }
@media (max-width: 900px) {
  .hero-plot { display: none; }
}
.hero-inner { position: relative; z-index: 1; }
.hero .eyebrow { display: block; margin-bottom: 1.1rem; }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.hero h1 .cred {
  font-family: var(--font-mono);
  font-size: 0.45em;
  color: var(--teal-deep);
  vertical-align: 0.55em;
  letter-spacing: 0.02em;
  margin-left: 0.35em;
}
.hero-role {
  font-size: 1.18rem;
  color: var(--teal-deep);
  margin-top: 0.55rem;
  font-weight: 500;
}
.hero-lead {
  margin-top: 1.4rem;
  max-width: 38rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
}
.hero-meta {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.hero-meta a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line); }
.hero-meta a:hover { color: var(--teal); border-color: var(--teal); }
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--teal);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  text-decoration: none;
  margin-top: 2rem;
}
.hero-cta:hover { background: var(--teal-deep); color: var(--paper); }

/* ---------- Stats strip ---------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--sage);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
}
.stat {
  background: var(--sage);
  padding: 1.6rem 1.4rem;
  text-align: left;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  color: var(--teal-deep);
  font-weight: 500;
}
.stat-label {
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.35;
}
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Section scaffolding ---------- */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--sage); }
.section-head { margin-bottom: 2.5rem; }
.section-head .eyebrow { margin-bottom: 0.6rem; display: block; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.section-sub { margin-top: 0.6rem; color: var(--ink-soft); max-width: 38rem; }

/* ---------- Focus cards ---------- */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.focus-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.focus-card svg { width: 28px; height: 28px; color: var(--teal); margin-bottom: 0.9rem; }
.focus-card h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.focus-card .tag { margin-bottom: 0.7rem; }
.focus-card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
@media (max-width: 760px) {
  .focus-grid { grid-template-columns: 1fr; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about p { color: var(--ink-soft); margin: 0 0 1.1rem; }
.about blockquote {
  margin: 1.6rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--teal);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink);
}
.about-closing { font-size: 0.95rem; color: var(--ink-faint); }
.areas-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.areas-card .eyebrow { display: block; margin-bottom: 0.9rem; }
.area-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.area-list li { font-size: 0.86rem; color: var(--ink); background: var(--sage); border-radius: var(--radius); padding: 0.32em 0.6em; }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Experience timeline ---------- */
.timeline { position: relative; }
.timeline-era-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.record {
  position: relative;
  padding-left: 1.6rem;
  border-left: 2px solid var(--line);
  padding-bottom: 2.4rem;
  margin-left: 0.3rem;
}
.record::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.4rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--paper);
}
.section--alt .record::before { border-color: var(--sage); }
.record:last-child { padding-bottom: 0.4rem; }
.record-head { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: baseline; margin-bottom: 0.4rem; }
.record-dates { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }
.record h3 { font-size: 1.22rem; margin: 0.2rem 0 0.1rem; }
.record-company { color: var(--teal-deep); font-weight: 600; font-size: 0.96rem; }
.record-location { color: var(--ink-faint); font-size: 0.86rem; }
.record-summary { color: var(--ink-soft); margin: 0.7rem 0 0.9rem; max-width: 42rem; }
.record-highlights { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.95rem; }
.record-highlights li { margin-bottom: 0.35rem; }

.substudies { margin-top: 1rem; display: grid; gap: 0.7rem; }
.substudy {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.05rem;
}
.section--alt .substudy { background: var(--paper); }
.substudy-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; margin-bottom: 0.3rem; }
.substudy h4 { font-family: var(--font-body); font-weight: 600; font-size: 0.96rem; margin: 0; color: var(--ink); }
.substudy-partner { font-size: 0.82rem; color: var(--ink-faint); }
.substudy p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

.earlier-toggle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  cursor: pointer;
  margin-bottom: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.earlier-toggle:hover { border-color: var(--teal); }
.earlier-toggle svg { width: 12px; height: 12px; transition: transform 0.2s ease; }
.earlier-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.earlier-wrap { overflow: hidden; max-height: 0; transition: max-height 0.35s ease; }
.earlier-wrap.is-open { max-height: 4000px; }

/* ---------- Publications ---------- */
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.pub-item {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.pub-item .tag { flex-shrink: 0; }
.pub-item span { color: var(--ink); font-size: 0.97rem; }
.pub-foot { margin-top: 1.6rem; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Education ---------- */
.edu-grid { display: grid; gap: 1.1rem; }
.edu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.1rem;
}
.edu-item:last-child { border-bottom: none; }
.edu-school { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.edu-degree { color: var(--ink-soft); font-size: 0.93rem; margin-top: 0.2rem; }
.edu-years { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-faint); white-space: nowrap; }

/* ---------- Contact / Footer ---------- */
.contact { text-align: left; }
.contact h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 0.8rem; }
.contact-note { color: var(--ink-soft); max-width: 32rem; margin-bottom: 2rem; }
.contact-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.contact-card {
  flex: 1;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.contact-card .eyebrow { display: block; margin-bottom: 0.5rem; }
.contact-card a { font-size: 1rem; word-break: break-word; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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