/* ==========================================================================
   style.css — the look of albertocomoretto.com (the "Statement" design; at the top of the site since 29 November 2026)
   Pure white page, dark grey text, one accent (orange). Inter Tight.
   Thin rules, small square-ish buttons, the sentences themselves are the hero.
   Mechanics (modal, slider, lightbox, gallery rows, marquee, reveal) live in
   assets/css/base.css; this file is only the look.
   ========================================================================== */

/* The typeface (Inter Tight, variable weight 400-700, SIL Open Font License), served from this site: assets/fonts/.
   No visitor data goes to Google Fonts. */
@font-face { font-family: "Inter Tight"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("../fonts/InterTight-Italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("../fonts/InterTight-Italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/InterTight-Regular-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/InterTight-Regular-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


:root {
  --bg: #ffffff;
  --surface: #f2f2f0;
  --ink: #2a2a2a;
  --acc: #f05a1a;        /* the one accent: fills, dots, underlines, ripples */
  --acc-ink: #c4440c;    /* the accent when it is small text on white */
  --on-acc: #1c1207;     /* text on top of an accent fill */

  --body: color-mix(in srgb, var(--ink) 82%, var(--bg));
  --muted: color-mix(in srgb, var(--ink) 66%, var(--bg));
  --faint: color-mix(in srgb, var(--ink) 42%, var(--bg));
  --line: color-mix(in srgb, var(--ink) 13%, var(--bg));
  --line2: color-mix(in srgb, var(--ink) 30%, var(--bg));
  --acc-soft: color-mix(in srgb, var(--acc) 12%, var(--bg));
  --acc-tint: color-mix(in srgb, var(--acc) 24%, var(--bg));
  --art2: color-mix(in srgb, var(--acc) 40%, var(--bg));

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;

  --p: clamp(14px, 1.6vw, 22px);      /* page gutter and the gap between columns */
  --max: 1120px;                      /* widest the page content gets; on wider screens it sits in the middle */
  --side: max(var(--p), calc((100% - var(--max)) / 2 + var(--p)));   /* side padding of the full-width bars, so their content lines up with the page */
  --col: 22.5%;                        /* the narrow left column */
  --nav-h: 69px;
  --pair-gap: var(--p);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { background: var(--bg); }
main { max-width: var(--max); margin-inline: auto; }
.is-home { --max: none; --side: var(--p); }   /* the home page keeps the full width */
/* ... except these parts, whose content stops at 1200 px (their lines still run the full width) */
.is-home #about, .is-home #research, .is-home #news { padding-inline: max(var(--p), calc((100% - 1200px) / 2 + var(--p))); }
.is-home #research { padding-inline: max(var(--p), calc((100% - 1380px) / 2 + var(--p))); }   /* the highlights are a bit wider than the text parts; only shows on screens wider than 1200 px */
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 500; font-size: 17px; line-height: 1.4; }
::selection { background: var(--acc); color: var(--on-acc); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 4px; }
b, strong { font-weight: 600; }

/* ---------- Small parts ---------- */
.pad { padding: clamp(28px, 4.4vw, 64px) var(--p); }
#research { padding-top: clamp(48px, 7.2vw, 108px); }   /* extra room under the "Featured by" strip */
.rule { border-top: 1px solid var(--line2); }

.label { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 0.92rem; color: var(--muted); line-height: 1.2; }
.label::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); }

.h2 { font-weight: 500; font-size: clamp(1.6rem, 3.3vw, 3.1rem); line-height: 1.04; letter-spacing: -0.034em; }
.head .h2 { font-size: clamp(2.2rem, 3.3vw, 3.1rem); }   /* section headings ("Some highlights."): never smaller than this, so they stay large on phones */
.statement { font-weight: 500; font-size: clamp(1.75rem, 4.3vw, 4.15rem); line-height: 1.04; letter-spacing: -0.036em; max-width: 21.5em; }
.statement span { color: var(--faint); }
/* Emphasised words (not links): a row of orange dots under the words that travels slowly along the line.
   --dot-gap is the distance from one dot to the next (larger = fewer dots); the 1.15s is how long a dot takes to reach the next place (smaller = faster). */
.statement u, .h2 u, .dream u { --dot-gap: 0.34em; text-decoration: none; background: radial-gradient(circle, var(--acc) 0 0.05em, transparent 0.058em) 0 calc(100% - 0.02em) / var(--dot-gap) 0.12em repeat-x; animation: dots-travel 1.15s linear infinite; }
@keyframes dots-travel { to { background-position: var(--dot-gap) calc(100% - 0.02em); } }
.lede { font-size: clamp(1.05rem, 1.55vw, 1.45rem); line-height: 1.2; letter-spacing: -0.015em; color: var(--body); max-width: 32em; }

