/* =========================================================================
   Electronic Structure Theory Lab — site styles (crimson & white theme)

   To change the colour scheme, edit the tokens in :root below — every
   colour on the site is derived from them.
   ========================================================================= */

/* ---- Self-hosted fonts (SIL Open Font License; see assets/fonts/) -------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext-wght-italic.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/fraunces-latin-ext-opsz-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("../fonts/fraunces-latin-opsz-italic.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  /* brand */
  --accent: #9e1b32;          /* crimson */
  --accent-strong: #7a1426;   /* darker crimson (hover) */
  --accent-deep: #4f0c18;     /* deepest crimson (hero / footer) */
  --accent-soft: #fbeef1;     /* light crimson tint */
  --accent-soft-2: #f5d9df;
  --gold: #d69e1a;            /* small highlights only */

  /* neutrals */
  --bg: #ffffff;
  --bg-alt: #faf6f6;
  --surface: #ffffff;
  --text: #1b1b1f;
  --text-soft: #3f3f46;
  --muted: #6b6b76;
  --border: #ece4e6;
  --ink: #2b2d42;
  --violet: #6d28d9;
  --violet-soft: #f1ebfe;

  --shadow: 0 1px 2px rgba(60, 10, 20, .04), 0 6px 20px rgba(60, 10, 20, .06);
  --shadow-hover: 0 4px 10px rgba(60, 10, 20, .08), 0 18px 40px rgba(60, 10, 20, .12);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; font-size: 17px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
body {
  margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.65;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--text); }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft-2); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.icon.flip { transform: scaleX(-1); }

/* reveal-on-scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---- Announcement bar ---------------------------------------------------- */
.announce { background: var(--accent-deep); color: #fbe9ec; font-size: .9rem; }
.announce-inner { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.announce-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; box-shadow: 0 0 0 0 rgba(214, 158, 26, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(214, 158, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(214, 158, 26, 0); } }
.announce-track { position: relative; flex: 1; display: grid; }
.announce-item { grid-area: 1 / 1; margin: 0; padding: 8px 0; opacity: 0; transform: translateY(6px); transition: opacity .45s, transform .45s; visibility: hidden; }
.announce-item.is-active { opacity: 1; transform: none; visibility: visible; }
.announce a { color: #fff; font-weight: 600; text-decoration: none; }
.announce strong { color: #fff; }
.announce-nav { display: flex; gap: 2px; }
.announce button { background: none; border: 0; color: #f3cdd5; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 4px 6px; border-radius: 6px; }
.announce button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.announce-close .icon { width: .95em; height: .95em; }
@media (max-width: 600px) { .announce-nav { display: none; } .announce { font-size: .84rem; } }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-bar { display: flex; align-items: center; gap: 16px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand:hover { color: var(--text); }
.brand-mark { width: 60px; height: 60px; object-fit: contain; flex: none; transition: transform .3s; }
.brand:hover .brand-mark { transform: scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; white-space: nowrap; }
@media (max-width: 440px) { .brand-name { font-size: .88rem; } .brand-mark { width: 44px; height: 44px; } .brand { gap: 9px; } }
.brand-sub { font-size: .74rem; color: var(--accent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.site-header .container.nav-bar { max-width: 1440px; }
.site-nav > ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; align-items: center; }
.site-nav > ul > li > a, .sub-toggle {
  position: relative; display: flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 999px;
  text-decoration: none; color: var(--text-soft); font: inherit; font-weight: 550; font-size: .88rem;
  background: none; border: 0; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s;
}
.site-nav > ul > li > a:hover, .sub-toggle:hover, .has-sub.is-open > .sub-toggle { background: var(--accent-soft); color: var(--accent-strong); }
.site-nav > ul > li > a[aria-current="page"], .is-current > .sub-toggle { background: var(--accent); color: #fff; }
.site-nav > ul > li > a[aria-current="page"]:hover, .is-current > .sub-toggle:hover { background: var(--accent-strong); color: #fff; }
.caret { width: 12px; height: 12px; transition: transform .25s; }
.has-sub { position: relative; }
.sub-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; width: 340px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 2px 6px rgba(60, 10, 20, .06), 0 22px 48px rgba(60, 10, 20, .18);
  opacity: 0; visibility: hidden; transform: translate(-50%, 10px) scale(.97); transform-origin: top center;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2, .8, .2, 1.1), visibility .2s; z-index: 60;
}
.sub-menu::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.sub-menu::after { content: ""; position: absolute; top: -7px; left: calc(50% - 7px); width: 14px; height: 14px; background: var(--surface);
  border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); border-radius: 3px 0 0 0; }
.sub-menu ul { list-style: none; margin: 0; padding: 0; }
.sub-menu li { opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .25s; }
.sub-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--text); transition: background .15s; }
.sub-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); transition: background .15s, color .15s, transform .2s; }
.sub-ic .icon { width: 20px; height: 20px; }
.sub-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sub-title { font-weight: 600; font-size: .92rem; }
.sub-desc { font-size: .8rem; color: var(--muted); white-space: normal; }
.sub-menu a:hover { background: var(--bg-alt); color: var(--text); }
.sub-menu a:hover .sub-ic { background: var(--accent); color: #fff; transform: scale(1.06); }
.sub-menu a[aria-current="page"] { background: var(--accent-soft); }
.sub-menu a[aria-current="page"] .sub-ic { background: var(--accent); color: #fff; }
@media (min-width: 1321px) {
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu, .has-sub.is-open .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
  .has-sub:hover .sub-menu li, .has-sub:focus-within .sub-menu li, .has-sub.is-open .sub-menu li { opacity: 1; transform: none; }
  .has-sub:hover .sub-menu li:nth-child(2), .has-sub.is-open .sub-menu li:nth-child(2) { transition-delay: .03s; }
  .has-sub:hover .sub-menu li:nth-child(3), .has-sub.is-open .sub-menu li:nth-child(3) { transition-delay: .06s; }
  .has-sub:hover .sub-menu li:nth-child(4), .has-sub.is-open .sub-menu li:nth-child(4) { transition-delay: .09s; }
  .has-sub:hover .caret, .has-sub.is-open .caret { transform: rotate(180deg); }
}
@media (min-width: 1321px) and (max-width: 1480px) { .brand-name { font-size: .92rem; } .brand-mark { width: 48px; height: 48px; } .site-nav > ul > li > a, .sub-toggle { padding: 8px 7px; } }
@media (max-width: 380px) { .brand-name { font-size: .78rem; } .brand-mark { width: 38px; height: 38px; } .brand { gap: 7px; } .brand-sub { font-size: .66rem; } }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text-soft); cursor: pointer; font-size: 1.15rem;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.when-open { display: none; }
.nav-toggle { display: none; }
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

@media (max-width: 1320px) {
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--bg);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-hover);
    display: none; padding: 10px 16px 20px; max-height: calc(100vh - 110px); overflow-y: auto;
  }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 4px; max-width: 640px; margin: 0 auto; }
  .site-nav > ul > li > a, .sub-toggle { padding: 12px 16px; font-size: 1.02rem; width: 100%; justify-content: space-between; border-radius: 12px; }
  .sub-menu { position: static; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 4px 0 6px 8px; display: none; background: none; }
  .sub-menu::after { display: none; }
  .sub-menu li { opacity: 1; transform: none; }
  .has-sub.is-open .sub-menu { display: block; animation: sub-in .25s ease; }
  .has-sub.is-open .caret { transform: rotate(180deg); }
  .nav-open .site-nav { display: block; animation: sub-in .25s ease; }
  .nav-open .when-closed { display: none; }
  .nav-open .when-open { display: inline; }
}
@keyframes sub-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- Section tabs (children of a menu item, shown on those pages) -------- */
.section-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 6px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 16px; width: fit-content; max-width: 100%; }
.section-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 11px; text-decoration: none; color: var(--text-soft); font-weight: 600; font-size: .92rem; transition: background .2s, color .2s, box-shadow .2s; }
.section-tabs a .icon { width: 18px; height: 18px; color: var(--accent); }
.section-tabs a:hover { background: var(--surface); color: var(--accent); }
.section-tabs a[aria-current="page"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(60, 10, 20, .08), 0 4px 12px rgba(60, 10, 20, .08); }
@media (max-width: 640px) { .section-tabs { width: 100%; } .section-tabs a { flex: 1 1 calc(50% - 8px); justify-content: center; padding: 9px 10px; font-size: .86rem; } }

