/* VISCO, the Visual Computing Lab.
   Inter for text, Syncopate for the wordmark only, AMU navy as the one brand colour. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #6b7280;
  --line: #e5e7eb;
  --brand: #002d69;      /* AMU navy: wordmark, active states */
  --link: #0049a4;       /* AMU blue: links */
  --max: 1080px;
  --radius: 4px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mark: "Syncopate", "Inter", sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 2rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0 0; }
.section-last { padding-bottom: 96px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.mark { color: var(--brand); flex: none; }
.brand:hover { text-decoration: none; }
.wordmark { font-family: var(--font-mark); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.04em; color: var(--brand); line-height: 1; }
.brand-sub { font-size: 0.875rem; color: var(--ink-3); padding-left: 14px; margin-left: 2px; border-left: 1px solid var(--line); line-height: 1.1; }
.site-nav { display: flex; gap: 32px; height: 100%; }
.site-nav a { display: flex; align-items: center; color: var(--ink-2); font-size: 0.9375rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px 0; background: var(--ink); }

/* ---------- page head ---------- */
.page-head { padding: 56px 0 36px; border-bottom: 1px solid var(--line); }
.page-head .lede { margin: 12px 0 0; max-width: 44rem; color: var(--ink-2); }
.lede { font-size: 1.125rem; line-height: 1.55; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head a { font-size: 0.9375rem; font-weight: 500; }
.label, .theme-body h3, .contact-grid h2 { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }

/* ---------- home: first view ---------- */
.hero { padding: 40px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.showcase { position: relative; aspect-ratio: 2 / 1; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.reel { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-caption { position: absolute; right: 12px; bottom: 12px; margin: 0; padding: 4px 10px; border-radius: 3px; background: rgba(17, 24, 39, 0.62); color: #fff; font-size: 0.8125rem; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.reel-caption.is-active { opacity: 1; pointer-events: auto; }
.reel-caption a { color: #fff; font-weight: 600; }

/* ---------- home: below the fold ---------- */
.block-title { margin-bottom: 16px; }
.about-text { font-size: 1.1875rem; line-height: 1.6; color: var(--ink-2); margin-bottom: 20px; }
.more-links { display: flex; gap: 24px; font-weight: 500; font-size: 0.9375rem; margin: 0; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.card { display: flex; flex-direction: column; color: var(--ink); }
.card:hover { text-decoration: none; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--bg-soft); margin-bottom: 14px; transition: opacity 0.15s; }
.card:hover img { opacity: 0.88; }
.card-title { font-weight: 600; font-size: 1rem; }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 2px; }
.card-sub { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.card-venue { font-size: 0.8125rem; color: var(--ink-3); margin-top: 6px; }

.supporters { border-top: 1px solid var(--line); padding-top: 40px; text-align: center; }
.supporters .label { margin-bottom: 28px; }
.supporter-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 32px 80px; }
.supporter-logos img { height: var(--h); width: auto; max-width: 100%; object-fit: contain; }
.supporter-logos a:hover { opacity: 0.8; }

/* ---------- news ---------- */
.news { list-style: none; }
.news li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 12px 0; font-size: 0.9375rem; line-height: 1.5; border-top: 1px solid var(--line); }
.news li:first-child { border-top: 0; padding-top: 0; }
.news time { color: var(--ink-3); font-size: 0.8125rem; line-height: 1.85; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- publications ---------- */
.year-index, .theme-index { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.9375rem; font-weight: 500; }
.year { font-size: 1.375rem; padding: 40px 0 10px; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.pub { display: grid; grid-template-columns: 192px minmax(0, 1fr); gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.pub:last-child { border-bottom: 0; }
.pub-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-soft); }
.pub-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pub-thumb-empty { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.pub-thumb-empty .mark { width: 44px; height: 44px; color: #d3dae3; }
.pub-title { font-size: 1.03125rem; letter-spacing: -0.01em; line-height: 1.4; margin-bottom: 4px; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--link); }
.pub-authors { margin: 0 0 3px; font-size: 0.90625rem; color: var(--ink-2); }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.pub-venue { margin: 0; font-size: 0.875rem; color: var(--ink-3); }
.pub-venue .venue { color: var(--ink-2); font-weight: 500; }
.pub-highlight { margin: 3px 0 0; font-size: 0.875rem; }
.pub-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; font-size: 0.875rem; font-weight: 500; }

/* ---------- people ---------- */
.lead { display: flex; align-items: center; gap: 28px; padding-bottom: 8px; }
.lead-photo { width: 144px; height: 144px; object-fit: cover; border-radius: var(--radius); background: var(--bg-soft); }
.lead-photo-link { flex: none; }
.lead-photo-link:hover .lead-photo, a.person-photo:hover img { opacity: 0.88; }
.lead-name { margin: 0; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.lead-name a { color: var(--ink); }
.lead-name a:hover { color: var(--link); }
.lead-role { margin: 2px 0 10px; color: var(--ink-3); }
.lead-link { margin: 0; font-size: 0.9375rem; font-weight: 500; }
.group-title { font-size: 1.125rem; padding: 40px 0 10px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.people { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 24px; }
.person { display: flex; flex-direction: column; }
.person-photo { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius); background: #eef1f5; margin-bottom: 10px; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.15s; }
.person-photo svg { width: 100%; height: 100%; fill: #cdd5df; }
.person-name { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.person-name a { color: var(--ink); }
.person-name a:hover { color: var(--link); }

/* ---------- research ---------- */
.theme { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 44px; padding: 44px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.theme:last-child { border-bottom: 0; }
.theme-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--bg-soft); }
.theme-body h2 { font-size: 1.375rem; margin-bottom: 10px; }
.theme-body p { color: var(--ink-2); }
.topics { padding-left: 1.1em; margin-bottom: 20px; color: var(--ink-2); }
.topics li { margin: 3px 0; }
.theme-body h3 { margin-bottom: 8px; }
.theme-pubs { list-style: none; font-size: 0.9375rem; }
.theme-pubs li { padding: 3px 0; }
.theme-pubs span { color: var(--ink-3); font-size: 0.875rem; }
.theme-pubs span::before { content: "· "; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.contact-grid h2 { margin-bottom: 8px; }
.contact-grid p { color: var(--ink-2); margin-bottom: 28px; }
#openings { scroll-margin-top: 72px; }
.map { display: block; width: 100%; height: 420px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 48px; background: var(--bg-soft); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.875rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.footer-inner p { margin: 0; }
.site-footer a { color: var(--ink-2); }
.footer-links { display: flex; gap: 20px; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .cards { gap: 32px 20px; }
  .theme { grid-template-columns: 1fr; gap: 20px; }
  .contact-grid { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; height: auto; flex-direction: column; gap: 0; padding: 8px 24px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a { padding: 10px 0; border-bottom: 0; margin: 0; }
  .site-nav a[aria-current="page"] { color: var(--brand); }
  .brand-sub { display: none; }
  .hero { padding-top: 24px; }
  .section { padding-top: 56px; }
  h1 { font-size: 1.75rem; }
  .cards { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
  .supporter-logos { gap: 24px 48px; }
  .map { height: 300px; }
  .supporter-logos img { height: calc(var(--h) * 0.7); }
  .lead-photo { width: 112px; height: 112px; }
  .people { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 22px 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
