/* =====================================================================
   Thomas Lustenberger — website stylesheet
   Plain CSS, no frameworks, no JavaScript.

   Contents
     1. Fonts
     2. Colours (change the whole look here)
     3. Basics (reset, page, links)
     4. Top menu (sticky, glassy, burger on small screens)
     5. Landing page (photo, intro, stats, "Published in", "Covered by")
     6. Content sections (sticky headings, research tabs, publications)
     7. Data, About, Contact
     8. Footer and "back to top" button
     9. Scroll effects (photo fade, arrow appears)
   ===================================================================== */


/* 1. FONTS ------------------------------------------------------------ */
/* IBM Plex Sans, stored locally in fonts/ (no external font service). */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-semibold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-bold.woff2") format("woff2"); }


/* 2. COLOURS ---------------------------------------------------------- */
:root {
  --background: oklch(15.5% .008 250);       /* page background (dark blue-grey) */
  --foreground: oklch(93% .01 85);           /* main text */
  --card: oklch(19% .01 250);                /* boxes, buttons */
  --muted: oklch(21% .01 250);               /* tab bar, abstract panels */
  --muted-foreground: oklch(66% .01 250);    /* secondary grey text */
  --accent: oklch(24% .012 250);             /* hover background */
  --primary: oklch(72% .12 235);             /* blue links and highlights */
  --border: oklch(27% .01 250);              /* thin lines */
  --glass: color-mix(in oklch, var(--background) 62%, transparent); /* see-through menu */
  --header-height: 72px;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}


/* 3. BASICS ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid var(--border); }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--background); color: var(--foreground); font-family: var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
ul, ol { list-style: none; }
img, svg { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Centred column used by every part of the page (64rem wide). */
.container { width: 100%; max-width: 64rem; margin-inline: auto; padding-inline: 1.5rem; }

/* Small grey capital-letter label ("PUBLISHED IN", "COVERED BY"). */
.eyebrow { margin-bottom: 1.5rem; font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); }

/* Underlined blue link ("Read the research →"). */
.link-accent { font-size: .875rem; line-height: 1.25rem; color: var(--primary); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in oklab, var(--primary) 45%, transparent); }


/* 4. TOP MENU --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--border);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.header-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem;
  max-width: 64rem; min-height: var(--header-height); margin-inline: auto; padding-inline: 1.5rem;
}
.brand { min-width: 0; font-size: 15px; font-weight: 500; }
.site-navigation { display: flex; gap: 1.5rem; min-width: 0; font-size: .875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.site-navigation a { transition: color .15s; }
.site-navigation a:hover { color: var(--foreground); }

/* Burger (☰) and close (×) buttons — only on small screens. */
.menu-button {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 4px;
  font-size: .875rem; font-weight: 500; cursor: pointer; transition: background .15s, color .15s;
}
.menu-button:hover { background: var(--accent); }
.menu-button:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--primary); }
.menu-button svg { width: 1rem; height: 1rem; pointer-events: none; }
.menu-close { display: none; }

