/* ===== Shared typography & components (both variants) ===== */

:root {
  --ink: #1d1c1a;
  --muted: #6d6860;
  --accent: #8a3324;        /* oxblood */
  --paper: #fcfbf8;         /* warm white */
  --band: #f3f0ea;          /* warm light grey */
  --rule: #e2ddd3;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
}

* { 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: 18px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(138, 51, 36, 0.35);
}
a:hover { text-decoration-color: var(--accent); }

/* Small spaced capitals: section labels, nav, links rows */
.caps, nav a, h3, .toggles .toggle, .label {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 500;
}

h1, h2 { font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 1.75rem; }

h3 {
  color: var(--muted);
  margin: 2.5rem 0 1.1rem;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
h3::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

main section { scroll-margin-top: 3.5rem; }

/* ----- Papers ----- */
.paper { margin: 0 0 1.9rem; }
.title { font-weight: 600; font-size: 1.06rem; line-height: 1.4; }
.title .year { font-weight: 400; color: var(--muted); }
.authors { color: var(--muted); }
.authors a { color: inherit; text-decoration-color: rgba(109, 104, 96, 0.4); }
.authors a:hover { color: var(--accent); }

.toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-top: 0.35rem; }
.toggles .toggle {
  background: none;
  border: 0;
  padding: 0.2rem 0;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.6;
}
.toggles .toggle + .toggle::before {
  content: "·";
  color: var(--muted);
  margin: 0 0.7rem;
  display: inline-block;
}
.toggles .toggle:hover { text-decoration: underline; text-underline-offset: 0.25em; }
button.toggle::after { content: " +"; }
button.toggle[aria-expanded="true"]::after { content: " –"; }
button.toggle[aria-expanded="true"] { color: var(--ink); }

.panel {
  margin: 0.7rem 0 0.2rem;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 1px solid var(--accent);
  font-size: 0.95rem;
  text-align: justify;
  hyphens: auto;
}
.panel p { margin: 0 0 0.6rem; }
.panel p:last-child { margin-bottom: 0; }
.panel[hidden] { display: none; }

.note { font-size: 0.85rem; font-style: italic; color: var(--muted); text-align: left; }

ul.talks { list-style: none; margin: 0; padding: 0; text-align: left; }
ul.talks li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.3rem 0 0.3rem 1rem; position: relative;
  border-top: 1px dotted var(--rule);
}
ul.talks li:first-child { border-top: 0; }
ul.talks .loc { color: var(--muted); font-style: italic; }
ul.talks .loc::before { content: ", "; font-style: normal; }
ul.talks .yr { color: var(--muted); white-space: nowrap; font-variant-numeric: oldstyle-nums; }

.dot, ul.talks li.me::before {
  display: inline-block; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--accent);
}
ul.talks li.me::before { content: ""; position: absolute; left: 0; top: 0.95rem; }

.tag {
  font-style: normal; text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.62rem; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 2px; padding: 0.05rem 0.3rem;
  vertical-align: 0.15em; text-decoration: none;
}
a.tag-link { color: var(--accent); border-color: rgba(138, 51, 36, 0.4); }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin: 0 0 1rem; }

/* ----- Home bits ----- */
.lead { font-size: 1.12rem; margin: 0; }
.news { margin-top: 2.25rem; }
h3.label { margin-top: 0; }
ul.dated { list-style: none; margin: 0; padding: 0; }
ul.dated li { display: flex; gap: 1.2rem; padding: 0.25rem 0; }
ul.dated .date { flex: 0 0 4.8rem; color: var(--muted); font-variant-numeric: oldstyle-nums; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .panel { text-align: left; hyphens: manual; }
  ul.dated li { flex-direction: column; gap: 0; padding: 0.35rem 0; }
  ul.dated .date { flex-basis: auto; font-size: 0.9rem; }
}
/* ===== Variant A: mountain banner ===== */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(252, 251, 248, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.site-header .inner {
  max-width: 48rem; margin: 0 auto; padding: 0.8rem 1.5rem;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
}
.site-name { color: var(--ink); text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--accent); }

.banner {
  height: clamp(165px, 27vw, 300px);
  background: #2a2522 var(--banner) center 58% / cover no-repeat;
}

.wrap { max-width: 48rem; margin: 0 auto; padding: 3rem 1.5rem 3.5rem; }

.hero {
  display: flex; align-items: flex-start; gap: 1.75rem;
  margin-top: -5.1rem;          /* portrait overlaps the banner */
  margin-bottom: 2.25rem;
}
.hero-text { padding-top: 5.75rem; }  /* keeps the name below the photo */
.portrait {
  width: 10.5rem; height: 10.5rem; object-fit: cover; border-radius: 50%;
  border: 5px solid var(--paper); flex-shrink: 0; background: var(--paper);
}
.hero h1 { font-size: 2.7rem; line-height: 1.05; margin: 0 0 0.35rem; }
.role { margin: 0; color: var(--muted); font-style: italic; font-size: 1.1rem; }
.links { margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.3rem; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }

#home .wrap { padding-top: 0; }

.band { background: var(--band); border-top: 1px solid var(--rule); }

footer { background: var(--band); border-top: 1px solid var(--rule); }
footer .inner { max-width: 48rem; margin: 0 auto; padding: 1.2rem 1.5rem 2rem; color: var(--muted); font-size: 0.85rem; font-style: italic; }

@media (max-width: 640px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 0.9rem; margin-top: -4.1rem; }
  .hero-text { padding-top: 0; }
  .portrait { width: 8.25rem; height: 8.25rem; }
  .hero h1 { font-size: 2.2rem; }
  nav ul { gap: 1.1rem; }
}
