/* ==========================================================================
   classic/classic.css — the classic, text-based academic site.
   Colours and fonts are set in :root; the rest follows the page order.
   ========================================================================== */

:root {
  --ink: #1f2328;
  --muted: #5b6169;
  --rule: #e7e3dc;
  --accent: #1f4e8c;
  --accent-soft: #eaf0f8;
  --bg: #ffffff;
  /* One font for the whole site, headings included (Lehan, 2026-10-06; was a serif for the headings). */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
/* Links inside running text (content.js markdown): underlined, otherwise like the words around them. */
a.text-link { color: inherit; }

.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; background: #fff; padding: 6px 10px; z-index: 10; }

.wrap { width: 100%; max-width: 840px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 28px;
  padding-top: 22px; padding-bottom: 14px;
}
.site-title { font: 600 25px/1.2 var(--sans); color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15.5px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Page ---------- */
main { flex: 1; }
.page { padding-top: 38px; padding-bottom: 60px; }
h1 { font: 600 34px/1.2 var(--sans); letter-spacing: -0.01em; margin: 0 0 18px; }
h2 { font: 600 22px/1.3 var(--sans); margin: 40px 0 10px; }
h3 { font-size: 17px; line-height: 1.45; margin: 0; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); }
.dates { color: var(--muted); font-size: 15px; white-space: nowrap; }
.muted { color: var(--muted); }

.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600; font-size: 15px;
  text-decoration: none;
}
.button:hover { filter: brightness(1.1); }
.button--ghost { background: transparent; color: var(--accent); border-color: #c9d5e6; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 8px; }

/* Home */
.home { display: grid; grid-template-columns: 230px 1fr; gap: 40px; align-items: start; }
.home img { width: 100%; height: auto; border-radius: 6px; }
.home h1 { margin-top: -6px; }
/* The bio a size up from the body text: beside the photo and the big name it read smaller than the
   other pages (Lehan, 2026-10-05). */
.home p { font-size: 19px; line-height: 1.6; }
.home .quick-links { margin-top: 22px; font-size: 17px; }

/* Research */
.paper { padding: 16px 0 14px; border-top: 1px solid var(--rule); }
.paper:last-child { border-bottom: 1px solid var(--rule); }
.paper h2 { font: 600 18.5px/1.4 var(--sans); margin: 0 0 4px; }
.paper h2 a { color: var(--ink); }
.paper h2 a:hover { color: var(--accent); }
.paper-meta { color: var(--muted); font-size: 15.5px; margin: 0; }
.chip {
  display: inline-block;
  margin-left: 6px;
  padding: 0 9px;
  border: 1.5px solid #c9d5e6;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.6;
  text-decoration: none;
}
.chip:hover { background: var(--accent-soft); }
.abstract { margin-top: 6px; }
.abstract summary {
  display: inline-block;
  cursor: pointer;
  color: var(--accent);
  font-size: 14.5px; font-weight: 600;
  list-style: none;
}
.abstract summary::-webkit-details-marker { display: none; }
.abstract summary::before { content: "\25B8"; content: "\25B8" / ""; display: inline-block;   /* the "/ ''" keeps the triangle out of the spoken name */ width: 1.1em; transition: transform .15s; }
.abstract[open] summary::before { transform: rotate(90deg); }
.abstract summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.abstract p { margin: 8px 0 4px; font-size: 16px; line-height: 1.6; max-width: 46em; }

/* Talks */
.talks { list-style: none; margin: 0; padding: 0; }
.talks li { padding: 7px 0; border-top: 1px solid var(--rule); }
.talk-detail { color: var(--muted); }
.pill {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e3f5ea; color: #0a6b3b;
  font-size: 12.5px; font-weight: 700; line-height: 1.7;
  vertical-align: 1px;
}

/* CV */
.edu { padding: 14px 0; border-top: 1px solid var(--rule); }
.head-row { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; }
.edu ul, .role ul { margin: 8px 0 0; padding-left: 20px; }
.edu li, .role li { margin: 4px 0; font-size: 16px; }
.pdf-frame { display: block; width: 100%; height: 88vh; margin-top: 12px; border: 1px solid var(--rule); border-radius: 6px; }

/* Art */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 6px 0 8px; }
.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--rule); border-radius: 12px;
  color: inherit; text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: #c9d5e6; box-shadow: 0 8px 22px rgba(31,78,140,.10); }
.card-title { font: 600 21px/1.25 var(--sans); }
.card-text { color: var(--muted); font-size: 15.5px; }
.card-cta { color: var(--accent); font-weight: 600; font-size: 15px; margin-top: auto; }
.project { padding: 16px 0; border-top: 1px solid var(--rule); }
.medium { font-style: italic; color: var(--muted); margin: 2px 0 8px; }

/* Other experience */
.role { padding: 16px 0; border-top: 1px solid var(--rule); }
.role h3 a { color: inherit; }   /* organisation links look like the heading, underlined */
.role-title { color: var(--muted); }
.awards { list-style: none; margin: 0; padding: 0; }
.awards li { display: flex; justify-content: space-between; gap: 4px 18px; padding: 8px 0; border-top: 1px solid var(--rule); }
.plain { padding-left: 20px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 14.5px; }
.site-footer .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px;
  padding-top: 18px; padding-bottom: 28px;
}
/* "Try a fun version": a button that opens a small menu of the four fun versions, above it. */
.fun-menu { position: relative; display: inline-block; }
.fun-link {
  font: inherit; font-weight: 600; color: var(--accent);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px;
}
.fun-link:hover { text-decoration-thickness: 2px; }
.fun-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.fun-list {
  position: absolute; bottom: calc(100% + 10px); right: -8px; z-index: 20;
  width: 300px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.fun-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none;
}
.fun-list a:hover { background: var(--accent-soft); }
.fun-list a:focus-visible { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.fun-icon { flex: none; width: 36px; height: 36px; border-radius: 9px; color: #fff; display: grid; place-items: center; }
.fun-icon svg { width: 24px; height: 24px; }
.fun-name { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.fun-blurb { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .home { grid-template-columns: 1fr; gap: 20px; }
  .home img { max-width: 210px; }
  .home p { font-size: 17.5px; }
  .home .quick-links { font-size: 16px; }
  h1 { font-size: 30px; }
  .cards { grid-template-columns: 1fr; }
  .pdf-frame { display: none; }      /* phones rarely show embedded PDFs; the buttons remain */
  .awards li { flex-direction: column; }
  .fun-list { right: auto; left: -8px; width: min(300px, calc(100vw - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) .abstract summary::before { transition: none; }
}
@media print {
  .site-nav, .site-footer, .pdf-frame, .actions, .skip { display: none; }
}