@media (min-width: 768px) {
  .header-inner { display: flex; justify-content: space-between; }
  .menu-button { display: none !important; }
}
@media (max-width: 767px) {
  /* The menu drops down when the burger link opens #main-navigation. */
  .site-navigation {
    display: none; position: absolute; inset: 100% 0 auto; padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: color-mix(in oklch, var(--background) 96%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
  .site-navigation a { padding: .75rem 0; }
  #main-navigation:target { display: grid; gap: 0; }
  .site-header:has(#main-navigation:target) .menu-open { display: none; }
  .site-header:has(#main-navigation:target) .menu-close { display: inline-flex; font-size: 24px; }
}
#main-navigation { scroll-margin-top: 73px; }


/* 5. LANDING PAGE ----------------------------------------------------- */
/* The photo starts under the see-through menu and fills the first screen. */
.landing {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  margin-top: calc(-1 * (var(--header-height) + 1px));
  padding-top: calc(var(--header-height) + 1px);
}
.landing-image { position: absolute; inset: -80px 0 0; z-index: -2; width: 100%; height: calc(100% + 80px); object-fit: cover; object-position: 50% 50%; }
/* Dark shading so the white text stays readable (lighter towards the right). */
.landing-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--background) 28%, transparent), color-mix(in oklch, var(--background) 56%, transparent)),
    linear-gradient(90deg, color-mix(in oklch, var(--background) 86%, transparent), color-mix(in oklch, var(--background) 62%, transparent) 46%, color-mix(in oklch, var(--background) 18%, transparent));
}
/* Soft fade from the photo into the page colour at the bottom. */
.landing::after { content: ""; position: absolute; inset: auto 0 0; height: 100px; pointer-events: none; background: linear-gradient(transparent, var(--background)); }
@media (max-width: 640px) {
  .landing-image { object-position: 50% 50%; }
  .landing-shade { background: color-mix(in oklch, var(--background) 68%, transparent); }
}

/* Introduction */
.landing-intro { flex: 1; min-height: 0; display: flex; align-items: center; overflow-y: auto; }
.intro { padding-block: 2.5rem; }
.intro h1 { max-width: 42rem; font-size: 2.25rem; line-height: 1.25; font-weight: 600; }
.intro-text { max-width: 36rem; margin-top: 1.5rem; font-size: 1.125rem; line-height: 1.625; color: color-mix(in oklab, var(--foreground) 90%, transparent); }
.highlight { font-weight: 600; color: var(--foreground); }
.intro-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.75rem; }
@media (min-width: 768px) {
  .intro h1 { font-size: 3.75rem; }
  .intro-text { font-size: 1.25rem; }
}

/* Bands below the introduction */
.band { flex-shrink: 0; }

/* Stats: 5 / 4 / 1 / 20+ */
.band-stats { padding-bottom: 1.5rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-block: 1px solid var(--border); background: color-mix(in oklab, var(--background) 25%, transparent); }
.stats > div { padding-block: 1.25rem; }
.stats > div:nth-child(even) { border-left: 1px solid var(--border); padding-left: 1.25rem; }
.stats dt { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.stats dd { margin-top: .25rem; font-size: .75rem; line-height: 1rem; color: var(--muted-foreground); }
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats > div + div { border-left: 1px solid var(--border); padding-left: 1.25rem; }
  .stats dt { font-size: 2.25rem; line-height: 2.5rem; }
  .stats dd { font-size: .875rem; line-height: 1.25rem; }
}

