/* AMCO — site styles.
   Built so far: reset + design tokens, the top navigation bar, the People page.
   ------------------------------------------------------------------------- */

/* --------------------------------------------------------------- fonts --- */
/* IBM Plex Sans, self-hosted (no external request — matters for GDPR on an
   EU university site). Variable weight 400–600. Picked for its engineering /
   scientific character: it was drawn for a technology institute. */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -------------------------------------------------------------- tokens --- */
:root {
  /* Brand — sampled directly from assets/img/logo.svg */
  --amco-navy: #163e64;
  --amco-navy-deep: #10314e;
  --amco-rust: #e97132;

  --paper: #f9f8f5; /* page background — soft warm off-white, not pure white */
  --surface: #ffffff; /* lifted surfaces: cards, inputs, panels */
  --wash: #f0eee9; /* one step deeper than paper, for banded sections */
  --ink: #12222f; /* body text */
  --slate: #58636f; /* secondary text — ~5.3:1 on white */
  --hairline: #e6e3dc;

  --nav-h: 52px;
  --wrap: 1180px;
  --pad: 22px;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

@media (min-width: 1024px) {
  :root {
    --nav-h: 60px;
    --pad: 32px;
  }
}

/* ---------------------------------------------------------------- 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(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto; /* keep aspect ratio when only width (or aspect-ratio) is set —
                   otherwise the width/height HTML attributes stretch the image */
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
}
.skip-link:focus {
  left: var(--pad);
  top: 10px;
  padding: 8px 14px;
  background: var(--paper);
  border: 2px solid var(--amco-navy);
  border-radius: 6px;
  font-weight: 500;
}

/* -------------------------------------------------------------- masthead --- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 248, 245, 0.88);
  backdrop-filter: saturate(1.5) blur(10px);
  -webkit-backdrop-filter: saturate(1.5) blur(10px);
  box-shadow: 0 1px 0 rgba(16, 49, 78, 0.07), 0 18px 34px -30px rgba(16, 49, 78, 0.4);
}
.masthead__inner {
  position: relative;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* brand -------------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 0 1 auto;
  min-width: 0;
  text-decoration: none;
  border-radius: 4px;
}
.brand:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 5px;
}
.brand__mark {
  height: 26px;
  width: auto;
  flex: 0 0 auto;
}
.brand__name {
  font-size: 0.78125rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--slate);
  max-width: 24ch;
  padding-left: 14px;
  border-left: 1px solid var(--hairline);
}
@media (min-width: 1024px) {
  .brand__mark {
    height: 28px;
  }
}
/* the name lockup needs room; hide it until there is space for nav + name */
@media (max-width: 1099px) {
  .brand__name {
    display: none;
  }
}

/* toggle (mobile only, and only when JS is present) --------------------- */
.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--amco-navy);
  cursor: pointer;
  border-radius: 6px;
}
.nav__toggle:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 2px;
}
.nav__bars {
  position: relative;
}
.nav__bars,
.nav__bars::before,
.nav__bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav__bars::before,
.nav__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav__bars::before {
  top: -6px;
}
.nav__bars::after {
  top: 6px;
}
.nav__toggle[aria-expanded="true"] .nav__bars {
  background: transparent;
}
.nav__toggle[aria-expanded="true"] .nav__bars::before {
  top: 0;
  transform: rotate(45deg);
}
.nav__toggle[aria-expanded="true"] .nav__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* nav ------------------------------------------------------------------- */
.nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: flex;
  align-items: center;
  padding: 0 2px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--slate);
  transition: color 0.15s var(--ease);
}
.nav__link:hover {
  color: var(--amco-navy);
}
.nav__link:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 4px;
  border-radius: 3px;
  color: var(--amco-navy);
}
.nav__link-text {
  display: inline-block;
}
.nav__link[aria-current="page"] {
  color: var(--amco-navy);
}

/* --- mobile (< 860px) --- */
@media (max-width: 859.98px) {
  .masthead__inner {
    flex-wrap: wrap;
  }
  .nav__toggle[aria-expanded] {
    display: inline-flex;
  }

  /* no JS: menu is a full-width block below the bar, always visible */
  .nav {
    flex-basis: 100%;
  }
  .nav__list {
    flex-direction: column;
  }
  .nav__link {
    min-height: 52px;
    padding-left: 4px;
    font-size: 1rem;
    border-top: 1px solid var(--hairline);
  }
  .nav__item:first-child .nav__link {
    border-top: 0;
  }
  .nav__link[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--amco-rust);
  }

  /* JS present: menu collapses into a toggled dropdown */
  .nav[data-open] {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-basis: auto;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 22px 30px -22px rgba(16, 49, 78, 0.3);
  }
  .nav[data-open="false"] {
    display: none;
  }
  .nav[data-open] .nav__list {
    max-width: var(--wrap);
    margin-inline: auto;
    padding: 4px var(--pad) 12px;
  }
}

/* --- desktop (>= 860px) --- */
@media (min-width: 860px) {
  .nav__list {
    flex-direction: row;
    gap: clamp(16px, 2vw, 28px);
    align-items: stretch;
  }
  .nav__item {
    display: flex;
  }
  .nav__link {
    position: relative;
    min-height: var(--nav-h);
  }
  /* underline grows in from the centre on hover, and stays put for the
     active section — softer than an instant colour swap */
  .nav__link::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--amco-rust);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s var(--ease);
  }
  .nav__link:hover::after,
  .nav__link[aria-current="page"]::after {
    transform: scaleX(1);
  }
}

