/* ============================================================
   quantumsensing.de — guided matter waves lab
   Design system. No external dependencies (no web fonts, no CDN)
   — deliberately, so nothing phones home (DSGVO) and nothing rots.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;

  /* neutrals — warm, paper-like */
  --bg:          #fbfaf8;
  --bg-sunken:   #f2f0ec;
  --surface:     #ffffff;
  --surface-2:   #f7f5f2;
  --border:      #e2ddd6;
  --border-strong:#cfc8bf;

  --ink:         #14171c;
  --ink-2:       #3d434d;
  --ink-3:       #6b7280;

  /* accent — matter-wave indigo + fringe cyan */
  --accent:      #4b46c4;
  --accent-ink:  #3b37a8;
  --accent-soft: #ecebfa;
  --cyan:        #0e8ea6;

  --radius:   14px;
  --radius-s: 8px;

  --shadow-1: 0 1px 2px rgba(20,23,28,.05), 0 1px 3px rgba(20,23,28,.04);
  --shadow-2: 0 8px 28px -12px rgba(20,23,28,.22), 0 2px 6px rgba(20,23,28,.05);

  --wrap: 1140px;
  --prose: 68ch;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono",
          Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: clamp(.82rem, .79rem + .12vw, .88rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.08rem);
  --step-1:  clamp(1.15rem, 1.08rem + .34vw, 1.35rem);
  --step-2:  clamp(1.4rem, 1.26rem + .68vw, 1.85rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-4:  clamp(2.2rem, 1.6rem + 2.9vw, 4.1rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:          #0e1014;
    --bg-sunken:   #090a0d;
    --surface:     #171a20;
    --surface-2:   #1d2128;
    --border:      #272c35;
    --border-strong:#39404b;

    --ink:         #eceef2;
    --ink-2:       #b8bec9;
    --ink-3:       #8b93a1;

    --accent:      #a29cff;
    --accent-ink:  #bcb8ff;
    --accent-soft: #1e1d38;
    --cyan:        #4fd0e6;

    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 10px 34px -14px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:          #0e1014;
  --bg-sunken:   #090a0d;
  --surface:     #171a20;
  --surface-2:   #1d2128;
  --border:      #272c35;
  --border-strong:#39404b;
  --ink:         #eceef2;
  --ink-2:       #b8bec9;
  --ink-3:       #8b93a1;
  --accent:      #a29cff;
  --accent-ink:  #bcb8ff;
  --accent-soft: #1e1d38;
  --cyan:        #4fd0e6;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 10px 34px -14px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.35);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
h1,h2,h3,h4 { line-height: 1.15; font-weight: 640; letter-spacing: -.021em; text-wrap: balance; }
p, li { text-wrap: pretty; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2.25rem); }
main { flex: 1 0 auto; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius-s) 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- 4. Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header[data-stuck="true"] { border-bottom-color: var(--border); }

.nav {
  display: flex; align-items: center; gap: 1rem;
  min-height: 66px;
}

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 660; letter-spacing: -.03em; font-size: 1.03rem;
  color: var(--ink); text-decoration: none; margin-right: auto;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__sub {
  display: none; font-weight: 450; color: var(--ink-3); font-size: .84rem;
  letter-spacing: 0; padding-left: .6rem; margin-left: .1rem;
  border-left: 1px solid var(--border-strong);
}
@media (min-width: 1220px) { .brand__sub { display: inline; } }

.nav__list {
  display: none; list-style: none; padding: 0; margin: 0;
  align-items: center; gap: .1rem;
}
@media (min-width: 940px) { .nav__list { display: flex; } }

.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem .68rem; border-radius: var(--radius-s);
  font-size: .935rem; font-weight: 520; color: var(--ink-2);
  text-decoration: none; white-space: nowrap;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link[aria-current="page"], .nav__item--active > .nav__link { color: var(--accent-ink); }
.nav__link svg { width: 11px; height: 11px; opacity: .55; transition: transform .18s ease; }
.nav__item:hover .nav__link svg, .nav__item:focus-within .nav__link svg { transform: rotate(180deg); }

.nav__menu {
  position: absolute; top: calc(100% + 2px); left: 0;
  min-width: 210px; padding: .38rem; margin: 0; list-style: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(-5px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.nav__item:hover > .nav__menu, .nav__item:focus-within > .nav__menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__menu a {
  display: block; padding: .48rem .6rem; border-radius: 6px;
  font-size: .91rem; color: var(--ink-2); text-decoration: none;
}
.nav__menu a:hover { background: var(--accent-soft); color: var(--accent-ink); }

.nav__tools { display: flex; align-items: center; gap: .3rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  background: none; border: 1px solid transparent; border-radius: var(--radius-s);
  color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--border); }
.icon-btn svg { width: 19px; height: 19px; }
.nav__burger { }
@media (min-width: 940px) { .nav__burger { display: none; } }

.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}

/* mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 150;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.drawer[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
.drawer__top { display: flex; align-items: center; min-height: 66px; }
.drawer__body { padding-block: 1rem 3rem; }
.drawer__group { border-top: 1px solid var(--border); padding-block: .35rem; }
.drawer__group:first-child { border-top: 0; }
.drawer a {
  display: block; text-decoration: none; color: var(--ink);
  font-size: 1.16rem; font-weight: 570; letter-spacing: -.02em;
  padding: .6rem 0;
}
.drawer .drawer__sub a {
  font-size: .99rem; font-weight: 430; color: var(--ink-2);
  padding: .38rem 0 .38rem 1.1rem;
  border-left: 2px solid var(--border);
}
.drawer .drawer__sub a:hover { color: var(--accent-ink); border-left-color: var(--accent); }
.drawer__sub { margin-block: .1rem .5rem; }

/* ---------- 5. Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero__fringes {
  position: absolute; inset: -20% -10% auto -10%; height: 150%;
  z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(
    100deg,
    color-mix(in srgb, var(--accent) 26%, transparent) 0px,
    color-mix(in srgb, var(--accent) 26%, transparent) 1.5px,
    transparent 1.5px, transparent 13px);
  -webkit-mask-image: radial-gradient(115% 78% at 78% 8%, #000 0%, rgba(0,0,0,.55) 38%, transparent 72%);
  mask-image: radial-gradient(115% 78% at 78% 8%, #000 0%, rgba(0,0,0,.55) 38%, transparent 72%);
  opacity: .5;
}
.hero__glow {
  position: absolute; z-index: -2; pointer-events: none;
  width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  top: -22vw; right: -12vw; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cyan) 18%, transparent) 0%, transparent 68%);
}
.hero__inner { padding-block: clamp(3.5rem, 11vw, 7.5rem) clamp(3rem, 8vw, 5rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 1.35rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--border-strong);
}
.eyebrow--plain::before { display: none; }

.hero h1 {
  font-size: var(--step-4); font-weight: 680; letter-spacing: -.035em;
  max-width: 17ch; margin-bottom: 1.4rem;
}
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero__lead {
  font-size: var(--step-1); color: var(--ink-2); max-width: 58ch;
  line-height: 1.55;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.2rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.25rem; border-radius: 999px;
  font-size: .95rem; font-weight: 570; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); color: #fff; }
:root[data-theme="dark"] .btn--primary, :root[data-theme="dark"] .btn--primary:hover { color: #0e1014; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--primary,
  :root:not([data-theme="light"]) .btn--primary:hover { color: #0e1014; }
}
.btn--ghost { border-color: var(--border-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.btn svg { width: 15px; height: 15px; }

/* facts strip */
.facts {
  display: grid; gap: 1px; background: var(--border);
  border-block: 1px solid var(--border);
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact { background: var(--bg); padding: 1.5rem clamp(1.15rem, 4vw, 2.25rem); }
.fact__n {
  font-size: var(--step-2); font-weight: 660; letter-spacing: -.03em;
  color: var(--accent-ink); display: block; line-height: 1.1;
}
.fact__l { font-size: .9rem; color: var(--ink-3); margin-top: .3rem; }

/* ---------- 6. Generic page head ---------- */
.page-head { padding-block: clamp(2.75rem, 7vw, 4.75rem) clamp(1.5rem, 3vw, 2.25rem); }
.page-head h1 { font-size: var(--step-3); max-width: 20ch; }
.page-head__lead {
  font-size: var(--step-1); color: var(--ink-2); max-width: 62ch; margin-top: 1rem;
  line-height: 1.55;
}

/* ---------- 7. Prose ---------- */
.prose { max-width: var(--prose); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-size: var(--step-2); margin-top: 2.6em; margin-bottom: .1em;
  scroll-margin-top: 90px;
}
.prose h3 {
  font-size: var(--step-1); margin-top: 2em; margin-bottom: .1em;
  scroll-margin-top: 90px;
}
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--ink-3); }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: .2rem 0 .2rem 1.2rem;
  color: var(--ink-2); font-size: 1.02em;
}
.prose blockquote p + p { margin-top: .7em; }
.prose figure { margin-block: 2rem; }
.prose figcaption, .caption {
  font-size: .87rem; color: var(--ink-3); margin-top: .6rem; line-height: 1.5;
}
.prose code, code {
  font-family: var(--mono); font-size: .88em;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .1em .35em; border-radius: 5px;
}
.lead { font-size: var(--step-1); color: var(--ink-2); line-height: 1.55; }