/* Published in */
.venues-box { border-block: 1px solid var(--border); padding: 1.5rem 1.25rem; background: color-mix(in oklab, var(--card) 85%, transparent); }
.venues { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.venue-short { font-size: 1.5rem; line-height: 2rem; font-weight: 500; }
.venue-long { margin-top: .5rem; font-size: .75rem; line-height: 1.375; color: var(--muted-foreground); }
@media (min-width: 768px) { .venues { grid-template-columns: repeat(5, 1fr); } }

/* Covered by: moving names (the list is written twice so the loop is seamless) */
.band-covered { overflow: hidden; padding-block: 1.5rem; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.marquee-track { display: flex; gap: 3.5rem; width: max-content; white-space: nowrap; font-size: 1.125rem; line-height: 1.75rem; animation: marquee 40s linear infinite; }
.marquee-track span { color: oklch(1 0 0); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* "Scroll down" link */
.landing-scroll { flex-shrink: 0; margin-top: auto; padding-top: 1rem; padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
.scroll-link { display: inline-flex; align-items: center; gap: .75rem; font-size: .75rem; line-height: 1rem; color: var(--muted-foreground); }
.scroll-link:hover { color: var(--primary); }

/* Which bands fit: phones show only the introduction; taller screens add
   stats, then "Published in", then "Covered by". Adjust the heights here. */
@media (max-width: 767px), (max-height: 639px) {
  .band { display: none; }
}
@media (min-width: 768px) and (max-height: 821px) {
  .band-published, .band-covered { display: none; }
}
@media (min-width: 768px) and (max-height: 939px) {
  .band-covered { display: none; }
}
/* Keep the introduction and bottom arrow within short landscape screens. */
@media (max-height: 639px) {
  .intro { padding-block: 1rem; }
  .intro h1 { font-size: 2rem; }
  .intro-text { margin-top: .75rem; font-size: 1rem; line-height: 1.4; }
  .intro-links { margin-top: .75rem; }
  .landing-scroll { padding-top: .5rem; padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
}
@media (max-height: 399px) {
  .landing-intro { align-items: flex-start; }
  .intro { padding-block: .5rem; }
  .intro h1 { font-size: 1.5rem; }
}


/* 6. CONTENT SECTIONS ------------------------------------------------- */
.content section { border-top: 1px solid var(--border); padding: 4rem 0; scroll-margin-top: 88px; }
.content svg { display: inline-block; }

/* Section heading (e.g. "Research — Articles, chapters & working papers") */
.sh { margin-bottom: 2rem; padding: 1rem 0; border-bottom: 1px solid var(--border); scroll-margin-top: 3.5rem; }
.kick { font-size: .75rem; font-weight: 500; color: var(--primary); }
.sh h2 { margin-top: .25rem; font-size: 1.5rem; line-height: 1.25; font-weight: 500; }
@media (min-width: 640px) { .sh h2 { font-size: 1.875rem; } }

/* Headings stay pinned under the top menu, with the same glass look. */
.sticky-head {
  position: sticky; top: var(--header-height); z-index: 20;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.research-head { margin-bottom: 1rem; padding-bottom: .5rem; }
.research-head .sh { margin-bottom: .75rem; }

/* Carry the same glass across the viewport; preserve the text column. */
.content .sticky-head {
  margin-inline: min(-1.5rem, calc((64rem - 100vw) / 2 - 1.5rem));
  padding-inline: max(1.5rem, calc((100vw - 64rem) / 2 + 1.5rem));
  top: calc(var(--header-height) + 1px);
  max-height: calc(20vh - var(--header-height) - 1px);
  max-height: calc(20dvh - var(--header-height) - 1px);
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Research tabs: Peer-reviewed / Book chapters / Working papers */
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border-radius: .5rem; background: var(--muted); }
@media (min-width: 640px) { .tabs { display: inline-flex; } }
.tab {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.25rem; padding: .5rem 1rem; border-radius: 4px; white-space: nowrap;
  font-size: .875rem; line-height: 1.25rem; font-weight: 500; cursor: pointer; transition: background .15s, color .15s;
}
.tab:hover { background: var(--accent); }
.tab:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--primary); }
.tabs .n { margin-left: .25rem; font-size: .75rem; opacity: .6; }

/* Fixed typography steps: width chooses type, height chooses spacing. */
.intro h1 { font-size: 3.75rem; }
.intro-text, .bio, .panel, .data-pub .data-text { font-size: 1rem; line-height: 1.625; }
.sh h2 { font-size: 1.875rem; }
.pt { font-size: 1.25rem; }
.by { font-size: .875rem; }
.compact-title { display: none; }
@media (max-width: 1023px) {
  .intro h1 { font-size: 3rem; }
  .sh h2 { font-size: 1.5rem; }
}
@media (max-width: 767px) {
  .intro h1 { font-size: 2.25rem; }
  .sh h2 { font-size: 1.125rem; }
  .pt { font-size: 1.125rem; }
  .site-navigation { font-size: .8125rem; }
  .tabs { margin-inline: -.75rem; }
  .site-navigation { padding: .25rem 1.5rem; max-height: calc(100dvh - var(--header-height) - 1px); overflow-y: auto; }
  .site-navigation a { padding-block: .5rem; }
}
@media (max-width: 359px) {
  .intro h1 { font-size: 2rem; }
  .research-head .full-title { display: none; }
  .research-head .compact-title { display: inline; }
}
/* Compact bars for narrow OR moderately short screens, without shrinking reading text. */
@media (max-width: 767px), (max-height: 1200px) {
  :root { --header-height: 40px; }
  .header-inner { gap: .5rem; }
  .brand { font-size: .875rem; }
  .site-navigation { gap: 1rem; }
  .sh { padding-block: .125rem; margin-bottom: .75rem; }
  .sh h2 { margin-top: 0; }
  .research-head { margin-bottom: .5rem; padding-bottom: .125rem; }
  .research-head .sh { margin-bottom: .125rem; }
  .sticky-head .kick { display: none; }
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
          gap: .125rem; padding: .125rem; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 1; min-width: 0; gap: .125rem; height: 2rem;
         padding: .25rem .375rem; font-size: .75rem; }
  .tabs .n { margin-left: 0; font-size: .625rem; }
}
/* Landscape: a short section label beside the tabs, not two stacked rows. */
@media (max-height: 640px) and (min-width: 568px) {
  :root { --header-height: 28px; }
  .menu-button { width: 1.75rem; height: 1.75rem; }
  .research-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem; padding-block: .125rem; }
  .research-head .sh { margin-bottom: 0; padding-block: 0; border: 0; }
  .research-head .full-title { display: none; }
  .research-head .compact-title { display: inline; }
  .research-head h2 { font-size: 1.125rem; }
  .tabs { margin-inline: 0; padding-block: .0625rem; }
  .tab { height: 1.75rem; padding-block: .125rem; }
}
/* Exceptionally short/narrow windows retain readable text inside a scrollable bar. */
@media (max-height: 480px) and (max-width: 567px) {
  :root { --header-height: 28px; }
  .menu-button { width: 1.75rem; height: 1.75rem; }
  .research-head .full-title { display: none; }
  .research-head .compact-title { display: inline; }
}
#main-navigation { scroll-margin-top: calc(var(--header-height) + 1px); }
.content section { scroll-margin-top: calc(var(--header-height) + 13px); }
#group-peer, #group-book, #group-working {
  scroll-margin-top: var(--research-offset, 238px);
}

.pub-group + .pub-group { margin-top: 2.5rem; }
.group-title { margin-bottom: .5rem; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground); }