.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding-bottom: clamp(18px, 2vw, 26px); }
.head .label { margin-bottom: 12px; }
.head__aside { font-size: 0.9rem; color: var(--muted); text-align: right; max-width: 30em; }

.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn { display: inline-block; padding: 0.68em 1.15em; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 0.95rem; font-weight: 500; line-height: 1.2; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.btn b { margin-left: 0.5em; font-weight: 400; }
.btn--primary:hover { background: var(--acc); color: var(--on-acc); }
.btn--ghost { background: var(--surface); color: var(--ink); }
.btn--ghost:hover { background: var(--acc-tint); }
.btn--sm { padding: 0.5em 0.95em; font-size: 0.86rem; }

.chip { display: inline-block; padding: 0.36em 0.85em; border: 1px solid var(--line2); border-radius: 999px; background: var(--bg); font-size: 0.84rem; font-weight: 500; line-height: 1.2; white-space: nowrap; transition: background 0.2s, border-color 0.2s; }
a.chip:hover { border-color: var(--acc); background: var(--acc-soft); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
/* small labels (journal, year, place): pills like the buttons and the press links; the first one tinted orange, the others outlined with the thin grey line */
.tag { display: inline-flex; align-items: center; padding: 0.36em 0.85em; border: 1px solid transparent; border-radius: 999px; background: var(--acc-tint); font-size: 0.84rem; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.tag--outline { background: none; border-color: var(--line2); color: var(--body); }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 95; display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); padding: 12px var(--side); background: var(--bg); border-bottom: 1px solid var(--ink); }
.nav__brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; }
/* the mark: a photo of Alberto (logo-face.jpg; the earlier tube version is logo-tube.jpg), an orange ring on hover */
.nav__mark { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #000; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color 0.25s; }
.nav__mark img { width: 100%; height: 100%; object-fit: cover; }
.nav__brand:hover .nav__mark, .nav__brand:focus-visible .nav__mark { outline-color: var(--acc); }
.nav__links { display: flex; gap: clamp(14px, 1.8vw, 26px); font-size: 0.94rem; }
.nav__links a { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.nav__links a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); transition: background 0.2s, border-color 0.2s; }
.nav__links a:hover::before, .nav__links a[aria-current="page"]::before, .nav__links a[aria-current="location"]::before { background: var(--acc); border-color: var(--acc); }
.nav__r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nb { padding: 0.62em 1.15em; border-radius: 999px; font-size: 0.9rem; font-weight: 600; line-height: 1.2; white-space: nowrap; transition: background 0.2s, color 0.2s; }

