/*
Theme Name: DBT
Theme URI: https://github.com/modellstadt/dbt-website
Author: modellstadt
Description: Research group website — clean, minimal, image-driven. Based on the original dbt.arch.ethz.ch structure.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: MIT
Text Domain: dbt
*/

/* ── Reset & Base ─────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #ffffff;
  --color-text: #222;
  --color-muted: #666;
  --color-accent: #000;
  --color-border: #e0e0e0;
  --color-nav-bg: #fff;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  /* Content, header and footer at most this wide (centred); full-screen heroes run to the edges.
     --edge: the distance of the content from the screen edge, for things laid over a hero. */
  --max-width: 1600px;
  --edge: max(24px, calc((100% - var(--max-width)) / 2 + 24px));
  --nav-height: 64px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }

/* ── Layout ───────────────────────────────── */

.site-container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ── 12-column grid (the column classes in use: footer, sponsor logos in two old texts) ── */

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
}

/* All cols default to full width (mobile-first). Only inside a .row: elsewhere a class
   that merely contains "col-" must not span the grid. (:where keeps the rule as light as
   before, so .col-md-6 etc. below still win.) */
:where(.row) > [class*="col-"] {
  grid-column: span 12;
  min-width: 0;
}

/* Tablet and up (≥ 768px) */
@media (min-width: 768px) {
  .col-md-3  { grid-column: span 3;  }
  .col-md-6  { grid-column: span 6;  }   /* also in two old texts: sponsor logos two by two */
  .col-md-9  { grid-column: span 9;  }
}


/* Section spacing utility (vertical only) */
.section { padding-top: 48px; padding-bottom: 48px; }

/* Sticky sidebar utility — only sticky on desktop */
@media (min-width: 1024px) {
  .sticky-side {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    max-height: calc(var(--screen-h) - var(--nav-height) - var(--eth-bar-h) - 48px);
    overflow-y: auto;
  }
}
/* Logged in: the WordPress bar is fixed above everything (32px; 46px on tablets),
   so the menu bar and the columns that stay in view sit below it */
@media (min-width: 783px) {
  .admin-bar .site-header { top: 32px; }
}
@media (min-width: 601px) and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (min-width: 1024px) {
  .admin-bar .sticky-side {
    top: calc(var(--nav-height) + 56px);
    max-height: calc(var(--screen-h) - var(--nav-height) - var(--eth-bar-h) - 80px);
  }
}

/* ── Header / Nav ─────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-nav-bg);
  height: var(--nav-height);
  display: flex; align-items: center;
}
/* The lines of the menu bar, the footer and the ETH stripe end where the content
   ends (--edge), like every other line on the page, instead of running to the
   screen edge */
.site-header::after, .eth-bar::before, .site-footer::before {
  content: ""; position: absolute; left: var(--edge); right: var(--edge); height: 1px;
  background: var(--color-border); pointer-events: none; transition: opacity 0.2s;
}
.site-header::after { bottom: 0; }
.eth-bar::before, .site-footer::before { top: 0; }

.site-header .site-container {
  display: flex; align-items: center; gap: 20px; width: 100%;
}

/* Logos: dbt mark upper right in the header; full name and ETH logo in a
   fixed bottom stripe that mirrors the header. ETH rules outside the ETH
   design: a clear space of one "E" height (= the logo's height) around the
   ETH logo, so the stripe is three logo heights tall. */
:root { --eth-h: 12px; --eth-bar-h: calc(var(--eth-h) * 3); }
/* Height of the visible screen. On phones the browser's toolbars cover part of 100vh, so
   what sits at the bottom of a full-screen part (the slideshow's title) would slide under
   the ETH stripe; 100svh is the screen with the toolbars shown. */
:root { --screen-h: 100vh; }
@supports (height: 100svh) { :root { --screen-h: 100svh; } }
.site-header { --logo-h: 20px; }
.site-branding { margin-left: auto; }
.site-branding a { display: block; line-height: 0; color: var(--color-accent); }
.site-branding svg { display: block; height: var(--logo-h); width: auto; }
.eth-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  height: var(--eth-bar-h); padding: 0 var(--edge);
  display: flex; align-items: center; justify-content: space-between; gap: var(--eth-h);
  background: var(--color-nav-bg);
}
.eth-bar-name {
  margin: 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 0.75rem; font-weight: 500; line-height: 1.4; color: var(--color-text);   /* room for g, y below the line (overflow is hidden for the …) */
}
.eth-bar-institute { font-weight: 400; color: var(--color-muted); }
/* Tablets: name and institute; the department only where it fits */
@media (max-width: 767px) { .eth-bar-department { display: none; } }
.eth-bar a { display: block; line-height: 0; color: var(--color-accent); }
.eth-bar svg { display: block; height: var(--eth-h); width: auto; }
@media (max-width: 600px) {
  .site-header { --logo-h: 18px; }
  .eth-bar-institute { display: none; } /* phones: the name only */
}

/* ── Side menu (slides in from the left) ──── */

.side-nav {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 400;
  width: min(420px, 100vw);
  background: var(--color-nav-bg);
  padding: 72px 32px 48px;
  overflow-y: auto;
  transform: translateX(-100%); visibility: hidden;
  transition: transform 0.3s ease, visibility 0s linear 0.3s;
}
.side-nav.open {
  transform: none; visibility: visible;
  transition: transform 0.3s ease;
}

.side-nav-close {
  position: absolute; top: 14px; right: 20px;
  background: none; border: none; cursor: pointer;
  font-size: 2.2rem; line-height: 1; color: var(--color-text);
}

.side-nav ul { list-style: none; }
.side-nav > ul > li {
  border-top: 2px solid var(--color-text);
  padding: 16px 0 20px;
}
.side-nav > ul > li > a {
  font-size: 1.15rem; font-weight: 500; color: var(--color-text);
}
.side-nav .sub-menu { margin-top: 8px; padding-left: 10px; }
.side-nav .sub-menu a {
  display: block; padding: 4px 0;
  font-size: 0.9rem; color: var(--color-muted);
}
.side-nav a:hover,
.side-nav .current-menu-item > a { color: var(--color-accent); text-decoration: underline; }

.side-nav-backdrop {
  position: fixed; inset: 0; z-index: 399;
  background: rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.side-nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* ── Slideshow (shared) ──────────────────── */

.dbt-slideshow {
  position: relative; overflow: hidden;
  background: #111; outline: none;
}

/* Fade mode (default) */
.dbt-slideshow .ss-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.8s ease;
}
.dbt-slideshow .ss-slide.active { opacity: 1; }

