/* ============================================================
   HBLT Design System — "Half-data, half-bookish"
   Palette: 70% Law Review / 30% Prussian
   Type: Fraunces / Newsreader / Inter / IBM Plex Mono
   ============================================================ */

/* ── 1. DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Palette */
  --paper:        #F9F7F2;
  --paper-raised: #FFFFFF;
  --paper-sunk:   #F0ECE3;
  --ink:          #191817;
  --ink-muted:    #67615A;
  --rule:         #E1DBCF;
  --accent:       #76303A;   /* oxblood */
  --accent-hover: #5C242C;
  --data:         #244A5C;   /* prussian-slate */
  --highlight:    #B5552F;   /* terracotta – sparingly */
  --done:         #546D52;   /* sage */
  --progress:     #B5832C;   /* ochre */
  --planned:      #978F84;   /* stone */

  /* Typography scale */
  --font-display:  'Fraunces', Georgia, serif;
  --font-prose:    'Newsreader', Georgia, serif;
  --font-ui:       'Inter', system-ui, sans-serif;
  --font-mono:     'IBM Plex Mono', 'Courier New', monospace;

  --text-hero:    clamp(2.4rem, 5vw, 4rem);
  --text-h2:      2rem;
  --text-h3:      1.25rem;
  --text-body:    1.0625rem;
  --text-ui:      0.9375rem;
  --text-mono:    0.8125rem;
  --leading-prose: 1.65;

  /* Spacing (replace all pt/inline hacks) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --nav-h: 3.75rem;
  --space-20: 5rem;

  /* Layout */
  --content-max:  860px;
  --wide-max:    1160px;
  --radius-card:   3px;
}

/* ── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* Base size — 18px so the whole rem-based layout (text + spacing) is a bit
   larger by default, regardless of browser zoom. */
html { scroll-behavior: smooth; font-size: 112.5%; }

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: var(--leading-prose);
  -webkit-font-smoothing: antialiased;
}

/* Prose contexts use serif */
.prose, .pub-abstract, .bio-body, article, .post-body {
  font-family: var(--font-prose);
  font-size: 1.0625rem;
  line-height: var(--leading-prose);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
h2 { font-size: var(--text-h2); letter-spacing: -0.01em; margin-bottom: var(--space-6); }
h3 { font-size: var(--text-h3); letter-spacing: -0.005em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-decoration-thickness: 1px; }

/* Mono class */
.mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums lining-nums;
}
.mono-label {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ── 3. LAYOUT CONTAINERS ─────────────────────────────────── */
.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container-content {
  width: 100%;
  max-width: var(--wide-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
@media (max-width: 640px) {
  .container-content { padding-inline: var(--space-4); }
}

/* ── 4. NAV ───────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-nav__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--wide-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
@media (max-width: 640px) {
  .site-nav__inner { padding-inline: var(--space-4); }
}

.site-nav__brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;   /* never break "François Hublet" onto two lines */
  flex-shrink: 0;
}
.site-nav__brand:hover { color: var(--ink); text-decoration: none; }

.site-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav__links a:hover,
.site-nav__links a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* Language switch */
.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  display: flex;
  gap: 0;
  align-items: center;
}
.lang-switch__btn {
  color: var(--ink-muted);
  text-decoration: none;
  padding: 2px 5px;
  transition: color 0.15s;
}
.lang-switch__btn:hover { color: var(--ink); text-decoration: none; }
.lang-switch__btn.active { color: var(--accent); font-weight: 500; }
.lang-switch__sep { color: var(--rule); font-size: 0.7rem; }

/* The German / French / Italian nav labels are noticeably longer than the
   English ones, so give those languages a tighter inline gap. */
html[lang="de"] .site-nav__links,
html[lang="fr"] .site-nav__links,
html[lang="it"] .site-nav__links { gap: var(--space-3); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  color: var(--ink);
}

/* Collapsed-menu appearance — applies whenever the links are opened, at any
   breakpoint (English collapses at 860px, longer languages earlier). */
.site-nav__links.open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: var(--space-4) var(--space-6);
}

@media (max-width: 860px) {
  .site-nav__links { display: none; }
  .nav-toggle { display: block; }
}