.nb--grey { background: var(--surface); }
.nb--grey:hover { background: var(--ink); color: var(--bg); }
.burger { display: none; position: relative; width: 44px; height: 44px; border-radius: 999px; background: var(--surface); }   /* light grey, like the Contact pill */
.burger span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease); }
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 25px; }
.menu-open .burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.menu { background: var(--bg); padding: calc(var(--nav-h) + 26px) var(--p) 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.menu__links a { display: flex; align-items: baseline; justify-content: space-between; padding: 0.22em 0; border-top: 1px solid var(--ink); font-size: clamp(2rem, 9vw, 3.4rem); letter-spacing: -0.036em; line-height: 1.12; }
.menu__links li:last-child a { border-bottom: 1px solid var(--ink); }
.menu__links a::after { content: "→"; font-size: 0.5em; font-weight: 400; color: var(--muted); }
.menu__foot { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr); }
.hero__l { padding: var(--p); display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.hero__tag { font-weight: 500; font-size: clamp(1.2rem, 1.9vw, 1.75rem); line-height: 1.06; letter-spacing: -0.025em; }
.hero__who { font-size: 0.9rem; color: var(--muted); line-height: 1.3; }
/* The coiling photograph fills the wide box at the top (on a wide screen it shows the middle band of
   the photo; on a phone the whole photo). The orange is a blend: black threads take the accent colour,
   white stays white. For the photo's own black, delete the ::after rule. To show another part of the
   photo: style="--pos: 50% 30%" on the figure. */
.hero__img { position: relative; isolation: isolate; margin: 0; aspect-ratio: 2.5; overflow: hidden; background: #fff; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.hero__img::after { content: ""; position: absolute; inset: 0; background: var(--acc); mix-blend-mode: screen; pointer-events: none; }
/* the threads drawn by site.js (data-strands): the canvas replaces the photo, the orange layer above tints it */
.hero__img canvas.strands { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img.has-strands img { opacity: 0; }

/* Two sets of ripples drifting past each other: interference, like two coupled oscillators (hiring card) */
.art { position: relative; overflow: hidden; aspect-ratio: 2.5; background: var(--acc-soft); }
.art i { position: absolute; inset: -60%; background: repeating-radial-gradient(circle at 50% 50%, var(--acc) 0 2px, transparent 2px 10px); animation: art-a 22s ease-in-out infinite alternate; will-change: translate; }
.art i + i { background: repeating-radial-gradient(circle at 50% 50%, var(--art2) 0 2px, transparent 2px 11px); animation-name: art-b; animation-duration: 29s; }
@keyframes art-a { from { translate: -14% -6%; } to { translate: -4% 5%; } }
@keyframes art-b { from { translate: 12% 8%; } to { translate: 3% -6%; } }
/* the same graphic as a wide, short band from edge to edge of the page: <div class="art art--band"><i></i><i></i></div> */
.art.art--band { aspect-ratio: auto; height: clamp(110px, 14vw, 200px); background: color-mix(in srgb, var(--acc) 18%, var(--bg)); }
.art--band i { background: repeating-radial-gradient(circle at 30% 50%, var(--acc) 0 2px, transparent 2px 10px); }
.art--band i + i { background: repeating-radial-gradient(circle at 30% 50%, var(--art2) 0 2px, transparent 2px 11px); }
.art--band + .contact, .band + .contact { border-top: 0; }   /* the band itself separates the sections: no thin line under it */
/* a picture as a band from edge to edge of the page (the wavy thread above "Let's chat."): whole on computers;
   on phones it keeps a minimum height, so its two ends run off the sides */
.band { overflow: hidden; }
.band img { display: block; width: 100%; height: auto; min-height: 84px; object-fit: cover; }
.intro .statement { margin-bottom: 0.75em; font-size: clamp(1.75rem, 3.5vw, 3.4rem); max-width: 26em; }   /* a little smaller and in longer lines than the page titles, so the picture above can be taller */
/* The first screen (home page, computers and tablets): the navigation, the picture and the sentence with its
   buttons fill exactly one screen. The picture takes the height that is left, so the buttons are never below
   the fold; on a low screen the sentence also gets a little smaller so the picture keeps about a third of the height.
   Phones (below) keep the whole photograph. */
@media (min-width: 861px) {
  .first { display: flex; flex-direction: column; min-height: calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h)); }
  .first .hero { flex: 1 1 0; min-height: max(110px, 30vh); }
  .first .hero__img { aspect-ratio: auto; min-height: 0; }
  .first .intro { flex: none; }
  .first .intro .statement { font-size: clamp(1.75rem, min(3.5vw, 14.2vh - 49px), 3.4rem); }
}

/* Page heroes of Publications and Gallery */
.phero { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr); padding: clamp(26px, 3.6vw, 52px) 0 clamp(26px, 4vw, 56px); }
.phero__l { padding: 0 var(--p); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.phero__l .label { margin: 0.5em 0 0; }
.phero__r { padding-right: var(--p); }
.phero .lede { margin-top: 1.1em; }
.phero .actions { margin-top: 22px; }

/* ---------- The idea / about ---------- */
.split { display: grid; grid-template-columns: clamp(240px, 28vw, 400px) minmax(0, 1fr); gap: clamp(18px, 3vw, 44px); padding: var(--p); padding-bottom: clamp(40px, 5.2vw, 80px); border-top: 1px solid var(--line2); }   /* extra room before the "Featured by" strip */
.split__photo { align-self: start; border-radius: 10px; background: var(--surface); }   /* the portrait, whole, at its own proportions */

.split__t { padding: 4px 0; }
.split__group { margin-bottom: clamp(18px, 2.2vw, 34px); }   /* the group's name, above the idea sentence */
/* the three paragraphs with the journal cover on their right */
/* the three paragraphs in the first column, the journal cover beside them (the last row takes up any height the cover has to spare) */
.split__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto 1fr; gap: 0 clamp(20px, 3.4vw, 56px); align-items: start; margin-top: clamp(16px, 1.9vw, 28px); }
.split__row > .split__body { grid-column: 1; }
.split__row .split__body:first-child { margin-top: 0; }
.split__cover { grid-column: 2; grid-row: 1 / span 4; padding-top: 0.35em; }
.split__t .lede b { color: var(--ink); }
/* the five words stay on one line on computers: their size also follows the width of the text column
   (the line is about 21.5 em long, so 100cqw / 21.9 always fits); on phones they may wrap */