/* --------------------------------------------------------- footer + body --- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--hairline);
  background: var(--wash);
}
.site-footer__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 28px var(--pad);
  font-size: 0.8125rem;
  color: var(--slate);
}
.site-footer__name {
  margin: 0 0 2px;
  font-weight: 500;
  color: var(--ink);
}
.site-footer__aff {
  margin: 0;
}
.site-footer__link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.site-footer__link:hover {
  color: var(--amco-navy);
  border-bottom-color: currentColor;
}
.site-footer__link:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 2px;
}
.site-footer__address {
  margin: 4px 0 0;
}
.site-footer__legal {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
}

.placeholder {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 72px var(--pad) 0;
}
.placeholder__eyebrow {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amco-rust);
}
.placeholder__title {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.placeholder__text {
  margin: 0;
  max-width: 54ch;
  color: var(--slate);
}

/* ====================================================================== HOME === */
/* Sections, top to bottom: hero (headline, buttons + two-photo collage, ribbon
   along its bottom edge) → research areas →
   "Who we are" band → latest news → recent publications → closing CTA.
   Shared bits: .home-label (rust small-caps), .home-section-title, .home-btn. */
.home-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amco-rust);
}
.home-section-head {
  margin-bottom: clamp(22px, 3vw, 34px);
}
.home-section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.home-section-title {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}
.home-more {
  flex-shrink: 0;
  color: var(--amco-navy);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.home-more:hover {
  color: var(--amco-rust);
}

.home-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border: 1.5px solid var(--amco-navy);
  border-radius: 999px;
  background: var(--amco-navy);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}
.home-btn:hover {
  background: var(--amco-navy-deep);
  border-color: var(--amco-navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -14px rgba(16, 49, 78, 0.7);
}
.home-btn--ghost {
  background: transparent;
  color: var(--amco-navy);
}
.home-btn--ghost:hover {
  background: var(--amco-navy);
  color: #fff;
}
.home-btn--light {
  background: #fff;
  border-color: #fff;
  color: var(--amco-navy);
}
.home-btn--light:hover {
  background: var(--amco-rust);
  border-color: var(--amco-rust);
  color: #fff;
  box-shadow: 0 14px 24px -14px rgba(0, 0, 0, 0.6);
}
.home-btn:focus-visible,
.home-more:focus-visible {
  outline: 2px solid var(--amco-rust);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ hero --- */
.home-hero {
  position: relative;
  overflow: hidden;
}
/* soft colour glows + a fine network of connected nodes (assets/img/network.svg,
   generated static SVG, faded out toward the text) with one highlighted signal
   path; deliberately not the flowing ribbon the People page uses */
.home-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 420px at 88% 8%, rgba(233, 113, 50, 0.13), transparent 70%),
    radial-gradient(760px 520px at 0% 0%, rgba(22, 62, 100, 0.08), transparent 70%),
    url("../img/network.svg") right center / cover no-repeat;
}
.home-hero__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(32px, 4.5vw, 60px) var(--pad) clamp(56px, 6vw, 84px);
}
.home-hero__text {
  flex: 1 1 340px;
  min-width: 0;
}
/* highlighted phrase — the rust background sits directly on this span, so it
   can never drift out of alignment with the text */
.home-hero__title-mark {
  background: rgba(233, 113, 50, 0.65);
  color: #fff;
  padding: 0 8px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.home-hero__title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--ink);
}
.home-hero__body {
  margin: 20px 0 0;
  max-width: 54ch;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.65;
  color: var(--slate);
}
.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Two layered photos: the notch on the primary photo echoes the cut in the
   AMCO logo's "O"; the rust square ties back to the highlighted headline. */
.home-visual {
  position: relative;
  flex: 0 0 auto;
  width: clamp(280px, 36vw, 450px);
  aspect-ratio: 1 / 1;
  margin-left: auto;
}
.home-visual__accent {
  position: absolute;
  z-index: 0;
  top: 0;
  /* the primary photo ends at 40px + 76%; this leaves a 10px orange peek on the
     right, matching the 10px one above it */
  right: calc(24% - 50px);
  width: 26%;
  height: 15%;
  background: var(--amco-rust);
}
.home-photo {
  position: absolute;
  margin: 0; /* positions below are explicit, not the browser's default <figure> margins */
}
.home-photo--primary {
  z-index: 1;
  left: 40px;
  top: 10px; /* leaves a 10px orange peek above the photo */
  width: 76%;
  height: 62%;
}
.home-photo--secondary {
  z-index: 2;
  right: calc(40px - 3%);
  bottom: calc(3% + 26px);
  width: 38%;
  height: 28%;
}
.home-photo__frame {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--wash);
  box-shadow: 0 22px 40px -20px rgba(16, 49, 78, 0.5);
}
.home-photo--primary .home-photo__frame {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}
.home-photo--secondary .home-photo__frame {
  box-shadow: 0 0 0 8px var(--paper), 0 24px 40px -20px rgba(16, 49, 78, 0.5);
}
.home-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-photo--primary img {
  object-position: 50% 30%;
}
.home-photo--secondary img {
  object-position: 24% 42%;
  transform: scale(1.45);
}
@media (max-width: 700px) {
  .home-visual {
    margin-inline: auto;
  }
}

/* ------------------------------------------------------- research areas --- */
.home-areas {
  padding: clamp(52px, 8vw, 96px) 0 clamp(36px, 5vw, 56px);
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.home-areas__inner,
.home-news__inner,
.home-pubs__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.home-areas__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 1000px) {
  /* five cards: three on the first row, two wider ones below */
  .home-areas__grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .home-area {
    grid-column: span 2;
  }
  .home-area--wide {
    grid-column: span 3;
  }
}
.home-area {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 49, 78, 0.04);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
  animation: person-in 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.home-area:hover,
.home-area:focus-within {
  transform: translateY(-4px);
  border-color: #d8d4cb;
  box-shadow: 0 24px 38px -26px rgba(16, 49, 78, 0.42);
}
/* card images are admin-uploaded and arbitrary, so they are cropped to the frame
   (cover); the tint only shows while loading or for a card without an image */
.home-area__media {
  position: relative;
  flex: none;
  aspect-ratio: 5 / 4;
  border-bottom: 1px solid var(--hairline);
  background: #edf2f7;
  overflow: hidden;
}
.home-area--wide .home-area__media {
  aspect-ratio: 2 / 1;
}
.home-area__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.home-area__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.home-area__ph img {
  position: static;
  width: 120px;
  height: auto;
  object-fit: contain;
  opacity: 0.35;
}
.home-area:hover .home-area__media img {
  transform: scale(1.03);
}
.home-area__body {
  padding: 20px 22px 24px;
}
.home-area__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.home-area__link {
  color: inherit;
  text-decoration: none;
}
.home-area__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.home-area__link:focus-visible {
  outline: none;
}
.home-area:has(.home-area__link:focus-visible) {
  outline: 2px solid var(--amco-navy);
  outline-offset: 3px;
}
.home-area__text {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--slate);
}