/* ---------- 8. Cards & grids ---------- */
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.5rem); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 640px)  { .grid--2, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(1.25rem, 2.6vw, 1.75rem);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: .6rem;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
a.card, .card--link { text-decoration: none; color: inherit; }
a.card:hover, .card--link:hover {
  border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-2);
  color: inherit;
}
.card h3 { font-size: 1.12rem; }
.card p { color: var(--ink-2); font-size: .96rem; }
.card__tag {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.card__more {
  margin-top: auto; padding-top: .5rem; font-size: .9rem; font-weight: 560;
  color: var(--accent-ink); display: inline-flex; align-items: center; gap: .35rem;
}
.card__more svg { width: 13px; height: 13px; transition: transform .16s ease; }
a.card:hover .card__more svg { transform: translateX(3px); }

/* ---------- 9. Lists: theses, publications, news ---------- */
.rows { border-top: 1px solid var(--border); }
.row {
  display: grid; gap: .25rem 1.5rem; padding-block: 1.35rem;
  border-bottom: 1px solid var(--border);
  grid-template-columns: 1fr; align-items: start;
}
@media (min-width: 760px) {
  .row { grid-template-columns: 7rem 1fr; }
}
.row__meta {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  color: var(--ink-3); padding-top: .32rem; text-transform: uppercase;
}
.row__title { font-size: 1.06rem; font-weight: 580; letter-spacing: -.015em; line-height: 1.4; }
.row__title a { color: var(--ink); text-decoration: none; }
.row__title a:hover { color: var(--accent-ink); text-decoration: underline; }
.row__sub { color: var(--ink-2); font-size: .95rem; margin-top: .15rem; }
.row__links { margin-top: .45rem; display: flex; flex-wrap: wrap; gap: .5rem; }

.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-family: var(--mono); letter-spacing: .03em;
  padding: .22rem .6rem; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--ink-2); text-decoration: none;
}
.pill:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.pill svg { width: 11px; height: 11px; }

