/* ===========================================================================
   Minimal academic theme. Color theming lives in the :root variables below —
   swap --accent (and friends) to retheme the whole site.
   =========================================================================== */
:root {
  --accent:        #2456a6;   /* links, active nav, highlights — academic blue */
  --accent-dark:   #173763;   /* hover, section headings — navy                */
  --text:          #15181c;   /* near-black body text                          */
  --muted:         #5b6470;   /* cool gray — venues, dates, footer             */
  --rule:          #e4e7ec;   /* light gray hairlines                          */
  --bg:            #ffffff;
  --tag-bg:        #eef2f8;   /* pale blue — tag pills, BibTeX block           */
  --max-width:     720px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

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

h1 { font-size: 1.7rem; margin: 0 0 1.5rem; }
h2 {
  font-size: 1.15rem;
  margin: 2.25rem 0 1rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--rule);
  color: var(--accent-dark);
}

/* ---- Header / nav ---- */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.25rem .75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.site-name { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.site-nav a { color: var(--muted); font-size: .95rem; }
.site-nav a.active { color: var(--accent); font-weight: 600; }

/* ---- Landing / About ---- */
.hero { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.5rem; }
.avatar {
  width: 130px; height: 130px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.hero h1 { margin: 0 0 .25rem; }
.tagline { margin: .1rem 0; color: var(--muted); }
.interests { margin: .4rem 0 0; font-size: .95rem; color: var(--muted); }
.links { margin-top: .9rem; font-size: .95rem; }
.bio p { margin: 0 0 1rem; }

/* ---- Lists (pubs / talks / teaching) ---- */
ul.pub-list, ul.talk-list, ul.course-list, ul.mentee-list {
  list-style: none; margin: 0; padding: 0;
}
.pub, .talk, .course, .mentee {
  padding: .85rem 0;
  border-bottom: 1px solid var(--rule);
}
.title { font-weight: 600; }
.authors { color: var(--text); }
.venue { color: var(--muted); font-size: .92rem; margin-top: .15rem; }
.affil { color: var(--muted); font-weight: 400; font-size: .92rem; }
.now { color: var(--muted); font-size: .9rem; }
.award { color: var(--accent-dark); font-size: .9rem; }

/* ---- Links row under a publication ---- */
.pub-links { margin-top: .35rem; font-size: .88rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.pub-links a { color: var(--accent); }

/* ---- BibTeX dropdown (pure <details>, no JS) ---- */
details.bibtex { display: inline-block; }
details.bibtex > summary {
  cursor: pointer; color: var(--accent); list-style: none;
  display: inline-block; user-select: none;
}
details.bibtex > summary::before { content: "[BibTeX]"; }
details.bibtex[open] > summary::before { content: "[BibTeX \2715]"; }
details.bibtex > summary::-webkit-details-marker { display: none; }
details.bibtex pre {
  background: var(--tag-bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: .8rem 1rem;
  margin: .6rem 0 .2rem;
  font-size: .82rem;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre;
}

/* ---- Talk / poster tags ---- */
.tag {
  display: inline-block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--accent-dark);
  margin-right: .5rem;
  vertical-align: middle;
}

/* ---- CV page ---- */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 6px;
  font-size: .95rem;
}
.button:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.cv-embed { width: 100%; height: 85vh; border: 1px solid var(--rule); border-radius: 6px; margin-top: 1rem; }

/* ---- Footer ---- */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .82rem;
}

@media (max-width: 540px) {
  .hero { flex-direction: column; align-items: center; text-align: center; }
  .links { text-align: center; }
}