.split__group { container-type: inline-size; }
.dream { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 0 0.3em; font-size: clamp(1.15rem, min(2.05vw, 100cqw / 21.9), 1.95rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.12; }
.dream b { font-weight: inherit; color: var(--acc); }
.dream span { white-space: nowrap; }   /* "Emergent &" stays together when the line wraps on phones */
.dream u { padding-bottom: 0.14em; }   /* room between the words and their dots */

/* shorter block beside the portrait: one paragraph and the group's name, with the cover at the side */
.split__more { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(18px, 3vw, 48px); align-items: end; }
.split__body { margin-top: clamp(16px, 1.9vw, 28px); max-width: 37em; font-size: clamp(1.04rem, 1.3vw, 1.26rem); font-weight: 450; line-height: 1.36; letter-spacing: -0.008em; }
.split__body + .split__body, .split__cover + .split__body { margin-top: 0.8em; }
/* three sizes in clear steps, largest first (flipped on 29 November 2026; before, the sentence was the largest):
   the group's name (this line), the five words (.dream), the idea sentence (#about .h2), then the paragraphs */
.dream__k { font-size: clamp(1.6rem, 3.3vw, 3.1rem); font-weight: 500; line-height: 1.06; letter-spacing: -0.034em; color: var(--acc); }
#about .h2 { font-size: clamp(1.35rem, 2.3vw, 2.2rem); line-height: 1.12; letter-spacing: -0.026em; }
.dream__k span { color: var(--faint); }   /* "at the Max Planck Institute ...": the same grey as the second half of the sentence above */
.dream__k + .dream { margin-top: clamp(8px, 1vw, 14px); }
.split__cover .about__cover { width: clamp(128px, 14vw, 210px); }

/* the longer "about" section (from the earlier home page; the cover and its caption still use .about__cover and .about__cap) */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: var(--p); align-items: start; padding: clamp(10px, 2vw, 30px) var(--p) clamp(34px, 5vw, 72px); }
.about__text { max-width: 36em; font-weight: 450; font-size: clamp(1.02rem, 1.25vw, 1.18rem); line-height: 1.42; color: var(--body); }
.about__text p + p { margin-top: 1em; }
.about__text b { color: var(--ink); font-weight: 600; }

.about__cover { display: block; width: clamp(150px, 19vw, 270px); border-radius: 10px; background: var(--surface); transition: transform 0.4s var(--ease); }
.about__cover:hover { transform: translateY(-5px) rotate(1.2deg); }
.about__cap { margin-top: 10px; font-size: 0.86rem; color: var(--muted); }

/* ---------- Featured by ---------- */
.journals { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr); align-items: center; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.journals__l { padding: 0 var(--p); font-size: 0.92rem; color: var(--muted); }
.journals .marquee { padding: clamp(12px, 1.3vw, 18px) 0; border-left: 1px solid var(--ink); }
.journals__i { display: inline-flex; align-items: center; gap: 0.6em; padding-left: 0.7em; font-size: clamp(1rem, 1.35vw, 1.3rem); font-weight: 500; letter-spacing: -0.022em; line-height: 1.1; }
.journals .marquee:hover .marquee__track { animation-play-state: paused; }
.journals__i::before { content: ""; width: 0.36em; height: 0.36em; border-radius: 50%; border: 1.5px solid var(--acc); }

/* ---------- Research highlights: a grid of cards ----------
   Each card shows one movie (or picture) and its title; clicking it opens the rest.
   Every movie or picture is zoomed to fill the same 3:2 box (Alberto asked for this), so the six
   tiles and their titles line up. Framing per card: style="--zoom: 1.1; --pos: 30% 50%" on the figure. */
