/* ==========================================================================
   Thomas M. Surowiec: site styles
   Type:   STIX Two Text (text, headings) + Source Sans 3 (UI, metadata)
   Colour: warm paper, near-black ink, one deep "fjord" blue accent
   All colours are tokens below; dark mode follows the OS setting.
   ========================================================================== */

/* ---------- Fonts (self-hosted, no Google requests; SIL Open Font License) ----------
   STIX Two Text: the typeface designed for scientific and mathematical publishing.
   Source Sans 3: a plain humanist sans for menus, labels and metadata. */
@font-face { font-family: "STIX Two Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/stix-two-text-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "STIX Two Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/stix-two-text-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "STIX Two Text"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url(../fonts/stix-two-text-latin-wght-italic.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "STIX Two Text"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url(../fonts/stix-two-text-latin-ext-wght-italic.woff2) format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/source-sans-3-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(../fonts/source-sans-3-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --paper:      #fbfaf7;
  --paper-2:    #f3f1ec;   /* cards, table stripes */
  --ink:        #1b1e23;   /* body text: ~16:1 on paper */
  --ink-2:      #4a515c;   /* secondary text: ~8:1 */
  --ink-3:      #6b7280;   /* metadata: ~4.8:1 */
  --rule:       #e2ded5;
  --accent:     #1f5a85;   /* links, highlights: ~7:1 */
  --accent-ink: #163f5e;
  --accent-bg:  #e6eef5;
  --motif:      #1f5a85;
  --award:      #9a4f1c;
  --award-bg:   #f6e9df;
  --motif-opacity: .13;

  --serif: "STIX Two Text", "STIX Two", "Times New Roman", Georgia, serif;
  --sans:  "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 68ch;
  --wide: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #121417;
    --paper-2:    #1a1d22;
    --ink:        #e8e6e1;
    --ink-2:      #b9bcc2;
    --ink-3:      #8f949c;
    --rule:       #2a2e35;
    --accent:     #8cc0e6;
    --accent-ink: #b7d8f0;
    --accent-bg:  #1b2a38;
    --motif:      #8cc0e6;
    --award:      #f0b68a;
    --award-bg:   #33241b;
    --motif-opacity: .10;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);   /* 17 → 19px */
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-line: underline; text-decoration-thickness: 1px;
    text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.6rem + 3vw, 3.6rem); font-weight: 650; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 1.3rem + 1vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
p, li { text-wrap: pretty; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }

/* Small caps-style label used for eyebrows, metadata, nav */
.label, .site-nav a, .eyebrow, .meta, .chip, .btn, .site-footer, th {
  font-family: var(--sans);
  font-feature-settings: "tnum";
  font-size-adjust: 0.5;
}
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--paper) 88%, transparent);
  position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.wordmark { font-family: var(--serif); font-weight: 650; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark:hover { color: var(--ink); }
.site-nav ul { list-style: none; display: flex; gap: clamp(12px, 2.4vw, 28px); margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { white-space: nowrap; font-size: .9rem; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 6px 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); }
@media (max-width: 640px) {
  .site-header { position: static; }
  .site-header .wrap { padding-top: 12px; padding-bottom: 10px; min-height: 0; }
  .site-nav { width: 100%; overflow-x: auto; }
  .site-nav ul { flex-wrap: nowrap; gap: 12px; }
  .site-nav a { font-size: .84rem; }
}

/* ---------- Splash (home) ---------- */
.splash { position: relative; isolation: isolate; overflow: hidden; color: #fff;
  min-height: min(calc(100svh - 64px), 920px); display: grid; place-items: center; text-align: center; background: #000; }
.splash-bg, .splash-bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.splash-bg img { object-fit: cover; object-position: 60% 40%; }
/* Start on black with only the text, then fade the building in (site.js adds .loaded) */
.js .splash-bg img { opacity: 0; transition: opacity 1.2s ease .25s; }
.js .splash-bg img.loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js .splash-bg img { opacity: 1; transition: none; } }
.splash::before {             /* overlay: keeps white text legible on any part of the photo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 48%, rgba(8,16,32,.62) 0%, rgba(8,16,32,.38) 60%, rgba(8,16,32,.18) 100%),
    linear-gradient(180deg, rgba(8,16,32,.30) 0%, rgba(8,16,32,0) 35%, rgba(8,16,32,.55) 100%);
}
.splash-inner { padding-top: 72px; padding-bottom: 104px; }
.splash .eyebrow { color: #cfe3f5; letter-spacing: .18em; }
.splash h1 { color: #fff; font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5.2rem); font-weight: 600; letter-spacing: -0.025em;
  text-shadow: 0 2px 30px rgba(0,0,0,.35); margin-bottom: .3em; }
.splash-roles { font-size: clamp(1.05rem, .98rem + .4vw, 1.3rem); color: rgba(255,255,255,.9); margin: 0 auto 2.2rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 0; }
.splash-roles span + span::before { content: "·"; margin: 0 .7em; opacity: .7; }
@media (max-width: 640px) { .splash-roles { flex-direction: column; } .splash-roles span + span::before { content: none; } }
.splash .profiles { justify-content: center; }
.splash .btn { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.38);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.splash .btn:hover { background: rgba(255,255,255,.2); border-color: #fff; color: #fff; }
.splash .btn.primary { background: #fff; color: #10203a; border-color: #fff; }
.splash .btn.primary:hover { background: #dbe9f6; border-color: #dbe9f6; color: #10203a; }
.splash a:focus-visible { outline-color: #fff; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: rgba(255,255,255,.8);
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); }
.scroll-cue:hover { color: #fff; border-color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue svg { animation: cue 2.4s ease-in-out infinite; }
  @keyframes cue { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
  .splash-inner > * { animation: rise .4s cubic-bezier(.2,.7,.2,1) both; }   /* whole sequence ≈ 0.5 s */
  .splash-inner > :nth-child(2) { animation-delay: .03s; } .splash-inner > :nth-child(3) { animation-delay: .06s; } .splash-inner > :nth-child(4) { animation-delay: .09s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
.splash-credit { position: absolute; right: 16px; bottom: 12px; font: 500 .72rem var(--sans); color: rgba(255,255,255,.6); letter-spacing: .02em; }
@media (max-width: 640px) { .splash-credit { display: none; } }

/* Subpage headers carry the topographic motif (level sets of a smooth landscape) */
.page-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: var(--motif); opacity: var(--motif-opacity);
  -webkit-mask-image: url(../img/contours.svg), linear-gradient(90deg, transparent 20%, #000 75%);
          mask-image: url(../img/contours.svg), linear-gradient(90deg, transparent 20%, #000 75%);
  -webkit-mask-size: cover, 100% 100%; mask-size: cover, 100% 100%;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.page-head { isolation: isolate; }

.lede { font-size: 1.22rem; line-height: 1.55; color: var(--ink); }
.facts .portrait { width: 200px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; margin: 0 0 2rem;
  box-shadow: 0 0 0 1px var(--rule), 0 16px 36px -18px rgba(20,30,40,.4); background: #b9cfe2; }
.facts .portrait img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .facts .portrait { width: 160px; } }

.highlights { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.highlights li { display: grid; grid-template-columns: 4rem 1fr; gap: 16px; padding: .8rem 0; border-top: 1px solid var(--rule); line-height: 1.5; }
.highlights li:first-child { border-top: 0; padding-top: 0; }
.highlights .date { font: 600 .84rem/1.9 var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; }

/* Profile links: icon + label pills */
.profiles { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0; margin: 0; list-style: none; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 500; color: var(--ink);
  text-decoration: none; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-bg); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 1.8rem; flex-wrap: wrap; }
.section-head a { font-family: var(--sans); font-size: .9rem; font-weight: 500; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }

.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; }
.page-head h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 2.9rem); margin-bottom: .4em; }
.page-head p:not(.eyebrow) { color: var(--ink-2); max-width: 40em; font-size: 1.12rem; margin: 0; }

/* Two-column layout: sidebar facts + main text */
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.facts { font-family: var(--sans); font-size: .92rem; line-height: 1.5; }
.facts h3 { font-family: var(--sans); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 0 0 .7rem; }
.facts dl { margin: 0 0 2rem; }
.facts dt { font-weight: 600; color: var(--ink); }
.facts dd { margin: 0 0 .9rem; color: var(--ink-2); }
.facts .years { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Theme cards ---------- */
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.theme { display: flex; flex-direction: column; gap: .5rem; padding: 22px 22px 20px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
a.theme:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); transform: translateY(-2px); box-shadow: 0 10px 24px -16px rgba(20,40,60,.35); color: var(--ink); }
.glyph { width: 48px; height: 48px; color: var(--accent); display: block; }
.theme .glyph { width: 40px; height: 40px; margin-bottom: .4rem; }
.theme h3 { font-size: 1.12rem; }
.theme p { color: var(--ink-2); font-size: .98rem; margin: 0; line-height: 1.5; }

/* ---------- Publication list ---------- */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 1.05rem 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr; gap: .25rem; }
.pub:first-child { border-top: 0; }
.pub .title { font-weight: 600; font-size: 1.12rem; line-height: 1.4; color: var(--ink); }
.pub .authors { color: var(--ink-2); font-size: .97rem; }
.pub .authors strong { color: var(--ink); font-weight: 600; }
.pub .venue { color: var(--ink-2); }
.pub .venue em { color: var(--ink); }
.pub .links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .35rem; }
.tag { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .04em; padding: 3px 9px; border-radius: 6px;
  border: 1px solid var(--rule); color: var(--ink-2); text-decoration: none; background: var(--paper); line-height: 1.5; }