/* ---- Buttons & chips ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .15s, background .15s, box-shadow .15s, color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(158, 27, 50, .25); }
.btn-primary:hover { background: var(--accent-strong); color: #fff; box-shadow: 0 10px 22px rgba(158, 27, 50, .32); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: #fff; }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent-strong); }
.btn-light { background: #fff; color: var(--accent); }
.btn-light:hover { background: #fff5f7; color: var(--accent-strong); box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
  font-size: .8rem; font-weight: 500; border: 1px solid var(--border); color: var(--text-soft); background: var(--surface);
  text-decoration: none; line-height: 1.6; font-family: inherit; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip .icon { width: .95em; height: .95em; }
.badge {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: 1px; margin-right: 6px;
}
.badge-preprint, .badge-talk, .badge-ongoing, .badge-opening { background: #fff4d6; color: #8a5a00; }
.badge-grant { background: #e6f4ea; color: #1e6b37; }
.badge-award, .badge-people, .badge-conference { background: var(--violet-soft); color: var(--violet); }
.badge-completed { background: #eef0f3; color: #4b5563; }
.tag-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list li { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-soft); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; text-decoration: none; }
.text-link .icon { transition: transform .15s; }
.text-link:hover .icon:not(.flip) { transform: translateX(3px); }
.link-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; align-items: center; }

/* ---- Cards --------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.theme-card {
  position: relative; overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column;
  transition: box-shadow .25s, border-color .25s, transform .25s; transform-style: preserve-3d; will-change: transform;
}
.theme-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), #d6455d);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.theme-card:hover { box-shadow: var(--shadow-hover); border-color: var(--accent-soft-2); color: var(--text); }
.theme-card:hover::before { transform: scaleX(1); }
.theme-card h3 { font-size: 1.08rem; margin-top: 16px; }
.theme-card p { color: var(--muted); font-size: .93rem; margin: 0 0 14px; }
.theme-more { margin-top: auto; color: var(--accent); font-weight: 600; font-size: .88rem; display: inline-flex; gap: 6px; align-items: center; opacity: 0; transform: translateX(-6px); transition: all .25s; }
.theme-card:hover .theme-more, .theme-card:focus-visible .theme-more { opacity: 1; transform: none; }
.theme-icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; flex: none;
  background: var(--accent-soft); color: var(--accent); font-size: 1.45rem; transition: background .25s, color .25s, transform .35s;
}
.theme-card:hover .theme-icon { background: var(--accent); color: #fff; transform: rotate(-8deg) scale(1.05); }

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background: radial-gradient(120% 110% at 78% 25%, #b8263f 0%, #8f1a2e 38%, #5c0f1d 75%, #3d0913 100%);
  padding: 96px 0 128px; cursor: crosshair;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(to bottom, transparent, rgba(40, 5, 12, .35)); z-index: -1; pointer-events: none; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { position: relative; pointer-events: none; }
.hero-inner a, .hero-inner button { pointer-events: auto; }
.hero-brand { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.hero-brand .hero-eyebrow { margin: 0; max-width: 46ch; line-height: 1.6; }
.hero-logo { width: 138px; height: 138px; flex: none; padding: 10px; border-radius: 30px; background: rgba(58, 6, 16, .62); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 14px 34px rgba(20, 0, 5, .35), inset 0 1px 0 rgba(255, 255, 255, .15); backdrop-filter: blur(3px); pointer-events: auto; }
@media (max-width: 720px) { .hero-logo { width: 92px; height: 92px; padding: 6px; border-radius: 22px; } .hero-brand { gap: 14px; } }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.6vw, 4.2rem); margin-bottom: .25em; max-width: 19ch; text-wrap: balance; text-shadow: 0 2px 30px rgba(40, 0, 10, .35); }
.hero-tagline { font-size: clamp(1.08rem, 2.2vw, 1.32rem); color: #fbe3e8; max-width: 42ch; }
.hero .hero-eyebrow { color: #ffd4dc; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-hint { margin-top: 28px; font-size: .85rem; color: #f3c3cc; display: inline-flex; gap: 8px; align-items: center; background: rgba(0, 0, 0, .18); padding: 6px 14px; border-radius: 999px; }
.eyebrow { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .7em; }
@media (max-width: 720px) { .hero { padding: 64px 0 104px; } .hero-hint { display: none; } }

/* ---- Stats band ---------------------------------------------------------- */
.stats-band { position: relative; z-index: 2; margin-top: -64px; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-hover); padding: 0;
}
.stats { max-width: calc(var(--maxw) - 56px); }
.stat { padding: 22px 20px; text-align: center; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat-num { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; color: var(--accent); line-height: 1; }
.stat-suffix { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); font-weight: 700; }
.stat-label { display: block; margin-top: 6px; font-size: .85rem; color: var(--muted); font-weight: 500; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); margin: 0 16px; width: auto; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---- Sections ------------------------------------------------------------ */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-tint { background: linear-gradient(180deg, var(--accent-soft) 0%, #fff 100%); border-top: 1px solid var(--accent-soft-2); }
.section-title { font-size: clamp(1.6rem, 3.2vw, 2.15rem); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head .section-title { margin: 0; }
.section-head .eyebrow { margin-bottom: .35em; }
.prose-lg { font-size: 1.1rem; color: var(--text-soft); }
.intro-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .intro-grid { grid-template-columns: 1.7fr 1fr; gap: 56px; } }
.pi-mini-wrap { display: flex; flex-direction: column; gap: 12px; }
.pi-mini { display: flex; gap: 16px; align-items: center; padding: 16px 18px; text-decoration: none; color: var(--text); transition: box-shadow .2s, transform .2s, border-color .2s; }
.pi-mini:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--accent-soft-2); color: var(--text); }
.pi-mini > span { display: flex; flex-direction: column; }
.pi-mini-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0; }
.pi-mini-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.pi-mini .avatar-md { width: 64px; height: 64px; font-size: 1.35rem; }
.two-col { display: grid; gap: 48px; }
@media (min-width: 980px) { .two-col { grid-template-columns: 1.5fr 1fr; } }