/* ---------- 10. Team ---------- */
.people { display: grid; gap: .55rem 1.25rem; grid-template-columns: 1fr; list-style: none; padding: 0; }
@media (min-width: 560px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .people { grid-template-columns: repeat(3, 1fr); } }
.people li {
  padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .99rem;
}
.people li span { display: block; font-size: .84rem; color: var(--ink-3); }

.group-head {
  display: flex; align-items: baseline; gap: .8rem; margin-top: 3rem; margin-bottom: 1rem;
}
.group-head h2 { font-size: var(--step-1); }
.group-head .count {
  font-family: var(--mono); font-size: .78rem; color: var(--ink-3);
}

/* ---------- 11. Media / figures ---------- */
.ph {
  position: relative; width: 100%; aspect-ratio: 3 / 2;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  display: grid; place-items: center;
}
.ph::after {
  content: attr(data-label);
  font-family: var(--mono); font-size: .75rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); padding: 1rem; text-align: center;
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph:has(img) { border-style: solid; }
.ph:has(img)::after { display: none; }

.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

/* ---------- 12. Callout ---------- */
.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: var(--radius-s);
  padding: 1.15rem 1.35rem; font-size: .97rem;
}
.callout strong { color: var(--ink); }
.callout--warn { border-left-color: #d97706; }

/* ---------- 13. Contact block ---------- */
.contact-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.1fr 1fr; } }
.deflist { display: grid; gap: .1rem; }
.deflist dt {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 1.15rem;
}
.deflist dd { margin: 0; font-size: 1.02rem; }
.deflist dd a { color: var(--ink); }
.deflist dd a:hover { color: var(--accent-ink); }