/* Longer languages would overflow the bar between ~860px and the content
   max-width, so collapse them into the menu button up to that width. */
@media (max-width: 1160px) {
  html[lang="de"] .site-nav__links,
  html[lang="fr"] .site-nav__links,
  html[lang="it"] .site-nav__links { display: none; }
  html[lang="de"] .site-nav__links.open,
  html[lang="fr"] .site-nav__links.open,
  html[lang="it"] .site-nav__links.open { display: flex; }
  html[lang="de"] .nav-toggle,
  html[lang="fr"] .nav-toggle,
  html[lang="it"] .nav-toggle { display: block; }
}

/* ── 5. SECTION SHELL ─────────────────────────────────────── */
.section {
  padding-block: var(--space-16);
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: none; }

.section__header {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.section__header h2 { margin-bottom: 0; }
.section__count {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.section__more {
  margin-left: auto;
  font-size: var(--text-ui);
  color: var(--accent);
}

/* ── 6. HERO ──────────────────────────────────────────────── */
.section.hero {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--space-0);
  padding-bottom: var(--space-16);
  border-top: none;
  position: relative;
}

.hero__grid {
  width: 100%;
}

.hero__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}
.hero__head-text { min-width: 0; }

/* Full-bleed background behind the name/role/photo banner */
.hero__head {
  position: relative;
  padding-block: var(--space-10);
  /* Stretch the element itself to the container edges */
  margin-inline: calc(-1 * var(--space-6));
  padding-inline: var(--space-6);
}
/* Then the pseudo-element breaks out to the viewport edges */
.hero__head::before {
  content: '';
  position: absolute;
  /* Extend up past the top of the (vertically-centred) hero so the band
     reaches the nav — no white gap between nav and title. The opaque,
     higher z-index nav covers the overflow above it. */
  top: calc(-1 * (100vh - var(--nav-h)));
  top: calc(-1 * (100svh - var(--nav-h)));
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background-image: var(--hero-bg-light);
  background-size: cover;
  background-position: center;
  z-index: 0;
  pointer-events: none;
}
body.dark .hero__head::before {
  background-image: var(--hero-bg-dark);
}
/* Keep content above the pseudo-element */
.hero__head > * { position: relative; z-index: 1; }

/* Scroll hint arrow */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-muted);
  font-size: 1.25rem;
  animation: hero-bounce 2.2s ease-in-out infinite;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.hero__scroll-hint:hover { opacity: 1; }

@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}
@media (max-width: 680px) {
  .hero__head { flex-direction: column-reverse; align-items: flex-start; gap: var(--space-4); }
}

.hero__name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.0;
  color: var(--ink);
  margin-top: 0;
  margin-bottom: var(--space-3);
  font-optical-sizing: auto;
  text-shadow: 0 0 4px var(--paper), 0 0 12px var(--paper);
}

/* Pronunciation anchor, button & popup */
.pron-anchor {
  position: relative;
  display: inline-block;
  vertical-align: super;
  margin-left: var(--space-2);
}
.pron-btn {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  /* Tie every colour to --ink-muted (defined in both themes) so the button
     keeps the same relative contrast in day and night mode. */
  color: var(--ink-muted);
  background: color-mix(in srgb, var(--ink-muted) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink-muted) 45%, transparent);
  border-radius: 2px;
  padding: 2px 5px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.pron-btn:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
  background: color-mix(in srgb, var(--ink-muted) 18%, transparent);
}

.pron-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 50;
  white-space: nowrap;
  font-size: initial;
  font-weight: normal;
  letter-spacing: normal;
  line-height: normal;
}
.pron-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding-block: 3px;
}
.pron-lang {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  min-width: 1.8rem;
}
.pron-ipa {
  font-family: var(--font-prose);
  font-size: 1rem;
  color: var(--ink);
  font-style: italic;
}
.pron-note {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--rule);
  max-width: 24ch;
  white-space: normal;
  line-height: 1.4;
}

.hero__role {
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  color: var(--ink);
  margin-bottom: var(--space-4);
  /* Halo in the page colour lifts the text off the photographic hero
     background in both light and dark mode. */
  text-shadow: 0 0 3px var(--paper), 0 0 9px var(--paper);
}
.hero__role span { color: var(--ink); font-weight: 600; }