/* ---- Carousel (recent results) ------------------------------------------- */
.carousel { position: relative; }
.carousel-track { display: grid; overflow: hidden; padding: 8px; margin: -8px; }
.slide {
  grid-area: 1 / 1; display: grid; gap: 28px; align-items: center; opacity: 0; visibility: hidden;
  transform: translateX(24px); transition: opacity .5s ease, transform .5s ease, visibility .5s;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; }
.slide.is-leaving { transform: translateX(-24px); }
@media (min-width: 900px) { .slide { grid-template-columns: 1.15fr 1fr; gap: 44px; } }
.slide-media {
  display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: #fff; cursor: zoom-in; box-shadow: var(--shadow);
}
.slide-media img { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: contain; transition: transform .6s; }
.slide-media:hover img { transform: scale(1.03); }
.slide-body h3 { font-family: var(--font-display); font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 600; }
.slide-body h3 a { color: var(--text); text-decoration: none; }
.slide-body h3 a:hover { color: var(--accent); }
.slide-body > p { color: var(--text-soft); }
.slide-paper { font-size: .9rem; color: var(--muted) !important; display: flex; gap: 6px; align-items: center; }
.hl-meta { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .5em; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; }
.carousel-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--accent);
  cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; transition: all .15s;
}
.carousel-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.carousel-dots { display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 999px; border: 0; background: var(--accent-soft-2); cursor: pointer; padding: 0; transition: width .3s, background .3s; }
.dot.is-active { width: 28px; background: var(--accent); }
.carousel-progress { height: 3px; background: var(--accent-soft); border-radius: 3px; overflow: hidden; margin-top: 14px; }

/* ---- rt-BTE simulation --------------------------------------------------- */
.sim-intro { display: grid; gap: 24px; margin-bottom: 26px; align-items: end; }
@media (min-width: 900px) { .sim-intro { grid-template-columns: 1.4fr 1fr; gap: 40px; } }
.equation { padding: 18px 22px; border-left: 4px solid var(--accent); }
.eq { font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 6px; }
.eq-term { color: var(--accent); }
.rtbte { padding: 20px; }
.rtbte-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.rtbte-readouts { display: flex; flex-wrap: wrap; gap: 8px; }
.rtbte-readouts > div { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; min-width: 104px; }
.rtbte-readouts .k { display: block; font-size: .76rem; color: var(--muted); font-weight: 600; }
.rtbte-readouts .v { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.rtbte-buttons { display: flex; gap: 8px; }
.rtbte-body { display: grid; gap: 18px; }
@media (min-width: 900px) { .rtbte-body { grid-template-columns: 1fr 300px; } }
.rtbte-plot { width: 100%; height: 360px; display: block; cursor: crosshair; touch-action: pan-y; border-radius: 10px; background: #fff; }
@media (max-width: 600px) { .rtbte-plot { height: 270px; } }
.rtbte-inset { width: 100%; height: 130px; display: block; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.rtbte-controls { display: grid; gap: 10px; }
.rtbte-controls label { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: .84rem; font-weight: 500; color: var(--text-soft); }
.rtbte-controls output { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }
.rtbte-controls input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); margin: 2px 0 0; }
.rtbte-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; font-size: .84rem; color: var(--text-soft); }
.rtbte-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--accent); }
.sw-init { border-top: 2px dotted var(--muted); }
.sw-eq { border-top: 2px dashed var(--ink); }
.sim-note { margin-top: 16px; max-width: 90ch; }
.research-video { margin: 0 0 26px; padding: 20px; }
.rv-head h3 { font-family: var(--font-display); font-size: 1.35rem; margin: 10px 0 4px; }
.rv-head p { max-width: 95ch; margin-bottom: 14px; }
.rv-media { display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; cursor: zoom-in; }
.rv-media video { display: block; width: 100%; height: auto; aspect-ratio: 2100 / 980; background: #fff; }
.sim-try { margin: 0 0 14px; color: var(--text-soft); }
.sim-try { margin-top: 26px; }
.anim-grid { display: grid; gap: 22px; }
@media (min-width: 820px) { .anim-grid { grid-template-columns: 1fr 1fr; } .anim-wide { grid-column: 1 / -1; } }
.anim-card { margin: 0; padding: 20px; display: flex; flex-direction: column; }
.anim-card .rv-media, .anim-card .anim-placeholder { margin-top: auto; }
.anim-card .rv-media img { display: block; width: 100%; height: auto; }
.anim-card:not(.anim-wide) .rv-media video { aspect-ratio: auto; }
.anim-methods { margin: -6px 0 14px; color: var(--text-soft); }
.anim-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 220px; border: 2px dashed var(--border); border-radius: 12px; color: var(--muted);
  background: repeating-linear-gradient(135deg, transparent 0 14px, var(--accent-soft) 14px 28px); font-size: .95rem; }
