:root {
  --bg: #FBFBFC;
  --ink: #1C2430;
  --muted: #5A6573;
  --rule: #E1E5EA;
  --rule-strong: #B9C2CC;
  --accent: #2B5C8A;
  --accent-soft: #EEF3F8;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181E; --ink: #E4E8EE; --muted: #9AA4B1; --rule: #29303A;
    --rule-strong: #46505C; --accent: #8CB6E0; --accent-soft: #1C2633;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

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

/* Top bar */
.topbar { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1.5rem; font-family: var(--sans); font-size: 0.9375rem; }
.topbar .home { color: var(--ink); font-weight: 600; }
.topbar nav { display: flex; gap: 0.25rem 1.5rem; flex-wrap: wrap; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--ink); }
.topbar nav a[aria-current="page"] { font-weight: 500; }

/* Hero: photo + icons left, about right */
.hero { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3.5rem; padding: 3rem 0 1rem; }
.photo { width: 220px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; display: block; }

.icons { display: flex; gap: 0.5rem; margin-top: 1rem; list-style: none; padding: 0; }
.icons a {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--rule); color: var(--muted);
  transition: color .15s, border-color .15s, background-color .15s;
}
.icons a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.icons svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .icons a { transition: none; } }

.intro h1 { font-size: 2.25rem; line-height: 1.15; font-weight: 600; margin: 0 0 0.35rem; }
.intro .role { font-family: var(--sans); font-size: 0.9688rem; color: var(--muted); margin: 0 0 1.5rem; line-height: 1.5; }
.intro p { margin: 0 0 1rem; max-width: 66ch; }
.interests { color: var(--muted); }
.interests strong { color: var(--ink); font-weight: 600; }

/* Quote */
.quote-block { text-align: center; padding: 2.5rem 0 1rem; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; font-size: 1.15rem; margin-bottom: 1.25rem; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: min(120px, 20vw); background: var(--rule-strong); }
.quote-block blockquote { margin: 0 auto; max-width: 34em; }
.quote-block p {
  font-style: italic; font-size: 1.375rem; line-height: 1.5; margin: 0 0 0.85rem;
  text-wrap: balance;
}
.quote-block footer { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); }

/* Sections */
.section { margin-top: 3.25rem; }
.section h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.25; margin: 0 0 1.25rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule); }

/* News + timeline: shared date column */
.dated { list-style: none; padding: 0; margin: 0; }
.dated > li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.25rem; }
.dated > li + li { margin-top: 0.8rem; }
.dated .when { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); padding-top: 0.15rem; }

/* Publications */
.pub { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.25rem; }
.pub + .pub { margin-top: 1.75rem; }
.venue {
  font-family: var(--sans); font-size: 0.8125rem; font-weight: 500; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 3px; padding: 0.2rem 0.45rem;
  text-align: center; align-self: start; margin-top: 0.2rem;
}
.pub .title { font-weight: 600; margin: 0 0 0.2rem; line-height: 1.4; }
.pub .authors, .pub .where { margin: 0; font-size: 0.9688rem; color: var(--muted); }
.pub .authors .me { color: var(--ink); font-weight: 600; }
.pub .where em { color: var(--ink); }
.pub .actions { font-family: var(--sans); font-size: 0.875rem; margin-top: 0.45rem; display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: baseline; }
.pub .actions .soon { color: var(--muted); }
.pub details summary { cursor: pointer; color: var(--accent); list-style: none; }
.pub details summary::-webkit-details-marker { display: none; }
.pub details[open] summary { color: var(--ink); }
.pub pre { margin: 0.6rem 0 0; padding: 0.85rem 1rem; background: var(--accent-soft); border-radius: 4px; font-size: 0.8125rem; line-height: 1.5; overflow-x: auto; }

/* Experience page */
.page-title { font-size: 2rem; font-weight: 600; margin: 3rem 0 0.5rem; }
.page-lede { color: var(--muted); margin: 0 0 2rem; max-width: 60ch; }
.timeline > li + li { margin-top: 2rem; }
.timeline h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.15rem; line-height: 1.35; }
.timeline .org { margin: 0; color: var(--muted); font-size: 0.9688rem; }
.timeline ul { margin: 0.5rem 0 0; padding-left: 1.1rem; max-width: 66ch; }
.timeline ul li { margin-bottom: 0.3rem; }

/* Footer */
.site-footer { margin-top: 4rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); }

/* Small screens */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 1.75rem; padding-top: 2rem; }
  .profile { display: flex; flex-direction: column; align-items: center; }
  .photo { width: 180px; }
  .intro h1 { font-size: 1.875rem; }
  .quote-block p { font-size: 1.2rem; }
}
@media (max-width: 520px) {
  .topbar { flex-direction: column; gap: 0.5rem; }
  .topbar nav { gap: 0.25rem 1.1rem; font-size: 0.875rem; }
  .pub, .dated > li { grid-template-columns: 1fr; gap: 0.35rem; }
  .venue { justify-self: start; }
}