.hero__data-strip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  color: var(--data);
  margin-bottom: var(--space-6);
  font-variant-numeric: tabular-nums;
}

.hero__tagline {
  font-family: var(--font-prose);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 56ch;
  margin-bottom: var(--space-6);
}

.hero__sub {
  font-family: var(--font-prose);
  font-size: 1.125rem;
  color: var(--ink);
  line-height: 1.55;
  max-width: 56ch;
  margin-bottom: var(--space-3);
}
.hero__sub a { color: var(--accent); }
.hero__sub a:hover { color: var(--accent-hover); }
.hero__sub:last-of-type { margin-bottom: var(--space-6); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.hero__photo {
  width: 110px;
  flex-shrink: 0;
}
.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  filter: grayscale(100%);
}

/* ── 7. BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-outline:hover { border-color: var(--ink-muted); color: var(--ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: transparent;
  padding-inline: var(--space-2);
}
.btn-ghost:hover { color: var(--ink); }

/* ── 8. SOCIAL LINKS ─────────────────────────────────────── */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 3px var(--space-3);
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.social-link:hover { color: var(--ink); border-color: var(--ink-muted); text-decoration: none; }
.social-link i { font-size: 0.85em; }

/* ── 9. RESEARCH PILLARS ─────────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
@media (max-width: 640px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

.pillar-card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  position: relative;
  transition: border-color 0.15s;
}
.pillar-card:hover { border-color: var(--ink-muted); }

.pillar-card__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
  font-variant-numeric: tabular-nums;
}

.pillar-card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-3);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.pillar-card__body {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: var(--space-4);
}

.pillar-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* Maturity dot */
.maturity {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.maturity__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.maturity--done   .maturity__dot { background: var(--done); }
.maturity--progress .maturity__dot { background: var(--progress); }
.maturity--wip    .maturity__dot { background: var(--progress); }
.maturity--planned .maturity__dot { background: var(--planned); }

/* ── 10. GRANT/PROJECT BAND ──────────────────────────────── */
.project-band {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--data);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-6);
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4) var(--space-6);
  align-items: start;
}
.project-band__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--data);
  white-space: nowrap;
  padding-top: 2px;
}
.project-band__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-1);
}
.project-band__body {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
}

/* ── 11. NEWS ITEMS ─────────────────────────────────────────*/
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.news-item {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: var(--space-4) var(--space-6);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.news-item:first-child { border-top: 1px solid var(--rule); }

.news-item__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.news-item__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}
.news-item__body {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
}

/* ── 12. PUBLICATION LIST ────────────────────────────────── */
/* Track filter tabs */
.track-filter {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-6);
  overflow-x: auto;
}
.track-filter__btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--space-2) var(--space-4) var(--space-3);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.track-filter__btn:hover { color: var(--ink); }
.track-filter__btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.pub-list { display: flex; flex-direction: column; }
.pub-item {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 var(--space-6);
  padding: var(--space-6) 0 var(--space-5);
  border-bottom: 1px solid var(--rule);
}
.pub-item:first-child { border-top: 1px solid var(--rule); }

.pub-item__year {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
  text-align: right;
}

.pub-item__title {
  font-family: var(--font-prose);
  font-size: 1rem;
  font-style: italic;
  color: var(--ink);
  margin-bottom: var(--space-1);
  line-height: 1.35;
}
.pub-item__title a { color: var(--ink); }
.pub-item__title a:hover { color: var(--accent); }

.pub-item__authors {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
  margin-bottom: var(--space-1);
}
.pub-item__authors .self { font-weight: 600; color: var(--ink); }

.pub-item__venue {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}
.pub-item__venue em { font-style: italic; }

.pub-item__badges { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-2); padding-top: 3px; }
.pub-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 2px;
  color: #fff;
}

.pub-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.pub-item__links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--data);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.pub-item__links a:hover { border-bottom-color: var(--data); text-decoration: none; }
.pub-item__links .sep { color: var(--rule); }

/* Accordion (abstract/bibtex) */
.pub-accordion { margin-top: var(--space-2); }
.pub-accordion__toggle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s;
  text-decoration: none;
  margin-right: var(--space-3);
}
.pub-accordion__toggle:hover { color: var(--ink); }
.pub-accordion__toggle[aria-expanded="true"] { color: var(--accent); }