/* ------------------------------------------------------------- who we are --- */
.home-about {
  margin-top: clamp(24px, 4vw, 40px);
  background: var(--wash);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.home-about__inner {
  max-width: 74ch;
  margin-inline: auto;
  padding: clamp(44px, 7vw, 80px) var(--pad);
  text-align: center;
}
.home-about__title {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}
.home-about__body {
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.75;
  color: var(--slate);
}
.home-about__body p {
  margin: 0 0 14px;
}
.home-about__body p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------- latest news --- */
.home-news {
  padding: clamp(48px, 7vw, 88px) 0 0;
}

/* ------------------------------------------------------- recent publications --- */
.home-pubs {
  padding: clamp(48px, 7vw, 88px) 0 0;
}
.home-pubs__list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 49, 78, 0.04);
}
.home-pub {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px clamp(16px, 2.6vw, 28px);
  border-bottom: 1px solid var(--hairline);
  transition: background-color 0.2s var(--ease);
}
.home-pub:last-child {
  border-bottom: 0;
}
.home-pub:hover {
  background: var(--paper);
}
.home-pub__year {
  justify-self: start;
  padding: 5px 0;
  width: 56px;
  border-radius: 999px;
  background: rgba(22, 62, 100, 0.08);
  color: var(--amco-navy);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.home-pub__text {
  min-width: 0;
}
.home-pub__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.home-pub__title a {
  color: inherit;
  text-decoration: none;
}
.home-pub__title a:hover {
  color: var(--amco-rust);
}
.home-pub__meta {
  margin: 5px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--slate);
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .home-pub {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .home-section-head--row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* --------------------------------------------------------------- closing CTA --- */
.home-cta {
  padding: clamp(48px, 7vw, 88px) var(--pad) clamp(52px, 8vw, 96px);
}
.home-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px 40px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(30px, 5vw, 56px) clamp(24px, 5vw, 60px);
  border-radius: 24px;
  background:
    linear-gradient(90deg, var(--amco-navy-deep) 28%, rgba(16, 49, 78, 0) 72%),
    url("../img/waves-light.svg") right center / 1400px auto no-repeat,
    linear-gradient(135deg, var(--amco-navy) 0%, var(--amco-navy-deep) 100%);
  color: #fff;
  box-shadow: 0 34px 56px -36px rgba(16, 49, 78, 0.7);
}
.home-cta__text {
  flex: 1 1 340px;
}
.home-cta__title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}
.home-cta__body {
  margin: 0;
  max-width: 52ch;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

@media (prefers-reduced-motion: reduce) {
  .home-area {
    animation: none;
  }
  .home-btn,
  .home-area {
    transition: none;
  }
}

/* ============================================================= PEOPLE page === */

/* page head — the one title block shared by every top-level page (People,
   Publications, Thesis, News, 404): label, big title, intro, hairline rule.
   A page with a photo adds .page-head__inner--media and a framed
   <figure class="page-head__media"> beside the text; no coloured band. */
.page-head {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 64px) var(--pad) 0;
}
.page-head__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 44px);
  align-items: center;
  padding-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 860px) {
  .page-head__inner--media {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  }
}
.page-head__eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amco-rust);
}
.page-head__title {
  margin: 0;
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
}
.page-head__lead {
  margin: 18px 0 0;
  max-width: 56ch;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.6;
  color: var(--slate);
}
.page-head__lead a {
  color: var(--amco-navy);
}
.page-head__media {
  position: relative;
  margin: 0 12px 12px 0;
}
.page-head__media::before {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 40%;
  height: 40%;
  background: var(--amco-rust);
}
.page-head__media img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 25%;
  background: var(--wash);
  /* corner notch echoing the logo's "O", same as the home page photo */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}
/* ---- People: dedicated header (title beside an uncropped group photo) ---- */
.people-head {
  position: relative;
  overflow: hidden;
  /* flowing ribbon of fine lines along the bottom of the header
     (assets/img/waves.svg) */
  background: url("../img/waves.svg") center bottom / 100% 230px no-repeat;
}
.people-head__wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 64px) var(--pad) clamp(120px, 12vw, 152px);
}
.people-head__inner {
  display: grid;
  gap: 28px 48px;
  align-items: center;
}
@media (min-width: 860px) {
  .people-head__inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  }
}
.people-head__title {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
}
/* the photo is a 2.8:1 panorama — kept uncropped so nobody is cut off, and
   small enough that the whole header fits in the first screen */
.people-panorama {
  position: relative;
  margin: 0 12px 12px 0;
}
.people-panorama::before {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 22%;
  height: 34%;
  background: var(--amco-rust);
}
.people-panorama img {
  position: relative;
  width: 100%;
  border-radius: 12px;
  background: var(--wash);
  box-shadow: 0 24px 40px -28px rgba(16, 49, 78, 0.5);
}

/* sticky group tabs */
.people-tabs {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  margin-top: clamp(24px, 3vw, 36px);
  background: rgba(249, 248, 245, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.people-tabs__inner {
  display: flex;
  gap: 6px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 10px var(--pad);
  overflow-x: auto;
  scrollbar-width: none;
}
.people-tabs__inner::-webkit-scrollbar {
  display: none;
}
.people-tab {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.people-tab:hover {
  background: var(--wash);
}
.people-tab:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 2px;
}
.people-tab[aria-current="true"] {
  background: var(--amco-navy);
  color: #fff;
}
.people-tab__count {
  font-size: 0.75rem;
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
}

/* roster */
.people {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 56px) var(--pad) 0;
}
.people-section {
  scroll-margin-top: calc(var(--nav-h) + 76px);
}
.people-section + .people-section {
  margin-top: clamp(48px, 7vw, 76px);
}
.people-section__head {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: clamp(22px, 3vw, 32px);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}
.people-section__head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 44px;
  height: 2px;
  background: var(--amco-rust);
}
.people-section__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.people-section__count {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
}