/* One publication row: year on the left, details on the right */
.pubs { margin-top: 1rem; }
.pub { display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--border); }
@media (min-width: 640px) { .pub { grid-template-columns: 4.5rem 1fr; } }
.pub > div { min-width: 0; }
.yr { padding-top: .25rem; font-size: .75rem; color: var(--muted-foreground); }
.pt { font-size: 1.125rem; line-height: 1.375; transition: color .15s; }
.pt:hover { color: var(--primary); }
@media (min-width: 768px) { .pt { font-size: 1.25rem; } }
.by { margin-top: .25rem; font-size: .875rem; color: var(--muted-foreground); }

/* Link groups: PUBLISHED / WORKING PAPER / MEDIA */
.links { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem 1rem; margin-top: .75rem; font-size: .75rem; }
.grp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; }
.gl { text-transform: uppercase; color: color-mix(in oklab, var(--muted-foreground) 80%, transparent); }
.grp a { font-weight: 500; color: var(--primary); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in oklab, var(--primary) 35%, transparent); }
.grp a:hover { text-decoration-color: var(--primary); }

/* "Abstract & cite" fold-out */
.pub details { margin-top: .5rem; }
.pub summary { display: inline-flex; align-items: center; gap: .25rem; list-style: none; cursor: pointer; font-size: .75rem; font-weight: 500; color: color-mix(in oklab, var(--foreground) 70%, transparent); }
.pub summary::-webkit-details-marker { display: none; }
.pub summary::after { content: ""; width: .4rem; height: .4rem; margin-left: .25rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.pub details[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.pub summary:hover { color: var(--primary); }
.panel { margin-top: 1rem; padding: 1rem; border-radius: .5rem; background: var(--muted); font-size: .875rem; line-height: 1.625; }
@media (min-width: 640px) { .panel { padding: 1.25rem; } }
.panel > p + .ref, .ref:not(:first-child) { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
/* One click on a reference selects all of it, ready to copy. */
.ref p { cursor: text; -webkit-user-select: all; user-select: all; }

/* Small button-style labels under the reference */
.copy-btn, .bibtex > summary {
  cursor: pointer; font-family: inherit;
  display: inline-block; margin-top: .75rem; margin-right: .5rem; padding: .25rem .625rem;
  border: 1px solid var(--border); border-radius: .375rem; background: var(--card);
  font-size: .75rem; line-height: 1.5; font-weight: 500; color: var(--muted-foreground);
}
.bibtex { display: inline; }
.pub .bibtex > summary { display: inline-block; color: var(--muted-foreground); transition: color .15s, border-color .15s; }
.pub .bibtex > summary::after { display: none; }
.pub .bibtex > summary:hover { border-color: var(--primary); color: var(--primary); }
.bibtex pre { margin-top: .5rem; padding: .75rem; overflow-x: auto; border-radius: .375rem; background: var(--card); font-size: .75rem; line-height: 1.5; cursor: text; -webkit-user-select: all; user-select: all; }


/* 7. DATA, ABOUT, CONTACT --------------------------------------------- */
.data-pub .data-text { margin-top: .5rem; font-size: .875rem; line-height: 1.6; color: color-mix(in oklab, var(--foreground) 80%, transparent); }
.data-pub .data-img { grid-column: 2; margin-top: 1rem; }
.data-pub .data-img img { width: 100%; max-width: 20rem; border: 1px solid var(--border); border-radius: .375rem; }
@media (min-width: 768px) {
  .data-pub .data-img { grid-column: 3; margin-top: 0; }
}
.u { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }

.about { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .about { grid-template-columns: 16rem 1fr; } }
.about img { width: 100%; max-width: 20rem; aspect-ratio: 4 / 5; object-fit: cover; border-radius: .5rem; }
figcaption { margin-top: .75rem; font-size: .875rem; font-style: italic; color: var(--muted-foreground); }
.bio { line-height: 1.625; }
.bio p + p { margin-top: 1.25rem; }

.cards { display: grid; gap: .5rem; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }
.card { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--card); font-size: .875rem; font-weight: 500; transition: color .15s, border-color .15s; }
.card svg { width: 1rem; height: 1rem; color: var(--muted-foreground); }
.card:hover { border-color: var(--primary); color: var(--primary); }


/* 8. FOOTER AND BACK-TO-TOP ------------------------------------------- */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding: 2rem 0 3rem; border-top: 1px solid var(--border); font-size: .875rem; color: var(--muted-foreground); }
.site-footer a:hover { color: var(--primary); }
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--foreground); cursor: pointer;
}