.pub-accordion__body {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--paper-sunk);
  border-radius: var(--radius-card);
  border: 1px solid var(--rule);
}
.pub-accordion__body.bibtex {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
  color: var(--ink);
  position: relative;
  padding-top: var(--space-6);
  margin-bottom: var(--space-4);
}
.bibtex-copy-btn {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  color: var(--ink-muted);
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.bibtex-copy-btn:hover { color: var(--ink); border-color: var(--ink-muted); }
.pub-accordion__body.abstract {
  font-family: var(--font-prose);
  font-size: var(--text-ui);
  line-height: var(--leading-prose);
  color: var(--ink);
}

/* ── 13. TEACHING & COURSES ─────────────────────────────── */
.course-list { display: flex; flex-direction: column; gap: var(--space-6); }
.course-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0 var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--rule);
}
.course-item__term {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}
.course-item__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-1);
}
.course-item__meta {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}
.course-item__desc {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: var(--space-3);
}
.material-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.material-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--data);
  border: 1px solid var(--rule);
  padding: 2px var(--space-3);
  border-radius: 2px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.material-link:hover { border-color: var(--data); text-decoration: none; }

/* ── 14. STUDENT PROJECTS ────────────────────────────────── */
.project-list { display: flex; flex-direction: column; gap: var(--space-4); }
.project-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: var(--space-5) var(--space-6);
  background: var(--paper-raised);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2) var(--space-6);
  align-items: start;
}
.project-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-1);
}
.project-card__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
  display: flex;
  gap: var(--space-3);
}
.project-card__desc {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
  line-height: 1.5;
  grid-column: 1;
}
.project-card__level {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--data);
  border: 1px solid var(--data);
  border-radius: 2px;
  padding: 2px 6px;
  white-space: nowrap;
  align-self: start;
}

/* Software / dataset cards — a bit of left breathing room, with an
   optional logo tucked into that margin. */
.project-card--resource {
  padding: var(--space-6) var(--space-6) var(--space-6) var(--space-8);
}
.project-card--resource > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.resource-logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-card);
  margin-top: 2px;
}

/* "Not in the site's main language" note on a publication. */
.pub-lang-note {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0 5px;
  margin-left: var(--space-2);
  vertical-align: middle;
  white-space: nowrap;
}

/* ── 15. BIO / ABOUT ─────────────────────────────────────── */
.bio-body { max-width: 70ch; }
.bio-body p { margin-bottom: var(--space-4); }