/* borderless roster: portrait + name + role sit on the page, no card box.
   One uniform size for every group. The whole tile links to the person's
   profile (stretched link on the name); the icon links stay independently
   clickable above it. Effects: the tiles fade in one after another, and on
   hover the portrait lifts and the photo zooms. Long names or roles can't
   break a tile: they wrap and are capped in height. */
.people-grid {
  display: grid;
  gap: clamp(24px, 3vw, 36px) clamp(18px, 2.4vw, 28px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 164px), 1fr));
}
.person {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  animation: person-in 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes person-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.person__portrait {
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: var(--wash);
  box-shadow: inset 0 0 0 1px rgba(16, 49, 78, 0.07);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.person__initials {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--wash), #e3dfd5);
  color: var(--slate);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.person__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  transition: transform 0.45s var(--ease);
}
.person:hover .person__portrait,
.person:focus-within .person__portrait {
  transform: translateY(-5px);
  box-shadow: inset 0 0 0 1px rgba(16, 49, 78, 0.07),
    0 24px 36px -18px rgba(16, 49, 78, 0.38);
}
.person:hover .person__portrait img {
  transform: scale(1.05);
}
.person__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 2px 0;
}
.person__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  /* a very long name can't make the tile (or its row) grow */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person__link-main {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.person__link-main::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
}
.person:hover .person__link-main {
  color: var(--amco-navy);
}
.person__link-main:focus-visible {
  outline: none;
}
.person__link-main:focus-visible::after {
  outline: 2px solid var(--amco-navy);
  outline-offset: 4px;
}
.person__role {
  margin: 1px 0 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person__links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 10px 0 0 -6px;
}
/* phones: two tiles per row so each person stays small */
@media (max-width: 560px) {
  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
  }
  .person__name {
    font-size: 0.94rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .person {
    animation: none;
  }
}

.person__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: var(--slate);
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.person__link:hover {
  color: var(--amco-navy);
  background: var(--wash);
}
.person__link:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 2px;
}
.person__link .icon {
  display: block;
  width: 17px;
  height: 17px;
}

/* ============================================================ PERSON page === */
/* The original layout, modernised: a navy banner (with a faint ribbon of light
   lines), the portrait overlapping the banner seam into a contact card, the
   name and role inside the banner, and the info column to the right. Only what
   exists is shown: Research interests always, and Biography / publications /
   projects / teaching / awards once the person has filled them in. The photo
   and the contact card share one shadow and are clipped at the seam so they
   read as one continuous unit. */
.profile {
  /* single source of truth for the banner's height — the container's negative
     margin and the name box both need to match this exactly, or a seam opens
     between the navy banner and the content beside it */
  --hero-h: clamp(180px, 21vw, 250px);
}
.profile-hero {
  position: relative;
  height: var(--hero-h);
  background: linear-gradient(135deg, var(--amco-navy-deep), var(--amco-navy) 60%, #1d4d7c);
  overflow: hidden;
}
.profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/waves-light.svg") right center / 1400px auto no-repeat;
  opacity: 0.22;
  pointer-events: none;
}
.profile-hero__back {
  position: absolute;
  z-index: 20; /* stays above .profile-container (z-index: 10) no matter what */
  top: 16px;
  left: var(--pad);
  right: var(--pad);
  max-width: 1040px;
  margin-inline: auto;
}
.profile-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.profile-back:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.profile-back:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---- Outer container — pulled UP into the banner via negative margin ---- */
.profile-container {
  position: relative;
  z-index: 10;
  margin-top: calc(-1 * var(--hero-h));
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: var(--pad);
  padding-bottom: clamp(56px, 7vw, 96px);
}

/* ---- Grid: picture | name / picture | contact | info ---- */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "picture"
    "name"
    "contact"
    "info";
}
@media (min-width: 760px) {
  .profile-grid {
    /* a capped column, not a flexible 1fr — otherwise the photo keeps growing
       with the viewport instead of staying a fixed portrait size */
    grid-template-columns: minmax(150px, 184px) minmax(0, 1fr);
    grid-template-areas:
      "picture name"
      "picture info"
      "contact info"
      ".       info";
  }
}

/* ---- Photo ---- */
.profile-img {
  grid-area: picture;
  justify-self: center;
  /* clears the "← People" pill, which sits near the banner's top */
  margin-top: 4.2rem;
  width: min(62%, 176px);
}
@media (min-width: 760px) {
  .profile-img {
    justify-self: stretch;
    width: 100%;
  }
}
.profile-img img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5; /* governs the box height — no competing max-height */
  object-fit: cover;
  object-position: top center;
  padding: 0.4rem;
  background-color: var(--surface);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 0 20px 1px rgba(16, 49, 78, 0.2);
  clip-path: inset(-24px -24px 0 -24px);
}

