/* ---------------------------------------------------------------------------
   Jaya Sharma — academic site
   Source Serif 4 for prose, Inter for UI chrome (nav, dates, labels).
   Single accent: a muted navy (#26365e).
--------------------------------------------------------------------------- */

:root {
  --ink:      #1c1e24;
  --ink-soft: #4a4f5c;
  --accent:   #26365e;
  --accent-2: #3a5089;
  --rule:     #e4e2dc;
  --bg:       #fbfaf7;
  --tag-bg:   #eef0f6;
  --measure:  38rem;
  --wrap:     52rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.075rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 2px;
}
a:hover { text-decoration: underline; }

strong { font-weight: 600; }

/* --- layout helpers ------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.measure { max-width: var(--measure); }
.wrap.measure { max-width: calc(var(--measure) + 3rem); }

main > section {
  padding: 3.25rem 0;
  border-top: 1px solid var(--rule);
}
main > section:first-of-type { border-top: 0; }

/* --- top nav ----------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-name {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 1.35rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
}

.nav-links a {
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* --- hero ------------------------------------------------------------- */

.hero {
  padding: 3.75rem 0 2.5rem;
  border-top: 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.portrait {
  flex: 0 0 auto;
  width: 180px;
  height: 180px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--tag-bg);
}

@media (max-width: 40rem) {
  .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .portrait { width: 132px; height: 132px; }
}

/* --- headings & prose ------------------------------------------------- */

h2 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
}

section p { margin: 0 0 1rem; }
section p:last-child { margin-bottom: 0; }

/* --- news ----------------------------------------------------------- */

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}
.news-item:first-child { border-top: 0; }

.news-date {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  padding-top: 0.28rem;
}

.news-body p { margin: 0; }

.tag {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--tag-bg);
  color: var(--accent);
  padding: 0.08em 0.5em;
  border-radius: 4px;
  white-space: nowrap;
}

/* --- CV button ---------------------------------------------------- */

.cv-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.cv-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* --- contact ---------------------------------------------------- */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-list li {
  display: flex;
  gap: 0.9rem;
  padding: 0.35rem 0;
}
.contact-list .label {
  flex: 0 0 6.5rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.15rem;
}

/* --- publications page ----------------------------------------- */

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pub-item {
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
}
.pub-item:first-child { border-top: 0; }
.pub-title {
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.pub-meta {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 0.4rem;
}
.pub-venue { color: var(--accent); font-weight: 500; }
.pub-links {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
}
.pub-links a { margin-right: 0.9rem; }

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.83rem;
  color: var(--ink-soft);
}

/* --- footer --------------------------------------------------- */

footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* --- responsive --------------------------------------------- */

@media (max-width: 34rem) {
  body { font-size: 1.02rem; }
  .nav-inner { padding: 0.75rem 1.25rem; }
  .nav-links { gap: 1rem; }
  .news-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .news-date { padding-top: 0; }
  .contact-list li { flex-direction: column; gap: 0.15rem; }
  .contact-list .label { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