a.tag:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-bg); }
.tag.status { border-color: transparent; background: var(--accent-bg); color: var(--accent-ink); }
.tag.award { border-color: transparent; background: var(--award-bg); color: var(--award); }
.pub .note { font-family: var(--sans); font-size: .8rem; color: var(--ink-3); }

.year-group { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0 24px; padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.year-group h2 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; padding-top: 1.15rem; font-variant-numeric: tabular-nums; position: sticky; top: 76px; align-self: start; }
@media (max-width: 640px) { .year-group { grid-template-columns: 1fr; } .year-group h2 { position: static; padding-top: .4rem; } }

/* Filter bar */
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 20px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .84rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.search { flex: 1 1 220px; max-width: 320px; font: 500 .9rem var(--sans); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.count { font-family: var(--sans); font-size: .84rem; color: var(--ink-3); margin-left: auto; }
.empty { color: var(--ink-3); font-style: italic; padding: 2rem 0; }
[hidden] { display: none !important; }

/* ---------- Seminar ---------- */
.notice { font-family: var(--sans); font-size: .92rem; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius);
  background: var(--accent-bg); color: var(--ink); margin: 0 0 2rem; max-width: var(--measure); }
.talks { list-style: none; margin: 0; padding: 0; }
.talk { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 4px 24px; padding: 1.1rem 0; border-top: 1px solid var(--rule); align-items: baseline; }
.talk .date { font-family: var(--sans); font-size: .86rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.talk .who { color: var(--ink-2); }
.talk .who strong { color: var(--ink); font-weight: 600; }
.talk .t { font-weight: 600; line-height: 1.4; }
.talk .t a { color: var(--ink); text-decoration-color: var(--rule); }
.talk .t a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
.talk .acts { display: flex; gap: 6px; }
@media (max-width: 700px) { .talk { grid-template-columns: 1fr; } .talk .acts { margin-top: .4rem; } }

/* ---------- Back-to-top button (phones and small tablets only) ----------
   Same look as the scroll cue on the splash page, pointing up. */
.to-top { display: none; }
@media (max-width: 760px) {
  .to-top { display: grid; place-items: center; position: fixed; right: 16px; bottom: 16px; z-index: 6;
    width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2);
    border: 1px solid var(--rule); background: color-mix(in srgb, var(--paper) 85%, transparent);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s, transform .25s; }
  .to-top.show { opacity: 1; transform: none; pointer-events: auto; }
  .to-top svg { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
@media print { .to-top { display: none !important; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; font-size: .84rem; color: var(--ink-3); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .filters, .page-head::before, .portrait, .splash-bg { display: none !important; }
  .splash { color: #000; min-height: 0; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .year-group h2 { position: static; }
}
.talk:first-child { border-top: 0; }
main:focus { outline: none; }
