/* Project sites (/comet, /semantic3d, …): one look for all; tokens first, then layout and components.
   Light or dark as the system prefers; the header switch overrides it (html[data-theme], remembered by project.js).
   The accent colour comes from each project's logo and is an accent (icons, small marks, primary button), never a
   surface. A project overrides only the accent tokens (.site-<project>). Text colours keep 4.5:1 on their surfaces. */
:root {
  --bg: #f5f7f9; --surface: #fff; --surface-2: #edf1f4; --line: #dce3e9;
  --text: #1c2731; --muted: #566672; --head: #0e1820;
  --accent: #f08c1a; --accent-ink: #9a4f00; --accent-soft: #fdf0e1; --on-accent: #1b1206;
  --warn-soft: #fcebe8; --warn-ink: #a3361f;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 8px 24px rgba(16, 24, 32, .07);
  /* a page head without a photo: light in the light theme */
  --plain-bg: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, #fff) 0%, #f5f7f9 70%);
  --plain-ink: var(--head); --plain-sub: var(--muted);
  --plain-ghost-bg: var(--surface); --plain-ghost-line: var(--line); --plain-ghost-ink: var(--head);
  --r: 14px; --r-sm: 10px; --wrap: 1180px; --hd: 64px;
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1317; --surface: #151c21; --surface-2: #1a2329; --line: #26313a;
  --text: #dde5ea; --muted: #98a7b1; --head: #f2f5f7;
  --accent: #f59b33; --accent-ink: #f7b267; --accent-soft: #2a2015; --on-accent: #1b1206;
  --warn-soft: #2c1d1a; --warn-ink: #f0a090;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
  --plain-bg: radial-gradient(120% 140% at 85% 10%, color-mix(in srgb, var(--accent) 34%, #13202a) 0%, #13202a 55%, #0d161d 100%);
  --plain-ink: #fff; --plain-sub: rgba(255, 255, 255, .86);
  color-scheme: dark;
  --logo-filter: invert(1) hue-rotate(180deg);
  --plain-ghost-bg: rgba(255, 255, 255, .12); --plain-ghost-line: rgba(255, 255, 255, .45); --plain-ghost-ink: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0e1317; --surface: #151c21; --surface-2: #1a2329; --line: #26313a;
  --text: #dde5ea; --muted: #98a7b1; --head: #f2f5f7;
  --accent: #f59b33; --accent-ink: #f7b267; --accent-soft: #2a2015; --on-accent: #1b1206;
  --warn-soft: #2c1d1a; --warn-ink: #f0a090;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
  --plain-bg: radial-gradient(120% 140% at 85% 10%, color-mix(in srgb, var(--accent) 34%, #13202a) 0%, #13202a 55%, #0d161d 100%);
  --plain-ink: #fff; --plain-sub: rgba(255, 255, 255, .86);
  color-scheme: dark;
  --logo-filter: invert(1) hue-rotate(180deg);
  --plain-ghost-bg: rgba(255, 255, 255, .12); --plain-ghost-line: rgba(255, 255, 255, .45); --plain-ghost-ink: #fff;
}
}

/* ---- base ---------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hd) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--font); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
h1, h2, h3 { color: var(--head); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
#main:focus { outline: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.narrow { max-width: 860px; }
.ci { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ci-xl { width: 64px; height: 64px; stroke-width: 1.25; color: var(--muted); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
/* A black line-art logo (COMET) is inverted on dark, with the hue turned back so its colours stay. */
:root.logo-invert :is(.brand, .drawer-hd, .ft-brand) img { filter: var(--logo-filter, none); }

/* ---- project accents ------------------------------------------------------------------------- */
:root.site-semantic3d { --logo-h: 42px; --accent: #26a9a9; --accent-ink: #0a6668; --accent-soft: #def2f2; --on-accent: #03191a; }
:root.site-semantic3d[data-theme="dark"] { --accent: #3cc3c3; --accent-ink: #7fd9d9; --accent-soft: #11292a; }
@media (prefers-color-scheme: dark) { :root.site-semantic3d:not([data-theme="light"]) { --accent: #3cc3c3; --accent-ink: #7fd9d9; --accent-soft: #11292a; } }

/* ---- header ---------------------------------------------------------------------------------- */
.hd { position: sticky; top: 0; z-index: 30; height: var(--hd); background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.hd-in { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: block; flex: none; }
.brand img { height: var(--logo-h, 30px); width: auto; }
.hd-nav { display: flex; gap: 2px; margin-left: auto; }
.hd-nav a { color: var(--text); text-decoration: none; font-size: .93rem; font-weight: 600; padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
.hd-nav a:hover { background: var(--surface-2); }
.hd-nav a[aria-current] { color: var(--head); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 8px 8px 0 0; }
.lang { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .85rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.lang span[aria-current] { color: var(--head); }
.lang a { color: var(--muted); text-decoration: none; padding: 4px 2px; }
.lang a:hover { color: var(--accent-ink); }
.theme { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--head); cursor: pointer; transition: border-color .15s, background .15s; }
.theme:hover { border-color: var(--muted); }
.theme .ci { width: 18px; height: 18px; }
.theme .t-light, :root[data-theme="dark"] .theme .t-dark { display: none; }
:root[data-theme="dark"] .theme .t-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .t-dark { display: none; }
  :root:not([data-theme="light"]) .theme .t-light { display: block; }
}
.hd-tools { display: flex; align-items: center; gap: 14px; }
.hd-toggle { display: none; width: 40px; height: 40px; margin-left: -8px; border: 0; border-radius: 10px; background: none; color: var(--head); cursor: pointer; }
.hd-toggle .ci { width: 24px; height: 24px; }
.hd-toggle:hover { background: var(--surface-2); }
@media (max-width: 1020px) {
  .hd-nav { display: none; }
  .hd-toggle { display: inline-grid; place-items: center; }
  .hd-in { gap: 12px; }
  .hd-tools { margin-left: auto; gap: 10px; }
}

/* ---- drawer (phones, tablets): panel from the left ------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 16, .45); opacity: 0; transition: opacity .18s; }
.drawer.is-open { opacity: 1; }
.drawer[hidden] { display: none; }
.drawer-panel { position: absolute; inset: 0 auto 0 0; width: min(320px, 86vw); background: var(--surface); box-shadow: var(--shadow);
  display: flex; flex-direction: column; padding: 0 0 max(16px, env(safe-area-inset-bottom)); transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-hd { display: flex; align-items: center; justify-content: space-between; height: var(--hd); padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.drawer-logo { height: calc(var(--logo-h, 30px) - 4px); width: auto; }
.drawer-close { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--head); cursor: pointer; display: grid; place-items: center; }
.drawer-close:hover { background: var(--surface-2); }
.drawer-nav { display: flex; flex-direction: column; padding: 10px; }
.drawer-nav a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.drawer-nav a .ci { color: var(--muted); }
.drawer-nav a:hover { background: var(--surface-2); }
.drawer-nav a[aria-current] { background: var(--accent-soft); color: var(--head); }
.drawer-nav a[aria-current] .ci { color: var(--accent-ink); }
.drawer-lang { margin: auto 22px 0; padding-top: 16px; }
html.no-scroll { overflow: hidden; }

/* ---- buttons, chips, links -------------------------------------------------------------------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.btns-center { justify-content: center; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--head); font-weight: 600; font-size: .95rem; text-decoration: none; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); border-color: transparent; }
.btn-ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .22); border-color: #fff; }
.btn .ci, .more .ci { transition: transform .15s; }
.btn:hover .ci, .card-link:hover .more .ci, a.more:hover .ci { transform: translateX(2px); }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .93rem; color: var(--accent-ink); text-decoration: none; }
.chip-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.chip-icon .ci { width: 22px; height: 22px; }
.chip-warn { background: var(--warn-soft); color: var(--warn-ink); }

/* ---- sections, grids -------------------------------------------------------------------------- */
.sec { padding: clamp(40px, 6vw, 72px) 0; }
.sec-alt { background: var(--surface-2); }
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sec-hd h2 { margin: 0; }
.h-sm { font-size: 1.15rem; margin-top: 1.6em; }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--head); line-height: 1.6; }
.grid { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.split-aside { grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); }
@media (max-width: 860px) { .split, .split-aside { grid-template-columns: 1fr; } }
@media (min-width: 861px) { .sticky-col { position: sticky; top: calc(var(--hd) + 24px); } }

/* ---- hero (home) ------------------------------------------------------------------------------ */
.hero { position: relative; color: #fff; background: #12202a var(--hero) center / cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(10, 18, 24, .9) 0%, rgba(10, 18, 24, .72) 45%, rgba(10, 18, 24, .25) 100%); }
.hero-in { padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(88px, 11vw, 150px); }
.hero-plain { background: var(--plain-bg); color: var(--plain-ink); border-bottom: 1px solid var(--line); }
.hero-plain::before { background: none; }
.hero.hero-plain h1 { color: var(--plain-ink); }
.hero-plain .hero-sub { color: var(--plain-sub); }
.hero-plain .eyebrow { background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: var(--line); color: var(--accent-ink); }
.hero-plain .btn-ghost { background: var(--plain-ghost-bg); border-color: var(--plain-ghost-line); color: var(--plain-ghost-ink); }
.hero-plain .btn-ghost:hover { border-color: var(--plain-ghost-ink); }
.hero-mark { position: absolute; right: max(16px, calc((100vw - var(--wrap)) / 2 + 16px)); top: 50%; transform: translateY(-50%); width: min(30vw, 340px); opacity: .9; pointer-events: none; }
@media (max-width: 860px) { .hero-mark { display: none; } }
.hero-plain .hero-in > * { position: relative; }
.eyebrow { display: inline-block; margin-bottom: 18px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); }
.hero h1 { color: #fff; font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); max-width: 20ch; margin-bottom: .4em; }
.hero-sub { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); max-width: 62ch; color: rgba(255, 255, 255, .88); margin-bottom: 28px; }
.facts { position: relative; z-index: 2; margin: -52px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.facts div { padding: 18px 20px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; }
.facts dt { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; color: var(--head); overflow-wrap: anywhere; }
@media (min-width: 861px) { .facts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div { border-left: 0; border-top: 1px solid var(--line); }
  .facts div:nth-child(-n+2) { border-top: 0; }
  .facts div:nth-child(2n) { border-left: 1px solid var(--line); }
  .facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---- page head (inner pages) ------------------------------------------------------------------- */
.ph { padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.ph-img { position: relative; color: #fff; border: 0; background: #12202a var(--ph) center / cover no-repeat; isolation: isolate;
  padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(36px, 5vw, 56px); }
.ph-img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 18, 24, .88), rgba(10, 18, 24, .45)); }
.ph h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); margin: 0; }
.ph-img h1 { color: #fff; }
.ph-lead { margin: 10px 0 0; color: var(--muted); }
.crumbs { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs .ci { width: 14px; height: 14px; }
.ph-img .crumbs { color: rgba(255, 255, 255, .8); }
.ph-img .crumbs a:hover { color: #fff; }

/* ---- cards, tiles, panels ---------------------------------------------------------------------- */
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: inherit; text-decoration: none; }
.card-link { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card-link:hover .card-media img { transform: scale(1.03); }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; flex: 1; }
.card-title { display: block; font-size: 1.08rem; font-weight: 700; color: var(--head); line-height: 1.3; margin: 0; }
.card-text { display: block; color: var(--muted); margin: 0; font-size: .95rem; }
.card-body .more { margin-top: auto; padding-top: 4px; }
.card-row { flex-direction: row; }
.card-row .card-media { width: 40%; aspect-ratio: auto; min-height: 220px; flex: none; }
.card-product { display: grid; place-items: center; }
.card-product:has(img) { background: #fff; }
.card-product img { object-fit: contain; padding: 18px; }
@media (max-width: 640px) { .card-row { flex-direction: column; } .card-row .card-media { width: 100%; min-height: 0; aspect-ratio: 16 / 10; } }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tile p { margin: 0; }
.features .tile p { font-size: .95rem; }
.tile-lg { padding: clamp(20px, 3vw, 28px); }
.tile-lg .h-sm { margin: 0; }
.tile-link { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.tile-link:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); }
.goals { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.goal { flex-direction: row; gap: 16px; scroll-margin-top: calc(var(--hd) + 24px); }
.goal .card-title { font-size: 1.05rem; margin-bottom: 4px; }
.goal p { color: var(--muted); }
.goal:target { border-color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.note { font-size: .93rem; margin-bottom: 28px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 3vw, 28px); }
.callout { display: flex; gap: 16px; margin-top: 32px; padding: clamp(20px, 3vw, 28px); border-radius: var(--r); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.callout .h-sm { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .callout { flex-direction: column; } }
.dl { margin: 0; display: grid; gap: 14px; }
.dl dt { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dl dd { margin: 2px 0 0; font-weight: 600; color: var(--head); }
.dl-icons dt { display: flex; align-items: center; gap: 8px; }
.dl-icons dd { padding-left: 26px; font-weight: 400; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .ci { color: var(--accent-ink); margin-top: .25em; }

/* ---- before / after slider ------------------------------------------------------------------------ */
.cmp { margin: 0; }
.cmp-stack { display: grid; gap: 20px; }
.cmp-frame { position: relative; overflow: hidden; border-radius: var(--r); aspect-ratio: 4 / 3; background: var(--surface-2); touch-action: pan-y; user-select: none; }
.cmp-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.cmp-frame .cmp-real { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-tag { position: absolute; top: 12px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: #fff; background: rgba(10, 18, 24, .62); pointer-events: none; }
.cmp-tag-l { left: 12px; } .cmp-tag-r { right: 12px; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .35); pointer-events: none; }
.cmp-handle .ci { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; padding: 8px; transform: translate(-50%, -50%); border-radius: 50%;
  background: #fff; color: #1b252d; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.cmp-frame { cursor: ew-resize; }
.cmp input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; -webkit-appearance: none; appearance: none; }
.cmp-frame:has(input:focus-visible) .cmp-handle .ci { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- home: mosaic, people ---------------------------------------------------------------------------- */
.mosaic { display: grid; gap: 12px; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 150px; }
.mosaic-item { position: relative; overflow: hidden; border-radius: var(--r-sm); grid-column: span 3; color: #fff; text-decoration: none; background: var(--surface-2); }
.mosaic-item:nth-child(1) { grid-row: span 2; }
.mosaic-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mosaic-item::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(8, 14, 20, .78)); }
.mosaic-item span { position: absolute; left: 14px; bottom: 10px; z-index: 1; font-weight: 700; }
.mosaic-item small { display: block; font-weight: 400; opacity: .85; }
.mosaic-item:hover img { transform: scale(1.04); }
@media (max-width: 760px) {
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; }
  .mosaic-item, .mosaic-item:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .mosaic-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
}
.people-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.people-mini a { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line);
  color: var(--head); text-decoration: none; font-weight: 600; }
.people-mini a:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.people-mini img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; }
.degree, .post { font-weight: 400; color: var(--muted); }

/* ---- team ------------------------------------------------------------------------------------------------ */
.person { display: flex; flex-direction: column; gap: 6px; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--r); background: var(--surface-2); margin-bottom: 8px; }
.person-name { font-size: 1.05rem; margin: 0; }
.person-name .degree { display: block; font-size: .85rem; }
.person-mail { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .92rem; min-width: 0; }
.person-mail .ci { color: var(--muted); }
.person-mail a { color: var(--text); overflow-wrap: anywhere; }
.person p:last-child { margin: 4px 0 0; }
@media (max-width: 420px) { .people { grid-template-columns: 1fr; } .person img { max-width: 260px; } }

/* ---- publications ----------------------------------------------------------------------------------------- */
.year { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.year:first-child { border-top: 0; padding-top: 0; }
.year-h { font-size: 1.4rem; color: var(--muted); margin: 0; }
@media (max-width: 640px) { .year { grid-template-columns: 1fr; gap: 6px; } }
.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.pub p { margin: 0; }
.pub-t { font-weight: 700; color: var(--head); line-height: 1.4; }
.pub-t a { color: var(--head); text-decoration: none; }
.pub-t a:hover { color: var(--accent-ink); text-decoration: underline; }
.pub-t .ci { width: 14px; height: 14px; margin-left: 6px; color: var(--muted); }
.pub-a { color: var(--text); font-size: .93rem; margin-top: 3px !important; }
.pub-a b { font-weight: 700; color: var(--head); }
.pub-v { color: var(--muted); font-size: .88rem; font-style: italic; }
.pub-r { margin-top: 4px !important; font-size: .85rem; }
.pub-r a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.pub-r .ci { width: 14px; height: 14px; }

/* ---- gallery ------------------------------------------------------------------------------------------------ */
.chips-bar { position: sticky; top: var(--hd); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--head); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.chip small { color: var(--muted); font-weight: 600; }
.chip:hover, .chip.is-active { border-color: var(--accent); background: var(--accent-soft); }
.gal-sec { scroll-margin-top: calc(var(--hd) + 56px); padding: 36px 0 12px; }
.gal-sec:last-of-type { padding-bottom: 64px; }
.gal-cmp { margin-bottom: 16px; }
.gal { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
@media (max-width: 540px) { .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.gal a { display: block; overflow: hidden; border-radius: var(--r-sm); aspect-ratio: 4 / 3; background: var(--surface-2); cursor: zoom-in; }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gal a:hover img { transform: scale(1.04); }
.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 10, 14, .97); color: #fff; overflow: hidden; }
.lb::backdrop { background: transparent; }
.lb[open] { display: grid; place-items: center; }
.lb-fig { margin: 0; display: grid; gap: 10px; justify-items: center; padding: 56px 72px; max-width: 100%; }
.lb-fig img { max-width: min(1400px, 100%); max-height: calc(100dvh - 150px); width: auto; height: auto; border-radius: 8px; }
.lb-fig figcaption { font-size: .9rem; color: rgba(255, 255, 255, .8); }
.lb-btn { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn .ci { width: 24px; height: 24px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lb-fig { padding: 64px 8px 84px; } .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; } }

/* ---- contact: map loads on click, the building photo stands in until then -------------------------------------- */
.contact .lead { margin-bottom: 20px; }
.contact .btns { margin-top: 24px; }
.map { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); min-height: 360px; display: flex; flex-direction: column;
  background: #12202a var(--map) center / cover no-repeat; }
.map::before { content: ""; position: absolute; inset: 0; background: rgba(10, 18, 24, .45); }
.map-play { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 0; background: none;
  color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.map-play .ci { width: 52px; height: 52px; padding: 12px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 20px rgba(0, 0, 0, .3); transition: transform .15s; }
.map-play:hover .ci { transform: translateY(-2px); }
.map figcaption { position: relative; padding: 10px 14px; font-size: .85rem; background: var(--surface); color: var(--muted); }
.map.is-live { background: none; }
.map.is-live::before { display: none; }
.map iframe { flex: 1; width: 100%; min-height: 360px; border: 0; }

/* ---- contact band, footer ----------------------------------------------------------------------------------------- */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(24px, 4vw, 40px);
  border-radius: calc(var(--r) + 4px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cta h2 { margin-bottom: 6px; }
.cta p { margin: 0; color: var(--muted); }
.ft { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 max(32px, env(safe-area-inset-bottom)); font-size: .92rem; }
.ft-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.ft-brand img { height: calc(var(--logo-h, 30px) - 4px); width: auto; margin-bottom: 12px; }
.ft-brand p, .ft-org p { color: var(--muted); margin: 0 0 8px; }
.ft-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; align-content: start; }
.ft-nav a { color: var(--text); text-decoration: none; }
.ft-nav a:hover { color: var(--accent-ink); }
.ft-org a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
@media (max-width: 760px) { .ft-in { grid-template-columns: 1fr; gap: 20px; } }

/* ---- motion: short, only for what enters the screen; none when the user asks for less ------------------------------ */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .35s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
main.is-swapping { opacity: .4; transition: opacity .12s; }
main.is-entering { animation: c-enter .22s ease both; }
@keyframes c-enter { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
