:root {
  --ink: #1c1c1c;
  --gray: #757575;
  --faint: #9a9a9a;
  --link: #1772d0;
  --rule: #ececec;
  --hover: #f6f6f7;
  --note: #b3400a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.page { max-width: 900px; margin: 0 auto; padding: 0 28px 48px; }

/* ---------- top nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topnav-inner {
  max-width: 900px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: baseline; justify-content: flex-end; gap: 16px; flex-wrap: wrap;
}
.navname { font-weight: 700; font-size: 16.5px; color: var(--ink); letter-spacing: -0.01em; }
.navname:hover { color: var(--link); text-decoration: none; }
.navlinks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.navlinks a {
  color: var(--gray); font-size: 14.5px; padding: 2px 0;
  border-bottom: 2px solid transparent;
}
.navlinks a:hover { color: var(--link); text-decoration: none; }
.navlinks a.active { color: var(--ink); border-bottom-color: var(--link); }

/* ---------- home hero ---------- */
.hero { display: flex; gap: 48px; align-items: flex-start; padding-top: 44px; }
.hero-text { flex: 1 1 60%; min-width: 0; }
.hero-text h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 4px; }
.tagline { color: var(--gray); margin: 0 0 18px; font-size: 16.5px; }
.tagline a { color: var(--gray); text-decoration: underline; text-decoration-color: #cfcfcf; }
.tagline a:hover { color: var(--link); }
.bio p { margin: 0 0 13px; }
.hero-photo { flex: 0 0 auto; padding-top: 6px; }
.hero-photo img {
  width: 200px; height: 200px; border-radius: 50%;
  object-fit: cover; object-position: center top; display: block;
}
.linkrow { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 20px; }
.linkrow a { display: inline-flex; align-items: center; gap: 7px; color: #3d3d3d; font-size: 14.5px; }
.linkrow a:hover { color: var(--link); text-decoration: none; }
.linkrow svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }

/* ---------- subpage header ---------- */
/* Every page title (hero name, CV name, and the Publications/Talks/Teaching
   headings) shares one treatment: 34px/700, same top offset and left edge, with
   a matching gray subtitle. This keeps the header aligned when navigating. */
.pagehead { padding-top: 44px; }
.pagehead h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 4px; }
.pagehead p { color: var(--gray); margin: 0; font-size: 16.5px; }

/* ---------- sections ---------- */
h2 {
  font-size: 23px; font-weight: 700; letter-spacing: -0.01em;
  margin: 52px 0 6px; padding-bottom: 8px; border-bottom: 1px solid var(--rule);
}
.sectionnote { color: var(--gray); font-size: 14.5px; margin: 8px 0 16px; }

/* ---------- generic gutter row (news / cv / talks / teaching) ---------- */
.grow { display: flex; gap: 22px; padding: 5px 0; }
.gwhen { flex: 0 0 118px; color: var(--faint); font-size: 14px; padding-top: 2px; white-space: nowrap; }
.gwhat { flex: 1; min-width: 0; }
/* wider date gutter on the CV, where ranges like "Aug 2022 – Feb 2023" need room */
#employment .gwhen, #education .gwhen, #honors .gwhen { flex: 0 0 150px; }
.gwhat .role { font-weight: 600; }
.gwhat .sub { color: var(--gray); font-size: 15px; }

/* ---------- news ---------- */
.news-year-h { font-size: 16px; font-weight: 700; color: var(--ink); margin: 22px 0 4px; }
.news-year-h:first-child { margin-top: 6px; }
/* One dotted one-liner list, shared by News, Talks, Press, Teaching, Supervision
   and Service so every page's list content aligns to the same left indent. */
.dotlist { margin: 4px 0 16px; padding-left: 22px; }
.dotlist li { margin-bottom: 7px; padding-left: 4px; }
.dotlist li::marker { color: var(--link); }
.dot-lbl { color: var(--faint); font-weight: 600; margin-right: 2px; }
.pt-sub { color: var(--gray); display: block; font-size: 15px; }
#news-older { display: none; }
.newstoggle {
  background: none; border: none; padding: 2px 0; margin: 12px 0 0 0;
  font: inherit; font-size: 14px; color: var(--gray); cursor: pointer;
}
.newstoggle:hover { color: var(--link); }