.cards { --cp: clamp(12px, 1.4vw, 20px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.card { display: flex; flex-direction: column; gap: 14px; padding: 14px var(--cp) 20px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--ink); cursor: pointer; transition: background 0.2s; }
.card:nth-child(3n + 2) { --d: 0.07s; }
.card:nth-child(3n) { border-right: 0; --d: 0.14s; }
.card:hover, .card:focus-visible { background: var(--surface); }   /* grey, like the Trajectory rows */
.card__k { font-size: 0.86rem; line-height: 1.2; color: var(--muted); font-variant-numeric: tabular-nums; }

.card__m { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; isolation: isolate; border-radius: 10px; background: var(--surface); }
.card__m img, .card__m video { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(var(--zoom, 1)); transition: transform 0.9s var(--ease); }
.card:hover .card__m img, .card:hover .card__m video, .card:focus-visible .card__m img, .card:focus-visible .card__m video { transform: scale(calc(var(--zoom, 1) * 1.05)); }

.card__t { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 2px; font-weight: 500; font-size: clamp(1.25rem, 2vw, 1.9rem); letter-spacing: -0.032em; line-height: 1.04; transition: color 0.2s; }
.card:hover .card__t, .card:focus-visible .card__t { color: var(--acc-ink); }
.card__t b { flex: none; font-weight: 400; font-size: 0.7em; transition: translate 0.25s var(--ease), color 0.2s; }
.card:hover .card__t b, .card:focus-visible .card__t b { translate: 3px -3px; color: var(--acc-ink); }
.card--all:hover .card__t b { translate: 5px 0; }
/* the last tile is not a movie: a dark box of the same shape, with a line of text */
.card__m--say { display: flex; align-items: flex-end; padding: clamp(14px, 1.7vw, 26px); background: var(--ink); color: var(--bg); transition: background 0.25s, color 0.25s; }
.card__m--say p { max-width: 10em; font-size: clamp(1.3rem, 2.3vw, 2.2rem); font-weight: 500; letter-spacing: -0.034em; line-height: 1.04; }
.card--all:hover .card__m--say, .card--all:focus-visible .card__m--say { background: var(--acc); color: var(--on-acc); }

/* ---------- News ---------- */
.news { border-top: 1px solid var(--line2); }
.cta { position: relative; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--acc) 18%, var(--bg)); }
.cta .art { position: absolute; inset: 0; aspect-ratio: auto; background: none; }
.cta .art i { background: repeating-radial-gradient(circle at 26% 50%, var(--acc) 0 2px, transparent 2px 10px); }
.cta .art i + i { background: repeating-radial-gradient(circle at 26% 50%, var(--art2) 0 2px, transparent 2px 11px); }
.cta__card { grid-column: 2; position: relative; margin: clamp(12px, 1.8vw, 26px); background: var(--bg); border-radius: 14px; padding: clamp(20px, 2.6vw, 38px); display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.cta__title { font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 3.4rem); line-height: 1.02; letter-spacing: -0.036em; }
.cta__text { max-width: 40em; font-weight: 450; font-size: 1.04rem; line-height: 1.42; color: var(--body); }
.cta__text p + p { margin-top: 0.9em; }

/* ---------- Trajectory ---------- */
.traj { border-top: 1px solid var(--line2); }
.logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.logos > span { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.4vw, 20px); min-height: clamp(96px, 10vw, 140px); padding: 18px clamp(12px, 1.6vw, 24px); border-right: 1px solid var(--line2); }
.logos > span:last-child { border-right: 0; }
.logos .logos__mpi { grid-column: span 2; }
.logos img { width: auto; height: auto; max-width: 100%; max-height: var(--h, clamp(34px, 4.2vw, 58px)); min-width: 0; transition: transform 0.4s var(--ease); }
.logos > span:hover img { transform: scale(1.05); }
.logos__mpi img:first-child { --h: clamp(22px, 2.6vw, 36px); }
.logos__mpi img:last-child { --h: clamp(50px, 5.6vw, 74px); flex: none; }