/* ---------- 14. Footer ---------- */
.site-footer {
  margin-top: auto; background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
  font-size: .93rem;
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 700px)  { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: .85rem;
}
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent-ink); text-decoration: underline; }
.site-footer address { font-style: normal; color: var(--ink-2); line-height: 1.7; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center;
  color: var(--ink-3); font-size: .86rem;
}
.footer-bottom .spacer { margin-left: auto; }
.social { display: flex; gap: .5rem; }
.social a {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 50%; color: var(--ink-2);
}
.social a:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.social svg { width: 17px; height: 17px; }

/* ---------- 15. Utilities ---------- */
.u-center { text-align: center; }
.u-muted { color: var(--ink-3); }
.u-mt-l { margin-top: clamp(2rem, 5vw, 3.5rem); }
.u-mb-m { margin-bottom: 1.5rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.bg-sunken { background: var(--bg-sunken); border-block: 1px solid var(--border); }
.scroll-x { overflow-x: auto; }

@media print {
  .site-header, .drawer, .site-footer, .hero__fringes, .hero__glow { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- 16. Components added by the page templates ---------- */

/* hero image band */
.hero__media { margin-top: clamp(2rem, 5vw, 3.25rem); }
.hero__media picture, .hero__media img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow-2);
}
.hero__media img { aspect-ratio: 21 / 9; object-fit: cover; display: block; }

/* two-column split */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 700px) { .split { grid-template-columns: 1fr 1fr; } }
.split--portrait { align-items: start; }
@media (min-width: 880px) { .split--portrait { grid-template-columns: 1fr 400px; } }

/* figures */
.fig { margin: 0; }
.fig picture, .fig img { width: 100%; }
.fig img {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface-2); display: block;
}
.fig--wide img { aspect-ratio: 21 / 9; object-fit: cover; }
.fig--card img { aspect-ratio: 4 / 3; object-fit: contain; padding: .35rem; }
.prose .fig { margin-block: 2rem; }

/* research topics */
.topics { border-top: 1px solid var(--border); }
.topic {
  display: grid; gap: 1.25rem 2.5rem; grid-template-columns: 1fr;
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 90px; align-items: start;
}
@media (min-width: 880px) { .topic { grid-template-columns: 1fr 360px; } }
.topic__text h3 { font-size: var(--step-1); margin-bottom: .85rem; }
.topic__fig img { aspect-ratio: 3 / 2; object-fit: cover; }

.linklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.linklist li { padding-left: 1.1rem; position: relative; font-size: .96rem; line-height: 1.5; }
.linklist li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .65;
}
.linklist a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.linklist a:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }

.sublist { margin: .45rem 0 0; padding-left: 1.15rem; color: var(--ink-2); font-size: .95rem; }
.sublist li + li { margin-top: .25rem; }

/* theses */
.theses { border-top: 1px solid var(--border); }
.thesis {
  display: grid; gap: .35rem 1.5rem; grid-template-columns: 1fr;
  padding-block: 1.5rem; border-bottom: 1px solid var(--border); align-items: start;
}
@media (min-width: 620px) { .thesis { grid-template-columns: 110px 1fr; } }
.thesis__cover { display: block; }
.thesis__cover img {
  width: 100%; border: 1px solid var(--border); border-radius: 6px;
  box-shadow: var(--shadow-1); background: #fff;
}
@media (max-width: 619px) { .thesis__cover { max-width: 88px; margin-bottom: .5rem; } }
.thesis .row__title { margin-bottom: .1rem; }

/* ---------- 17. Fixes ---------- */
/* inline arrow/external icons must never inherit a huge intrinsic size */
a svg, p svg, span svg, li svg { width: 1em; height: 1em; vertical-align: -.12em; flex: none; }
.icon-btn svg { width: 19px; height: 19px; }
.social svg { width: 17px; height: 17px; }
.brand__mark { width: 26px; height: 26px; }
.card__more svg, .btn svg, .pill svg { width: .95em; height: .95em; }

/* diagrams should never be cropped */
.topic__fig img {
  aspect-ratio: 4 / 3; object-fit: contain;
  background: var(--surface-2); padding: .5rem;
}
.topic { align-items: start; }

/* tighten the hero */
.hero__inner { padding-bottom: clamp(2rem, 4vw, 3rem); }

/* drawer brand must not inherit the big nav link type */
.drawer__top .brand { font-size: 1.03rem; font-weight: 660; padding: 0; display: inline-flex; }
.drawer__top .brand span { font-size: inherit; font-weight: inherit; }
/* "All news →" and similar inline links stay on one line */
.group-head a { white-space: nowrap; }

/* ---------- 18. Narrow-screen fixes (≤360 px) ---------- */
.brand { min-width: 0; overflow: hidden; }
.brand > span:first-of-type { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) {
  .brand { font-size: .95rem; gap: .45rem; }
  .icon-btn { width: 36px; height: 36px; }
  .wrap { padding-inline: 1rem; }
}
/* very long e-mails / URLs break instead of widening the page */
.prose a, .prose p, .prose li, .deflist dd, .row__sub, .caption {
  overflow-wrap: anywhere; word-break: break-word;
}
/* long German compounds must break rather than widen the page */
h1, h2, h3, h4, .row__title, .fact__l { overflow-wrap: break-word; hyphens: auto; }

/* ============================================================
   19. Cover heroes — the wp-block-cover equivalents
   ============================================================ */
