/* ──────────────────────────────────────────────────────────────────────────
   Tokens. --rail-bg is the one to change if the sidebar color is wrong.
   Alternatives:  warm stone    #efece6 / ink #2a2724 / quiet #6f6a62
                  deep cardinal #6b1010 / ink #f3e9e9 / quiet #c9a9a9
                  deep slate    #2b3038 / ink #e9eaec / quiet #a3a9b2
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --ink: #1a1a1a;  --ink-soft: #44474d;  --ink-quiet: #6b7078;
  --rule: #e4e6e9; --rule-soft: #f0f1f3; --accent: #8c1515; --bg: #fff;

  --rail-bg: #8C1515; --rail-ink: #FFFFFF; --rail-quiet: #E8C9C9;
  --rail-line: #A33A3A; --rail-w: 20.5rem;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --measure: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 108%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── Shell ────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100vh; }

.rail { background: var(--rail-bg); color: var(--rail-ink); }
.rail-inner {
  position: sticky; top: 0; padding: 3rem 2rem 2.5rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.rail-photo {
  width: 224px; height: 224px; border-radius: 50%; object-fit: cover;
  object-position: center top; display: block; margin-bottom: 1.5rem;
  background: var(--rail-line);
}
.rail-name { font-size: 1.18rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.rail-role { color: var(--rail-quiet); font-size: 0.88rem; line-height: 1.5; margin-top: 0.4rem; }

.rail-nav { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; margin: 1.75rem 0 0; width: 100%; }
.rail-nav a {
  color: var(--rail-quiet); font-size: 0.95rem; padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}
.rail-nav a:hover { color: var(--rail-ink); text-decoration: none; }
.rail-nav a.is-current { color: var(--rail-ink); font-weight: 600; }

.social { display: flex; justify-content: center; gap: 1rem; margin-top: 1.9rem; }
.social a { color: var(--rail-quiet); display: flex; }
.social a:hover { color: var(--rail-ink); }
.social svg { display: block; }

/* ── Main ─────────────────────────────────────────────────────────────── */
.main { padding: 3.25rem 2.5rem 4rem; }
.main-inner { max-width: var(--measure); }

h1, h2, h3 { color: var(--ink); line-height: 1.25; letter-spacing: -0.016em; }
.page-title { font-size: 1.95rem; font-weight: 690; margin: 0 0 1.5rem; }

/* A section of the page. Larger than the headings inside it, which was the
   wrong way round when this was a small uppercase eyebrow. */
.section-head {
  font-size: 1.45rem; font-weight: 660; margin: 3rem 0 1.2rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule);
}
h2 { font-size: 1.45rem; font-weight: 660; margin: 3rem 0 1.2rem; }
h3 { font-size: 1.14rem; font-weight: 640; margin: 2rem 0 0.45rem; }
p { margin: 0 0 1.1rem; color: var(--ink-soft); }
.lede { font-size: 1.07rem; color: var(--ink); }

.eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-quiet);
  padding-bottom: 0.45rem; margin: 2.9rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.more { font-size: 0.92rem; margin-top: 0.9rem; }
.note { font-size: 0.89rem; color: var(--ink-quiet); }