.tl__row { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr); align-items: center; padding: 14px 8px; border-top: 1px solid var(--ink); transition: background 0.2s; }
.tl__row:last-child { border-bottom: 1px solid var(--ink); }
.tl__row:hover { background: var(--surface); }
.tl__dot { display: none; }
.tl__year { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl__year::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.is-now .tl__year { color: var(--ink); }
.is-now .tl__year::before { background: var(--acc); border-color: var(--acc); animation: now-beat 2.4s ease-out infinite; }
/* the dot of the current position beats: it swells for a moment while a ring of light spreads out from it and fades
   (as the green dot did on the earlier dark site). 2.4s is one beat; 8px is how far the ring spreads. */
@keyframes now-beat {
  0% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 60%, transparent); }
  14% { transform: scale(1.2); }
  30% { transform: scale(1); }
  75% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--acc) 0%, transparent); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 0%, transparent); }
}
.tl__body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--p); align-items: center; }
.tl__role { grid-row: span 2; font-size: clamp(1.2rem, 2.1vw, 1.9rem); letter-spacing: -0.032em; line-height: 1.08; }
.tl__where { grid-column: 2; align-self: end; font-weight: 450; font-size: 1rem; line-height: 1.35; color: var(--body); }
/* Text links: every link that is not a button, a card or a menu item has a solid orange underline */
.tl__where a, .award__meta a, .cta__text a, .about__cap a { color: var(--ink); text-decoration: underline solid var(--acc); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; transition: color 0.2s; }
.tl__where a:hover, .award__meta a:hover, .cta__text a:hover, .about__cap a:hover { color: var(--acc-ink); }
.tl__where:last-child { grid-row: span 2; align-self: center; }   /* no buttons under it: centre it on the row */
.tl__actions { grid-column: 2; align-self: start; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- Contact and footer ---------- */
.contact { border-top: 1px solid var(--line2); padding-bottom: clamp(20px, 3vw, 40px); }
.contact__h { font-weight: 500; font-size: clamp(2.6rem, 9vw, 8.6rem); line-height: 0.96; letter-spacing: -0.05em; }
.contact .lede { margin-top: 1em; }
/* The contact block with the looped thread: the thread spans the page, runs over the heading and comes down on
   its right. The picture is 106% of the page wide (its first loop hangs off the left edge) and 25.3vw tall; the
   text starts just under the thread's left half (about half the picture's height), so they never touch. */
.contact--thread { position: relative; overflow: hidden; border-top: 0; padding-top: calc(12.7vw + 24px); min-height: calc(25.3vw + 24px); }
.contact__thread { position: absolute; left: -6%; top: 10px; width: 106%; max-width: none; height: auto; pointer-events: none; }
.contact--thread > :not(.contact__thread) { position: relative; }
.foot { display: grid; grid-template-columns: 1fr 1fr; gap: var(--p); padding: var(--p) var(--side) 34px; border-top: 1px solid var(--ink); }
.foot__mail { display: inline-block; font-size: clamp(1.5rem, 4.2vw, 3.9rem); letter-spacing: -0.04em; line-height: 1; text-decoration: underline solid var(--acc); text-decoration-thickness: 0.05em; text-underline-offset: 0.14em; transition: color 0.25s; }
.foot__mail:hover { color: var(--acc-ink); }
.foot small { display: block; margin-top: 14px; font-size: 0.86rem; color: var(--muted); }
.foot__links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--p); align-content: start; font-size: 0.98rem; }
.foot__links a { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line2); transition: color 0.2s, padding 0.25s var(--ease); }
.foot__links a:hover { color: var(--acc-ink); padding-left: 6px; }
.foot__links a span { font-weight: 400; }

/* ---------- Publications ---------- */
.banner { margin: 0; padding: 0 var(--p); }
.banner .m { border-radius: 22px; background: var(--surface); }
.banner figcaption { display: flex; justify-content: flex-end; margin-top: 10px; }
.credit { display: inline-flex; align-items: baseline; gap: 0.4em; font-size: 0.9rem; color: var(--muted); }
.credit__arr { transition: translate 0.45s var(--ease), color 0.3s; }
.credit:hover .credit__arr, .credit:focus-visible .credit__arr { translate: 3px -3px; color: var(--acc-ink); }
.banner--talk { padding: 0; margin-top: clamp(30px, 5vw, 64px); }

.pub { --thumb: clamp(128px, 12.5vw, 176px); display: grid; grid-template-columns: var(--thumb) minmax(0, 1fr) auto; gap: clamp(14px, 2.6vw, 36px); align-items: center; padding: clamp(18px, 2.2vw, 30px) 0; border-top: 1px solid var(--ink); }
.pub:last-of-type { border-bottom: 1px solid var(--ink); }
/* Thumbnails are circles, as on the earlier site (Alberto asked for this): the movie or picture fills
   the circle. Per-thumbnail framing: style="--zoom: 1.2; --origin: 50% 40%" on the img / video. */
.pub__thumb { position: relative; isolation: isolate; width: var(--thumb); height: var(--thumb); border-radius: 50%; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: transform 0.6s var(--ease), box-shadow 0.3s; }
.pub__thumb img, .pub__thumb video { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); transform-origin: var(--origin, 50% 50%); transition: transform 0.8s var(--ease); }
.pub__thumb.is-link:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 0 0 3px var(--acc); }
.pub__thumb.is-link:hover img, .pub__thumb.is-link:hover video { transform: scale(calc(var(--zoom, 1) * 1.1)); }
.pub__thumb--empty { box-shadow: none; border: 1px dashed var(--line2); background: transparent; }
.pub__title { font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.85rem); letter-spacing: -0.03em; line-height: 1.08; max-width: 30em; }
.pub__authors { margin-top: 10px; max-width: 54em; font-weight: 450; font-size: 0.98rem; line-height: 1.35; color: var(--muted); }
.pub__authors u { color: var(--ink); font-weight: 600; text-decoration: none; }   /* his name: bold, not underlined (it is not a link) */
/* Journal names. A linked one is orange with an orange underline; on hover it rolls to a dark copy
   while a dark line wipes over the underline, as on the earlier site (site.js builds .roll). */