.hero, .page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: #0d1016;
}
.hero__bg, .page-hero__bg,
.hero__bg img, .page-hero__bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2; display: block;
}
.hero__scrim, .page-hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,10,14,.68) 0%, rgba(8,10,14,.5) 45%, rgba(8,10,14,.82) 100%),
    radial-gradient(120% 90% at 15% 30%, rgba(8,10,14,.55), transparent 70%);
}
/* homepage hero: taller, headline-first */
.hero__inner { padding-block: clamp(4.5rem, 13vw, 9rem) clamp(3.5rem, 9vw, 6.5rem); }
.hero h1 {
  font-size: var(--step-4); font-weight: 680; letter-spacing: -.035em;
  max-width: 17ch; margin-bottom: 1.4rem; color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.hero h1 em { font-style: normal; color: #c3bfff; }
.hero__lead {
  font-size: var(--step-1); color: rgba(255,255,255,.9); max-width: 58ch; line-height: 1.55;
  text-shadow: 0 1px 14px rgba(0,0,0,.5);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.2rem; }

/* interior page hero: shorter band */
.page-hero__inner { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.25rem, 6vw, 4rem); }
.page-hero h1 {
  font-size: var(--step-3); color: #fff; max-width: 22ch;
  text-shadow: 0 2px 20px rgba(0,0,0,.45);
}
.page-hero__lead {
  font-size: var(--step-1); color: rgba(255,255,255,.9); max-width: 62ch;
  margin-top: .9rem; line-height: 1.55; text-shadow: 0 1px 14px rgba(0,0,0,.5);
}
.eyebrow--on-image { color: rgba(255,255,255,.82); }
.eyebrow--on-image::before { background: rgba(255,255,255,.45); }
.eyebrow--on-image a { color: inherit; }
.btn--on-image {
  border-color: rgba(255,255,255,.45); color: #fff; background: rgba(255,255,255,.07);
  backdrop-filter: blur(6px);
}
.btn--on-image:hover { background: rgba(255,255,255,.16); color: #fff; border-color: #fff; }
/* the header sits on top of a dark hero — keep it readable */
.site-header { background: color-mix(in srgb, var(--bg) 80%, transparent); }

/* ============================================================
   20. Brand mark = the lab's own logo (2D BEC array)
   ============================================================ */
.brand__mark { width: 34px; height: 30px; flex: none; display: block; }
.brand__mark img {
  width: 34px; height: 30px; object-fit: cover; border-radius: 4px; display: block;
}

/* ============================================================
   21. Publications
   ============================================================ */
.pub .row__title { font-size: 1.02rem; font-weight: 600; }
.pub__authors { font-size: .88rem; color: var(--ink-3); margin-top: .25rem; line-height: 1.5; }
.pub__venue { font-size: .93rem; color: var(--ink-2); margin-top: .2rem; font-style: italic; }
.facts--4 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .facts--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .facts--4 { grid-template-columns: repeat(4, 1fr); } }

.linklist__head {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin: 1.1rem 0 .5rem;
}
.linklist__head:first-child { margin-top: 0; }
.linklist__venue { color: var(--ink-3); font-size: .88em; }

.linklist--plain li::before { background: var(--border-strong); }

/* ============================================================
   22. Projects
   ============================================================ */
.projects { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); }
.project {
  display: grid; grid-template-columns: 1fr; gap: 1rem 2rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 1.9rem);
  box-shadow: var(--shadow-1);
}
@media (min-width: 820px) { .project { grid-template-columns: 200px 1fr; } }
.project__acr {
  display: inline-block; font-family: var(--mono); font-size: .78rem; font-weight: 600;
  letter-spacing: .06em; padding: .25rem .6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); margin-bottom: .6rem;
}
.project__head .row__meta { padding-top: 0; }
.project__prog { font-size: .88rem; margin-top: .35rem; }
.project__prog a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.project__prog a:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }
.project__body h3 { font-size: var(--step-1); margin-bottom: .4rem; }
.project__en { color: var(--ink-2); font-size: .97rem; margin-bottom: .3rem; }

.fact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.4rem; box-shadow: var(--shadow-1);
}

/* ============================================================
   23. News list with thumbnails
   ============================================================ */
.newslist { border-top: 1px solid var(--border); }
.newsrow {
  display: grid; grid-template-columns: 1fr; gap: .8rem 1.5rem;
  padding-block: 1.4rem; border-bottom: 1px solid var(--border); align-items: start;
}
@media (min-width: 640px) { .newsrow { grid-template-columns: 140px 1fr; } }
.news__thumb { display: block; }
.news__thumb img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-s); border: 1px solid var(--border);
}
@media (max-width: 639px) { .news__thumb { max-width: 180px; } }

/* inline icons must stay inline — the global `svg{display:block}` reset breaks
   arrows and external-link marks inside running text */