.profile-img__ph {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  border: 0.4rem solid var(--surface);
  border-radius: 14px 14px 0 0;
  background: linear-gradient(135deg, var(--wash), #e3dfd5);
  box-shadow: 0 0 20px 1px rgba(16, 49, 78, 0.2);
  clip-path: inset(-24px -24px 0 -24px);
  color: var(--slate);
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---- Name — inside the banner, white text ---- */
.profile-name {
  grid-area: name;
  display: flex;
  align-items: flex-end;
  padding: 3.4rem 1.6rem 1.9rem;
  color: #fff;
}
@media (min-width: 760px) {
  .profile-name {
    height: var(--hero-h); /* matches the banner exactly — see .profile */
    padding: 0 1.6rem 1.8rem 1.6rem;
  }
}
.profile-name__items {
  min-width: 0;
}
.profile-name__h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff;
  overflow-wrap: anywhere;
}
.profile-name__role {
  display: inline-block;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(233, 113, 50, 0.95);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
}
.profile-name__status {
  display: inline-block;
  margin: 0 0 0 8px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

/* ---- Contact card — below the photo: one short row of icon buttons ---- */
.profile-contact {
  grid-area: contact;
  /* on phones the card is exactly as wide as the photo above it */
  justify-self: center;
  width: min(62%, 176px);
  padding: 0.35rem 0.5rem 0.65rem;
  background: var(--surface);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 0 20px 1px rgba(16, 49, 78, 0.2);
  /* hide the shadow on the top edge so it merges seamlessly with the photo */
  clip-path: inset(0 -24px -24px -24px);
}
@media (min-width: 760px) {
  .profile-contact {
    justify-self: stretch;
    width: auto;
  }
}
.profile-contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.profile-contact__links:empty {
  display: none;
}
.profile-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--wash);
  color: var(--amco-navy);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
    transform 0.2s var(--ease);
}
.profile-btn:hover {
  background: var(--amco-navy);
  color: #fff;
  transform: translateY(-2px);
}
.profile-btn:focus-visible {
  outline: 2px solid var(--amco-rust);
  outline-offset: 2px;
}
.profile-btn .icon {
  display: block;
  width: 17px;
  height: 17px;
}

/* ---- Info / content sections ---- */
.profile-info {
  grid-area: info;
  padding-top: 2.2rem;
}
@media (min-width: 760px) {
  .profile-info {
    padding-left: 1.6rem;
  }
}
.profile-section + .profile-section {
  margin-top: clamp(28px, 4vw, 42px);
}
.profile-section__head {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}
.profile-section__head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 44px;
  height: 2px;
  background: var(--amco-rust);
}
.profile-section__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.profile-prose {
  margin: 0;
  color: #34414d;
}
.profile-prose p {
  margin: 0 0 0.9em;
  font-size: 1rem;
  line-height: 1.8;
}
.profile-prose p:last-child {
  margin-bottom: 0;
}
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.profile-tag {
  max-width: 100%;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: #34414d;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.profile-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.profile-list > li + li {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}
.pub__title,
.entry__title {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pub__authors,
.pub__meta,
.entry__meta {
  margin: 3px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--slate);
  overflow-wrap: anywhere;
}
.entry__summary {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #34414d;
}
.entry__link {
  color: var(--amco-navy);
  text-decoration: none;
  font-weight: 600;
}
.entry__link:hover {
  color: var(--amco-rust);
}
.entry__link:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 2px;
}

/* ======================================================= PUBLICATIONS page === */
/* Loosely modelled on GRASP Lab's publications page: the shared .page-head
   band, a search/topic/year filter bar, and an editorial, year-grouped
   reference list rather than a card grid. */

/* flowing lines (assets/img/waves-pubs.svg): an even ribbon of parallel lines
   following one smooth curve under the header, fading out at both ends. The
   ribbon lives on a pseudo-element so the fade doesn't touch the content. */
.pubs-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: clamp(100px, 9vw, 130px);
}
.pubs-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 170px;
  z-index: -1;
  background: url("../img/waves-pubs.svg") center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.pubs-head .page-head__inner {
  border-bottom: 0;
}

.pubs-body {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 52px) var(--pad) clamp(48px, 6vw, 72px);
}

/* empty state */
.pubs-empty {
  max-width: 60ch;
}
.pubs-empty__text {
  margin: 0;
  color: var(--slate);
  font-size: 0.98rem;
}

/* filter bar — a single compact row (no stacked labels: the search
   placeholder and each select's "All …" option already say what it does),
   since at today's list length a full form's worth of chrome is more than
   the list needs. Revisit if the list grows a lot. */
.pubs-filters {
  margin-bottom: clamp(20px, 3vw, 28px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.pubs-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pubs-filters__input,
.pubs-filters__select {
  height: 38px;
  flex: 1 1 180px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
}
.pubs-filters__input {
  flex-grow: 2;
}
.pubs-filters__input:focus-visible,
.pubs-filters__select:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 1px;
  border-color: var(--amco-navy);
}
.pubs-filters__count {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
}

/* year-grouped reference list */
.pubs-year + .pubs-year {
  margin-top: clamp(32px, 4vw, 44px);
}
.pubs-year__heading {
  margin: 0 0 16px;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--amco-navy);
  font-variant-numeric: tabular-nums;
}
.pubs-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pub-entry {
  padding: 14px 10px;
  margin-inline: -10px;
  border-top: 1px solid var(--hairline);
  border-radius: 8px;
  transition: background-color 0.15s var(--ease);
}
.pub-entry:hover {
  background: var(--wash);
}
.pubs-list > .pub-entry:first-child {
  border-top: 0;
}
.pub-entry__title {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.pub-entry__title-link {
  color: inherit;
  text-decoration: none;
}
.pub-entry__title-link:hover {
  color: var(--amco-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pub-entry__title-link:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 2px;
}
.pub-entry__authors {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--slate);
}
.pub-entry__meta {
  margin: 4px 0 0;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--slate);
}
.pub-entry__meta .entry__link {
  margin-left: 4px;
  font-style: normal;
}
.pub-entry__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.pub-entry__tags:empty {
  display: none;
}
.pub-entry__tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--slate);
  font-size: 0.74rem;
  font-weight: 500;
}

/* Native <details>/<summary> — no JS needed for expand/collapse, works with
   keyboard and screen readers for free. Only rendered at all when an entry
   actually has an abstract (see publications.php), so most entries right
   now show no control — that's expected until abstracts are filled in. */
.pub-entry__abstract {
  margin-top: 10px;
}
.pub-entry__abstract summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--amco-navy);
  list-style: none; /* hide default marker in Firefox */
}
.pub-entry__abstract summary::-webkit-details-marker {
  display: none; /* hide default marker in Chrome/Safari */
}
.pub-entry__abstract summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s var(--ease);
}
.pub-entry__abstract[open] summary::before {
  transform: rotate(45deg);
}
.pub-entry__abstract summary:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pub-entry__abstract summary:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 3px;
  border-radius: 3px;
}
.pub-entry__abstract-body {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--hairline);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--slate);
}
.pub-entry__abstract-body p {
  margin: 0 0 10px;
}
.pub-entry__abstract-body p:last-child {
  margin-bottom: 0;
}

