/* ------------------------------------------------------------------
   HPC Lab · ISTI-CNR
   ------------------------------------------------------------------ */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #efede6;
  --ink: #16181d;
  --ink-2: #3b3f4a;
  --muted: #646a78;
  --line: #e2dfd6;
  --accent: #0d5b8a;
  --accent-soft: #e3eef6;
  --accent-ink: #ffffff;
  --gold: #a35a00;
  --gold-soft: #fbefdc;
  --t-a: #0d5b8a;   --t-a-bg: #e3eef6;
  --t-q1: #1f7a4d;  --t-q1-bg: #e2f2e9;
  --t-conf: #4f5666; --t-conf-bg: #eceef2;
  --t-ws: #9a5b00;  --t-ws-bg: #fbefdc;
  --t-pre: #a8323e; --t-pre-bg: #f9e5e7;
  --t-ed: #6b3fa0;  --t-ed-bg: #efe8f8;
  --shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 8px 24px rgba(20, 22, 28, .06);
  --band-hero: linear-gradient(160deg, #dfecf6 0%, #eef4f8 45%, #f6f5f1 100%);
  --band-research: #f6f5f1;
  --band-lab: #e6eff6;
  --band-projects: #e9f1ec;
  --band-pubs: #ffffff;
  --band-awards: #f7efe2;
  --band-contact: #0f2b42;
  --radius: 14px;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --surface: #171a20; --surface-2: #1d2128; --ink: #e9eaee; --ink-2: #c6c9d1;
    --muted: #979dab; --line: #2a2e37; --accent: #74b9e8; --accent-soft: #16293a; --accent-ink: #0b1620;
    --gold: #f0a24f; --gold-soft: #33240f;
    --t-a: #74b9e8; --t-a-bg: #16293a; --t-q1: #6fd3a0; --t-q1-bg: #12291e;
    --t-conf: #b5bac6; --t-conf-bg: #23272f; --t-ws: #f0a24f; --t-ws-bg: #33240f;
    --t-pre: #f08c97; --t-pre-bg: #34181c; --t-ed: #c4a2f0; --t-ed-bg: #261c35;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --band-hero: linear-gradient(160deg, #10263a 0%, #111a24 50%, #0f1115 100%);
    --band-research: #0f1115;
    --band-lab: #111c27;
    --band-projects: #111d18;
    --band-pubs: #14171d;
    --band-awards: #1e1810;
    --band-contact: #0a1824;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #171a20; --surface-2: #1d2128; --ink: #e9eaee; --ink-2: #c6c9d1;
  --muted: #979dab; --line: #2a2e37; --accent: #74b9e8; --accent-soft: #16293a; --accent-ink: #0b1620;
  --gold: #f0a24f; --gold-soft: #33240f;
  --t-a: #74b9e8; --t-a-bg: #16293a; --t-q1: #6fd3a0; --t-q1-bg: #12291e;
  --t-conf: #b5bac6; --t-conf-bg: #23272f; --t-ws: #f0a24f; --t-ws-bg: #33240f;
  --t-pre: #f08c97; --t-pre-bg: #34181c; --t-ed: #c4a2f0; --t-ed-bg: #261c35;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --band-hero: linear-gradient(160deg, #10263a 0%, #111a24 50%, #0f1115 100%);
  --band-research: #0f1115;
  --band-lab: #111c27;
  --band-projects: #111d18;
  --band-pubs: #14171d;
  --band-awards: #1e1810;
  --band-contact: #0a1824;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; margin: 0; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); line-height: 1.15; margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { margin: 0 0 1rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 24px; }

/* ---------- section bands: full-bleed backgrounds, one tone per section ---------- */
.hero, .section, .footer { position: relative; clip-path: inset(0 -100vmax); }
.hero::before, .section::before, .footer::before {
  content: ""; position: absolute; inset: 0 -100vmax; z-index: -1; background: var(--band, transparent);
}
.hero { --band: var(--band-hero); }
#research { --band: var(--band-research); }
#people { --band: var(--bg); }
#results { --band: var(--band-lab); }
#people { --band: var(--band-research); }
#projects { --band: var(--band-projects); }
#publications { --band: var(--band-pubs); }
#awards { --band: var(--band-awards); }
#contact, .footer {
  --band: var(--band-contact);
  --ink: #f1f4f8; --ink-2: #c9d4df; --muted: #93a6b8; --line: rgba(255,255,255,.12);
  --surface: rgba(255,255,255,.06); --accent: #8cc8f0;
  color: var(--ink);
}
#contact .contact-block { border-color: rgba(255,255,255,.1); }
#projects .card, #research .theme, .result-card, .person { box-shadow: var(--shadow); }
#publications .search, #publications .pill { background: var(--bg); }
#publications .pill[aria-pressed="true"] { background: var(--ink); }
#publications .topics .pill[aria-pressed="true"] { background: var(--accent); }
#projects .tags li { background: var(--surface); border: 1px solid var(--line); }
#awards .timeline li { border-color: color-mix(in srgb, var(--gold) 18%, transparent); }
.eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}
.more { display: inline-block; margin-top: .5rem; font-weight: 500; font-size: .95rem; }
.subhead { margin: 2.5rem 0 1rem; font-size: 1.1rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: var(--ink-2); font-size: .9rem; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav-links a:hover { background: var(--surface-2); text-decoration: none; }
.theme-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none;
}