.anim-ph-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 1.2rem; padding-left: 3px; }
.anim-code { margin-top: 12px; align-self: flex-start; }

/* ---- Gallery & lightbox -------------------------------------------------- */
.gallery { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gallery-item { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .25s, transform .25s; }
.gallery-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.gallery-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.gallery-open img, .gallery-open video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 10px; box-sizing: border-box; background: #fff; transition: transform .5s; }
.gallery-open video { padding: 0; }
.gallery-item:hover .gallery-open img, .gallery-item:hover .gallery-open video { transform: scale(1.04); }
.gallery-badge { position: absolute; left: 10px; top: 10px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; }
.gallery-item figcaption { padding: 14px 16px 16px; font-size: .9rem; }
.gallery-item figcaption strong { display: block; color: var(--text); }
.gallery-item figcaption span { color: var(--muted); font-size: .85rem; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%; overflow: visible; }
.lightbox::backdrop { background: rgba(25, 4, 10, .82); backdrop-filter: blur(3px); }
.lightbox-body { background: #fff; border-radius: 14px; overflow: hidden; }
.lightbox-body img, .lightbox-body video { display: block; width: 100%; max-height: 80vh; object-fit: contain; background: #fff; }
.lightbox-body iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.lightbox-caption { color: #fbe3e8; text-align: center; margin: 12px 0 0; font-size: .95rem; }
.lightbox-close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--accent); cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; }
[data-zoom] { cursor: zoom-in; }

/* ---- Funding strip ------------------------------------------------------- */
.funding-section { padding: 56px 0; border-top: 1px solid var(--border); }
.funding-section .section-title { text-align: center; margin-bottom: 4px; }
.funders-title { text-align: center; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 26px 0 0; }
.funders { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.funder {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 272px; height: 172px; padding: 14px 14px 10px; text-align: center; text-decoration: none; overflow: hidden;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; transition: all .25s; color: var(--text);
}
.funder img { max-height: 100px; max-width: 236px; object-fit: contain; filter: grayscale(1) opacity(.8); transition: filter .25s, transform .25s; }
.funder:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.funder:hover img { filter: none; transform: scale(1.04); }
.funder-short { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.funder-name { font-size: .72rem; color: var(--muted); line-height: 1.25; max-height: 2.6em; overflow: hidden; }
.funder-photo { padding: 0; justify-content: flex-end; }
.funder-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; filter: saturate(.85); }
.funder-photo .funder-name { position: relative; z-index: 1; width: 100%; padding: 16px 8px 6px; color: #fff; font-weight: 600;
  background: linear-gradient(transparent, rgba(20, 4, 8, .85)); max-height: none; }
@media (max-width: 560px) { .funder { width: calc(50% - 8px); height: 130px; } .funder img { max-height: 74px; max-width: 100%; } }

/* ---- CTA ----------------------------------------------------------------- */
.cta-section { padding-top: 20px; }
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 40px;
  border-radius: 22px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 90% 10%, #c02a45 0%, var(--accent) 45%, var(--accent-deep) 100%);
  box-shadow: 0 20px 40px rgba(122, 20, 38, .25);
}
.cta::after {
  content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34.64' height='60'%3E%3Cpath d='M17.32 0V20L0 30V50L17.32 60M17.32 20L34.64 30V50L17.32 60' fill='none' stroke='white' stroke-width='1.2'/%3E%3C/svg%3E");
}
.cta h2 { color: #fff; font-size: 1.7rem; margin-bottom: .3em; }
.cta p { margin: 0; color: #fbe3e8; max-width: 60ch; }
.cta > * { position: relative; z-index: 1; }
.page-body .cta { margin-top: 48px; }

/* ---- Page hero ----------------------------------------------------------- */
.page-hero {
  position: relative; overflow: hidden; padding: 60px 0 44px; border-bottom: 1px solid var(--accent-soft-2);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34.64' height='60'%3E%3Cpath d='M17.32 0V20L0 30V50L17.32 60M17.32 20L34.64 30V50L17.32 60' fill='none' stroke='%239e1b32' stroke-opacity='.09' stroke-width='1.2'/%3E%3C/svg%3E"),
    linear-gradient(120deg, #fff 0%, var(--accent-soft) 100%);
}
.page-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin-bottom: .25em; }
.page-hero .lead { font-size: 1.1rem; color: var(--text-soft); max-width: 70ch; margin: 0; }
.page-hero .eyebrow a { color: inherit; text-decoration: none; }
.page-body { padding-top: 44px; padding-bottom: 80px; }
.list-group-title { margin-top: 40px; font-size: 1.5rem; }
.list-group-title:first-child { margin-top: 0; }

/* ---- Avatars ------------------------------------------------------------- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; }
.avatar-md { width: 96px; height: 96px; }
.avatar-lg { width: 86px; height: 86px; }
.avatar-xl { width: 172px; height: 172px; }
.avatar-initials { background: linear-gradient(135deg, #c02a45, var(--accent-deep)); color: #fff; font-weight: 600; font-family: var(--font-display); letter-spacing: .02em; }
.avatar-md.avatar-initials { font-size: 1.8rem; }
.avatar-lg.avatar-initials { font-size: 1.75rem; }
.avatar-xl.avatar-initials { font-size: 3.3rem; }
img.avatar { border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent-soft-2); }

/* ---- Publications -------------------------------------------------------- */
.pub-list { display: flex; flex-direction: column; }
.pub { padding: 12px 0; border-bottom: 1px solid var(--border); }
.pub:first-child { padding-top: 0; }
.pub:last-child { border-bottom: 0; }
.pub-cite { margin: 0; line-height: 1.6; color: var(--text-soft); font-size: .95rem; }
.pub-title { font-weight: 600; color: var(--text); }
.lab-author { color: var(--accent); font-weight: 600; }
.pub-venue { color: var(--text-soft); }
.pub-type { color: var(--muted); font-size: .88em; }
.pub-note { color: var(--accent); font-size: .92em; }
.pub-links { margin: 3px 0 0; font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pub-links a { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.pub-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 12px; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 999px; padding: 0 16px; color: var(--muted); transition: all .2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); padding: 11px 0; width: 100%; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.filter-chip {
  font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer; padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); transition: all .15s;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-chip .count { opacity: .75; font-size: .8em; margin-left: 2px; }
.pub-links-row { margin: 0 0 24px; }
.year-group { margin-top: 30px; }
.year-heading { font-size: 1.4rem; display: flex; align-items: center; gap: 14px; margin-bottom: 14px; color: var(--accent); }
.year-heading::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent-soft-2), transparent); }
.empty-state { padding: 40px 0; text-align: center; color: var(--muted); }

/* ---- News ---------------------------------------------------------------- */
.news-list { list-style: none; padding: 0; margin: 0; position: relative; }
.news-item { position: relative; display: grid; grid-template-columns: 78px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--border); font-size: .95rem; }
.news-item:last-child { border-bottom: 0; }
.news-when { font-size: .76rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.news-now { color: #8a5a00; }
.news-item div { color: var(--text-soft); }

/* ---- Recent results (list + post) ---------------------------------------- */
.hl-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.hl-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.hl-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.hl-media img { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-bottom: 1px solid var(--border); transition: transform .5s; }
.hl-media { overflow: hidden; display: block; }
.hl-card:hover .hl-media img { transform: scale(1.04); }
.hl-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.hl-body h3 { font-size: 1.12rem; }
.hl-body h3 a { color: var(--text); text-decoration: none; }
.hl-body h3 a:hover { color: var(--accent); }
.hl-body > p { color: var(--muted); font-size: .93rem; }
.hl-body .text-link { margin-top: auto; }
.highlight-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .highlight-grid { grid-template-columns: 1fr 300px; } .paper-card { position: sticky; top: 100px; } }
.figure { margin: 0 0 26px; }
.figure img, .figure video { display: block; width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.figure figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--accent-soft-2); }
.post-body { font-size: 1.05rem; max-width: 72ch; }
.post-body img { border-radius: 12px; border: 1px solid var(--border); }
.paper-ref { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.paper-card .link-row { margin-top: 10px; }

/* ---- Research page ------------------------------------------------------- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.toc a {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text-soft); font-size: .9rem; font-weight: 500; transition: all .15s;
}
.toc a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.methods { margin-bottom: 16px; }
.methods h2 { font-size: 1.25rem; margin: 0; }
.theme { padding: 40px 0; border-bottom: 1px solid var(--border); }
.theme:last-of-type { border-bottom: 0; }
.theme-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.theme-head h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.theme-body { max-width: 80ch; }
.theme-image { border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 16px; }
.prose { color: var(--text-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose ul { padding-left: 1.2em; }
.related { margin-top: 18px; }
.related summary { cursor: pointer; font-weight: 600; color: var(--accent); font-size: .95rem; }
.related .pub-list { margin-top: 12px; }

/* ---- Generic item cards (teaching, tutorials, …) ------------------------- */
.item-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-bottom: 10px; }
.item-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s, border-color .25s; }
.item-card:hover { box-shadow: var(--shadow-hover); border-color: var(--accent-soft-2); }
.item-media { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); background: #fff; }
.media-frame { aspect-ratio: 16 / 9; }
.media-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.item-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.item-body h3 { font-size: 1.08rem; margin-bottom: 4px; }
.item-sub { color: var(--accent); font-size: .85rem; font-weight: 600; margin-bottom: 10px; }
.small-prose { font-size: .93rem; }
.item-body .link-row { margin-top: auto; padding-top: 16px; }
.empty-card { display: flex; gap: 16px; align-items: center; color: var(--text-soft); border-style: dashed; box-shadow: none; }
.empty-card .icon { width: 2rem; height: 2rem; color: var(--accent); }
.empty-card p { margin: 0; }