/* 9. SCROLL EFFECTS --------------------------------------------------- */
/* Modern browsers: the photo fades out while scrolling and the up-arrow
   appears after scrolling down. Older browsers simply show both. */
/* Handled by the small built-in script at the bottom of index.html
   (CSS scroll-timelines caused the landing text to vanish on reload in some browsers). */
.to-top { opacity: 0; visibility: hidden; pointer-events: none; }
.to-top.is-shown { opacity: 1; visibility: visible; pointer-events: auto; }
.landing-image { will-change: opacity; }
.landing-intro, .landing .band, .landing-scroll { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .landing-image { animation: none; }
}

/* ==========================================================================
   "You are here" highlighting while scrolling (pure CSS, no scripts)
   Each section/group gets a named view timeline; the matching menu link
   lights up while that section passes just below the sticky menu.
   Browsers without support simply show the menus without highlighting.
   ========================================================================== */
.site-navigation a.is-here { color: var(--primary); }
.tabs .tab.is-here { background: var(--card); color: var(--primary); }
.copy-btn:hover, .bibtex > summary:hover { border-color: var(--primary); color: var(--primary); }


/* v22 type scale. Width picks sizes; height only changes spacing.
   Body 16 / 15 on phones; secondary reading (abstract, data) one step below body. */