a svg, p svg, span svg, li svg, .pill svg, .btn svg, .card__more svg {
  display: inline-block; vertical-align: -.12em;
}
.icon-btn svg, .social svg, .brand__mark { display: block; }

/* long DOI / arXiv pills must wrap instead of widening the page */
.pill { max-width: 100%; overflow-wrap: anywhere; }
.linklist li, .linklist a { overflow-wrap: anywhere; }
.row__links { max-width: 100%; }

/* between 940 and ~1100 px the full nav is tight — trim the padding a little */
@media (min-width: 940px) and (max-width: 1120px) {
  .nav__link { padding-inline: .48rem; font-size: .9rem; }
  .brand { font-size: .98rem; }
}

/* dropdowns near the right edge open leftwards */
.nav__item--right .nav__menu { left: auto; right: 0; }

/* a touch more scrim at the top so the eyebrow stays legible over bright skies */
.hero__scrim, .page-hero__scrim {
  background:
    linear-gradient(180deg, rgba(8,10,14,.74) 0%, rgba(8,10,14,.52) 45%, rgba(8,10,14,.84) 100%),
    radial-gradient(130% 95% at 12% 35%, rgba(8,10,14,.62), transparent 72%);
}

/* only ever visible in the local preview: a file the site links to is missing */
.pill--missing { border-style: dashed; border-color: #d97706; color: #b45309; }

/* ============================================================
   24. Lightbox
   ============================================================ */
.fig--zoomable img { cursor: zoom-in; }
.fig--zoomable img:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lightbox {
  border: 0; padding: 0; margin: 0;
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  /* dim on the dialog itself as well as the backdrop: ::backdrop alone is not
     reliably composited everywhere, and a half-visible page behind the picture
     ruins the contrast of the caption */
  background: rgba(8, 10, 14, .94); color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgba(8, 10, 14, .94); }
.lightbox[open] { display: grid; place-items: center; }

.lightbox__fig {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: .9rem;
  max-width: min(92vw, 1500px); max-height: 88dvh; padding: 1rem;
}
.lightbox__fig img {
  max-width: 100%; max-height: 72dvh; width: auto; height: auto;
  object-fit: contain; border-radius: 8px; background: #14171c;
  box-shadow: 0 24px 70px -20px rgba(0,0,0,.8);
}
.lightbox__fig figcaption {
  font-size: .95rem; line-height: 1.5; color: rgba(255,255,255,.82);
  text-align: center; max-width: 70ch; text-wrap: pretty;
}
.lightbox__count {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .78rem; letter-spacing: .1em;
  color: rgba(255,255,255,.55); margin: 0;
}

.lightbox__close, .lightbox__nav {
  position: absolute; z-index: 2;
  display: grid; place-items: center;
  background: rgba(255,255,255,.09); color: #fff;
  border: 1px solid rgba(255,255,255,.22); border-radius: 50%;
  cursor: pointer; backdrop-filter: blur(6px);
  transition: background .15s ease, border-color .15s ease;
}
.lightbox__close:hover, .lightbox__nav:hover {
  background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5);
}
.lightbox__close { top: 1rem; right: 1rem; width: 46px; height: 46px; }
.lightbox__close svg { width: 22px; height: 22px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lightbox__nav svg { width: 26px; height: 26px; }
.lightbox__nav--prev { left: max(1rem, 2vw); }
.lightbox__nav--next { right: max(1rem, 2vw); }
.lightbox__nav[hidden], .lightbox__close[hidden] { display: none; }

@media (max-width: 640px) {
  .lightbox__nav { width: 44px; height: 44px; }
  .lightbox__nav--prev { left: .5rem; }
  .lightbox__nav--next { right: .5rem; }
  .lightbox__fig { padding: .5rem; max-width: 96vw; }
  .lightbox__fig img { max-height: 66dvh; }
}