/* ---- Projects ------------------------------------------------------------ */
.project-list { display: grid; gap: 16px; }
.project h3 { font-size: 1.15rem; margin: 10px 0 6px; }
.project-top { display: flex; gap: 10px; align-items: center; }
.project-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.project-meta span { display: inline-flex; gap: 6px; align-items: center; }

/* ---- People -------------------------------------------------------------- */
.pi-list { display: grid; gap: 20px; }
.pi-details { margin-top: 14px; display: grid; gap: 8px; }
.pi-details details { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--bg-alt); }
.pi-details summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.timeline { list-style: none; margin: 10px 0 2px; padding: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 6px 0; border-top: 1px dashed var(--border); font-size: .93rem; color: var(--text-soft); }
.timeline li:first-child { border-top: 0; }
.tl-years { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .timeline li { grid-template-columns: 1fr; gap: 0; } }
.awards { margin: 10px 0 2px; padding-left: 1.3em; color: var(--text-soft); font-size: .93rem; }
.awards li { margin-bottom: 4px; }
.person-sup { font-size: .84rem; color: var(--text-soft); margin: 6px 0 0; }
.person-sup span { color: var(--muted); }
.person-email { margin: 6px 0 0; font-size: .84rem; }
.person-email a { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; word-break: break-all; }
.alumni-title { font-size: 1.1rem; margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
.count-pill { font-size: .75rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 1px 9px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.alumni-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.alumni-table th { text-align: left; background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; padding: 9px 12px; white-space: nowrap; }
.alumni-table td { padding: 9px 12px; border-top: 1px solid var(--border); color: var(--text-soft); vertical-align: top; }
.alumni-table tr:hover td { background: #fffafb; }
.al-name { font-weight: 600; color: var(--text) !important; white-space: nowrap; }
.al-years { white-space: nowrap; font-variant-numeric: tabular-nums; }
.al-now { color: var(--accent-strong) !important; }
.pi { display: grid; gap: 28px; padding: 34px; margin-bottom: 20px; border-top: 4px solid var(--accent); }
@media (min-width: 760px) { .pi { grid-template-columns: auto 1fr; } }
.pi h2 { font-size: 1.95rem; margin-bottom: .2em; }
.pi-title { color: var(--text-soft); }
.pi .eyebrow { margin-bottom: .4em; }
.people-group { margin-top: 48px; }
.people-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.person { display: flex; gap: 16px; align-items: flex-start; transition: box-shadow .25s, transform .25s; }
.person:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.person h3 { font-size: 1.05rem; margin: 2px 0 2px; }
.person-role { color: var(--accent); font-size: .88rem; font-weight: 600; margin: 0; }
.person-topic { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }
.person .link-row { margin-top: 8px; }
.icon-link { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); border: 1px solid var(--border); transition: all .15s; }
.icon-link:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.alumni-list { padding-left: 1.2em; color: var(--text-soft); }
.alumni-list li { margin-bottom: 6px; }
.collab-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.collab-grid li { display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface); }
.collab-grid .muted { font-size: .86rem; }
.people-group ~ .cta { margin-top: 48px; }

/* ---- Software ------------------------------------------------------------ */
.sw-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); margin: 16px 0 24px; }
@media (max-width: 400px) { .sw-grid, .item-grid, .hl-grid { grid-template-columns: 1fr; } }
.sw-card { display: flex; flex-direction: column; transition: box-shadow .25s, border-color .25s; padding: 0; overflow: hidden; }
.sw-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.sw-media { display: block; width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--border); background: #fff; cursor: zoom-in; }
.sw-media video, .sw-media img { display: block; width: 100%; height: auto; }
.sw-wide { grid-column: 1 / -1; }
.sw-wide .sw-media { padding: 18px 24px; background: #fff; }
@media (max-width: 600px) { .sw-wide .sw-media { padding: 6px; } }
.sw-wide .sw-media video, .sw-wide .sw-media img { max-height: 520px; object-fit: contain; margin: 0 auto; }
@media (min-width: 900px) {
  .sw-wide .sw-text { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 36px; align-items: start; }
  .sw-wide .sw-head h2 { font-size: 1.3rem; }
}
.sw-features { margin: 0 0 6px; padding-left: 1.2em; color: var(--text-soft); }
.sw-features li { margin-bottom: 6px; }
.badge-soon { background: #fff4d6; color: #8a5a00; font-size: .66rem; vertical-align: 3px; margin-left: 6px; }
.sw-card:hover { box-shadow: var(--shadow-hover); border-color: var(--accent-soft-2); }
.sw-card > p { color: var(--text-soft); }
.sw-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.sw-head h2 { font-family: var(--font); font-size: 1.08rem; font-weight: 650; margin: 0 0 2px; }
.sw-head p { margin: 0; }
.sw-paper { margin-top: 12px; }
.sw-card .link-row { margin-top: auto; padding-top: 16px; }

/* ---- Contact ------------------------------------------------------------- */
.contact-grid { display: grid; gap: 20px; }
@media (min-width: 820px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card { border-top: 4px solid var(--accent); }
.contact-card h2 { font-size: 1.4rem; }
.contact-card ul { padding-left: 1.2em; color: var(--text-soft); }
.contact-list { list-style: none; padding: 0 !important; margin: 0; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.contact-list .icon { color: var(--accent); margin-top: .3em; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: #1d080d; color: #d9c4c8; padding: 56px 0 26px; font-size: .92rem; border-top: 4px solid var(--accent); }
.footer-grid { display: grid; gap: 30px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; } }
.footer-title { font-weight: 700; color: #fff; margin-bottom: .7em; letter-spacing: .02em; }
.footer-title-2 { margin-top: 1.4em; }
.site-footer a { color: #f3d3da; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 7px; }
.footer-links a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.site-footer .muted { color: #a88f95; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .84rem; color: #a88f95; }

/* ---- Back to top --------------------------------------------------------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(122, 20, 38, .35); opacity: 0; transform: translateY(12px); pointer-events: none; transition: all .25s;
}
.to-top .icon { transform: rotate(-90deg); }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent-strong); }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 44px; height: 44px; flex: none; }
.footer-mail { margin: 4px 0; }

/* ---- Lab photos (People page) --------------------------------------------- */
.photo-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.photo-item { margin: 0; }
.photo-open { display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-alt); cursor: zoom-in; aspect-ratio: 4 / 3; }
.photo-open img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.photo-open:hover img { transform: scale(1.04); }
.photo-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 4 / 3;
  border: 2px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); font-size: .9rem;
  background: repeating-linear-gradient(135deg, transparent 0 14px, var(--accent-soft) 14px 28px); }
.photo-ph svg { width: 34px; height: 34px; color: var(--accent); opacity: .7; }
.photo-item figcaption { margin-top: 8px; font-size: .88rem; color: var(--text-soft); }
.photo-item figcaption span { display: block; color: var(--muted); font-size: .8rem; }

/* ---- Book cards (item with cover:) ---------------------------------------- */
.item-card.has-cover { flex-direction: row; align-items: stretch; }
.item-cover { width: 112px; flex: none; margin: 18px 0 18px 18px; border-radius: 6px; box-shadow: 0 6px 18px rgba(30, 5, 10, .18); cursor: zoom-in; }
.item-card.has-cover .item-body { flex: 1; min-width: 0; }
@media (max-width: 420px) { .item-cover { width: 88px; } }

/* ---- Video lecture thumbnails (item with youtube: / watch:) --------------- */
.yt-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #8f1a2e, #4f0c18); cursor: pointer; overflow: hidden; text-decoration: none; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, filter .3s; }
.yt-thumb:hover img { transform: scale(1.04); filter: brightness(.85); }
.yt-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; border-radius: 12px;
  background: var(--accent); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); transition: transform .25s; }
.yt-play::after { content: ""; position: absolute; left: 26px; top: 13px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.yt-thumb:hover .yt-play { transform: scale(1.1); }
.yt-external { display: flex; flex-direction: column; justify-content: space-between; padding: 16px 18px; color: #fff; }
.yt-external:hover { color: #fff; }
.yt-ext-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.25; max-width: 90%; opacity: .92; }
.yt-ext-note { font-size: .75rem; opacity: .75; }

/* ---- Lab logo (_includes/lab-logo.html + assets/js/lab-logo.js) ---------- */
.lab-logo { display: block; overflow: visible; --ll-glow: 0; }
.lab-logo--dark .ll-e { stroke: var(--accent); }
.lab-logo--light .ll-e { stroke: #fff; }
.lab-logo .ll-x { stroke: #e3a21a; filter: drop-shadow(0 0 calc(var(--ll-glow) * 7px) rgba(255, 214, 102, calc(var(--ll-glow)))); }
.lab-logo--light .ll-x { stroke: #f5c04a; }
.lab-logo .ll-elec { fill: #f5c04a; stroke: #fff; stroke-width: 1.6; filter: drop-shadow(0 0 4px rgba(255, 214, 102, .9)); }
.lab-logo .ll-hole { fill: #7a1426; stroke-width: 2.6; }
.lab-logo--light .ll-hole { stroke: #fff; }
.lab-logo--dark .ll-hole { stroke: var(--accent); fill: #fff; }
.lab-logo .ll-photon path { stroke: #f5c04a; stroke-width: 2.6; }
.lab-logo .ll-photon .ll-head { fill: #f5c04a; stroke: none; }
.lab-logo .ll-ripple { stroke-width: 1.6; }
.lab-logo--light .ll-ripple { stroke: rgba(255, 255, 255, .9); }
.lab-logo--dark .ll-ripple { stroke: var(--accent); }
.lab-logo[data-lab-logo] { cursor: pointer; outline: none; }
.lab-logo[data-lab-logo]:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 12px; }

/* ---- Visitor map (footer; _config.yml → visitor_map) ---------------------- */
.visitor-map { margin-top: 22px; }
.visitor-map-widget { max-width: 260px; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.visitor-map-widget img, .visitor-map-widget canvas, .visitor-map-widget iframe { max-width: 100%; height: auto; display: block; }
.visitor-map-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .85rem; }
.visitor-map-ph { max-width: 240px; border: 1px dashed rgba(255, 255, 255, .25); border-radius: 10px; padding: 10px 12px; color: #f3c3cc; font-size: .8rem; text-align: center; }
.visitor-map-ph svg { width: 100%; height: auto; display: block; margin-bottom: 4px; }

/* ---- Research topics (text + figure side by side) ------------------------- */
.topic { display: grid; gap: 28px; padding: 40px 0; border-top: 1px solid var(--border); scroll-margin-top: 100px; }
.topic:first-of-type { border-top: 0; }
@media (min-width: 960px) {
  .topic.has-image { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 48px; }
  .topic.has-image.flip .topic-text { order: 2; }
}
.topic .theme-head { margin-bottom: 12px; }
.topic-figure { margin: 0; }
.topic-figures { display: flex; flex-direction: column; gap: 22px; }
.topic-img { display: block; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; cursor: zoom-in; box-shadow: var(--shadow); transition: box-shadow .25s, transform .25s; }
.topic-img:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.topic-img img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; border-radius: 8px; }
.topic-figure figcaption { margin-top: 10px; font-size: .86rem; color: var(--muted); }

/* ---- Computational resources: one row of cards --------------------------- */
.res-row { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 1100px) { .res-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .res-row { grid-template-columns: 1fr; } }
.res-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.res-media { aspect-ratio: 16 / 10; background: var(--bg-alt); border-bottom: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.res-media img { width: 100%; height: 100%; object-fit: cover; }
.res-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.res-body h3 { font-size: 1.02rem; margin: 0 0 4px; }
.res-sub { font-size: .82rem; color: var(--accent); font-weight: 600; margin: 0 0 10px; }
.res-body .small-prose { font-size: .88rem; }
.res-body .link-row { margin-top: auto; padding-top: 12px; }
.res-card.is-past .res-media img { filter: grayscale(1) opacity(.75); }
.badge-past { align-self: flex-start; background: #ececf0; color: #55555f; margin-bottom: 8px; }

/* ---- Community & commercial codes ----------------------------------------- */
.code-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-bottom: 12px; }
.code-card { display: flex; flex-direction: column; }
.code-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.code-head h3 { margin: 0; font-size: 1.12rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.code-head p { margin: 2px 0 0; }
.code-mono { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.code-mono.is-long { font-size: .88rem; }
.code-use { font-size: .9rem; color: var(--text-soft); margin: 4px 0 8px; }
.code-card .link-row { margin-top: auto; padding-top: 12px; }

/* ---- Outreach (timeline per person and category) --------------------------- */
.outreach-person { margin-top: 18px; scroll-margin-top: 100px; }
.outreach-cat { margin: 18px 0 30px; }
.outreach-cat h3 { font-size: 1.12rem; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; color: var(--accent-strong); }
.outreach-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--accent-soft-2); }
.outreach-list li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 10px 0 10px 16px; position: relative; }
.outreach-list li::before { content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.or-year { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 2px; }
.or-title { margin: 0; font-weight: 600; }
.or-meta { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.or-details { margin-top: 4px; font-size: .92rem; color: var(--text-soft); }
.or-details p { margin: 0; }
@media (max-width: 520px) { .outreach-list li { grid-template-columns: 1fr; gap: 2px; } }

/* ---- Funding & partners carousel (homepage, above Research findings) ------ */
.funders-band { padding: 64px 0 48px; }
.funder-slide { grid-template-columns: 1fr; }
@media (min-width: 900px) { .funder-slide { grid-template-columns: 1fr 1fr; gap: 44px; } }
.funder-logo { display: grid; place-items: center; height: 230px; padding: 26px 34px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.funder-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.funder-logo.is-photo { padding: 0; }
.funder-logo.is-photo img { width: 100%; height: 100%; object-fit: cover; }
.funder-logo .funder-short { font-size: 2.2rem; }
.funder-info h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.8vw, 2rem); font-weight: 600; line-height: 1.2; margin: 0 0 16px; }
.funder-info .eyebrow { margin-bottom: .5em; }
.funder-thumbs { flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 920px; }
.dot.funder-thumb { width: 50px; height: 34px; border-radius: 8px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; padding: 3px; opacity: .55; filter: grayscale(1); transition: opacity .2s, filter .2s, border-color .2s, transform .2s; }
.dot.funder-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dot.funder-thumb span { font-size: .6rem; font-weight: 700; color: var(--accent); }
.dot.funder-thumb:hover { opacity: 1; filter: none; }
.dot.funder-thumb.is-active { width: 50px; background: #fff; opacity: 1; filter: none; border: 2px solid var(--accent); transform: translateY(-2px); }
@media (max-width: 640px) { .funder-thumbs { display: none; } .funder-logo { height: 170px; } }

/* ---- Publications: one section per type ------------------------------------ */
.pub-tabs .filter-chip.is-empty:not(.is-active) { opacity: .45; }
#pub-results .pub-type { display: none; }   /* the section already says what kind of publication it is */
#pub-results .pub-panel > .year-group:first-child { margin-top: 8px; }

/* ---- Teaching list (People page) -------------------------------------------- */
.teaching { list-style: none; margin: 10px 0 2px; padding: 0; }
.teaching li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 7px 0; border-top: 1px dashed var(--border); font-size: .93rem; color: var(--text-soft); }
.teaching li:first-child { border-top: 0; }
.tc-name { font-weight: 600; color: var(--text); flex: 1 1 280px; }
.tc-level { color: var(--muted); }
.tc-term { font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tc-term.tc-spring { background: #e6f3ec; color: #1d6b43; }

/* ---- Students supervised (People) and thesis citations (Publications) ------- */
.sup-level { margin: 18px 0 6px; font-size: 1rem; color: var(--accent); }
.sup-table td, .sup-table th { vertical-align: top; }
.pub-cites:empty { display: none; }
.pub-cites { color: var(--text); font-weight: 600; }
.pub-cites a { color: inherit; }

/* ---- Links are never underlined (colour and weight mark them) ---------------- */
a, a:hover, a:focus, a:active, a:visited { text-decoration: none; }
.prose a, .lead a, .news-text a, .or-details a { font-weight: 550; }
a:hover { color: var(--accent-deep); }
.announce a:hover { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ---- Release banner (home page) --------------------------------------------- */
.release-band { padding: 34px 0 0; }
.release-card {
  display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #fff 70%); border: 1px solid var(--accent-soft-2);
  border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow);
}
.release-text { flex: 1 1 420px; min-width: 0; }
.release-text h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.release-text p { margin: 0; color: var(--text-soft); max-width: 70ch; }
.release-text .eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.release-badge { background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 999px; letter-spacing: .06em; }
.release-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.release-actions .btn { white-space: nowrap; }
.release-actions .btn svg { width: 18px; height: 18px; }
.btn-ghost-dark { border: 1.5px solid var(--accent); color: var(--accent); background: transparent; }
.btn-ghost-dark:hover { background: var(--accent); color: #fff; }
@media (max-width: 720px) { .release-card { padding: 20px 18px; } .release-actions .btn { white-space: normal; } }

/* ---- Hero release pill ---------------------------------------------------------- */
.hero-release { margin: 26px 0 0; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .34); backdrop-filter: blur(4px); padding: 8px 16px 8px 8px; border-radius: 999px; color: #fff; font-size: .95rem; pointer-events: auto; }
.hero-release-badge { background: var(--gold); color: #3a0610; font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.hero-release a { color: #fff; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, .22); }
.hero-release a:hover { background: #fff; color: var(--accent); }
.hero-release a svg { width: 16px; height: 16px; }
@media (max-width: 720px) { .hero-release { border-radius: 18px; padding: 10px 12px; } }
.hero-hint { margin-top: 18px; }
.hero-release { margin: 0 0 22px; }
.hero { padding-top: 56px; }
@media (max-width: 720px) { .hero { padding-top: 40px; } }
@media (max-width: 340px) { .brand-name { font-size: .66rem; } .brand-mark { width: 32px; height: 32px; } .nav-bar { gap: 6px; } }

/* ---- Wide screens: logo further left, clear of the menu ---------------------- */
@media (min-width: 1600px) { .site-header .container.nav-bar { max-width: 1800px; gap: 48px; } }
@media (min-width: 2200px) { .site-header .container.nav-bar { max-width: 2100px; } }

/* ---- Compact hero (about 75% of the former height, type a tad smaller) ------- */
.hero { padding: 58px 0 122px; }
.hero-release { margin: 0 0 18px; padding: 6px 14px 6px 6px; font-size: .9rem; }
.hero-brand { margin-bottom: 10px; gap: 16px; }
.hero-logo { width: 112px; height: 112px; padding: 8px; border-radius: 26px; }
.hero .hero-eyebrow { font-size: .72rem; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: .2em; max-width: 24ch; }
.hero-tagline { font-size: clamp(1rem, 1.9vw, 1.16rem); max-width: 52ch; margin-bottom: 0; }
.hero-actions { margin-top: 24px; gap: 8px; }
.hero-actions .btn { padding: 10px 20px; font-size: .9rem; }
.hero-hint { margin-top: 20px; font-size: .8rem; padding: 4px 12px; }
@media (max-width: 720px) { .hero { padding: 28px 0 84px; } .hero-logo { width: 76px; height: 76px; padding: 5px; border-radius: 18px; } }

/* ---- Pipeline figure inside a code card ------------------------------------------ */
.sw-pipeline { margin: 8px 0 18px; border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.sw-pipeline button { display: block; width: 100%; padding: 6px 10px; border: 0; background: transparent; cursor: zoom-in; }
.sw-pipeline img { display: block; width: 100%; max-width: 920px; height: auto; margin: 0 auto; }
.sw-pipeline figcaption { padding: 10px 16px 12px; font-size: .82rem; color: var(--text-soft); border-top: 1px solid var(--border); background: var(--bg-alt); }

/* ---- Tall photo (portrait photo or collage) on Life in the Group ----------------- */
.photo-tall .photo-open { aspect-ratio: 9 / 16; }
.photo-tall .photo-open img { object-fit: contain; }
@media (min-width: 720px) {
  .photo-tall { grid-row: span 2; display: flex; flex-direction: column; }
  .photo-tall .photo-open { aspect-ratio: auto; flex: 1; position: relative; min-height: 0; }
  .photo-tall .photo-open img { position: absolute; inset: 0; object-fit: contain; background: var(--bg-alt); }
}

/* ---- Header: full institute name under the group name, sized to be no wider than the name ---- */
.brand-text { --bn: 1.12rem; }
.brand-name { font-size: var(--bn); }
.brand-sub { font-size: calc(var(--bn) * .5); letter-spacing: .03em; white-space: nowrap; font-weight: 650; }
@media (min-width: 1321px) and (max-width: 1560px) { .brand-text { --bn: .9rem; } }
@media (max-width: 440px) { .brand-text { --bn: .86rem; } }
@media (max-width: 380px) { .brand-text { --bn: .76rem; } }
@media (max-width: 340px) { .brand-text { --bn: .64rem; } }