/* Slide mode */
.dbt-slideshow[data-transition="slide"] { overflow: hidden; }
.dbt-slideshow[data-transition="slide"] .ss-slide {
  transition: transform 0.6s ease, opacity 0.6s ease;
  transform: translateX(100%);
}
.dbt-slideshow[data-transition="slide"] .ss-slide.active {
  transform: translateX(0); opacity: 1;
}

.dbt-slideshow img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Videos in slideshows and at the top of entries fill the frame like the images */
.dbt-slideshow video, .single-hero video { width: 100%; height: 100%; object-fit: cover; display: block; background: #111; }

/* Caption */
.ss-caption a { color: inherit; text-decoration: none; }
.ss-caption {
  position: absolute; bottom: 24px; left: 24px; right: 24px;
  color: #fff; font-size: 1.4rem; font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  z-index: 3;
}

/* Arrows */
.ss-prev, .ss-next {
  position: absolute; top: 50%; z-index: 4;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.3); color: #fff;
  border: none; cursor: pointer;
  width: 44px; height: 44px; font-size: 1.6rem; line-height: 1;
  border-radius: 50%; transition: background 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.ss-prev:hover, .ss-next:hover { background: rgba(0,0,0,0.6); }
.ss-prev { left: 16px; }
.ss-next { right: 16px; }

/* Dots */
.ss-dots {
  position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 4;
}
.ss-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7); background: transparent;
  cursor: pointer; padding: 0; transition: background 0.2s;
}
.ss-dot.active, .ss-dot:hover { background: #fff; }

/* Progress bar */
.ss-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,0.15); z-index: 4;
}
.ss-progress-bar { height: 100%; width: 0; background: rgba(255,255,255,0.6); }

/* Credit of the current slide, bottom right */
.ss-credit {
  position: absolute; right: 12px; bottom: 10px; z-index: 3;
  font-size: 0.7rem; color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* ── Slideshow — hero size ───────────────── */

.dbt-slideshow.ss-hero {
  width: 100%; aspect-ratio: 16/7;
}
/* Front-page carousel: inside the white frame like the full-screen hero */
main > .dbt-slideshow.ss-hero { width: auto; margin: 24px; }

/* ── Slideshow — fullscreen hero ─────────── */

.hero-fullscreen .dbt-slideshow {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
/* Dots on the right edge (in line with the dbt and ETH logos), clear of the
   caption on the left, also on phones */
.hero-fullscreen .dbt-slideshow .ss-dots { bottom: 24px; left: auto; right: var(--edge); transform: none; }
.hero-fullscreen .dbt-slideshow .ss-caption { left: var(--edge); right: calc(var(--edge) + 116px); }

/* ── Slideshow — in-content ──────────────── */

.dbt-slideshow.ss-inline {
  width: 100%; aspect-ratio: 16/9;
  margin: 32px 0;
}
/* a gallery shown as a slideshow (functions.php): the figure keeps the spacing */
.wp-block-gallery.is-style-slideshow .dbt-slideshow { margin: 0; }
.dbt-slideshow.ss-inline .ss-caption {
  font-size: 0.9rem; bottom: 12px; left: 16px; right: 16px;
}

/* ── Full-screen Hero ────────────────────── */

.hero-fullscreen {
  position: relative;
  width: 100%; height: var(--screen-h);
  overflow: hidden;
  background: #111 center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
}

/* Full-screen variant (default): the hero fills the whole screen, under the
   transparent header and the transparent ETH stripe. The nav is
   position:fixed here (out of the flow), so the hero starts at the top.
   Padding keeps hero text between the two bars; soft gradients at top and
   bottom keep the white logos and text readable over bright images. */
body.dbt-hero-behind-menu .hero-fullscreen {
  height: var(--screen-h);
  padding-top: var(--nav-height); padding-bottom: var(--eth-bar-h);
}
body.dbt-hero-behind-menu .hero-fullscreen::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.35), transparent 140px),
    linear-gradient(to top, rgba(0,0,0,0.4), transparent 220px);
}
/* The title (and the dots beside it) keep clear of the ETH stripe: 32px on phones, up to 48px */
body.dbt-hero-behind-menu .hero-fullscreen { --hero-gap: clamp(32px, 3.5vw, 48px); }
body.dbt-hero-behind-menu .hero-fullscreen .ss-caption { bottom: calc(var(--eth-bar-h) + var(--hero-gap)); }
body.dbt-hero-behind-menu .hero-fullscreen .dbt-slideshow .ss-dots { bottom: calc(var(--eth-bar-h) + var(--hero-gap) + 8px); }

/* Framed variant (option): the hero sits in the white frame, 24px from the
   header, the ETH stripe and both sides, aligned with the page gutters. */
body.dbt-hero-fullscreen:not(.dbt-hero-behind-menu) .hero-fullscreen {
  width: auto; margin: 24px;
  height: calc(var(--screen-h) - var(--nav-height) - var(--eth-bar-h) - 48px);
}

.hero-fullscreen .hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}