/* ============================================================== THESIS page === */
/* =============================================================== THESIS pages === */
/* List: intro panels, topic chips, a grid of compact proposal cards. Detail
   (thesis.php?id=N): description + facts on the left, a sticky contact panel on
   the right. Cards are links (stretched link on the title). */
.thesis-info {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(28px, 4vw, 44px) var(--pad) 0;
}
.thesis-info__inner {
  max-width: 78ch;
}
.thesis-intro p {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--slate);
}
.thesis-intro p:last-child {
  margin-bottom: 0;
}

.thesis-list {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 52px) var(--pad) clamp(40px, 6vw, 64px);
}
.thesis-list__title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.thesis-list__count {
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--slate);
  font-size: 0.8rem;
  font-weight: 600;
  vertical-align: middle;
}
.thesis-empty {
  color: var(--slate);
  font-size: 0.95rem;
}

.thesis-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.thesis-filters[hidden] {
  display: none;
}
.thesis-filter {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}
.thesis-filter:hover {
  border-color: #cfcabf;
  background: var(--wash);
}
.thesis-filter:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 2px;
}
.thesis-filter[aria-pressed="true"] {
  background: var(--amco-navy);
  border-color: var(--amco-navy);
  color: #fff;
}
.thesis-filter__n {
  font-size: 0.74rem;
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
}

.thesis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 18px;
}
.thesis-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px 22px 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 49, 78, 0.04);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
  animation: person-in 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.thesis-card[hidden] {
  display: none;
}
.thesis-card::before {
  /* accent line that draws in on hover */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--amco-rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.thesis-card:hover,
.thesis-card:focus-within {
  transform: translateY(-4px);
  border-color: #d8d4cb;
  box-shadow: 0 22px 34px -24px rgba(16, 49, 78, 0.4);
}
.thesis-card:hover::before,
.thesis-card:focus-within::before {
  transform: scaleX(1);
}
.thesis-card .thesis-tags {
  margin: 0;
}
.thesis-card__title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thesis-card__link {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.thesis-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}
.thesis-card:hover .thesis-card__link {
  color: var(--amco-navy);
}
.thesis-card__link:focus-visible {
  outline: none;
}
.thesis-card:has(.thesis-card__link:focus-visible) {
  outline: 2px solid var(--amco-navy);
  outline-offset: 3px;
}
.thesis-card__excerpt {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--slate);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thesis-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.thesis-card__who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--slate);
}
.thesis-card__more {
  flex: none;
  color: var(--amco-navy);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.thesis-card__arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}
.thesis-card:hover .thesis-card__arrow {
  transform: translateX(4px);
}

.thesis-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.thesis-tag {
  max-width: 100%;
  padding: 4px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: var(--wash);
  color: var(--slate);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.25;
}

/* detail page */
.thesis-back {
  margin: 0 0 18px;
  font-size: 0.9rem;
  font-weight: 500;
}
.thesis-back a {
  color: var(--amco-navy);
  text-decoration: none;
}
.thesis-back a:hover {
  color: var(--amco-rust);
}
.page-head__title--long {
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  line-height: 1.12;
  max-width: 30ch;
  overflow-wrap: anywhere;
}
.thesis-detail__body {
  display: grid;
  gap: 32px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(28px, 4vw, 48px) var(--pad) clamp(28px, 4vw, 48px);
}
@media (min-width: 900px) {
  .thesis-detail__body {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: start;
  }
}
.thesis-detail__main {
  display: grid;
  gap: 30px;
  min-width: 0;
}
.thesis-block__label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amco-rust);
}
.thesis-block p {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.75;
  color: #34414d;
}
.thesis-block p:last-child {
  margin-bottom: 0;
}
.thesis-aside {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 18px 30px -26px rgba(16, 49, 78, 0.45);
}
@media (min-width: 900px) {
  .thesis-aside {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
  }
}
.thesis-aside__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.thesis-aside__text {
  margin: 0 0 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--slate);
}
.thesis-aside__buttons {
  display: grid;
  gap: 8px;
}
.thesis-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--amco-navy);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color 0.15s var(--ease);
}
.thesis-btn:hover {
  background: var(--amco-navy-deep);
}
.thesis-btn:focus-visible {
  outline: 2px solid var(--amco-rust);
  outline-offset: 2px;
}
.thesis-btn--ghost {
  background: transparent;
  color: var(--amco-navy);
  box-shadow: inset 0 0 0 1px #cfcabf;
}
.thesis-btn--ghost:hover {
  background: var(--wash);
}
.thesis-aside__back {
  display: inline-block;
  margin-top: 14px;
  color: var(--slate);
  font-size: 0.82rem;
  text-decoration: none;
}
.thesis-aside__back:hover {
  color: var(--amco-navy);
  text-decoration: underline;
}
.pager {
  display: grid;
  gap: 14px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--pad) clamp(40px, 6vw, 64px);
}
@media (min-width: 700px) {
  .pager {
    grid-template-columns: 1fr 1fr;
  }
}
.pager__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.pager__link:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 28px -22px rgba(16, 49, 78, 0.4);
}
.pager__link--next {
  text-align: right;
  grid-column: 2;
}
.pager__link--prev:only-child {
  grid-column: 1;
}
.pager__label {
  color: var(--slate);
  font-size: 0.76rem;
  font-weight: 600;
}
.pager__title {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .thesis-card {
    animation: none;
  }
}

/* ================================================================ NEWS page === */
/* List: the latest post is a wide featured card, older posts form a grid; each
   card is a link (stretched link on the title). Article (news.php?id=N): one
   centered column — centered header, gallery, body, numbered papers, links. */
.news-wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(28px, 4vw, 48px) var(--pad) clamp(48px, 7vw, 80px);
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 18px;
}
.news-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--slate);
  font-size: 0.95rem;
  text-align: center;
}
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 49, 78, 0.04);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
  animation: person-in 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.news-card:hover,