.intro h1 { font-size: 3.5rem; }
.intro-text { font-size: 1.125rem; line-height: 1.6; }
.bio { font-size: 1rem; line-height: 1.625; }
.sh h2 { font-size: 1.75rem; }
.pt { font-size: 1.1875rem; }
.by { font-size: .875rem; }
.panel { font-size: .9375rem; line-height: 1.6; }
.data-pub .data-text { font-size: .9375rem; line-height: 1.6; }
.pub summary, .links, .yr, .group-title { font-size: .75rem; }
.bibtex > summary, .copy-btn { font-size: .75rem; }
.bibtex pre { font-size: .75rem; line-height: 1.5; }
.card, figcaption, .site-footer { font-size: .875rem; }
@media (max-width: 1023px) {
  .intro h1 { font-size: 2.75rem; }
  .sh h2 { font-size: 1.5rem; }
}
@media (max-width: 767px) {
  .intro h1 { font-size: 2rem; }
  .intro-text { font-size: 1rem; }
  .bio { font-size: .9375rem; line-height: 1.6; }
  .sh h2 { font-size: 1.125rem; }
  .pt { font-size: 1.0625rem; }
  .by { font-size: .8125rem; }
  .panel, .data-pub .data-text { font-size: .875rem; line-height: 1.6; }
  .bibtex pre { font-size: .6875rem; }
  .card, figcaption, .site-footer { font-size: .8125rem; }
}
@media (max-width: 359px) { .intro h1 { font-size: 1.75rem; } }

