/* Shared component styles. Each theme (themes/<name>/static/theme/theme.css)
   sets the design tokens below and restyles header/footer/hero. */

:root {
  --bg: #ffffff;
  --fg: #1d1d24;
  --muted: #6c6c77;
  --border: #e3e4ea;
  --primary: #050f4a;
  --primary-fg: #ffffff;
  --accent: #0a4cb5;
  --link: #0a4cb5;
  --card-bg: #ffffff;
  --card-fg: #1d1d24;
  --surface: #f5f6f9;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: var(--font-body);
  --radius: 10px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 16px rgb(0 0 0 / .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 1.6em 0 .6em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-top: 0; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: var(--primary-fg); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.content { padding-top: 1.5rem; padding-bottom: 4rem; }
.content > :first-child { margin-top: 0; }
.stream > * + * { margin-top: 1.25rem; }
.rich-text > :last-child { margin-bottom: 0; }

/* ---------- header & navigation ---------- */
.site-header { position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 84px; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: inherit; }
.brand-logo { height: 56px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; gap: .25rem 1.75rem; flex-wrap: wrap; justify-content: flex-end; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: .5rem 0; text-decoration: none; color: inherit; white-space: nowrap; }
.main-nav > ul > li > a { border-bottom: 2px solid transparent; }
.main-nav > ul > li.active > a, .main-nav > ul > li > a:hover { border-bottom-color: currentColor; }
.main-nav .has-children > a::after { content: ""; display: inline-block; width: .38em; height: .38em; margin-left: .45em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-.2em) rotate(45deg); }
.submenu {
  position: absolute; top: 100%; left: -1rem; min-width: 220px; padding: .5rem 0 !important;
  background: var(--card-bg); color: var(--card-fg); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
}
.submenu a { padding: .45rem 1rem; }
.submenu a:hover, .submenu .active a { background: var(--surface); }
.main-nav li:hover > .submenu, .main-nav li:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  /* menu button (JS); without JavaScript the menu is simply shown */
  .js .nav-toggle { display: block; width: 44px; height: 44px; position: relative; cursor: pointer; padding: 0; border: 0; background: none; color: inherit; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    position: absolute; left: 10px; width: 24px; height: 2px; background: currentColor; content: ""; transition: .2s;
  }
  .nav-toggle-bars { top: 21px; }
  .nav-toggle-bars::before { top: -7px; left: 0; }
  .nav-toggle-bars::after { top: 7px; left: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
  .header-inner { flex-wrap: wrap; }
  .main-nav { flex-basis: 100%; padding-bottom: 1rem; }
  .js .main-nav { display: none; }
  .js .nav-toggle[aria-expanded="true"] ~ .main-nav { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li > a { border-bottom: 0; font-size: 1.1rem; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; color: inherit; padding: 0 0 .5rem 1rem !important; }
  .submenu a:hover, .submenu .active a { background: transparent; text-decoration: underline; }
}

/* section tabs / pills */
.section-nav { display: flex; flex-wrap: wrap; gap: .6rem; padding-top: 1.25rem; padding-bottom: .5rem; }
.section-nav.inline { padding: 0; margin-bottom: 1.5rem; }
.pill { display: inline-block; padding: .45rem 1.3rem; border: 1.5px solid currentColor; border-radius: 999px; text-decoration: none; color: inherit; font-weight: 500; }
.pill.active, .pill:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- page header ---------- */
.page-header { position: relative; padding: 3.5rem 0 1rem; isolation: isolate; }
.page-header h1 { margin-bottom: .3em; }
.page-header .section-nav { padding-top: 0; margin-bottom: 1.5rem; }
.page-header.has-image { color: #fff; padding: 7rem 0 3rem; }
.page-header-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; filter: brightness(.45); }
.page-header .lead { font-size: 1.2rem; max-width: 52rem; }
.breadcrumb { margin-bottom: .5rem; font-size: .95rem; }

/* ---------- hero (home) ---------- */
.hero { position: relative; isolation: isolate; text-align: center; padding: 6rem 0; }
.hero.has-image { min-height: min(92vh, 900px); display: flex; align-items: center; color: #fff; margin-top: -84px; padding-top: 84px; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero.has-image::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(0 0 0 / .55), rgb(0 0 0 / .25) 40%, rgb(0 0 0 / .55)); }
.hero h1 { font-size: clamp(2.4rem, 7vw, 5rem); font-weight: 700; margin: 0; }
.hero hr { width: 280px; max-width: 60%; margin: 1.6rem auto; border-color: rgb(255 255 255 / .55); }
.hero .tagline { font-size: 1.2rem; opacity: .9; }
.hero .lead { max-width: 46rem; margin: 1rem auto 0; }
.hero-scroll { position: absolute; bottom: 1.5rem; left: 50%; width: 32px; height: 32px; margin-left: -16px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: .8; animation: nudge 2s infinite; }
@keyframes nudge { 50% { translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) { .hero-scroll { animation: none; } html { scroll-behavior: auto; } }

/* ---------- generic components ---------- */
.card { background: var(--card-bg); color: var(--card-fg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.card a { color: inherit; }
.button {
  display: inline-flex; align-items: center; gap: .75rem; padding: .7rem 1.4rem; border-radius: 999px;
  background: var(--primary); color: var(--primary-fg); border: 1.5px solid var(--primary); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.15); }
.button-arrow::after { content: "→"; }
.badge { display: inline-block; padding: .05rem .6rem; border-radius: 999px; background: var(--surface); color: var(--fg); font-size: .8rem; font-weight: 600; vertical-align: .1em; }
.notice { padding: .8rem 1rem; border-left: 4px solid var(--accent); background: var(--surface); }
.plain { list-style: none; padding: 0; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1.25rem; margin: 0 0 1rem; }
.meta dt { font-weight: 600; }
.meta dd { margin: 0; }
.meta-line { margin: .25rem 0 .5rem; }
details summary { cursor: pointer; color: var(--link); }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.embed { position: relative; aspect-ratio: 16 / 9; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* click-to-play YouTube */
.video-embed { margin: 1.25rem 0 1.75rem; }
.video-facade { overflow: hidden; border-radius: 6px; background: #000; color: #fff; }
.video-facade > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-play { position: absolute; inset: 0; display: block; width: 100%; border: 0; padding: 0; color: #fff; font: inherit; cursor: pointer;
  background: linear-gradient(transparent 55%, rgb(0 0 0 / .7)); }
.video-play-icon { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 72px; height: 50px; border-radius: 14px;
  background: #c00 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 30px no-repeat;
  box-shadow: 0 2px 12px rgb(0 0 0 / .4); transition: scale .15s; }
.video-play:hover .video-play-icon, .video-play:focus-visible .video-play-icon { scale: 1.08; }
.video-title { position: absolute; left: 1rem; right: 1rem; bottom: .8rem; font-weight: 600; text-align: left; text-shadow: 0 1px 3px rgb(0 0 0 / .8); }
.video-note { margin-top: .4rem; font-size: .8rem; color: var(--muted); }
.figure { margin: 2rem 0; }
.figure img { margin-inline: auto; }
.figure figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }
.figure-narrow { max-width: 560px; margin-inline: auto; }
.figure img { max-height: min(75vh, 720px); width: auto; }
.video-block { margin: 1.5rem auto 2rem; max-width: 900px; }
.video-block video { display: block; width: 100%; height: auto; max-height: 75vh; border-radius: 6px; background: #000; }
.video-block figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }
.text-image { --media: 40%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--media)); gap: 1.5rem 2.5rem; align-items: start; margin: 1.75rem 0; }
.text-image-small { --media: 26%; }
.text-image-large { --media: 50%; }
.text-image-left { grid-template-columns: minmax(0, var(--media)) minmax(0, 1fr); }
.text-image-left .text-image-media { order: -1; }
.text-image-text > :first-child { margin-top: 0; }
.text-image-text > :last-child { margin-bottom: 0; }
.text-image-media { margin: 0; }
.text-image-media img { width: auto; max-width: 100%; max-height: 380px; margin-inline: auto; border-radius: 6px; }
.text-image-right .text-image-media img { margin-right: 0; }
.text-image-left .text-image-media img { margin-left: 0; }
.text-image-media figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
@media (max-width: 760px) {
  .text-image, .text-image-left { grid-template-columns: 1fr; }
  .text-image-media { order: -1; }
  .text-image-media img { max-height: 300px; margin-inline: auto !important; }
}
.figure-full { width: 100vw; margin-left: calc(50% - 50vw); }
.figure-left, .figure-right { max-width: 45%; }
.figure-left { float: left; margin: .3rem 1.5rem 1rem 0; }
.figure-right { float: right; margin: .3rem 0 1rem 1.5rem; }
@media (max-width: 640px) { .figure-left, .figure-right { float: none; max-width: 100%; margin: 1.5rem 0; } }
.documents { padding-left: 1.2rem; }
.logo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5rem 3rem; padding: 1.5rem 0; }
.logo-row img { --logo-h: 72px; height: calc(var(--logo-h) * var(--logo-scale, 1)); width: auto; object-fit: contain; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
.filter-bar input, .filter-bar select { font: inherit; padding: .55rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); color: var(--card-fg); }
.filter-bar input { flex: 1 1 260px; }
.pagination { display: flex; gap: 1.5rem; justify-content: center; margin-top: 2rem; }

/* map */
.map { border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.map-address { margin-top: .75rem; }
.map-beside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2.5rem; align-items: start; margin-bottom: 2rem; }
.map-beside .map-text > :first-child { margin-top: 0; }
@media (max-width: 860px) { .map-beside { grid-template-columns: 1fr; gap: 1.25rem; } }

/* ---------- people ---------- */
.people-role { margin-top: 2rem; }
.people-section:first-child > .people-role:first-child, .people-section:first-child > .people-status:first-child { margin-top: 0; }
.people-status { margin-top: 3rem; }
.person-name { margin: 0; font-size: 1.05rem; }
.person-name a { text-decoration: none; }
.person-title, .person-affiliation, .person-note { margin: .1rem 0; }
.person-affiliation, .person-note { color: var(--muted); font-size: .92rem; }
.person-contact, .person-links { list-style: none; padding: 0; margin: .5rem 0 0; }
.person-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.person-placeholder { display: block; width: 100%; aspect-ratio: 1; background: #dfe1e6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a7abb4'%3E%3Ccircle cx='12' cy='8.5' r='4.2'/%3E%3Cpath d='M3.5 21c.8-4.6 4.2-7 8.5-7s7.7 2.4 8.5 7z'/%3E%3C/svg%3E") center / 60% no-repeat; }
.icon-link { display: inline-block; font-size: .78rem; padding: .1rem .55rem; border-radius: 999px; background: var(--surface); text-decoration: none; }

/* list layout: photo left (QODL style) */
.people-list .person { display: grid; grid-template-columns: 200px 1fr; gap: 2.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.people-list .person-photo img, .people-list .person-placeholder { width: 200px; aspect-ratio: 4 / 5; object-fit: cover; }
.people-list .person-links .icon-email { display: none; }
@media (max-width: 600px) { .people-list .person { grid-template-columns: 110px 1fr; gap: 1.25rem; } .people-list .person-photo img, .people-list .person-placeholder { width: 110px; } }

/* cards layout (QOT style) */
.people-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 3.5rem 1.5rem; padding-top: 3rem; }
.people-cards .person { position: relative; text-align: center; background: var(--card-bg); color: var(--card-fg); padding: 5.5rem 1rem 1.25rem; border-top: 4px solid var(--accent); box-shadow: var(--shadow); border-radius: 2px; }
.people-cards .person-photo { position: absolute; top: -3.5rem; left: 50%; translate: -50% 0; width: 140px; }
.people-cards .person-photo img, .people-cards .person-placeholder { width: 140px; height: 140px; object-fit: cover; border-radius: 28px; border: 5px solid var(--card-bg); box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.people-cards .person-title { color: var(--muted); font-size: .92rem; }
.people-cards .person-contact { font-size: .82rem; letter-spacing: .02em; display: flex; justify-content: center; flex-wrap: wrap; gap: 0 .5rem; }
.people-cards .person-contact .email { display: none; }
.people-cards .person-contact .label { display: none; }
.people-cards .person-contact .phone::before { content: "tel. "; }
.people-cards .person-contact .phone + .room::before { content: "|"; margin-right: .5rem; color: var(--muted); }
.people-cards .person-contact .room { text-transform: uppercase; }
.people-cards .person-links { justify-content: center; margin-top: .9rem; }
.people-compact { columns: 2 280px; padding-left: 1.2rem; }
.people-compact li { break-inside: avoid; margin-bottom: .3rem; }
.profile-grid { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 3rem; }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }
.profile .person { display: block; }
/* profile page: portrait and contact details on a light card, like the team cards */
.profile .person { background: var(--card-bg); color: var(--card-fg); --muted: #62677d; padding: 1rem 1rem 1.25rem; border-top: 4px solid var(--accent);
  border-radius: 4px 4px var(--radius) var(--radius); box-shadow: var(--shadow); }
.profile .person-contact a, .profile .person-name a { color: var(--primary); }
.profile .person-photo img, .profile .person-placeholder { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) * .6); }
.profile .person-info { padding: .9rem .25rem 0; }
.profile .person-name { font-size: 1.15rem; }
.profile .person-contact { font-size: .95rem; }
@media (max-width: 760px) { .profile .person { max-width: 340px; } }

/* teams */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.team-card { display: block; text-decoration: none; border-top: 4px solid var(--accent); transition: transform .15s; }
.team-card:hover { transform: translateY(-3px); }
.team-card h3 { margin: .75rem 0 .25rem; }
.team-card .acronym { font-weight: 600; color: var(--accent); margin: 0 0 .5rem; }
.team-grid.former .team-card { opacity: .75; }

/* ---------- publications & outputs ---------- */
.publications { padding-left: 0; list-style: none; counter-reset: none; }
.publications li { padding: .85rem 0; border-bottom: 1px solid var(--border); }
.publications .member { font-weight: 600; }
.publications .doi, .publications .arxiv, .publications .pdf { font-size: .82rem; margin-left: .35rem; white-space: nowrap; }
.year { border-bottom: 2px solid var(--fg); padding-bottom: .3rem; }
.pub-funding { font-size: .9rem; margin-top: .4rem; }
.outputs { list-style: none; padding: 0; }
.outputs li { padding: .8rem 0; border-bottom: 1px solid var(--border); }
.outputs .muted { display: block; font-size: .92rem; }
.highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.highlight { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.highlight img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.highlight-body { padding: 1.25rem 1.4rem 1.5rem; }
.highlight h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.highlight h3 a { text-decoration: none; }
.highlight .journal { color: var(--muted); font-size: .9rem; }

/* news */
.news-list { list-style: none; padding: 0; }
.news-list li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.news-list time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.news-list.large li { padding: 1rem 0; }
.news-list.large p { margin: .2rem 0 0; }

/* ---------- funding & patents ---------- */
.grant { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; margin-bottom: 1.5rem; }
.grant.finished .grant-logos img { opacity: .8; } /* fade the logos only: faded text fails contrast */
.grant-logos { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.grant-logos img { max-height: 60px; width: auto; }
.grant h3 { margin-top: 0; }
@media (max-width: 640px) { .grant { grid-template-columns: 1fr; } .grant-logos { flex-direction: row; justify-content: flex-start; } }
.funding-ack { margin: 1rem 0; }
.funding-text { font-size: .88rem; color: var(--muted); max-width: 60rem; }
.funding-logos { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.funding-logos img { max-height: 70px; width: auto; }
/* the whole strip keeps its proportions: both sizes auto, either limit may apply */
.funding-logos .logo-strip { width: auto; height: auto; max-width: min(100%, 900px); max-height: 110px; object-fit: contain; }
/* funder logos in page content sit on a white rounded panel (the strips are drawn for a white background) */
.content .funding-logos { background: #fff; border-radius: 14px; padding: .8rem 1.4rem; display: inline-flex; border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgb(0 0 0 / .06); }
.content .funding-logos .logo-strip { max-height: 90px; }
.patent { margin-bottom: 2rem; }
.patent h2 { margin-top: 0; padding-bottom: .4rem; border-bottom: 2px solid var(--accent); }
.patent-grid { display: grid; grid-template-columns: 1fr minmax(0, 320px); gap: 2rem; }
.patent-grid > :only-child { grid-column: 1 / -1; }
@media (max-width: 760px) { .patent-grid { grid-template-columns: 1fr; } }
.filings { list-style: none; padding: 0; }
.filing { display: flex; gap: .9rem; align-items: baseline; padding: .4rem 0; }
/* jurisdiction chip: a small flag, then the code */
.jurisdiction { flex: none; display: inline-flex; align-items: center; gap: .4rem; height: 1.7rem; padding: 0 .55rem 0 .3rem; border-radius: 4px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: #eef0f7; color: #1d1d24; box-shadow: inset 0 0 0 1px #d6d8e2; }
.jurisdiction::before { content: ""; flex: none; width: 1.5rem; height: 1rem; border-radius: 2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23c9ccd8'/%3E%3C/svg%3E") center / cover;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .15); }
.j-ep::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23039'/%3E%3Cg fill='%23fc0'%3E%3Cpolygon points='21.00,8.85 21.26,9.64 22.09,9.64 21.42,10.14 21.68,10.93 21.00,10.44 20.32,10.93 20.58,10.14 19.91,9.64 20.74,9.64'/%3E%3Cpolygon points='20.20,11.85 20.45,12.64 21.29,12.64 20.61,13.14 20.87,13.93 20.20,13.44 19.52,13.93 19.78,13.14 19.10,12.64 19.94,12.64'/%3E%3Cpolygon points='18.00,14.05 18.26,14.84 19.09,14.84 18.42,15.33 18.68,16.13 18.00,15.64 17.32,16.13 17.58,15.33 16.91,14.84 17.74,14.84'/%3E%3Cpolygon points='15.00,14.85 15.26,15.64 16.09,15.64 15.42,16.14 15.68,16.93 15.00,16.44 14.32,16.93 14.58,16.14 13.91,15.64 14.74,15.64'/%3E%3Cpolygon points='12.00,14.05 12.26,14.84 13.09,14.84 12.42,15.33 12.68,16.13 12.00,15.64 11.32,16.13 11.58,15.33 10.91,14.84 11.74,14.84'/%3E%3Cpolygon points='9.80,11.85 10.06,12.64 10.90,12.64 10.22,13.14 10.48,13.93 9.80,13.44 9.13,13.93 9.39,13.14 8.71,12.64 9.55,12.64'/%3E%3Cpolygon points='9.00,8.85 9.26,9.64 10.09,9.64 9.42,10.14 9.68,10.93 9.00,10.44 8.32,10.93 8.58,10.14 7.91,9.64 8.74,9.64'/%3E%3Cpolygon points='9.80,5.85 10.06,6.64 10.90,6.64 10.22,7.14 10.48,7.93 9.80,7.44 9.13,7.93 9.39,7.14 8.71,6.64 9.55,6.64'/%3E%3Cpolygon points='12.00,3.65 12.26,4.45 13.09,4.45 12.42,4.94 12.68,5.73 12.00,5.24 11.32,5.73 11.58,4.94 10.91,4.45 11.74,4.45'/%3E%3Cpolygon points='15.00,2.85 15.26,3.64 16.09,3.64 15.42,4.14 15.68,4.93 15.00,4.44 14.32,4.93 14.58,4.14 13.91,3.64 14.74,3.64'/%3E%3Cpolygon points='18.00,3.65 18.26,4.45 19.09,4.45 18.42,4.94 18.68,5.73 18.00,5.24 17.32,5.73 17.58,4.94 16.91,4.45 17.74,4.45'/%3E%3Cpolygon points='20.20,5.85 20.45,6.64 21.29,6.64 20.61,7.14 20.87,7.93 20.20,7.44 19.52,7.93 19.78,7.14 19.10,6.64 19.94,6.64'/%3E%3C/g%3E%3C/svg%3E"); }
.j-pl::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23fff'/%3E%3Crect y='10' width='30' height='10' fill='%23dc143c'/%3E%3C/svg%3E"); }
.j-us::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23fff'/%3E%3Crect y='0.000' width='30' height='1.538' fill='%23b22234'/%3E%3Crect y='3.077' width='30' height='1.538' fill='%23b22234'/%3E%3Crect y='6.154' width='30' height='1.538' fill='%23b22234'/%3E%3Crect y='9.231' width='30' height='1.538' fill='%23b22234'/%3E%3Crect y='12.308' width='30' height='1.538' fill='%23b22234'/%3E%3Crect y='15.385' width='30' height='1.538' fill='%23b22234'/%3E%3Crect y='18.462' width='30' height='1.538' fill='%23b22234'/%3E%3Crect width='12' height='10.769' fill='%233c3b6e'/%3E%3C/svg%3E"); }
.j-wo::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23009edb'/%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Ccircle cx='15' cy='10' r='6'/%3E%3Cellipse cx='15' cy='10' rx='2.6' ry='6'/%3E%3Cpath d='M9 10h12M10 6.8h10M10 13.2h10'/%3E%3C/g%3E%3C/svg%3E"); }
.j-cn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23de2910'/%3E%3Cg fill='%23ffde00'%3E%3Cpolygon points='5.00,2.00 5.67,4.07 7.85,4.07 6.09,5.35 6.76,7.43 5.00,6.15 3.24,7.43 3.91,5.35 2.15,4.07 4.33,4.07'/%3E%3Cpolygon points='10.00,1.00 10.22,1.69 10.95,1.69 10.36,2.12 10.59,2.81 10.00,2.38 9.41,2.81 9.64,2.12 9.05,1.69 9.78,1.69'/%3E%3Cpolygon points='12.00,3.00 12.22,3.69 12.95,3.69 12.36,4.12 12.59,4.81 12.00,4.38 11.41,4.81 11.64,4.12 11.05,3.69 11.78,3.69'/%3E%3Cpolygon points='12.00,6.00 12.22,6.69 12.95,6.69 12.36,7.12 12.59,7.81 12.00,7.38 11.41,7.81 11.64,7.12 11.05,6.69 11.78,6.69'/%3E%3Cpolygon points='10.00,8.00 10.22,8.69 10.95,8.69 10.36,9.12 10.59,9.81 10.00,9.38 9.41,9.81 9.64,9.12 9.05,8.69 9.78,8.69'/%3E%3C/g%3E%3C/svg%3E"); }
.j-gb::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23012169'/%3E%3Cpath d='M0 0l30 20M30 0L0 20' stroke='%23fff' stroke-width='4'/%3E%3Cpath d='M0 0l30 20M30 0L0 20' stroke='%23c8102e' stroke-width='1.6'/%3E%3Cpath d='M15 0v20M0 10h30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M15 0v20M0 10h30' stroke='%23c8102e' stroke-width='3.4'/%3E%3C/svg%3E"); }
.j-de::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23000'/%3E%3Crect y='6.67' width='30' height='6.67' fill='%23dd0000'/%3E%3Crect y='13.33' width='30' height='6.67' fill='%23ffce00'/%3E%3C/svg%3E"); }
.j-jp::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23fff'/%3E%3Ccircle cx='15' cy='10' r='6' fill='%23bc002d'/%3E%3C/svg%3E"); }
.j-kr::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23fff'/%3E%3Ccircle cx='15' cy='10' r='5' fill='%23cd2e3a'/%3E%3Cpath d='M10 10a5 5 0 0 0 10 0a2.5 2.5 0 0 0-5 0a2.5 2.5 0 0 1-5 0z' fill='%230047a0'/%3E%3C/svg%3E"); }
.filing.status-granted .jurisdiction { box-shadow: 0 0 0 2px #2e7d32; }
.patent-funding { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* jobs & teaching */
.job-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.job h3 { margin: 0 0 .25rem; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.course { text-decoration: none; display: block; }
.course h3 { margin: 0 0 .3rem; }
.course-grid.past .course { box-shadow: none; border: 1px solid var(--border); }
.materials-list { list-style: none; padding: 0; }
.materials-list li { padding: .45rem 0; border-bottom: 1px dashed var(--border); }
.materials-list time { display: inline-block; min-width: 4.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.site-footer { margin-top: 4rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 2rem; padding-top: 3rem; padding-bottom: 2rem; }
.footer-grid h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 0; }
.footer-links ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.footer-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }
.footer-menu h2 { font-size: 1rem; margin: 0 0 .6rem; }
.footer-links a, .footer-contact a { color: inherit; }
.footer-partners .logo-row img { --logo-h: 64px; }
.footer-funding { background: #fff; color: #333; padding: 1.5rem 0; }
.footer-funding .funding-ack { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 2rem; align-items: center; margin: 0; }
.footer-funding .funding-text { font-size: .75rem; color: #444; margin: 0; }
@media (max-width: 760px) { .footer-grid, .footer-funding .funding-ack { grid-template-columns: 1fr; } }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1rem; padding-bottom: 1.5rem; font-size: .85rem; opacity: .8; }
.footer-bottom a { color: inherit; }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.search-results { list-style: none; padding: 0; }
.search-results li { padding: .6rem 0; border-bottom: 1px solid var(--border); }
.search-results p { margin: .2rem 0 0; }

.login form { display: grid; gap: .8rem; max-width: 22rem; }
.login input { font: inherit; padding: .5rem .7rem; width: 100%; }
.narrow { max-width: 40rem; padding-top: 3rem; padding-bottom: 3rem; }
.error { color: #b00020; }

.team-section { margin-top: 2.5rem; }
.team-heading { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; }
.team-heading a { text-decoration: none; }

.table-wrap { overflow-x: auto; }
.table-wrap table { border-collapse: collapse; width: 100%; }
.table-wrap td, .table-wrap th { padding: .5rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.presentation .affiliation { color: var(--muted); }
.presentation time { font-variant-numeric: tabular-nums; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; margin: 1.5rem 0; }
.gallery a, .gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.gallery a { overflow: hidden; cursor: zoom-in; }
.gallery img { transition: transform .25s ease, filter .25s ease; }
.gallery a:hover img { filter: brightness(1.1); transform: scale(1.04); }

/* ---------- hero legibility & fade into the page ---------- */
.hero.has-image::before {
  background:
    linear-gradient(180deg, rgb(0 0 0 / .72) 0, rgb(0 0 0 / .25) 22%, rgb(0 0 0 / .15) 50%, rgb(0 0 0 / .35) 78%, transparent 100%);
}
.hero.has-image::after {
  /* smooth transition from the photo into the page background */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 38%; z-index: -1;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 55%, transparent) 55%, var(--bg));
}
.hero.has-image h1, .hero.has-image .tagline { text-shadow: 0 2px 18px rgb(0 0 0 / .55), 0 1px 3px rgb(0 0 0 / .5); }
/* a soft dark halo behind the title and a frosted pill under the tagline, so both stay readable on any photo */
.hero.has-image .hero-inner { position: relative; }
.hero.has-image .hero-inner::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(100%, 60rem); height: 150%;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgb(0 0 0 / .45), rgb(0 0 0 / .25) 55%, transparent);
}
.hero.has-image .tagline {
  display: inline-block; margin: 0; padding: .35em 1.1em; border-radius: 999px;
  font-size: 1.3rem; font-weight: 500; opacity: 1; letter-spacing: .01em;
  background: rgb(0 0 0 / .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  text-shadow: 0 1px 2px rgb(0 0 0 / .6);
}
.hero.has-image hr { border-color: rgb(255 255 255 / .8); }
.hero-scroll { display: none; }

/* ---------- logo rows ---------- */
.logo-row { gap: 1.5rem 3.5rem; padding: 2rem 0; }
.logo-row img { --logo-h: 64px; max-width: 270px; }
.logo-row.affiliations { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 1rem 0 2rem; }

/* ---------- news ---------- */
.news-cards { display: grid; gap: 1.25rem; }
.news-card { display: grid; grid-template-columns: 1fr; gap: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.news-card.has-image { grid-template-columns: 220px 1fr; }
.news-card .news-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; }
.news-card time { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.news-card h2 { font-size: 1.2rem; margin: .2rem 0 .4rem; }
.news-card h2 a { text-decoration: none; color: inherit; }
.news-card h2 a:hover { text-decoration: underline; }
.news-card p { margin: 0 0 .4rem; }
.news-cite { font-size: .88rem; color: var(--muted); }
@media (max-width: 640px) { .news-card.has-image { grid-template-columns: 1fr; } }
.related-pub { margin: 2rem 0; }
.related-pub img { border-radius: 6px; margin-bottom: 1rem; }
.related-pub .label { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--muted); margin: 0 0 .3rem; }

/* ---------- grants ---------- */
.grant-kicker { margin: 0 0 .3rem; font-size: .85rem; color: var(--muted); }
.badge-active { background: #e3f4e8; color: #1e6b35; }
.grant-more { font-weight: 600; text-decoration: none; }
.grant .funding-ack { border-top: 1px solid var(--border); padding-top: .9rem; }
.grant-logos img { max-width: 160px; max-height: 70px; height: auto; }

/* ---------- headings with icons ---------- */
.icon-heading { display: flex; align-items: center; gap: .6rem; }
.icon-heading .heading-icon { height: 1.6em; width: auto; }
.logo-strip-block { margin: 2.5rem 0; }
.logo-caption { text-align: center; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--muted); margin: 0; }
.logo-strip-block .logo-row { padding-top: 1rem; }
.job-list.closed .job { box-shadow: none; border: 1px solid var(--border); }
.job-list.closed h3 a { color: var(--muted); }
.grant-original-title { margin: -.3rem 0 .8rem; font-style: italic; color: var(--muted); font-size: .92rem; }
.grant-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: .8rem 0 0; }
.grant-links:empty { display: none; }

/* ---------- code blocks ---------- */
figure.code { margin: 1.25rem 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fafbfc; color: #1d1d24; }
figure.code figcaption { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem .9rem; font-size: .78rem; background: #eef0f4; color: #555a66; border-bottom: 1px solid var(--border); }
.code-title { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; }
.code-lang { margin-left: auto; text-transform: uppercase; letter-spacing: .06em; }
figure.code .highlight { margin: 0; background: transparent; }
figure.code pre { margin: 0; padding: .9rem 1rem; overflow-x: auto; font: 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4; }
figure.code-bash { background: #1f2430; color: #e6e6e6; border-color: #1f2430; }
figure.code-bash figcaption { background: #2a3040; color: #aab; border-color: #333a4a; }
/* bash on dark: override the light pygments palette */
figure.code-bash .highlight .c1, figure.code-bash .highlight .c { color: #8b93a7; font-style: italic; }
figure.code-bash .highlight .nb, figure.code-bash .highlight .k { color: #7fd1ff; font-weight: 600; }
figure.code-bash .highlight .s2, figure.code-bash .highlight .s1, figure.code-bash .highlight .s { color: #a6e3a1; }
figure.code-bash .highlight .o, figure.code-bash .highlight .p { color: #e6e6e6; }
figure.code-bash .highlight .nv, figure.code-bash .highlight .m { color: #f9c97a; }

/* ---------- file-type badges on download links (all pages) ---------- */
a[href$=".pdf" i]::before, a[href$=".zip" i]::before, a[href$=".doc" i]::before, a[href$=".docx" i]::before,
a[href$=".odt" i]::before, a[href$=".ppt" i]::before, a[href$=".pptx" i]::before, a[href$=".odp" i]::before,
a[href$=".ipynb" i]::before, a[href$=".py" i]::before, a[href$=".nb" i]::before, a[href$=".m" i]::before,
a[href$=".json" i]::before, a[href$=".csv" i]::before, a[href$=".txt" i]::before, a[href$=".vi" i]::before,
a[href$=".mp4" i]::before, a[href$=".tex" i]::before {
  display: inline-block; margin-right: .35em; padding: .05em .4em; border-radius: 3px;
  font: 700 .66em/1.5 ui-sans-serif, system-ui, sans-serif; letter-spacing: .04em; vertical-align: .15em;
  color: #fff; background: #6b7280; text-decoration: none;
}
a[href$=".pdf" i]::before { content: "PDF"; background: #d93025; }
a[href$=".zip" i]::before { content: "ZIP"; background: #b7791f; }
a[href$=".doc" i]::before, a[href$=".docx" i]::before, a[href$=".odt" i]::before { content: "DOC"; background: #2b579a; }
a[href$=".ppt" i]::before, a[href$=".pptx" i]::before, a[href$=".odp" i]::before { content: "PPT"; background: #c43e1c; }
a[href$=".ipynb" i]::before { content: "IPYNB"; background: #f37626; }
a[href$=".py" i]::before { content: "PY"; background: #3572a5; }
a[href$=".nb" i]::before, a[href$=".m" i]::before { content: "NB"; background: #dd1100; }
a[href$=".json" i]::before { content: "JSON"; }
a[href$=".csv" i]::before { content: "CSV"; background: #217346; }
a[href$=".txt" i]::before { content: "TXT"; }
a[href$=".tex" i]::before { content: "TEX"; background: #008080; }
a[href$=".vi" i]::before { content: "VI"; background: #c9a400; }
a[href$=".mp4" i]::before { content: "VIDEO"; background: #6d28d9; }
/* not inside buttons, logo links or image links */
.button::before, .logo-row a::before, .gallery a::before, .news-thumb::before { content: none !important; }
.icon-heading.icon-only .heading-icon { height: 2.4em; }
/* list layout: no placeholder photo, text takes the full width */
.people-list .person.no-photo { grid-template-columns: 1fr; }
.people-list .person.no-photo .person-photo { display: none; }
.people-compact a { color: inherit; }