/* ---------- selected publications (thumbnail rows) ---------- */
.pubrow { display: flex; gap: 26px; align-items: flex-start; padding: 14px; margin: 2px -14px; border-radius: 10px; transition: background 0.12s ease; }
.pubrow:hover { background: var(--hover); }
.thumb { flex: 0 0 180px; }
.thumb img, .thumb .ph {
  width: 180px; aspect-ratio: 16 / 10; border-radius: 8px;
  border: 1px solid #e6e6e6; box-shadow: 0 1px 4px rgba(0,0,0,0.07); display: block;
}
.thumb img { object-fit: cover; background: #fafafa; cursor: zoom-in; }
.thumb .ph {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; letter-spacing: 0.06em; text-align: center; padding: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.pubtext { flex: 1; min-width: 0; }
.pub-title { margin: 0; font-size: 17px; line-height: 1.4; }
.pub-title a { font-weight: 600; }
.pub-authors { font-size: 15px; margin: 3px 0 0; }
.pub-venue { font-size: 15px; color: var(--gray); font-style: italic; margin: 2px 0 0; }
.pub-venue .note { font-style: normal; font-weight: 700; color: var(--note); }
.pub-links { font-size: 13.5px; margin-top: 5px; color: var(--faint); }
.pub-links a { margin-right: 10px; }

/* ---------- lightbox (full-size publication figures) ---------- */
.lightbox { display: none; }
.lightbox.open {
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.82); padding: 34px;
}
.lightbox img {
  max-width: min(1100px, 94vw); max-height: 92vh; width: auto; height: auto;
  object-fit: contain; background: #fff; border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); cursor: zoom-out;
}
.lb-close {
  position: absolute; top: 12px; right: 20px;
  background: none; border: none; color: #fff;
  font-size: 34px; line-height: 1; padding: 4px 10px; cursor: pointer; opacity: 0.75;
}
.lb-close:hover { opacity: 1; }

/* ---------- compact publications ---------- */
.group-h { font-size: 17px; font-weight: 700; margin: 30px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); }
.cpub { margin: 0 0 15px; }
.cpub .t a { font-weight: 600; }
.cpub .star { color: #d99000; font-weight: 700; margin-left: 6px; font-size: 13px; }
.hl-star { color: #d99000; font-size: 15px; }
.cpub .a { font-size: 14.5px; }
.cpub .v { font-size: 14.5px; color: var(--gray); font-style: italic; display: inline; }
.cpub .v .note { font-style: normal; font-weight: 700; color: var(--note); }
.cpub .l { font-size: 13.5px; }
.cpub .l a { margin-right: 10px; }

/* ---------- chips (interests) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.chip { font-size: 13.5px; color: var(--gray); border: 1px solid #e2e2e2; border-radius: 20px; padding: 3px 12px; }

/* ---------- languages ---------- */
.langgrid { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 6px; }
.langgrid div { font-size: 15.5px; }
.langgrid .lv { color: var(--gray); }

footer {
  margin-top: 70px; padding-top: 18px; border-top: 1px solid var(--rule);
  text-align: center; color: var(--faint); font-size: 13px;
}
footer a { color: var(--gray); }

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  .page { padding: 0 18px 40px; }
  .topnav-inner { padding: 10px 18px; }
  .hero { flex-direction: column; align-items: center; gap: 24px; padding-top: 32px; }
  .hero-photo { order: -1; padding-top: 0; }
  .hero-photo img { width: 150px; height: 150px; }
  .hero-text h1 { text-align: center; font-size: 29px; }
  .tagline { text-align: center; }
  .linkrow { justify-content: center; }
  .pagehead { padding-top: 32px; }
  .pubrow { flex-direction: column; gap: 12px; padding: 12px; margin: 2px -12px; }
  .thumb { flex: none; width: 100%; }
  .thumb img, .thumb .ph { width: 100%; max-width: 320px; }
  .grow { flex-direction: column; gap: 2px; }
  .gwhen { flex: none; }
  .news .gwhen { padding-top: 0; }
}