.news-card:focus-within {
  transform: translateY(-4px);
  border-color: #d8d4cb;
  box-shadow: 0 24px 38px -26px rgba(16, 49, 78, 0.42);
}
.news-card__media {
  flex: none;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--wash);
}
.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.news-card:hover .news-card__media img {
  transform: scale(1.05);
}
.news-card__ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--wash), #e6e2d9);
}
.news-card__ph img {
  width: 120px;
  height: auto;
  opacity: 0.5;
}
.news-card:hover .news-card__ph img {
  transform: none;
}
.news-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px 15px;
}
.news-card__date {
  margin: 0;
  color: var(--amco-rust);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.news-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__link {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.news-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.news-card:hover .news-card__link {
  color: var(--amco-navy);
}
.news-card__link:focus-visible {
  outline: none;
}
.news-card:has(.news-card__link:focus-visible) {
  outline: 2px solid var(--amco-navy);
  outline-offset: 3px;
}
.news-card__summary {
  margin: 0;
  color: var(--slate);
  font-size: 0.85rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__more {
  margin-top: auto;
  padding-top: 4px;
  color: var(--amco-navy);
  font-size: 0.8rem;
  font-weight: 600;
}
.news-card__arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}
.news-card:hover .news-card__arrow {
  transform: translateX(4px);
}
.news-card--feature {
  grid-column: 1 / -1;
}
@media (min-width: 860px) {
  .news-card--feature {
    flex-direction: row;
  }
  .news-card--feature .news-card__media {
    flex: 0 0 40%;
    aspect-ratio: auto;
    min-height: 230px;
  }
  .news-card--feature .news-card__body {
    justify-content: center;
    gap: 10px;
    padding: clamp(18px, 2.6vw, 30px);
  }
  .news-card--feature .news-card__title {
    font-size: clamp(1.25rem, 2.1vw, 1.65rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    -webkit-line-clamp: 3;
  }
  .news-card--feature .news-card__summary {
    font-size: 0.92rem;
    -webkit-line-clamp: 3;
  }
  .news-card--feature .news-card__more {
    align-self: flex-start;
    margin-top: 4px;
    padding: 8px 15px;
    border-radius: 999px;
    background: var(--amco-navy);
    color: #fff;
  }
}

/* article */
.news-article {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(28px, 5vw, 56px) var(--pad) clamp(48px, 7vw, 80px);
}
.news-article__head {
  text-align: center;
}
.news-back {
  margin: 0 0 clamp(20px, 3vw, 32px);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
}
.news-back a {
  color: var(--amco-navy);
  text-decoration: none;
}
.news-back a:hover {
  color: var(--amco-rust);
}
.news-article__date {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(233, 113, 50, 0.12);
  color: #b4521a;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.news-article__title {
  margin: 0;
  font-size: clamp(1.8rem, 4.4vw, 2.9rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.news-article__summary {
  margin: 18px auto 0;
  max-width: 60ch;
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  line-height: 1.6;
  color: var(--slate);
}
.news-post__gallery {
  margin: clamp(28px, 4vw, 44px) 0 0;
}
.news-post__hero {
  margin: 0 0 8px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--wash);
}
.news-post__hero a {
  display: block;
}
.news-post__hero img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.news-post__hero:hover img {
  transform: scale(1.02);
}
.news-post__strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.news-post__thumb {
  margin: 0;
  flex: 1 1 130px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--wash);
}
.news-post__thumb a {
  display: block;
}
.news-post__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}
.news-post__thumb:hover img {
  transform: scale(1.05);
}
.news-article__body {
  display: grid;
  gap: clamp(24px, 3.4vw, 36px);
  margin-top: clamp(28px, 4vw, 44px);
}
.news-prose p {
  margin: 0 0 16px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: #34414d;
}
.news-prose p:last-child {
  margin-bottom: 0;
}
.news-papers__label {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amco-rust);
}
.news-papers__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paper;
}
.news-paper {
  position: relative;
  min-width: 0;
  padding: 14px 18px 14px 58px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  counter-increment: paper;
}
.news-paper::before {
  content: counter(paper);
  position: absolute;
  left: 16px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--amco-navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}
.news-paper__title {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.news-paper__authors {
  margin: 3px 0 0;
  color: var(--slate);
  font-size: 0.84rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.news-article__link {
  margin: 0;
  text-align: center;
}
.news-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--amco-navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s var(--ease);
}
.news-btn:hover {
  background: var(--amco-navy-deep);
}
.news-btn:focus-visible {
  outline: 2px solid var(--amco-rust);
  outline-offset: 2px;
}
.news-article .pager {
  padding: clamp(32px, 5vw, 48px) 0 0;
  margin: 0;
  max-width: none;
}
@media (prefers-reduced-motion: reduce) {
  .news-card {
    animation: none;
  }
}

/* ----------------------------------------------------------------- admin --- */
.admin-auth {
  max-width: 360px;
  margin: clamp(48px, 10vh, 96px) auto;
  padding: 0 var(--pad);
}
.admin-auth__title {
  margin: 0 0 20px;
  font-size: 1.4rem;
}
.admin-auth__form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-auth__label {
  font-size: 0.85rem;
  color: var(--slate);
}
.admin-auth__input,
.admin-form__input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}
.admin-auth__input:focus-visible,
.admin-form__input:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 1px;
  border-color: var(--amco-navy);
}
.admin-auth__submit,
.admin-form__submit {
  margin-top: 10px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--amco-navy);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.admin-auth__submit:hover,
.admin-form__submit:hover {
  background: var(--amco-navy-deep);
}

.admin-message {
  margin: 0 0 20px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.admin-message--success {
  background: #e7f3ea;
  color: #1e5c31;
}
.admin-message--error {
  background: #fbe9e7;
  color: #92321f;
}

.admin {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) var(--pad) 80px;
}
.admin__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.admin__title {
  margin: 0;
  font-size: 1.6rem;
}
.admin__count {
  margin: 4px 0 0;
  color: var(--slate);
  font-size: 0.9rem;
}
.admin__logout {
  color: var(--amco-navy);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.admin__logout:hover {
  text-decoration: underline;
}
.admin__panel {
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 24px;
  background: var(--wash);
  border-radius: 12px;
}
.admin__panel-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
}
.admin__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.admin__panel-head .admin__panel-title {
  margin: 0;
}
.admin-add {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--amco-navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s var(--ease);
}
.admin-add:hover {
  background: var(--amco-navy-deep);
}
.admin-add:focus-visible {
  outline: 2px solid var(--amco-rust);
  outline-offset: 2px;
}