.hero-overlay-text {
  position: relative; z-index: 3; /* above the full-screen gradients */
  color: #fff; text-align: center;
  max-width: 700px; padding: 24px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.hero-overlay-text h1 { font-size: 3rem; margin-bottom: 12px; color: #fff; }
.hero-overlay-text p  { font-size: 1.2rem; opacity: 0.9; }

/* Text position variants */
.hero-text-center { align-items: center; justify-content: center; }
.hero-text-bottom-left {
  align-items: flex-end; justify-content: flex-start;
}
.hero-text-bottom-left .hero-overlay-text { text-align: left; padding: 48px; }
.hero-text-bottom-center {
  align-items: flex-end; justify-content: center;
}
.hero-text-bottom-center .hero-overlay-text { padding-bottom: 48px; }

/* Transparent header only when hero extends behind menu */
body.dbt-hero-behind-menu .site-header {
  position: fixed; width: 100%;
  background: transparent;
}
body.dbt-hero-behind-menu .site-header::after { opacity: 0; }
body.dbt-hero-behind-menu .site-header .site-branding a {
  color: #fff;
}
body.dbt-hero-behind-menu .site-header .menu-toggle span {
  background: #fff;
}
/* …and solid again once the hero is scrolled past (nav.js) */
body.dbt-hero-behind-menu .site-header { transition: background 0.2s; }
body.dbt-hero-behind-menu .site-header.is-solid {
  background: var(--color-nav-bg);
}
body.dbt-hero-behind-menu .site-header.is-solid::after { opacity: 1; }
body.dbt-hero-behind-menu .site-header.is-solid .site-branding a { color: var(--color-accent); }
body.dbt-hero-behind-menu .site-header.is-solid .menu-toggle span { background: var(--color-accent); }

/* The ETH stripe is transparent with white text and logo while the full-screen
   hero fills the bottom of the screen (nav.js sets .is-over-hero), and white
   again as soon as page content scrolls under it. Without JS it stays white. */
.eth-bar { transition: background 0.2s; }
.eth-bar.is-over-hero { background: transparent; }
.eth-bar.is-over-hero::before { opacity: 0; }
.eth-bar.is-over-hero .eth-bar-name,
.eth-bar.is-over-hero a { color: #fff; }
.eth-bar.is-over-hero .eth-bar-institute { color: rgba(255,255,255,0.8); }

@media (max-width: 600px) {
  .hero-overlay-text h1 { font-size: 2rem; }
  .hero-overlay-text p  { font-size: 1rem; }
}

/* ── Poster (parts/poster.php) ──────────────
   Sizes are in cqw (1% of the poster's width), so one design scales
   from a grid tile to an A1 print. Web tiles show image and title;
   the print sheet (.poster--print) adds logo, institute line and data. */

.poster {
  position: relative; display: block; overflow: hidden;
  container-type: inline-size;
  aspect-ratio: 1 / 1.4142;
  background: #222; color: #fff;
}
.poster:hover { text-decoration: none; }

.poster-image {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
a.poster:hover .poster-image { transform: scale(1.03); }

/* Scrims keep the white text readable on any image, even white ones.
   The bottom scrim belongs to the text block: it starts 32cqw above the
   first line, so a three-line title gets a taller shade than a one-word one.
   Eased stops (no visible edge); already ~55% dark where the text begins. */
.poster--print::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 25%;
  pointer-events: none; z-index: 1;
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0));
}

.poster-head, .poster-foot { position: absolute; z-index: 2; left: 4cqw; right: 4cqw; }
.poster-foot { bottom: 4cqw; }
.poster-foot::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  top: -32cqw; bottom: -4cqw; left: -4cqw; right: -4cqw;
  background: linear-gradient(
    rgba(0,0,0,0)    0,
    rgba(0,0,0,0.05) 8cqw,
    rgba(0,0,0,0.16) 16cqw,
    rgba(0,0,0,0.34) 24cqw,
    rgba(0,0,0,0.55) 32cqw,
    rgba(0,0,0,0.75) 100%
  );
}
/* Last resort for very bright spots; invisible on dark images */
.poster-kicker, .poster-title { text-shadow: 0 0 2cqw rgba(0,0,0,0.25); }

.poster-kicker {
  margin-bottom: 1.5cqw;
  font-size: max(2.4cqw, 10.5px); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #fff;
}
.poster-title {
  font-size: max(6cqw, 15px); font-weight: 600; line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff; overflow-wrap: break-word; hyphens: auto;
}

/* Print sheet only */

.poster--print .poster-title {
  font-size: 10cqw; font-weight: 700; line-height: 0.95;
  text-transform: uppercase; letter-spacing: -0.02em;
}

