/* ============================================================
   Modern academic homepage — warm, contemporary, restrained
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1c1917;
  background: #faf8f5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --ink-faint: #a8a29e;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --rule: #e7e5e4;
  --shadow: 0 1px 2px rgba(28,25,23,0.04), 0 4px 12px rgba(28,25,23,0.04);
  --shadow-hover: 0 1px 2px rgba(28,25,23,0.06), 0 8px 24px rgba(28,25,23,0.08);
}

/* ---------- Top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topnav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.topnav-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.topnav-links { display: flex; gap: 1.5rem; }
.topnav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.topnav-links a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .topnav-links { gap: 1rem; }
  .topnav-links a { font-size: 0.85rem; }
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.hero .role {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}
.hero .role strong { color: var(--ink); font-weight: 600; }
.hero .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.hero .hero-meta a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.hero .hero-meta a:hover { color: var(--accent); border-color: var(--accent); }
.hero-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 2.5rem 0 2rem;
    gap: 2rem;
  }
  .hero-photo { width: 140px; height: 140px; order: -1; }
}

/* ---------- Sections ---------- */
section {
  margin: 3.5rem 0;
  scroll-margin-top: 110px;  /* leave room for the sticky nav when anchor-jumping */
}
section h2 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
section h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.5rem 0 0.75rem;
}

p { margin: 0 0 1rem; color: var(--ink); }
.lead { font-size: 1.05rem; line-height: 1.7; color: var(--ink); }
.muted { color: var(--ink-soft); }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); transition: border-color 0.15s; }
a:hover { border-bottom-color: var(--accent); }

ul { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin-bottom: 0.5rem; }

/* ---------- Research interests as chips ---------- */
.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chips li {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--ink);
  margin: 0;
  transition: border-color 0.15s, color 0.15s;
}
.chips li:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- News timeline ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
.news-list li:last-child { border-bottom: none; }
.news-date {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 540px) {
  .news-list li { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---------- Cards for selected publications ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.pub-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.pub-card:hover { box-shadow: var(--shadow-hover); border-color: var(--ink-faint); }
.pub-card .pub-title { font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; line-height: 1.4; }
.pub-card .pub-meta { font-size: 0.88rem; color: var(--ink-soft); }
.pub-card .pub-meta em { color: var(--ink); font-style: italic; }
.pub-card .pub-authors { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 0.3rem; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  vertical-align: 2px;
}

.more {
  margin-top: 1rem;
  font-size: 0.92rem;
}
.more a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }

/* ---------- Talks (horizontal grid, like Group) ---------- */
.talk-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.5rem 2rem;
}
.talk-list li {
  padding: 0.5rem 0;
  font-size: 0.93rem;
}
.talk-list .talk-title { color: var(--ink); line-height: 1.5; }
.talk-list .talk-where { color: var(--ink-soft); font-size: 0.85rem; margin-top: 0.15rem; }

/* ---------- Students ---------- */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
}
.people li {
  font-size: 0.92rem;
  padding: 0.35rem 0;
}
.people .person-name { font-weight: 600; color: var(--ink); }
.people .person-where { color: var(--ink-soft); }

/* ---------- Page header (used on inner pages like Publications) ---------- */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 0.75rem;
  color: var(--ink);
}
.page-header .eyebrow {
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}
.page-header .eyebrow a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.page-header .eyebrow a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.page-header .page-subtitle {
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0;
}

/* ---------- Publications-page lists ---------- */
.year-block {
  margin: 2rem 0 1.25rem;
}
.year-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed var(--rule);
}
.pub-plain {
  list-style: none;
  padding-left: 0;
}
.pub-plain li {
  padding: 0.65rem 0 0.65rem 1.5rem;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.55;
  border-bottom: 1px solid rgba(231, 229, 228, 0.6);
}
.pub-plain li:last-child { border-bottom: none; }
.pub-plain li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
}

/* ---------- Last section needs scroll headroom ---------- */
/* So anchor-linking to a bottom section actually puts it at the top of the
   viewport, instead of the browser running out of page to scroll. */
.wrap > section:last-of-type {
  padding-bottom: 40vh;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- Print ---------- */
@media print {
  .topnav { display: none; }
  body { background: #fff; }
  .pub-card { box-shadow: none; border: 1px solid #ddd; }
  a { color: #000; border: none; }
}