.admin-form {
  display: grid;
  gap: 12px;
}
.admin-form__label {
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 4px;
  display: block;
}
.admin-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-form__topics {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.admin-form__topics legend {
  padding: 0 6px;
}
.admin-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--hairline);
  border-radius: 8px;
  overflow: hidden;
}
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
}
.admin-row--empty {
  color: var(--slate);
  justify-content: center;
}
.admin-row__title {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
}
.admin-row__who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.admin-row__avatar {
  flex: none;
  width: 40px;
  height: 50px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 6px;
  background: var(--wash);
}
.admin-row__avatar--empty {
  display: grid;
  place-items: center;
  color: var(--slate);
  font-size: 1rem;
  font-weight: 600;
}
.admin__panel--muted {
  background: transparent;
  border: 1px dashed #d3cfc6;
}
.admin__panel-count {
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 600;
  vertical-align: middle;
}
.admin__panel-note {
  margin: -6px 0 14px;
}
.admin__panel--muted .admin-row__avatar {
  filter: grayscale(1);
  opacity: 0.7;
}
.admin-row__meta {
  margin: 2px 0 0;
  color: var(--slate);
  font-size: 0.82rem;
}
.admin-row__delete-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
  color: #92321f;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.admin-row__delete-btn:hover {
  background: #fbe9e7;
  border-color: #f0c4bc;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
}
.admin-tabs__link {
  padding: 10px 4px;
  margin-bottom: -1px;
  color: var(--slate);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.admin-tabs__link + .admin-tabs__link {
  margin-left: 16px;
}
.admin-tabs__link:hover {
  color: var(--ink);
}
.admin-tabs__link--active {
  color: var(--amco-navy);
  border-bottom-color: var(--amco-navy);
}

.admin-subtabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  background: var(--wash);
  border-radius: 10px;
}
.admin-subtabs__link {
  padding: 7px 16px;
  border-radius: 7px;
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.admin-subtabs__link:hover {
  color: var(--ink);
}
.admin-subtabs__link--active {
  background: var(--surface);
  color: var(--amco-navy);
  box-shadow: 0 1px 2px rgba(16, 49, 78, 0.12);
}

.admin-form__textarea {
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  resize: vertical;
}
.admin-form__textarea:focus-visible {
  outline: 2px solid var(--amco-navy);
  outline-offset: 1px;
  border-color: var(--amco-navy);
}
.admin-form__hint {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--slate);
}
.admin__panel-title--sub {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 1rem;
}

.admin-repeat {
  display: grid;
  gap: 10px;
}
.admin-repeat__item {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
.admin-repeat__legend {
  padding: 0 4px;
  font-size: 0.78rem;
  color: var(--slate);
}
.admin-repeat__item--contact {
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
}
.admin-repeat__item--contact .admin-repeat__legend {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .admin-repeat__item--contact {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
  }
}

.admin-news-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.admin-news-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--hairline);
}
.admin-news-image__option {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--slate);
  cursor: pointer;
}
.admin-news-image__option--remove {
  color: #92321f;
}

.admin-hero-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.admin-hero-photo {
  display: block;
  cursor: pointer;
}
.admin-hero-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--hairline);
}
.admin-hero-photo input:checked + img {
  border-color: var(--amco-navy);
}
.admin-hero-photo input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.admin-library-photo {
  min-width: 0;
}
.admin-library-photo__remove,
.admin-library-photo__inuse {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--slate);
}
.admin-library-photo__remove {
  cursor: pointer;
}
.admin-library-photo__remove input {
  margin-right: 4px;
  accent-color: #b3261e;
}
.admin-library-photo__inuse {
  font-weight: 600;
  color: var(--amco-navy);
}
.admin-library-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 6px 0 14px;
}
.admin-library-actions .admin-form__hint {
  margin: 0;
}
.admin-form__submit--danger {
  width: auto;
  background: transparent;
  color: #b3261e;
  box-shadow: inset 0 0 0 1px #e3b4ae;
}
.admin-form__submit--danger:hover {
  background: #fbe9e7;
}

.admin-hero-photo__name {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--slate);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.admin-row__edit-link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
  color: var(--amco-navy);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.admin-row__edit-link:hover {
  background: var(--wash);
  border-color: #d3cfc6;
}

.admin-toggles {
  display: grid;
  gap: 10px;
}
.admin-toggle {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  cursor: pointer;
}
.admin-toggle__label {
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .admin-form__row {
    grid-template-columns: 1fr;
  }
  .admin-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------- motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------ admin: Home page cards --- */
.admin-home-card {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 14px 16px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--paper);
}
.admin-home-card__legend {
  padding: 0 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--amco-navy);
}
.admin-home-card__top {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 12px;
}
.admin-home-card__top > div {
  display: grid;
  gap: 6px;
  align-content: start;
}
.admin-home-card__remove {
  justify-self: start;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #b3261e;
  cursor: pointer;
}
.admin-home-card__remove input {
  margin-right: 6px;
  accent-color: #b3261e;
}
@media (max-width: 520px) {
  .admin-home-card__top {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------ admin: server check --- */
.admin-checks {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.admin-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.9rem;
}
.admin-check__mark {
  grid-row: span 2;
  align-self: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c4d4e3;
}
.admin-check--ok .admin-check__mark { background: #2c8a5e; }
.admin-check--warn .admin-check__mark { background: #d99a1c; }
.admin-check--fail .admin-check__mark { background: #b3261e; }
.admin-check__label {
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.admin-check__detail {
  color: var(--slate);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.admin-check--fail .admin-check__detail { color: #b3261e; }