.pub__venue { display: inline-block; margin-top: 10px; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.012em; line-height: 1.25; color: var(--ink); }
.pub__venue > span:not(.roll) { margin-left: 0.15em; font-weight: 500; font-size: 0.95rem; letter-spacing: 0; color: var(--muted); }
a.pub__venue { color: var(--acc-ink); }
.roll { position: relative; display: inline-grid; line-height: 1.3; clip-path: inset(0 -0.4em); }
.roll__a, .roll__b { grid-area: 1 / 1; white-space: nowrap; transition: transform 0.55s var(--ease); }
.roll__b { transform: translateY(105%); color: var(--ink); }
.roll::before, .roll::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--acc); }
.roll::after { background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 0.55s var(--ease); }
a:hover > .roll .roll__a, a:focus-visible > .roll .roll__a { transform: translateY(-105%); }
a:hover > .roll .roll__b, a:focus-visible > .roll .roll__b { transform: none; }
a:hover > .roll::after, a:focus-visible > .roll::after { transform: scaleX(1); transform-origin: left; }
.pub__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; }
.pub__cover { width: clamp(88px, 10.5vw, 150px); border: 0.5px solid var(--line2); border-radius: 4px; overflow: hidden; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06); rotate: 2deg; transition: transform 0.4s var(--ease); }
.pub__cover img { width: 100%; height: auto; }
.pub__cover:hover { transform: translateY(-5px) rotate(-3deg); }

.awards-sec { padding-top: clamp(40px, 6vw, 84px); }
.award { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr) minmax(0, 1fr); gap: 8px var(--p); align-items: center; padding: 16px 8px; border-top: 1px solid var(--ink); }
.award:last-child { border-bottom: 1px solid var(--ink); }
.award .tag { justify-self: start; }
.award__name { font-size: clamp(1.2rem, 2.1vw, 1.9rem); letter-spacing: -0.032em; line-height: 1.08; }
.award__meta { font-weight: 450; font-size: 1rem; line-height: 1.4; color: var(--body); }
.award .pub__actions { grid-column: 3; margin-top: 2px; align-self: start; }
/* with buttons under the text: the tag and the name sit at mid-height of both lines */
.award:has(.pub__actions) .tag, .award:has(.pub__actions) .award__name { grid-row: 1 / span 2; }
.award:has(.pub__actions) .award__meta { align-self: end; }