/* ── 16. SERVICE / REVIEWING ─────────────────────────────── */
.service-list { list-style: none; padding: 0; }
.service-list li {
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  font-size: var(--text-ui);
}
.service-list li a { color: var(--ink); }
.service-list__year {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ── 17. MEDIA / WRITING ─────────────────────────────────── */
.media-item {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 var(--space-6);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.media-item__year {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.media-item__title { font-family: var(--font-ui); font-size: var(--text-ui); color: var(--ink); }
.media-item__title a { color: var(--ink); }
.media-item__venue { font-family: var(--font-ui); font-size: var(--text-ui); color: var(--ink-muted); font-style: italic; }

/* ── 18. FOOTER ──────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding-block: var(--space-8);
}
.site-footer__inner {
  max-width: var(--wide-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: var(--space-6);
}
.site-footer__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-2);
}
.site-footer__affil {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.site-footer__links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.site-footer__links a:hover { color: var(--ink); text-decoration: none; }
.site-footer__copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  margin-top: var(--space-3);
}

/* ── 19. CV TIMELINE ────────────────────────────────────── */
.cv-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.cv-subsection {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0 var(--space-6);
}
@media (max-width: 640px) {
  .cv-subsection { grid-template-columns: 1fr; }
  .cv-subsection__label { margin-bottom: var(--space-1); }
}
.cv-subsection__label {
  padding-top: 2px;
}
.cv-entries {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cv-entry {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0 var(--space-4);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.cv-entry:first-child { border-top: 1px solid var(--rule); }
/* Wider, wrapping label column — for longer labels like language levels */
.cv-entry--wide { grid-template-columns: 12rem 1fr; }
.cv-entry--wide .cv-entry__years { white-space: normal; }
.cv-entry__years {
  font-size: var(--text-mono);
  color: var(--ink-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.cv-entry__title {
  font-family: var(--font-prose);
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0;
}
.cv-entry__place {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

/* Zenodo button — brand-tinted variant of .material-link */
.material-link--zenodo {
  color: #1682d4;
  border-color: rgba(22, 130, 212, 0.4);
}
.material-link--zenodo:hover {
  color: #fff;
  background: #1682d4;
  border-color: #1682d4;
}

/* "To appear" — same row layout as other publications, subtly highlighted */
.pub-item--to-appear {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.pub-item--to-appear .pub-item__year {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}
.to-appear__pill {
  display: inline-block;
  margin-left: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 2px;
  padding: 1px 6px;
  vertical-align: 1px;
}
body.dark .to-appear__pill {
  color: #000;
}

/* Year dropdown (media / Le Grand Continent) */
.gc-year-select {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper-raised);
  color: var(--ink);
}

/* Section intro paragraphs (DB-driven, per language) */
.section-intro {
  font-family: var(--font-prose);
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 65ch;
  margin-bottom: var(--space-8);
}
.research-subhead {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: var(--space-4);
}
.research-subhead__note {
  font-family: var(--font-ui);
  font-size: var(--text-ui);
  color: var(--ink-muted);
  max-width: 65ch;
  margin-top: calc(-1 * var(--space-2));
  margin-bottom: var(--space-2);
}

/* Language flags — square, lightly rounded (flag-icons) */
.lang-flag {
  width: 1.15em;
  height: 1.15em;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.12);
  vertical-align: -0.18em;
  background-size: cover;
  background-position: center;
}

/* Collaborators — comma-separated running paragraph */
.collab-para {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
}
.collab-para__meta { color: var(--ink-muted); }

/* ── 20. FILTER ENHANCEMENTS ─────────────────────────────── */
.pub-filters {
  margin-bottom: var(--space-6);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.pub-filters .track-filter {
  margin-bottom: 0;
  border-bottom: 1px solid var(--rule);
  padding-left: var(--space-2);
}
.pub-filters .track-filter:last-child { border-bottom: none; }
.track-filter__label {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  font-size: 0.65rem;
  min-width: 4rem;
  color: var(--ink-muted);
  border-right: 1px solid var(--rule);
  margin-right: var(--space-1);
}

/* ── 21. THEME TOGGLE BUTTON ─────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 4px 7px;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 0.95rem;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-muted); }

/* ── 22. DARK AURORA THEME ───────────────────────────────── */
body.dark {
  --paper:        #080F0B;
  --paper-raised: #0D1810;
  --paper-sunk:   #040905;
  --ink:          #D0EDD6;
  --ink-muted:    #6A9B76;
  --rule:         #1C3324;
  --accent:       #3DFF84;
  --accent-hover: #25CC66;
  --data:         #36D48E;
  --highlight:    #7AFFB8;
  --done:         #3DFF84;
  --progress:     #C9A830;
  --planned:      #4A6B55;
}

body.dark .btn-primary {
  color: #080F0B;
}
body.dark .btn-primary:hover {
  color: #080F0B;
}

body.dark .site-nav {
  background: var(--paper);
  border-bottom-color: var(--rule);
}

body.dark .site-nav__links.open {
  background: var(--paper);
  border-bottom-color: var(--rule);
}

body.dark .pillar-card,
body.dark .project-card {
  background: var(--paper-raised);
  border-color: var(--rule);
}

body.dark .pub-accordion__body {
  background: var(--paper-sunk);
  border-color: var(--rule);
}

body.dark .project-band {
  background: var(--paper-sunk);
  border-color: var(--rule);
}

body.dark .pub-filters {
  border-color: var(--rule);
}

body.dark .pub-filters .track-filter {
  border-bottom-color: var(--rule);
}

body.dark .track-filter__label {
  border-right-color: var(--rule);
}

.text-muted  { color: var(--ink-muted) !important; }
.text-accent { color: var(--accent) !important; }
.text-data   { color: var(--data) !important; }

.hidden { display: none !important; }

.navbar { display: none; }