/* Print / save as PDF: one clean column, no menus or photo. */
@media print {
  @page { margin: 18mm; }
  :root { --background: #fff; --foreground: #000; --card: #fff; --muted: #fff; --muted-foreground: #444; --primary: #000; --border: #ccc; }
  html, body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .site-header, .menu-button, .to-top, .landing-image, .landing-scroll, .tabs, .marquee, .band-press, .copy-btn, .skip-link { display: none !important; }
  .landing { height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 0 1rem !important; }
  .sticky-head { position: static !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: none !important; margin-inline: 0 !important; padding-inline: 0 !important; max-height: none !important; }
  details > .panel { display: none; }
  .pub, .card, figure { break-inside: avoid; }
  section { break-before: auto; }
  .sh, .sh h2, .group-title { break-after: avoid; page-break-after: avoid; }
  .band:has(.marquee), #about figure, .site-footer a { display: none !important; }
  a { color: #000 !important; text-decoration: none; }
  .pt::after { content: " — " attr(href); font-size: 8pt; color: #555; word-break: break-all; }
  .card::after { content: " " attr(href); font-size: 8pt; color: #555; }
  * { animation: none !important; transition: none !important; box-shadow: none !important; }
}

/* =====================================================================
   v25 — Comfortable sizes and tap targets
   Goal: bars stay slim on small screens, but every link/button is at
   least ~40px tall to click/tap (44px for the menu on phones), and no
   clickable text is smaller than 13px.
   ===================================================================== */
/* Top menu: 56px on desktop/tablet, 48px on phones, 40px only on short landscape. */
:root { --header-height: 56px; }
.brand { font-size: 1rem; }
.site-navigation { gap: .25rem; font-size: .9375rem; }
.site-navigation a { display: inline-flex; align-items: center; min-height: 40px; padding-inline: .625rem; border-radius: 6px; }
.site-navigation a:hover { background: var(--accent); }
.tab { height: 2.5rem; padding: .5rem 1rem; font-size: .875rem; }
.tabs .n { font-size: .75rem; }
.sh h2 { font-size: 1.75rem; }

/* Links inside publications: larger text plus an invisible taller hit area. */
.links, .pub summary, .yr { font-size: .8125rem; }
.grp a { display: inline-block; padding-block: .375rem; margin-block: -.375rem; }
.pub summary { min-height: 32px; }
.bibtex > summary, .copy-btn { font-size: .8125rem; padding: .375rem .75rem; }
.card { min-height: 3rem; font-size: .9375rem; }
.to-top { width: 2.75rem; height: 2.75rem; }

@media (max-width: 767px) {
  :root { --header-height: 48px; }
  .brand { font-size: .9375rem; }
  .menu-button { width: 2.75rem; height: 2.75rem; }
  .site-navigation { font-size: 1rem; padding: .25rem 1.5rem .75rem; }
  .site-navigation a { min-height: 48px; padding-inline: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
  .site-navigation a:hover { background: none; }
  .sh h2 { font-size: 1.25rem; }
  .tab { height: 2.5rem; padding: .25rem .5rem; font-size: .8125rem; }
  .tabs .n { font-size: .6875rem; }
  .bio { font-size: 1rem; }
  .pt { font-size: 1.0625rem; }
  .by { font-size: .875rem; }
  .panel, .data-pub .data-text { font-size: .9375rem; }
  .card, figcaption, .site-footer { font-size: .875rem; }
}
/* Short landscape phones: keep the bars slim, but still tappable. */
@media (max-height: 640px) and (min-width: 568px) {
  :root { --header-height: 40px; }
  .menu-button { width: 2.5rem; height: 2.5rem; }
  .site-navigation a { min-height: 36px; }
  .tab { height: 2.25rem; }
}
@media (max-height: 480px) and (max-width: 567px) {
  :root { --header-height: 44px; }
  .menu-button { width: 2.75rem; height: 2.75rem; }
}

/* v25b — Section heading bar is never cut off.
   The bar always shows in full (no height cap). On short screens it gets
   more compact instead: short title placed beside the tabs. */
.content .sticky-head { max-height: none; overflow: visible; }
@media (max-height: 760px) and (min-width: 568px) {
  .research-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem; padding-block: .25rem; }
  .research-head .sh { margin-bottom: 0; padding-block: 0; border: 0; }
  .research-head .full-title { display: none; }
  .research-head .compact-title { display: inline; }
  .research-head h2 { font-size: 1.125rem; }
  .tabs { margin-inline: 0; }
}
@media (max-height: 600px) and (max-width: 567px) {
  .research-head .full-title { display: none; }
  .research-head .compact-title { display: inline; }
}

/* v26b — Print: full-width About, no split entries, headings repeat on new pages.
   Each list is laid out as a "table" in print, so the browser repeats its
   heading (the table header) at the top of every page the list continues on. */
@media print {
  .about { display: block !important; }
  .bio { max-width: none !important; }
  .pub, .pub > div, .card { break-inside: avoid; page-break-inside: avoid; }
  .pub-group, #other, #data { display: table; width: 100%; border-collapse: collapse; }
  .pub-group > .group-title, #other > .sh, #data > .sh { display: table-header-group; }
  .pub-group > .group-title { font-weight: 600; color: #000; }
  .pub-group > .pubs, #other > .pubs, #data > div { display: table-row-group; }
  #research > .research-head { break-after: avoid; }
}
@media print {
  /* Keeping the heading unsplittable is what makes the browser repeat it on each page. */
  .pub-group > .group-title, #other > .sh, #data > .sh { break-inside: avoid; page-break-inside: avoid; padding-bottom: .4rem; }
  #data > div > .pubs { display: block; }
}

/* v27b — Overview section at the top of the content (not in the top menu). */
.overview-text { max-width: 46rem; font-size: 1.0625rem; line-height: 1.7; color: var(--foreground); }
@media (min-width: 1024px) { .overview-text { font-size: 1.125rem; } }
@media print { .overview-text { max-width: none; } }
