/* ── tokens ────────────────────────────────────────────── */
:root {
  --paper: #fcfbf8;
  --ink: #17202a;
  --muted: #5f6f7d;
  --rule: #e4e2db;
  --accent: #2a4c7d;
  --spine: 122px;
  --gutter: 30px;
  --paper-blur: rgba(252, 251, 248, .88);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11151a;
    --ink: #e7e5e0;
    --muted: #8d9baa;
    --rule: #232a32;
    --accent: #93b8e9;
    --paper-blur: rgba(17, 21, 26, .88);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3.25rem 1.5rem 4rem;
}

.anchor { scroll-margin-top: 5.25rem; }

/* ── sticky tab bar ────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper-blur);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.topbar__inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar__name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity .22s ease, transform .22s ease;
}

.topbar.is-scrolled .topbar__name {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.tabs {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 500;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs a {
  position: relative;
  padding: .85rem 0;
  color: var(--muted);
  border: 0;
  white-space: nowrap;
}

.tabs a:hover { color: var(--ink); }

.tabs a[aria-current="true"] { color: var(--ink); }

.tabs a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color .15s ease, border-color .15s ease;
}

a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── hero ──────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 2.25rem;
  align-items: start;
}

.hero__name {
  font-size: clamp(2.15rem, 6vw, 2.85rem);
  font-weight: 500;
  letter-spacing: -.022em;
  line-height: 1.04;
  margin: 0 0 .55rem;
}

.hero__role {
  margin: 0;
  line-height: 1.5;
}

.hero__email {
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--muted);
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.15rem;
  margin-top: .95rem;
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 500;
}

.hero__links a { border-bottom-color: var(--accent); }

.hero__portrait img {
  width: 132px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-radius: 3px;
}

.bio {
  margin: 1.9rem 0 0;
  max-width: 66ch;
}

/* ── sections ──────────────────────────────────────────── */
.section { margin-top: 3.4rem; }

.section__title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1.1rem;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -.012em;
}

.section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ── entries: date/venue spine + body ──────────────────── */
.entry {
  display: grid;
  grid-template-columns: var(--spine) 1fr;
  gap: var(--gutter);
  padding: .95rem 0;
}

.entry + .entry { border-top: 1px solid var(--rule); }

.entry--tight { padding: .55rem 0; }

.spine {
  font-family: var(--sans);
  font-size: .8rem;
  line-height: 1.45;
  padding-top: .3rem;
}

.spine__key {
  display: block;
  font-weight: 600;
  color: var(--accent);
}

.spine__sub {
  display: block;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.entry__title {
  margin: 0 0 .18rem;
  font-size: 1.06rem;
  font-weight: 500;
  line-height: 1.34;
}

.entry__line { margin: 0; }

.authors {
  margin: 0;
  font-family: var(--sans);
  font-size: .855rem;
  line-height: 1.5;
  color: var(--muted);
}

.authors strong {
  color: var(--ink);
  font-weight: 600;
}

.note {
  margin: .22rem 0 0;
  font-family: var(--sans);
  font-size: .79rem;
  color: var(--muted);
}

.note--inline {
  margin: 0 0 0 .5rem;
  display: inline;
}

.entry__links {
  margin: .4rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .9rem;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 500;
}

.entry__links a { border-bottom-color: var(--accent); }

/* ── footer ────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--rule);
  margin-top: 1rem;
}

.footer__inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.4rem 1.5rem 2.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem 1rem;
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--muted);
}

/* ── small screens ─────────────────────────────────────── */
@media (max-width: 640px) {
  .page { padding: 2.25rem 1.25rem 2.5rem; }

  .topbar__inner { padding: 0 1.25rem; }

  .topbar__name { display: none; }

  .tabs {
    gap: 1.1rem;
    margin: 0 -1.25rem;
    padding: 0 1.25rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero__portrait img { width: 104px; }

  .entry {
    grid-template-columns: 1fr;
    gap: .3rem;
  }

  .spine {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding-top: 0;
  }

  .spine__key, .spine__sub { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
