:root {
  --bg: #FAFAF8;
  --text: #2C2C2C;
  --text-soft: #6B6B6B;
  --rule: #E5E3DD;
  --accent: #6B2737;
  --accent-soft: #8a3a4a;
  --pale: #D4E1EC;
  --pale-soft: #E8EFF6;

  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: Menlo, Consolas, 'Liberation Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

a { color: inherit; }

/* ─── Hero ──────────────────────────────────────────── */
.hero h1 {
  font-family: var(--serif);
  font-size: 2.85rem;
  font-weight: 500;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.hero .title {
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 0.85rem;
}

.hero .affiliations {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
}

.hero .links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: 0.9rem;
}

.hero .links a {
  color: var(--text-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 120ms ease;
}

.hero .links a svg {
  color: var(--text-soft);
  transition: color 120ms ease;
}

.hero .links a:hover,
.hero .links a:hover svg { color: var(--accent); }

/* ─── Header rule ────────────────────────────────────── */
.header-rule {
  border: 0;
  height: 1px;
  background: var(--accent);
  margin: 2.75rem 0 2.25rem;
  opacity: 0.85;
}

/* ─── Sections ───────────────────────────────────────── */
section {
  margin-bottom: 3.25rem;
}

section:last-of-type { margin-bottom: 0; }

section h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  font-variation-settings: "opsz" 36;
  letter-spacing: -0.005em;
  margin-bottom: 1.4rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
}

section p + p { margin-top: 0.65rem; }

/* ─── About ──────────────────────────────────────────── */
.bio {
  font-size: 1rem;
  margin-bottom: 1.1rem;
}

.topics {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.topics li {
  background: var(--pale);
  color: var(--text);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.825rem;
  font-weight: 500;
}

/* ─── Entry layout ───────────────────────────────────── */
.entry {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.1rem;
  margin-bottom: 1.85rem;
}

.entry:last-child { margin-bottom: 0; }

.entry .side {
  padding-top: 0.15rem;
}

.entry .logo {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.entry .year {
  color: var(--text-soft);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.entry h3 {
  font-family: var(--serif);
  font-size: 1.075rem;
  font-weight: 500;
  font-variation-settings: "opsz" 24;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.entry h3 a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}

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

.entry .meta {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.entry .note {
  font-size: 0.94rem;
  margin-top: 0.45rem;
  color: var(--text);
  font-style: italic;
}

/* Activities have no side column */
.entry-act {
  grid-template-columns: 1fr;
}

/* ─── Publications ───────────────────────────────────── */
.entry-pub .authors {
  font-size: 0.94rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.entry-pub .authors strong {
  color: var(--accent);
  font-weight: 600;
}

.pub-type, .talk-type {
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 0.86rem;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.65rem;
  font-size: 0.86rem;
}

.pub-links a {
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 120ms ease, border-color 120ms ease;
}

.pub-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pub-links details { display: inline-block; }

.pub-links summary {
  color: var(--text-soft);
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  display: inline-block;
  transition: color 120ms ease, border-color 120ms ease;
}

.pub-links summary::-webkit-details-marker { display: none; }

.pub-links summary:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pub-links pre {
  background: var(--pale-soft);
  border-left: 2px solid var(--pale);
  padding: 0.85rem 1rem;
  margin-top: 0.65rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  border-radius: 2px;
  width: 100%;
  display: block;
}

.pub-links details[open] {
  display: block;
  width: 100%;
}

/* ─── Selection ──────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ─── Mobile ─────────────────────────────────────────── */
@media (max-width: 600px) {
  main { padding: 2.5rem 1.25rem 4rem; }
  .hero h1 { font-size: 2.1rem; }
  .hero .title { font-size: 1rem; }
  .header-rule { margin: 2rem 0 1.75rem; }
  section { margin-bottom: 2.5rem; }
  .entry {
    grid-template-columns: 3.25rem 1fr;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
  }
  .entry .logo { width: 2.5rem; height: 2.5rem; }
}