/* ---------- Gallery ---------- */
.gal { border-top: 1px solid var(--line2); }
/* the gallery column is narrower than the page, so the photos are not huge on a wide screen */
.gal .head, .gal .pairs { max-width: 1000px; margin-inline: auto; }
.shot { border-radius: 8px; background: var(--surface); }
.shot img, .shot video { transition: transform 0.9s var(--ease); }
.shot:hover img, .shot:hover video { transform: scale(1.02); }
.shot figcaption .chip { border-color: transparent; background: rgba(255, 255, 255, 0.92); font-size: 0.78rem; white-space: normal; }
.shot figcaption .chip.is-dark { background: rgba(20, 20, 22, 0.82); color: #f1f1ee; }   /* on a dark photo (site.js decides) */
.shot figcaption a.chip:hover { background: var(--acc); color: var(--on-acc); border-color: transparent; }

/* ---------- Research detail modal ---------- */
.modal__backdrop { background: rgba(30, 30, 30, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal__panel { background: var(--bg); border-radius: 22px; box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35); }
.modal__media { background: var(--surface); --slide-pad: clamp(12px, 1.6vw, 22px); --slide-radius: 14px; }   /* --slide-radius: rounded corners of each picture and movie in the pop-up */
.modal__content { padding: clamp(22px, 2.8vw, 40px); }
.modal__close { border-radius: 999px; background: var(--ink); color: var(--bg); transition: background 0.2s, color 0.2s; }
.modal__close:hover { background: var(--acc); color: var(--on-acc); }
.modal__kicker { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; padding-right: 52px; }
.modal__title { font-weight: 500; font-size: clamp(1.5rem, 2.5vw, 2.3rem); line-height: 1.05; letter-spacing: -0.034em; }
.modal__journal { display: inline-block; margin: 14px 0 18px; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.012em; line-height: 1.25; color: var(--acc-ink); text-decoration: underline solid var(--acc); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; transition: color 0.2s; }
.modal__journal:hover { color: var(--ink); }
.modal__text { font-weight: 450; font-size: 1.04rem; line-height: 1.45; color: var(--body); }
.modal__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.modal__press { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line2); }
.mono { margin-right: 6px; font-size: 0.86rem; color: var(--muted); }
.slider__btn { border-radius: 999px; background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1px var(--line2), 0 6px 18px rgba(0, 0, 0, 0.1); transition: background 0.2s, color 0.2s; }
.slider__btn:hover { background: var(--ink); color: var(--bg); }
.slider__dots button { border: 1.5px solid var(--ink); background: var(--bg); transition: background 0.2s, border-color 0.2s; }
.slider__dots button[aria-current="true"] { background: var(--acc); border-color: var(--acc); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1020px) {
  .nav__links { display: none; }
  .burger { display: block; }
  /* cards: two across */
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card:nth-child(n) { border-right: 1px solid var(--line2); --d: 0s; }
  .card:nth-child(2n) { border-right: 0; --d: 0.07s; }
}
@media (max-width: 860px) {
  .modal__kicker { padding-right: 0; }   /* the close button sits in its own strip above the picture */
  .modal__panel { background: linear-gradient(var(--surface) 0 var(--strip, 56px), var(--bg) var(--strip, 56px)); }   /* that strip has the same grey as the picture area, so the grey runs to the top */
  .hero, .phero, .split, .about, .cta, .foot { grid-template-columns: minmax(0, 1fr); }
  .hero__l { flex-direction: row; align-items: flex-end; }
  .hero__who { text-align: right; }
  .art, .hero__img { aspect-ratio: 1.5; }
  .phero__l { margin-bottom: 14px; }
  .phero__r { padding-left: var(--p); }
  .about__text { max-width: none; }
  .journals { grid-template-columns: minmax(0, 1fr); }
  .journals__l { padding: 12px var(--p) 0; }
  .journals .marquee { border-left: 0; padding-top: 8px; }
  .cta .art { position: relative; inset: auto; height: 150px; }
  .cta__card { grid-column: 1; }
  .head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .head__aside { text-align: left; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos > span { border-bottom: 1px solid var(--line2); }
  .logos > span:nth-child(odd) { border-right: 0; }
  .logos > span:nth-last-child(-n+2) { border-bottom: 0; }
  .tl__row, .tl__body { grid-template-columns: minmax(0, 1fr); }
  .tl__row { padding: 14px 2px; }
  .tl__year { padding: 0 0 6px; }
  .tl__role, .tl__where, .tl__actions { grid-column: 1; grid-row: auto; }
  .tl__where { padding-top: 6px; }
  .tl__where:last-child { grid-row: auto; }
  .pub { --thumb: clamp(84px, 24vw, 128px); grid-template-columns: var(--thumb) minmax(0, 1fr); align-items: start; }
  .roll__a, .roll__b { white-space: normal; }
  .split__photo { max-width: 340px; margin-inline: auto; }   /* the portrait sits in the middle on phones */
  .split { row-gap: 40px; }   /* more room between the portrait and the text under it */
  .split__more { grid-template-columns: minmax(0, 1fr); align-items: start; }
  /* narrow screens: the cover floats on the right and the last paragraph runs down its left side */
  .split__row { display: flow-root; }
  .split__cover { float: right; width: clamp(140px, 40vw, 170px); margin: 1.1em 0 6px 16px; padding-top: 0; }   /* top margin: level with the first line of the paragraph */
  .split__cover .about__cover { width: 100%; }
  .pub__cover { grid-column: 2; }
  .award { grid-template-columns: minmax(0, 1fr); padding: 16px 2px; }
  .award .pub__actions { grid-column: 1; }
  .award:has(.pub__actions) .tag, .award:has(.pub__actions) .award__name { grid-row: auto; }
  .award__meta { padding-top: 0; }
}
@media (max-width: 640px) {
  /* cards: one under the other */
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card:nth-child(n) { padding: 14px 2px 20px; border-right: 0; --d: 0s; }

}
@media (max-width: 520px) {
  .nav__mark { display: none; }   /* on phones: the name only, no photo */
  .nb--grey { display: none; }
  .foot__links { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }   /* the social links and the site links, one above the other with room between */
  .foot__links ul:first-child li:last-child a { border-bottom: 1px solid var(--line2); }   /* the line closes the social links under X ... */
  .foot__links ul + ul li:first-child a { border-top: 0; }   /* ... instead of sitting above Home */
}
@media (prefers-reduced-motion: reduce) {
  .art i, .statement u, .h2 u, .dream u, .is-now .tl__year::before { animation: none; }
}
