/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --paper: #F6F3ED;
  --paper-alt: #EFEAE0;
  --ink: #20242B;
  --ink-muted: #5B5A52;
  --spine: #23385E;
  --spine-dark: #182842;
  --accent: #B8863A;
  --rule: #C9C2B4;
  --error: #A6402B;
  --white: #FFFFFF;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 920px;
  --edge: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--spine-dark);
}

/* Page title: the single h1 that opens each page's main content */
main h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--spine-dark);
  display: inline-block;
}

a { color: var(--spine); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 243, 237, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--spine-dark);
  white-space: nowrap;
}

.mark span { color: var(--ink-muted); font-size: 0.85em; margin-left: 0.35em; }

.main-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--spine);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: clamp(64px, 12vw, 128px) var(--edge) clamp(48px, 8vw, 88px);
  border-bottom: 1px solid var(--rule);
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.hero-kicker {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin-bottom: 20px;
  padding-bottom: 0;
  border-bottom: none;
  display: block;
}

.hero h1 .devanagari {
  color: var(--accent);
  font-size: 0.62em;
  font-style: italic;
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--spine);
  color: var(--white);
}
.btn-primary:hover { background: var(--spine-dark); }

.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: none;
}
.btn-ghost:hover { border-color: var(--spine); color: var(--spine); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: clamp(56px, 8vw, 96px) var(--edge);
  border-bottom: 1px solid var(--rule);
}

.section.alt { background: var(--paper-alt); }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-lede {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 62ch;
  margin-bottom: 24px;
}

.placeholder-note {
  color: var(--ink-muted);
  font-style: italic;
  font-size: 0.95rem;
}

/* Homepage summary cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.summary-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.summary-card:hover { border-color: var(--spine); background: var(--white); }
.summary-card h3 { margin-bottom: 8px; font-size: 1.05rem; color: var(--spine-dark); }
.summary-card p { margin: 0; color: var(--ink-muted); font-size: 0.92rem; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

.about-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.cv-btn { margin-top: 24px; }

.fact-list {
  margin: 28px 0 0;
  display: grid;
  gap: 16px;
}

.fact-list > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.fact-list dt { color: var(--ink-muted); font-size: 0.9rem; }
.fact-list dd { margin: 0; }

/* Journalism / Publications — article listings */
.stat-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin: 32px 0;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat { display: flex; flex-direction: column; }
.stat-number { font-family: var(--font-display); font-size: 1.8rem; color: var(--spine-dark); }
.stat-label { color: var(--ink-muted); font-size: 0.9rem; }

.article-index { margin-top: 16px; }

.article-entry {
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.article-entry h3 { margin: 0 0 6px; font-size: 1.15rem; }
.article-entry .publication,
.article-entry .date,
.article-entry .category {
  display: inline-block;
  color: var(--ink-muted);
  font-size: 0.85rem;
  margin-right: 14px;
}
.article-entry > p:not(.publication):not(.date):not(.category) { margin: 8px 0; }
.article-entry > a { font-size: 0.9rem; text-decoration: none; border-bottom: 1px solid var(--accent); }

/* Experience timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.timeline-status {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--ink-muted);
  border: 1px solid var(--rule);
  padding: 3px 10px;
  border-radius: 2px;
}
.timeline-status.current { color: var(--spine); border-color: var(--spine); }

.timeline-meta { display: flex; flex-direction: column; gap: 8px; }
.timeline-dates { font-size: 0.85rem; color: var(--ink-muted); }

.timeline-body h2 { margin-bottom: 4px; font-size: 1.2rem; }
.timeline-org { color: var(--ink-muted); margin: 0 0 8px; font-size: 0.95rem; }

/* Projects */
.project-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.project-item { padding: 24px 0; border-bottom: 1px solid var(--rule); }

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.project-head h2 { margin: 0; font-size: 1.2rem; }

.project-meta {
  margin: 12px 0 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.project-meta div { display: flex; gap: 6px; font-size: 0.85rem; }
.project-meta dt { color: var(--ink-muted); }
.project-meta dd { margin: 0; color: var(--ink); }

.tag {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 2px;
  white-space: nowrap;
  border: 1px solid var(--rule);
  color: var(--ink-muted);
}
.tag-planned { border-color: var(--accent); color: var(--accent); }
.tag-ongoing { border-color: var(--spine); color: var(--spine); }

/* Plain lists (used across Achievements, Programs, Not-found) */
.plain-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.plain-list li { padding: 18px 0; border-bottom: 1px solid var(--rule); }

.program-list li { display: flex; flex-direction: column; gap: 4px; }
.program-name { font-family: var(--font-display); font-size: 1.1rem; color: var(--spine-dark); }
.program-desc { color: var(--ink-muted); font-size: 0.95rem; }
.program-dates { display: block; font-size: 0.85rem; color: var(--ink-muted); margin: 2px 0 4px; }

/* Group / subgroup headings used inside long content pages */
.group-heading {
  font-size: 1rem;
  color: var(--spine);
  margin: 40px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.group-heading:first-of-type { margin-top: 0; }

.subgroup-heading {
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 28px 0 4px;
}

.involvement-title { display: block; font-weight: 500; color: var(--spine-dark); }
.involvement-dates { display: block; font-size: 0.85rem; color: var(--ink-muted); margin-top: 2px; }
.involvement-desc { display: block; margin-top: 6px; color: var(--ink); }

/* Programs feature (photo) */
.program-feature {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.program-feature img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--rule);
}

/* Media gallery */
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.media-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
}
.media-item figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--ink-muted); }

/* Contact */
.contact-grid { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.contact-link { font-family: var(--font-display); font-size: 1.3rem; text-decoration: none; }
.contact-link:hover { text-decoration: underline; }

.social-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.social-list a { text-decoration: none; font-size: 0.95rem; border-bottom: 1px solid transparent; }
.social-list a:hover { border-bottom-color: var(--accent); }

/* Contact form */
.contact-form {
  max-width: 560px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.9rem; color: var(--ink-muted); }
.form-row input,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  resize: vertical;
}
.form-row input.invalid,
.form-row textarea.invalid { border-color: var(--error); }
.form-error { color: var(--error); font-size: 0.85rem; min-height: 1.2em; }
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status { font-size: 0.9rem; color: var(--spine); min-height: 1.2em; }
.form-note { margin-top: 4px; max-width: 62ch; }

/* Legal pages */
.legal-page .section-inner { max-width: 680px; }
.legal-page p { margin-bottom: 1em; }

/* 404 */
.not-found { text-align: center; padding-top: clamp(80px, 14vw, 140px); padding-bottom: clamp(80px, 14vw, 140px); }
.not-found-links {
  border-top: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.not-found-links li { border-bottom: none; padding: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 40px var(--edge) 32px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.site-footer p { margin: 4px 0; }

.footer-name { font-family: var(--font-display); font-size: 1.1rem; color: var(--spine-dark); }
.footer-tagline { margin-bottom: 16px !important; }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer-nav a { color: var(--ink-muted); text-decoration: none; font-size: 0.85rem; }
.footer-nav a:hover { color: var(--spine); }

.footer-socials { justify-content: center; margin: 0 0 12px; }
.footer-legal { font-size: 0.8rem; }
.footer-legal a { color: var(--ink-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--spine); }