.poster-head {
  top: 4cqw;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.poster-logo svg { display: block; height: 4.5cqw; width: auto; }
.poster-org { font-size: 1.8cqw; font-weight: 600; line-height: 1.3; text-align: right; }

.poster-subtitle { margin-top: 2.5cqw; font-size: 3.6cqw; line-height: 1.25; }
/* Typed on the poster before printing (not stored) */
.poster-subtitle[contenteditable] { outline: none; cursor: text; }
.poster-subtitle[contenteditable]:empty::before { content: attr(data-placeholder); opacity: 0.5; }
.poster-subtitle[contenteditable]:focus { box-shadow: 0 1px 0 rgba(255,255,255,0.6); }
.poster-meta {
  margin-top: 3cqw;
  font-family: var(--font-mono); font-size: 2.2cqw;
  text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.85;
}

/* ── Poster grid: 6 columns, large posters span 2×2 ──
   Row height follows the column width so every cell keeps A-paper proportions. */

.poster-wall { container-type: inline-size; padding: 24px 0; }

.poster-grid {
  --cols: 6; --gap: 16px;
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: calc((100cqw - (var(--cols) - 1) * var(--gap)) / var(--cols) * 1.4142);
  grid-auto-flow: dense;
}
.poster-grid > .poster { aspect-ratio: auto; height: 100%; }
.poster-grid > .poster--large { grid-column: span 2; grid-row: span 2; }
.poster-grid > .no-results { grid-column: 1 / -1; }

.poster-detail { display: none; }

/* ── List view (.poster-wall.is-list, toggled by view-switch.js) ──
   Each tile becomes a row: small portrait thumbnail, info line, title, detail. */

.poster-wall.is-list .poster-grid { display: block; }
.poster-wall.is-list .poster {
  display: grid; grid-template-columns: 34px 10rem 1fr minmax(0, 20rem);
  gap: 16px; align-items: center;
  aspect-ratio: auto; height: auto; overflow: visible;
  container-type: normal;
  padding: 8px 0; border-bottom: 1px solid var(--color-border);
  background: none; color: var(--color-text);
}
.poster-wall.is-list .poster:hover { background: #fafafa; }
.poster-wall.is-list .poster-foot::before { content: none; }
.poster-wall.is-list .poster-kicker,
.poster-wall.is-list .poster-title { text-shadow: none; }
.poster-wall.is-list .poster-image {
  position: static; display: block; grid-column: 1;
  width: 34px; height: 48px;
}
.poster-wall.is-list a.poster:hover .poster-image { transform: none; }
.poster-wall.is-list .poster-foot { display: contents; }
.poster-wall.is-list .poster-kicker {
  grid-column: 2; margin: 0;
  font-size: 0.75rem; color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}
.poster-wall.is-list .poster-title {
  grid-column: 3;
  font-size: 0.95rem; font-weight: 500; color: var(--color-text);
}
.poster-wall.is-list .poster-detail {
  display: block; grid-column: 4;
  font-size: 0.8rem; color: var(--color-muted); text-align: right;
}

@media (max-width: 600px) {
  .poster-wall.is-list .poster { grid-template-columns: 34px 1fr; gap: 2px 12px; }
  .poster-wall.is-list .poster-image { grid-row: 1 / 4; }
  .poster-wall.is-list .poster-kicker,
  .poster-wall.is-list .poster-title,
  .poster-wall.is-list .poster-detail { grid-column: 2; text-align: left; }
}

@media (max-width: 1024px) { .poster-grid { --cols: 4; } }
@media (max-width: 600px)  { .poster-grid { --cols: 2; --gap: 12px; } }
/* Only the top row is large: three on a desktop, two in four columns, one on a phone */
@media (max-width: 1024px) { .poster-grid > .poster--large:nth-child(n+3 of .poster--large) { grid-column: span 1; grid-row: span 1; } }
@media (max-width: 600px)  { .poster-grid > .poster--large:nth-child(n+2 of .poster--large) { grid-column: span 1; grid-row: span 1; } }

.poster-wall-more { text-align: right; font-weight: 500; }

/* ── Front-page statement ────────────────── */

.front-statement {
  max-width: 26ch; margin: 10vh auto 12vh;
  font-size: clamp(1.6rem, 3.2vw, 2.75rem); font-weight: 600;
  line-height: 1.2; letter-spacing: -0.01em;
}

/* ── Poster view (poster-view.php) ───────── */

body.poster-view { background: #e6e6e6; }

.poster-toolbar {
  display: flex; align-items: center; gap: 24px;
  padding: 12px 24px; background: #fff;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.poster-toolbar a { margin-right: auto; }
.poster-toolbar select { margin-left: 6px; font: inherit; }
.poster-toolbar button {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 6px 14px; border: 1px solid var(--color-text);
  background: var(--color-text); color: #fff;
}

.poster-sheet {
  height: calc(100vh - 110px); aspect-ratio: 1 / 1.4142;
  margin: 24px auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.poster-sheet .poster { width: 100%; height: 100%; aspect-ratio: auto; }

@media print {
  body.poster-view { background: none; }
  .poster-toolbar { display: none; }
  .poster-subtitle:empty { display: none; }
  .poster-subtitle[contenteditable]:focus { box-shadow: none; }
  .poster-sheet { width: 100vw; height: 100vh; margin: 0; box-shadow: none; }
  .poster { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Pages (page.php) ─────────────────────── */

.single-content h1 { margin-bottom: 16px; }
.single-content .meta { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 32px; }
.single-content--narrow { max-width: 800px; margin: 0 auto; }

/* Images in text and their captions. One caption under an image: caption text,
   then the credit in grey (functions.php, "Image credits"). */
.entry-content img { display: block; width: 100%; height: auto; }
.entry-content figure:not(.wp-block-gallery figure) { margin: 32px 0; max-width: 100%; width: auto !important; }
.entry-content figure img { display: block; }
.entry-content figcaption,
.image-caption {
  display: block; margin-top: 8px;
  font-size: 0.8rem; line-height: 1.45; color: var(--color-text);
}
.image-credit { color: var(--color-muted); }
.image-credit a { color: inherit; }

/* Gallery blocks: caption and credit under each image too (WordPress lays them
   over the image, on a blurred band). */
.entry-content .wp-block-gallery { margin: 32px 0; }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { content: none; }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  position: static; max-height: none; overflow: visible;
  margin-top: 6px; padding: 0; background: none;
  color: var(--color-text); text-shadow: none; text-align: left; font-size: 0.75rem;
}

/* Texts (pages and entries): one clean column, whatever the old editors left behind.
   Images and videos always fill it (no small or overflowing ones). */
.entry-content { overflow-wrap: break-word; }
.entry-content > :first-child { margin-top: 0; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1em; }
.entry-content h1, .entry-content h2 { font-size: 1.15rem; font-weight: 600; line-height: 1.3; margin: 1.8em 0 0.5em; }
.entry-content h3, .entry-content h4,
.entry-content h5, .entry-content h6 { font-size: 1rem; font-weight: 600; line-height: 1.35; margin: 1.5em 0 0.4em; }
.entry-content iframe, .entry-content video,
.entry-content embed, .entry-content object {
  display: block; width: 100% !important; height: auto !important;
  aspect-ratio: 16 / 9; margin: 24px 0; border: 0;
}
.entry-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
/* Boxes with a fixed width left by old editors (e.g. Media Credit's mceMediaCreditOuterTemp) */
.entry-content div[style*="width"] { max-width: 100%; }

/* ── Page not found (404.php) ─────────────── */

.not-found { max-width: 40rem; padding: 8px 0 48px; }
.not-found p { margin: 0 0 24px; }
.not-found-search { display: flex; gap: 8px; margin: 0 0 32px; }
.not-found-search input {
  flex: 1; min-width: 0; font: inherit; padding: 10px 12px;
  border: 1px solid var(--color-border); border-radius: 0; background: #fff; color: var(--color-text);
}
.not-found-search input:focus { outline: none; border-color: var(--color-text); }
.not-found-search button {
  font: inherit; padding: 10px 16px; cursor: pointer;
  border: 1px solid var(--color-text); background: none; color: var(--color-text);
}
.not-found-search button:hover { background: var(--color-text); color: #fff; }
.not-found-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.not-found-links a { color: var(--color-text); text-decoration: underline; text-decoration-color: var(--color-border); text-underline-offset: 3px; }
.not-found-links a:hover { text-decoration-color: currentColor; }

/* Hidden visually, read by screen readers */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Search & Filter page ────────────────── */

.search-results.loading { opacity: 0.4; transition: opacity 0.15s; }
.no-results { color: var(--color-muted); font-size: 0.9rem; padding: 48px 0; }

/* ── Page header ──────────────────────────── */

.page-header {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 48px 0 24px; border-bottom: 1px solid var(--color-border); margin-bottom: 24px;
}
.page-header h1 { font-size: 1.6rem; }

/* Grid / list switch (parts/view-switch.php) */
.view-switch { display: flex; border: 1px solid var(--color-text); }
.view-switch button {
  font: inherit; font-size: 0.8rem; font-weight: 500;
  padding: 4px 12px; border: none; cursor: pointer;
  background: none; color: var(--color-text);
}
.view-switch button[aria-pressed="true"] { background: var(--color-text); color: #fff; }

/* Course links above the student works grid (archive-course.php) */
.term-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: -8px 0 24px; font-size: 0.85rem; }
.term-links a { color: var(--color-muted); text-decoration: none; }
.term-links a:hover,
.term-links a[aria-current="page"] { color: var(--color-text); }
.term-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.term-intro { max-width: 42rem; margin: 0 0 32px; font-size: 1.05rem; line-height: 1.55; }
.term-intro p + p { margin-top: 0.8em; }

/* Students under a student work (single.php) */

/* ── Unified filter row ──────────────────── */

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 16px 0 24px;
}

.filter-slot {
  position: relative;
  border-right: 1px solid var(--color-border);
  flex: 0 0 auto;
}
.filter-slot:last-of-type { border-right: 1px solid var(--color-border); }

.filter-trigger {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px;
  background: transparent; border: none; cursor: pointer;
  font-family: var(--font-body);
  color: var(--color-text);
  transition: background 0.1s;
}
.filter-trigger:hover { background: #fafafa; }
.filter-slot.open .filter-trigger { background: #f5f5f5; }

/* Keyword slot — text input lives inside the trigger row */
.filter-slot--keyword { flex: 1; min-width: 220px; }
.filter-trigger--input { cursor: text; }
.filter-trigger--input input {
  flex: 1; min-width: 0;
  border: none; background: transparent; outline: none;
  font-family: var(--font-body); font-size: 0.85rem;
  color: var(--color-text);
}
.filter-trigger--input input::placeholder { color: var(--color-muted); }

.filter-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--color-muted); font-weight: 600;
}
.filter-value {
  font-size: 0.8rem; font-weight: 500; color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}
.filter-value.is-default { color: var(--color-muted); font-weight: 400; }
.filter-chevron {
  font-size: 0.7rem; color: var(--color-muted);
  margin-left: auto;
  transition: transform 0.15s;
}
.filter-slot.open .filter-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.filter-panel {
  position: absolute; top: 100%; left: -1px;
  width: max-content; min-width: 220px; max-width: 360px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: none;
  padding: 16px;
  z-index: 50;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.filter-panel[hidden] { display: none; }

/* Checkbox / radio list inside panel */
.filter-options {
  display: flex; flex-direction: column; gap: 0;
}
.filter-option {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}
.filter-option input { cursor: pointer; }
.filter-option:hover { color: var(--color-accent); }
/* how many entries an option would show (filter-archive.js); none: greyed out */
.filter-option-count { margin-left: auto; padding-left: 16px; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.filter-option.is-empty { color: #bbb; }
.filter-option.is-empty .filter-option-count { color: #bbb; }

/* Filter summary (count + clear) */
.filter-summary {
  margin-left: auto;
  display: flex; align-items: center; gap: 16px;
  height: 40px; padding: 0 16px;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--color-muted);
  border-left: 1px solid var(--color-border);
}
.filter-clear {
  font-family: var(--font-body); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.5px;
  background: none; border: none; cursor: pointer;
  color: var(--color-muted); padding: 0;
  text-decoration: underline;
}
.filter-clear:hover { color: var(--color-accent); }
.filter-clear[hidden] { display: none; }

/* ── Year range slider (lives inside a filter-panel) ──── */

.year-range-display {
  font-size: 0.85rem; font-weight: 500; color: var(--color-accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}

.year-slider {
  position: relative;
  padding: 0 9px 18px;
  user-select: none; -webkit-user-select: none;
  width: 280px;
}

.year-histogram {
  display: flex; align-items: flex-end; gap: 0;
  height: 32px; padding: 0 0 4px;
}
.year-hist-bar {
  flex: 1;
  background: var(--color-border);
  margin: 0 1px;
  transition: background 0.15s;
  min-height: 2px;
}
.year-hist-bar.active { background: var(--color-accent); }

.year-track {
  position: relative;
  height: 2px;
  background: var(--color-border);
  cursor: pointer;
  margin-top: 4px;
}
.year-track-fill {
  position: absolute; top: 0; bottom: 0;
  background: var(--color-accent);
}

.year-handle {
  position: absolute; top: 50%;
  width: 14px; height: 14px;
  background: #fff;
  border: 1.5px solid var(--color-accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  transition: transform 0.1s;
  touch-action: none;
}
.year-handle:hover { transform: translate(-50%, -50%) scale(1.2); }
.year-handle:active { cursor: grabbing; }
.year-handle:focus { outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,0.1); }

.year-axis {
  display: flex; justify-content: space-between;
  font-size: 0.65rem; color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-slot { border-right: none; border-bottom: 1px solid var(--color-border); }
  .filter-slot:last-of-type { border-bottom: 1px solid var(--color-border); }
  .filter-summary { margin-left: 0; border-left: none; border-top: 1px solid var(--color-border); }
  .filter-panel { position: static; width: auto; max-width: none; box-shadow: none; border: none; padding: 12px 16px 16px; background: #fafafa; }
}

/* ── Footer ───────────────────────────────── */

.site-footer {
  position: relative;
  margin-top: 64px; font-size: 0.8rem; color: var(--color-muted);
  padding-bottom: var(--eth-bar-h); /* room for the fixed ETH stripe */
}

.footer-grid { padding: 48px 0 32px; }
/* Site map: the menu's sections and "Follow" in equal columns – all in one row on
   desktops, three per row on tablets, two on phones */
.footer-grid .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-grid .footer-col { grid-column: auto; }
@media (min-width: 768px) { .footer-grid .row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid .row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
.footer-col h4 {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--color-text); margin-bottom: 12px; font-weight: 600;
}
.footer-col h4 a { color: inherit; }
.footer-col h4 a:hover { text-decoration: none; color: var(--color-muted); }
.footer-col ul { list-style: none; }
.footer-col li { padding: 3px 0; }
.footer-col a { color: var(--color-muted); transition: color 0.15s; }
.footer-col a:hover { color: var(--color-accent); text-decoration: none; }


.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--color-border);
}
.footer-legal { margin-left: auto; }
.footer-legal a { color: var(--color-muted); margin-left: 16px; }
.footer-legal a:hover { color: var(--color-accent); }

/* ── Mobile menu toggle ──────────────────── */

.menu-toggle {
  display: block; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative; z-index: 300;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block; width: 100%; height: 2px; background: var(--color-accent);
  position: absolute; left: 0; transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

.menu-toggle.active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* ── Responsive ───────────────────────────── */

@media (max-width: 600px) {
  .dbt-slideshow.ss-hero { aspect-ratio: 16/9; }
}

/* ── Network (page-network.php): partners by kind, with the work done together ── */
.network-group { margin: 48px 0; }
.network-group-title {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--color-muted); padding-bottom: 12px; margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}
.network-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 32px;
}
.network-item { display: flex; flex-direction: column; gap: 4px; }
.network-name { font-weight: 500; }
.network-name a { color: inherit; }
.network-works { font-size: 0.8rem; line-height: 1.45; color: var(--color-muted); }
.network-works a { color: var(--color-muted); }
.network-works a:hover { color: var(--color-accent); }
.network-ext { width: 0.6em; height: 0.6em; margin-left: 0.3em; vertical-align: 0.15em; color: var(--color-muted); }
.network-name a:hover .network-ext { color: var(--color-accent); }
/* Key partners: logos, greyscale at one height so they read as a set */
.network-key {
  list-style: none; margin: 8px 0 0; padding: 24px 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px;
}
.network-key img {
  display: block; height: 36px; width: auto; max-width: 160px; object-fit: contain;
  filter: grayscale(1); opacity: 0.75; transition: filter 0.2s, opacity 0.2s;
}
.network-key a:hover img { filter: none; opacity: 1; }

/* Publications list (archive-publication.php): citations, year | title, then
   all authors and the venue underneath. No thumbnail (few have an image). */
.poster-wall--citations.is-list .poster {
  grid-template-columns: 4rem minmax(0, 1fr); gap: 2px 16px; align-items: baseline; padding: 14px 0;
}
.poster-wall--citations.is-list .poster-image { display: none; }
.poster-wall--citations.is-list .poster-kicker { grid-column: 1; grid-row: 1; }
.poster-wall--citations.is-list .poster-type { display: none; }   /* the year alone; "Press" goes in the line below */
.poster-wall--citations.is-list .poster-title { grid-column: 2; grid-row: 1; }
.poster-wall--citations.is-list .poster-detail {
  grid-column: 2; grid-row: 2; text-align: left; max-width: 52rem; line-height: 1.45;
}

/* "Open publication": the first thing in a publication's info column */
.button-open {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 1px solid var(--color-text); color: var(--color-text);
  font-size: 0.85rem; font-weight: 500; text-decoration: none;
}
.button-open svg { width: 0.65em; height: 0.65em; }
.button-open:hover { background: var(--color-text); color: #fff; text-decoration: none; }

/* ── Lightbox: images in the text open large (assets/js/lightbox.js) ── */

.entry-content img.lightbox-able { cursor: zoom-in; }
html.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  background: #111;
}
.lightbox[hidden] { display: none; }
.lightbox-figure {
  margin: 0; max-width: calc(100vw - 144px);
  display: flex; flex-direction: column; align-items: center;
}
.lightbox-img { display: block; max-width: 100%; max-height: calc(100vh - 128px); object-fit: contain; }
.lightbox-caption {
  max-width: 70ch; margin-top: 12px;
  color: #ddd; font-size: 0.8rem; line-height: 1.4; text-align: center;
}
.lightbox-caption .image-credit, .lightbox-caption a { color: #9a9a9a; }
.lightbox-close {
  position: absolute; top: 12px; right: 16px; z-index: 2;
  width: 44px; height: 44px; border: none; background: none; cursor: pointer;
  color: #fff; font-size: 2rem; line-height: 1;
}
.lightbox-count {
  position: absolute; top: 24px; left: 24px;
  color: #9a9a9a; font-family: var(--font-mono); font-size: 0.75rem;
}
.lightbox .ss-prev[hidden], .lightbox .ss-next[hidden] { display: none; }
@media (max-width: 600px) {
  .lightbox-figure { max-width: 100vw; }
  .lightbox .ss-prev, .lightbox .ss-next { display: none; }   /* swipe instead */
}

/* ── Entry pages (single.php) ─────────────────
   Every entry – projects, news, publications, topics, student works, profiles – in
   three equal columns: title, year and summary | text | Information, Team and links
   (profiles: portrait and name | bio | projects, publications …). Narrower screens:
   two equal columns (title and summary above the text | right column), then one.
   Every rule starts with body.dbt-3col (the class of entry pages, functions.php),
   which also keeps them above the general rules for texts on pages (.entry-content).

   Three sizes: the title; the summary; and one small size for all other text – the
   text, the right column, captions – the size of the footer's lists, so the images
   and the white space carry the page. Otherwise the only differences are deliberate:
   bold (title, summary, headings, bold words, labels in the right column), grey for
   what is secondary (year, captions, roles), links (thin underline). Between
   paragraphs an empty line; a thin line where a new part starts. */
body.dbt-3col {
  --t: 0.85rem; --l: 21px;           /* text: size and line height (= the empty line between paragraphs) */
  --s: 0.85rem; --ls: 21px;          /* right column and captions: the same */
  --lead: 17px; --lead-l: 26px;      /* the summary; also the space between title, summary and portrait */
  --space: 32px;                     /* around images, and between the blocks of a column */
  --col-gap: 64px;                   /* between the columns */
  --above-line: 20px;                /* from text to a line between parts */
  --above-heading: 20px;             /* from that line to the heading below it */
  --below-heading: 6px;              /* from a heading to its text */
  --grey: #8a8a8a; --underline: #d0d0d0;
}

/* Columns: three, two, one */
body.dbt-3col .single-columns { position: relative; display: grid; gap: var(--col-gap); align-items: start; }
/* With assets/js/columns.js the columns scroll together: one shorter than the screen stays
   in view, a longer one scrolls in proportion, the longest normally – so nothing needs a
   scrollbar of its own. Without the script: title and right column stay in view (below). */
body.dbt-3col .single-columns.cols-synced > :is(.single-lead, .single-main, .single-info) {
  position: relative; top: auto; max-height: none; overflow: visible; will-change: transform;
  overflow-anchor: none;   /* the browser must not hold the page to a column that moves, or the two chase each other */
}
/* …moved by the browser itself, in step with the scrolling: evenly between two scroll
   positions (--col-from, --col-to), from --col-a down to --col-b (columns.js) */
@keyframes dbt-col-move { from { transform: translateY(var(--col-a)); } to { transform: translateY(var(--col-b)); } }
body.dbt-3col .single-columns.cols-synced > .is-scroll-linked {
  animation: dbt-col-move linear both;
  animation-timeline: scroll(root block);   /* (after the shorthand, which resets it) */
  animation-range: var(--col-from) var(--col-to);
}
body.dbt-3col .single-main { min-width: 0; }
@media (min-width: 1280px) {
  body.dbt-3col .single-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.dbt-3col .single-lead { position: sticky; top: calc(var(--nav-height) + 24px); }
  body.admin-bar.dbt-3col .single-lead { top: calc(var(--nav-height) + 56px); }
}
@media (min-width: 768px) and (max-width: 1279px) {
  /* (rows: auto 1fr – a long right column lengthens the text's row, not the title's) */
  body.dbt-3col .single-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr; row-gap: var(--space); }
  body.dbt-3col .single-lead { grid-column: 1; grid-row: 1; }
  body.dbt-3col .single-main { grid-column: 1; grid-row: 2; }
  body.dbt-3col .single-info { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 767px) {
  body.dbt-3col .single-columns { grid-template-columns: minmax(0, 1fr); row-gap: var(--space); }
  body.dbt-3col .single-info { margin-top: var(--space); }
}

/* Main image or slideshow: across the page above the columns (cut to the wide
   format), or at the top of the text column (whole, in its own proportions) */
body.dbt-3col .single-media { margin-bottom: var(--space); }
/* (no spacing of its own: that is for slideshows between paragraphs, .ss-inline) */
body.dbt-3col .single-media .dbt-slideshow { width: 100%; aspect-ratio: 16 / 9; margin: 0; }
body.dbt-3col .single-hero { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
body.dbt-3col .single-hero img { width: 100%; height: 100%; object-fit: cover; }
body.dbt-3col .single-hero--whole { aspect-ratio: auto; }
body.dbt-3col .single-hero--whole img { display: block; height: auto; }
body.dbt-3col .image-caption--hero { margin: 8px 0 0; }
/* A page that opens with a full-width picture: the same white margin above it as at
   the sides, so it sits in an even frame (and fits a laptop screen with its dots) */
body.dbt-3col .site-container.section:has(> .single-entry--wide > .single-media:first-child) { padding-top: 24px; }

/* Type: one size, one line spacing, one weight, no capitals … */
body.dbt-3col .single-columns :is(h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, blockquote,
  table, th, td, div, span, small, a, em, i, b, strong, cite, figcaption) {
  font-size: var(--t); line-height: var(--l); font-weight: 400;
  letter-spacing: normal; text-transform: none;
}
/* … the title … */
body.dbt-3col .single-columns .single-head h1 {
  font-size: 34px; line-height: 39px; font-weight: 600; letter-spacing: -0.01em; margin: 0;
}
/* … bold: the summary, headings and bold words in the text … */
body.dbt-3col .single-columns p.single-summary { font-size: var(--lead); line-height: var(--lead-l); font-weight: 600; }
body.dbt-3col .single-columns .entry-content :is(h1, h2, h3, h4, h5, h6, b, strong),
body.dbt-3col .single-columns .entry-content :is(h1, h2, h3, h4, h5, h6, b, strong) * { font-weight: 600; }
/* … small: the right column, and captions and photo credits (grey, the same under
   every image; "caption · credit") … */
body.dbt-3col .single-columns .single-info :is(h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, blockquote,
  table, th, td, div, span, small, a, em, i, b, strong, cite) { font-size: var(--s); line-height: var(--ls); }
body.dbt-3col .single-columns :is(figcaption, .image-caption, .wp-caption-text, .ss-caption),
body.dbt-3col .single-columns :is(figcaption, .image-caption, .wp-caption-text, .ss-caption) *,
body.dbt-3col .single-columns .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  font-size: var(--s); line-height: var(--ls); color: var(--grey);
}
body.dbt-3col .single-columns :is(figcaption, .image-caption, .wp-caption-text) { margin-top: 8px; }
body.dbt-3col .image-credit--after::before { content: "· "; }
body.dbt-3col .ss-credit { font-size: var(--s); line-height: 1.3; }
/* … grey: year, roles and years under names … */
body.dbt-3col .single-columns :is(.single-head .meta, small) { color: var(--grey); }
/* … labels in the right column: bold, like the headings in the text … */
body.dbt-3col .single-columns .single-info :is(.info-label, .sidebar-section h3, .entry-details dt, .credits dt) { font-weight: 600; color: var(--color-text); }
/* … links: one style everywhere, a thin light underline (darker on hover) */
body.dbt-3col .single-columns a:not(.sidebar-item, .project-localnav-item, .button-open) {
  color: inherit; text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--underline); text-underline-offset: 3px;
}
body.dbt-3col .single-columns a:not(.sidebar-item, .project-localnav-item, .button-open):hover { text-decoration-color: currentColor; }
body.dbt-3col .single-columns a:not(.sidebar-item):has(img) { text-decoration: none; }
body.dbt-3col .single-columns sup { line-height: 0; }

/* Left column: title, year, sub-pages, summary (profiles: portrait, name, role) */
body.dbt-3col .single-head { display: flex; flex-direction: column; margin: 0; }
body.dbt-3col .single-head .meta { margin: 0; }
body.dbt-3col .single-summary { margin: var(--lead-l) 0 0; }
body.dbt-3col .person-photo {
  width: 168px; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden;
  margin: 0 0 var(--lead-l); background: #f0f0f0;
}
body.dbt-3col .person-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { body.dbt-3col .person-photo { width: 128px; } }
/* Share line under the summary, personal links under a person's role: small, in one
   line that wraps, the links as everywhere in the columns */
body.dbt-3col :is(.share-line, .person-links) {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px;
  margin: var(--lead-l) 0 0; padding: 0; list-style: none;
}
body.dbt-3col .single-columns :is(.share-line, .person-links) :is(span, a, li, button) { font-size: var(--s); line-height: var(--ls); }
body.dbt-3col .share-label { color: var(--grey); }
body.dbt-3col .share-line button {
  font: inherit; color: var(--color-text); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--underline); text-underline-offset: 3px;
}
body.dbt-3col .share-line button:hover { text-decoration-color: currentColor; }
body.dbt-3col .share-line--native > :not(.share-native) { display: none; }   /* phones: only "Share" */

/* Pages of a project with several pages: a list under the year, the current one in black */
body.dbt-3col .project-localnav { order: 1; display: flex; flex-direction: column; align-items: flex-start; margin: var(--lead-l) 0 0; }
body.dbt-3col .project-localnav-item { display: flex; align-items: center; color: var(--grey); }
body.dbt-3col .project-localnav-item:is(:hover, .is-active) { color: var(--color-text); }

/* Text: an empty line between paragraphs, more room around images. A heading starts
   a new part: a thin line above it, as between the parts of the right column (the
   negative margin turns the paragraph's empty line into the space above the line). */
body.dbt-3col .single-columns .single-text > :not(h1, h2, h3, h4, h5, h6) { margin: 0 0 var(--l); }
body.dbt-3col .single-columns .single-text > :is(figure, .wp-block-image, .wp-block-gallery, .wp-block-embed, .wp-block-video,
  .dbt-slideshow, iframe, video, p:has(> img), p:has(> a > img)) { margin: var(--space) 0; }
body.dbt-3col .single-columns .single-text > :is(h1, h2, h3, h4, h5, h6) {
  margin: calc(var(--above-line) - var(--l)) 0 var(--below-heading); padding-top: var(--above-heading);
  border-top: 1px solid var(--color-border);
}
/* …but not at the top of the text, nor between two headings in a row (they belong together) */
body.dbt-3col .single-columns .single-text > :first-child,
body.dbt-3col .single-columns .single-text > :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) { margin-top: 0; padding-top: 0; border-top: 0; }
body.dbt-3col .single-columns .entry-content :is(ul, ol) { padding-left: 0; list-style-position: outside; }
/* Videos and embeds inside a block: the block keeps the spacing, not the player */
body.dbt-3col .single-columns .single-text figure :is(iframe, video, embed, object) { margin: 0; }
/* Block-editor "Columns" in the text column: stacked, readable */
body.dbt-3col .single-text .wp-block-columns { display: block; }
body.dbt-3col .single-text .wp-block-column + .wp-block-column { margin-top: 1em; }

/* Right column: label, then its text; between the parts a thin line, as between the
   parts of the text. It stays in view while the text
   scrolls (.sticky-side; not on profiles, whose lists can be very long). */
body.dbt-3col .single-info { display: flex; flex-direction: column; gap: 0; font-size: var(--s); }
body.dbt-3col .single-info.sticky-side { scrollbar-width: thin; overscroll-behavior: contain; }
body.dbt-3col .single-info > * { margin: 0; padding: 0; border: 0; }
body.dbt-3col .single-info > * + * {
  margin-top: var(--above-line); padding-top: var(--above-heading);
  border-top: 1px solid var(--color-border);
}
body.dbt-3col .single-info :is(.info-label, .sidebar-section h3, .credits dt) { margin: 0 0 var(--below-heading); }
body.dbt-3col .single-info .entry-content > * { margin: 0; }
body.dbt-3col .single-info .entry-content :is(i, em) { font-style: inherit; }   /* no italics from old texts */
body.dbt-3col .single-info .entry-content img { display: inline-block; width: auto; max-width: 100%; max-height: 64px; }   /* logos keep their size */
body.dbt-3col .single-info .entry-content a .ext { width: 0.6em; height: 0.6em; margin-left: 0.3em; vertical-align: 0.1em; }   /* arrow of external links */
/* Event details (Venue, Organizers, Link) and the students of a student work: like every
   other part – the label above, its text below, a line before the next */
body.dbt-3col :is(.entry-details, .credits) { display: block; margin: 0; }
body.dbt-3col :is(.entry-details, .credits) dt { margin: 0 0 var(--below-heading); }
body.dbt-3col :is(.entry-details, .credits) dd { margin: 0; }
body.dbt-3col .entry-details dd + dt {
  margin-top: var(--above-line); padding-top: var(--above-heading);
  border-top: 1px solid var(--color-border);
}
/* Linked entries (team, projects, topics …): image and name, role or year below;
   publications as lines of text */
body.dbt-3col .sidebar-items { display: flex; flex-direction: column; gap: 8px; }
body.dbt-3col .sidebar-item { display: flex; align-items: center; gap: 12px; text-decoration: none; }
body.dbt-3col .sidebar-item:hover { text-decoration: none; }
body.dbt-3col .sidebar-item:hover span { color: var(--color-accent); }
body.dbt-3col .sidebar-item--text { display: block; }
body.dbt-3col .sidebar-thumb { width: 40px; height: 40px; flex-shrink: 0; overflow: hidden; background: #f0f0f0; }
body.dbt-3col .sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }
body.dbt-3col .sidebar-item span { color: var(--color-text); }
body.dbt-3col :is(.sidebar-item, .collab-list) small { display: block; margin-top: 0; }
/* People outside DBT in an older team list, as text */
body.dbt-3col .collab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }

/* ── Related (single.php): a row of tiles under the columns ──
   A line and a bold label like every part of the page, then the tiles of the lists in a
   row that scrolls sideways (assets/js/related.js), each as wide as a small tile of the lists:
   six in view on a desktop, four on a tablet, two on a phone. */
.related-row { margin-top: 64px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.related-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
:is(.related-head, .area-head) h2 { margin: 0; font-size: 0.85rem; line-height: 21px; font-weight: 600; color: var(--color-text); letter-spacing: normal; }

/* Front page (front-page.php): News, then Projects, each with a line and a bold label
   like Related; the news scroll sideways in one row. */
.front-row { margin-top: 48px; }
.front-row:first-of-type { margin-top: 0; }
.front-row .poster-wall { padding-top: 0; }
.front-row .poster-wall-more { margin-top: 16px; }

/* Research area page (taxonomy-research-area.php): its parts like Related – a line, a bold
   label, on the right a link to the whole list where the page shows only part of it. */
.area-section { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.area-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.area-head a { font-size: 0.85rem; line-height: 21px; }
.related-nav { display: flex; gap: 8px; }
.related-nav[hidden] { display: none; }
.related-nav button {
  width: 32px; height: 32px; border: 1px solid var(--color-border); background: #fff; cursor: pointer;
  font: inherit; font-size: 1.1rem; line-height: 1; color: var(--color-text);
}
.related-nav button:hover:not(:disabled) { border-color: var(--color-text); }
.related-nav button:disabled { opacity: 0.35; cursor: default; }
.related-track {
  display: grid; grid-auto-flow: column; gap: 16px;
  grid-auto-columns: calc((100% - 5 * 16px) / 6);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.related-track::-webkit-scrollbar { display: none; }
.related-track > * { scroll-snap-align: start; }
@media (max-width: 1024px) { .related-track { grid-auto-columns: calc((100% - 3 * 16px) / 4); } }
@media (max-width: 600px)  { .related-track { gap: 12px; grid-auto-columns: calc((100% - 12px) / 2); } }