/* ── Figures ──────────────────────────────────────────────────────────── */
.fig {
  width: 100%; height: auto; display: block;
  margin: 1.1rem 0 1.6rem; color: var(--ink-quiet);
}
.fig-box rect { fill: #fff; stroke: var(--rule); stroke-width: 1.4; }
.fig-box.is-accent rect { stroke: var(--accent); }
.fig-box.is-muted rect { fill: var(--rule-soft); stroke: var(--rule); }
.fig-label { font: 600 13px var(--sans); fill: var(--ink); text-anchor: middle; }
/* no text-anchor here: CSS would override the per-element attribute */
.fig-sub   { font: 400 11.5px var(--sans); fill: var(--ink-quiet); }
.fig-tag   { font: 400 11.5px var(--sans); fill: var(--ink-quiet); }
.fig-line path { stroke: var(--ink-quiet); stroke-width: 1.4; fill: none; }
.fig-line.is-dashed path { stroke-dasharray: 3 3; }

/* ── Publications ─────────────────────────────────────────────────────── */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 1rem 0; border-bottom: 1px solid var(--rule-soft); }
.pub:last-child { border-bottom: 0; }
.pub-title { font-weight: 620; color: var(--ink); margin-bottom: 0.15rem; }
.pub-authors { color: var(--ink-soft); font-size: 0.91rem; }
.pub-authors strong { color: var(--ink); font-weight: 650; }
.pub-venue { color: var(--ink-quiet); font-size: 0.88rem; margin-top: 0.1rem; }
.pub-links { margin-top: 0.5rem; display: flex; align-items: center; gap: 0.7rem; }
/* Colored set. Each icon carries its own hue, so none of them reads as the
   disabled sibling of the PDF. The reds and ambers match the summary pages. */
.pub-icon { display: inline-flex; opacity: 0.9; transition: opacity .12s ease; }
.pub-icon:hover { opacity: 1; text-decoration: none; }
.pub-icon svg { display: block; }
.pub-icon.is-pdf  { color: #8C1515; }
.pub-icon.is-site { color: #1F6F8B; }
.pub-icon.is-sum  { color: #B5720F; }


.foot {
  margin-top: 3.5rem; padding-top: 1.4rem; border-top: 1px solid var(--rule);
  color: var(--ink-quiet); font-size: 0.86rem;
}

/* ── Narrow ───────────────────────────────────────────────────────────── */
@media (max-width: 56rem) {
  .shell { grid-template-columns: 1fr; }
  .rail-inner { position: static; padding: 2.25rem 1.5rem; }
  .rail-photo { width: 150px; height: 150px; margin-bottom: 1rem; }
  .rail-nav { flex-direction: row; flex-wrap: wrap; justify-content: center;
              gap: 1.1rem; margin-top: 1.1rem; }
  .social { margin-top: 1.1rem; }
  .main { padding: 2.25rem 1.5rem 3rem; }
}

/* ── A thread's papers, sitting under its figure ──────────────────────── */
.thread-papers {
  border-left: 2px solid var(--accent);
  padding: 0.1rem 0 0.1rem 1.1rem;
  margin: 0 0 2.2rem;
}
.tp-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-quiet); margin-bottom: 0.3rem;
}
.thread-papers .pub { padding: 0.35rem 0; border-bottom: 0; }

/* ── Bio entries, resume shaped ───────────────────────────────────────── */
.entry { margin-bottom: 2rem; }
.entry-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.entry-title { font-size: 1.08rem; font-weight: 650; color: var(--ink); }
.entry-when { font-size: 0.86rem; color: var(--ink-quiet); white-space: nowrap; }
/* The line under an entry title reads the same as a role line: same size,
   same weight, same color token. Only the spacing differs, because one sits
   directly under a title and the other follows a list. */
.entry-sub {
  font-size: 0.93rem; font-weight: 600; color: var(--ink); margin-top: 0.15rem;
}
.entry-role {
  font-size: 0.93rem; font-weight: 600; color: var(--ink);
  margin-top: 1.05rem;
}
.entry ul { margin: 0.4rem 0 0; padding-left: 1.15rem; }
.entry li { color: var(--ink-soft); margin-bottom: 0.28rem; }
.entry li::marker { color: var(--ink-quiet); }

/* A role line carries its own dates, pushed to the right. */
.entry-role {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.entry-role .entry-when { font-weight: 400; }

/* The bio is a list of short facts rather than prose, so it reads better on a
   wider measure where most bullets fit on one line. */
.main-inner.is-wide { max-width: 56rem; }

/* Bold phrases are there to be scanned, so they also step up in color. */
p strong, .lede strong { font-weight: 640; color: var(--ink); }