/* ---------- hero ---------- */
.hero { padding-top: 80px; padding-bottom: 80px; }
.hero h1 { max-width: 16em; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.05; margin-bottom: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--accent); }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 40em; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 2rem 0; padding: 0; }
.stats div { border-top: 2px solid var(--ink); padding-top: 10px; }
.stats dt { font-family: var(--serif); font-size: 2rem; line-height: 1; font-weight: 500; }
.stats dd { margin: 6px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: 500 .95rem var(--sans);
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: var(--ink-2); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { opacity: .9; }

.hero-card {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow); max-width: 260px; justify-self: end; width: 100%;
}
.hero-card img { aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; background: #fff; }
.hero-card figcaption { padding: 16px 20px 18px; display: grid; gap: 2px; }
.hero-card strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.hero-card span { color: var(--muted); font-size: .88rem; }

/* ---------- research ---------- */
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.theme {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column;
}
.theme-num { font-family: var(--serif); color: var(--accent); font-size: .95rem; margin-bottom: .75rem; }
.theme h3 { margin-bottom: .75rem; }
.theme > p { color: var(--ink-2); font-size: .95rem; }
.theme-papers { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: 10px; flex: 1; align-content: start; }
.theme-papers li { font-size: .88rem; line-height: 1.4; padding-top: 10px; border-top: 1px solid var(--line); }
.theme-papers .v { display: inline-block; font-size: .7rem; font-weight: 600; color: var(--accent); margin-right: 6px; letter-spacing: .02em; }
.theme-papers a { color: var(--ink); }
.earlier { margin: 1.5rem 0 0; color: var(--muted); font-size: .95rem; }
.area-note { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; }
.area-note button { font: inherit; font-size: .8rem; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0; }

/* ---------- lab ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.split > div > p { color: var(--ink-2); }
.lines { padding-left: 1.1rem; margin: 0 0 1.5rem; color: var(--ink-2); }
.lines li { margin-bottom: .6rem; }
.lines strong { color: var(--ink); font-weight: 600; }
.people { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.people h3 { margin-bottom: .5rem; }
.people-group { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1rem 0 .3rem; }
.people-list { font-size: .9rem; color: var(--ink-2); line-height: 1.55; }

/* ---------- projects ---------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; letter-spacing: .02em; margin-bottom: .5rem; }
.card p { font-size: .9rem; color: var(--ink-2); margin: 0; }
.tags { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .85rem; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }

/* ---------- publications ---------- */
.pub-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.pub-meta { font-size: .85rem; color: var(--muted); max-width: 30em; margin-bottom: 1.5rem; }
.filters { display: grid; gap: 12px; margin-bottom: 1.25rem; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 12px; color: var(--muted); max-width: 420px;
}
.search:focus-within { border-color: var(--accent); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); padding: 10px 0; width: 100%; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font: 500 .85rem var(--sans); padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.pill:hover { border-color: var(--ink-2); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill .n { opacity: .6; font-weight: 400; margin-left: 4px; }
.topics .pill { border-radius: 8px; font-size: .8rem; padding: 4px 10px; }
.topics .pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pub-count { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }

.pub-year { font-family: var(--serif); font-size: 1.5rem; color: var(--muted); margin: 2rem 0 .25rem; }
.pub-year:first-child { margin-top: .5rem; }
.pub {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.badge {
  display: inline-block; text-align: center; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  padding: 4px 6px; border-radius: 6px; align-self: start; margin-top: 3px;
  color: var(--t-conf); background: var(--t-conf-bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge.a_conf { color: var(--t-a); background: var(--t-a-bg); }
.badge.q1 { color: var(--t-q1); background: var(--t-q1-bg); }
.badge.workshop { color: var(--t-ws); background: var(--t-ws-bg); }
.badge.preprint { color: var(--t-pre); background: var(--t-pre-bg); }
.badge.edited, .badge.book { color: var(--t-ed); background: var(--t-ed-bg); }
.pub-title { font-weight: 600; line-height: 1.4; color: var(--ink); margin: 0 0 4px; }
.pub-title a { color: inherit; }
.pub-authors { font-size: .88rem; color: var(--ink-2); margin: 0 0 2px; }
.pub-authors b { color: var(--ink); font-weight: 600; }
.pub-venue { font-size: .82rem; color: var(--muted); margin: 0; }
.pub-venue a { margin-left: 8px; font-weight: 500; }
.award {
  display: inline-block; font-size: .72rem; font-weight: 600; color: var(--gold); background: var(--gold-soft);
  border-radius: 6px; padding: 2px 8px; margin: 4px 0 2px;
}
.pub-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pub-topics button {
  font: 500 .72rem var(--sans); color: var(--muted); background: none; border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 7px; cursor: pointer;
}
.pub-topics button:hover { color: var(--accent); border-color: var(--accent); }
.more-btn { margin: 24px auto 0; display: flex; }
.more-btn[hidden] { display: none; }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- awards ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.t-year { font-family: var(--serif); font-size: 1.3rem; color: var(--muted); }
.t-badge { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--gold); background: var(--gold-soft); border-radius: 6px; padding: 2px 8px; margin-bottom: 4px; }
.t-title { font-weight: 600; margin: 0 0 2px; }
.t-meta { font-size: .88rem; color: var(--muted); margin: 0; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.contact-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.contact-block h3 { font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
address { font-style: normal; color: var(--ink-2); line-height: 1.6; }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

.footer { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
body { background: var(--band-contact); }
main { background: var(--bg); }
.footer p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; padding-bottom: 48px; }
  .hero-card { justify-self: start; max-width: 320px; order: -1; display: grid; grid-template-columns: 96px 1fr; align-items: center; border-radius: 16px; }
  .hero-card img { width: 96px; height: 96px; }
  .hero-card figcaption { padding: 12px 16px; }
  .themes, .split, .contact { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap, .section { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 52px; padding-bottom: 52px; }
  .nav-inner { padding: 0 16px; gap: 12px; }
  .brand { display: none; }
  .nav-links { margin-left: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .pill { white-space: nowrap; }
  .pub { grid-template-columns: 1fr; gap: 6px; }
  .badge { justify-self: start; max-width: 100%; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .footer { flex-direction: column; }
}


/* ======================= lab additions ======================= */
.brand { display: flex; align-items: baseline; gap: 6px; }
.brand-mark { font-family: var(--sans); font-weight: 700; font-size: .85rem; letter-spacing: .04em; color: var(--accent-ink); background: var(--accent); padding: 2px 6px; border-radius: 6px; align-self: center; }
.brand-sub { font-family: var(--sans); font-size: .75rem; font-weight: 500; color: var(--muted); }
.stats dd .since { white-space: nowrap; }
.section-lede { color: var(--ink-2); max-width: 46em; margin-top: -.5rem; margin-bottom: 1.5rem; }
.subhead.first { margin-top: 0; }
.note { font-size: .8rem; color: var(--muted); margin-top: 1rem; }
.theme-count { font-size: .8rem; color: var(--muted); margin-left: 6px; font-weight: 400; }

/* results */
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.result-card .award { align-self: start; margin: 0; }
.result-card h4 { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; line-height: 1.3; margin: 0; }
.result-card h4 a { color: var(--ink); }
.result-card p { font-size: .85rem; color: var(--muted); margin: 0; }
.result-card .meta { margin-top: auto; display: flex; gap: 10px; align-items: center; font-size: .8rem; color: var(--muted); }
.top-cited { list-style: none; counter-reset: c; padding: 0; margin: 0; display: grid; gap: 0; }
.top-cited li { counter-increment: c; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.top-cited li::before { content: counter(c); font-family: var(--serif); font-size: 1.3rem; color: var(--muted); }
.top-cited .t { font-weight: 600; }
.top-cited .t a { color: var(--ink); }
.top-cited .m { font-size: .85rem; color: var(--muted); }
.cite-n { font-family: var(--serif); font-size: 1.3rem; text-align: right; white-space: nowrap; }
.cite-n small { display: block; font-family: var(--sans); font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* people */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.person { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .9rem; color: var(--accent); background: var(--accent-soft); }
.person-name { font-weight: 600; font-size: .95rem; line-height: 1.25; margin: 0; }
.person-name a { color: var(--ink); }
.person-role { font-size: .8rem; color: var(--muted); margin: 2px 0 0; line-height: 1.3; }
.person-pubs { font: 500 .75rem var(--sans); color: var(--accent); background: none; border: 0; padding: 0; margin-top: 3px; cursor: pointer; }
.person-pubs:hover { text-decoration: underline; }
.people-grid.compact .person { box-shadow: none; padding: 10px 12px; }
.people-grid.compact .avatar { width: 34px; height: 34px; font-size: .78rem; }
.alumni { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.alumni summary { cursor: pointer; font-weight: 600; }
.alumni p { color: var(--ink-2); font-size: .92rem; margin-top: .75rem; }
.alumni-list { line-height: 1.8; }

/* projects */
.cards.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.small .card { padding: 16px; box-shadow: none; }

/* publication filters */
.filter-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-top .search { flex: 1 1 260px; }
.select { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.select select { font: 500 .88rem var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; max-width: 220px; }
.pub-cites { font-size: .78rem; color: var(--muted); margin-left: 8px; white-space: nowrap; }
.pub-authors .m { color: var(--ink); font-weight: 600; }

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .brand { display: flex; }
  .brand-sub { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.small { grid-template-columns: 1fr; }
  .filter-top .select { flex: 1 1 45%; }
  .select select { width: 100%; max-width: none; }
  .top-cited li { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .cite-n { grid-column: 2; text-align: left; font-size: 1rem; }
  .cite-n small { display: inline; margin-left: 4px; }
}

/* software & data */
#software { --band: var(--band-projects); }
.card.product { display: flex; flex-direction: column; gap: 6px; }
.card.product p { margin: 0; }
.product-kind { font-size: .72rem !important; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent) !important; }
.product-links { margin-top: auto !important; padding-top: 8px; display: flex; gap: 14px; font-size: .85rem; font-weight: 500; }
#software .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#projects { --band: var(--band-research); }
.datasets { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.datasets li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.datasets a { font-weight: 600; }
.datasets span { color: var(--ink-2); font-size: .9rem; }
.talks { padding-left: 1.1rem; color: var(--ink-2); font-size: .92rem; }
.talks li { margin-bottom: .4rem; }
@media (max-width: 960px) { #software .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  #software .cards { grid-template-columns: 1fr; }
  .datasets li { grid-template-columns: 1fr; gap: 2px; }
}

.person-name a, .alumni-list a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
.alumni-list a { color: var(--ink-2); }

.patent-tag { color: var(--accent) !important; background: var(--accent-soft) !important; }
.patent-nums { font-size: .8rem !important; color: var(--ink-2) !important; }
.patents .result-card .meta { display: block; line-height: 1.5; }

img.avatar { object-fit: cover; padding: 0; background: var(--surface-2); }
.person .avatar { width: 56px; height: 56px; }
.people-grid.compact .avatar { width: 40px; height: 40px; }

/* lab logo + project logos */
.brand-logo { display: inline-flex; align-items: center; border-radius: 8px; }
.brand-logo img { height: 30px; width: auto; display: block; }
:root[data-theme="dark"] .brand-logo { background: #fff; padding: 3px 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background: #fff; padding: 3px 8px; } }
.card.project { display: flex; flex-direction: column; gap: 8px; }
.card.project h3 { margin: 4px 0 0; }
.card.project h3 a { color: var(--ink); }
.logo-plate { display: grid; place-items: center; height: 76px; padding: 10px 14px; background: #fff; border-radius: 10px; border: 1px solid #e6e3da; }
.logo-plate img { max-height: 54px; max-width: 100%; width: auto; object-fit: contain; }
.cards.small .logo-plate { height: 60px; }
.cards.small .logo-plate img { max-height: 40px; }
.logo-fallback { font: 700 1.1rem var(--sans); color: #4f5666; letter-spacing: .04em; }
.logo-wall { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.logo-wall li { background: #fff; border: 1px solid #e6e3da; border-radius: 10px; height: 64px; display: grid; place-items: center; padding: 8px 10px; }
.logo-wall a { display: grid; place-items: center; width: 100%; height: 100%; }
.logo-wall img { max-height: 44px; max-width: 100%; object-fit: contain; }
.brand { flex: none; }
.brand-logo { flex: none; }
.brand-logo img { width: 90px; height: 30px; max-width: none; }

/* preamble highlights */
.lede a.hl { color: var(--ink); font-weight: 600; text-decoration: none; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 22%, transparent) 62%); padding: 0 1px; }
.lede a.hl:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.theme:target { outline: 2px solid var(--accent); outline-offset: 2px; }
/* software logos */
.card.product .logo-plate { height: 64px; margin-bottom: 4px; }
.card.product .logo-plate img { max-height: 46px; }
.tusk-mark { display: inline-flex; align-items: center; gap: 2px; font: 700 1.5rem Inter, var(--sans); color: #1f2a37; letter-spacing: -.02em; }
.tusk-mark b { color: #44A194; font-weight: 700; }
.tusk-mark img { width: 30px; height: 30px; max-height: none !important; }
/* dataset icons */
.datasets li { grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 12px; }
.datasets li > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.datasets .ds-name a { font-weight: 600; }
.ds-icon { width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); margin-top: 1px; }
.ds-icon img { width: 22px; height: 22px; border-radius: 5px; }
@media (max-width: 640px) { .datasets li > div { grid-template-columns: 1fr; gap: 2px; } }
#people { --band: var(--band-pubs); }
/* earlier-project logos fill their tiles */
.logo-wall li { height: 72px; padding: 6px 8px; }
.logo-wall img { max-height: 58px; width: auto; max-width: 100%; }
/* project-card logos: bigger, less padding */
.logo-plate { padding: 6px 10px; }
.logo-plate img { max-height: 62px; }
.cards.small .logo-plate { height: 76px; }
.cards.small .logo-plate img { max-height: 60px; }
/* taller plates so square logos (ACCORDION) are not dwarfed */
.cards.small .logo-plate { height: 88px; }
.cards.small .logo-plate img { max-height: 72px; }
