/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-soft: #444444;
  --ink-muted: #888888;
  --rule: #e6e6e6;
  --accent: #0a58ca;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 38rem;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease;
}
a:hover { color: var(--accent); }

/* ---------- Top tabs ---------- */
.tabs {
  border-bottom: 1px solid var(--rule);
}

.tabs ul {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.95rem;
}

.tabs li { margin: 0; }

.tabs a {
  display: inline-block;
  padding: 1rem 1.1rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 120ms ease, border-color 120ms ease;
}
.tabs a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- Layout ---------- */
.page {
  max-width: 56rem;
  margin: 0 auto;
  padding: 3rem clamp(1.25rem, 5vw, 3rem) 4rem;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .hero {
    grid-template-columns: 180px 1fr;
    gap: 2rem;
    align-items: start;
  }
}

.hero__portrait { margin: 0; }
.hero__portrait img {
  width: 180px;
  height: 225px;
  object-fit: cover;
}

.hero__body { min-width: 0; }

.name {
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.3rem;
}

.title {
  color: var(--ink);
  margin: 0 0 0.1rem;
}

.affiliation {
  color: var(--ink-soft);
  margin: 0 0 0.3rem;
}

.email {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.email a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}
.email a:hover { color: var(--accent); border-bottom-color: currentColor; }

.bio {
  margin: 0;
  max-width: var(--measure);
}

/* ---------- Sections ---------- */
.section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 3rem;
  padding: 1.5rem 0;
}

@media (min-width: 720px) {
  .section { grid-template-columns: 9rem 1fr; }
}

.section__title {
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0.3rem 0 0.75rem;
}

@media (min-width: 720px) {
  .section .section__title { margin-bottom: 0; }
}

.section__body { max-width: var(--measure); }
.section__body p { margin: 0 0 1rem; }
.section__body p:last-child { margin-bottom: 0; }

/* ---------- Publications ---------- */
.papers {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: var(--measure);
  display: grid;
  gap: 1.5rem;
}

.paper__title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 500;
}
.paper__title a {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.paper__title a:hover { color: var(--accent); border-bottom-color: currentColor; }

.paper__authors {
  margin: 0 0 0.2rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.paper__venue {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.paper__venue .venue { color: var(--ink-soft); font-weight: 500; }
.paper__venue .dot { color: var(--ink-muted); }
.paper__venue a { color: var(--ink-muted); text-decoration: none; border-bottom: 1px solid var(--rule); }
.paper__venue a:hover { color: var(--accent); border-bottom-color: currentColor; }

/* ---------- Footer ---------- */
.footer {
  padding-top: 2rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.footer p { margin: 0; }

.muted { color: var(--ink-muted); }
.small { font-size: 0.82rem; }
