/* ASPOM site styles. No framework; mobile first.
   Content classes (for page authors) are documented in README.md. */

:root {
  --accent: #0b7a8a;
  --accent-dark: #075c68;
  --accent-soft: #e3f3f5;
  --navy: #0b3a6e;
  --navy-dark: #072648;
  --blue: #1c5fae;
  --ink: #1d2730;
  --muted: #56626e;
  --line: #dce3ea;
  --bg: #ffffff;
  --bg-soft: #f3f6f9;
  --callout: #e7f0fb;
  --callout-line: #9fc0e8;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 32 48 / 8%), 0 4px 16px rgb(16 32 48 / 8%);
  --shadow-lift: 0 2px 4px rgb(16 32 48 / 10%), 0 12px 28px rgb(16 32 48 / 14%);
  --container: 72rem;
  --nav-h: 3.25rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); margin: 1.6em 0 0.6em; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p, ul, ol, dl { margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
sup { line-height: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.small { font-size: 0.875rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--navy); color: #fff; padding: 0.5rem 1rem; border-radius: 0 0 6px 6px;
}
.skip-link:focus { top: 0; color: #fff; }

.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-dark); margin: 0 0 0.35rem;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.7em 1.4em;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.button:hover { background: var(--accent-dark); color: #fff; }
.button-small { padding: 0.5em 1em; font-size: 0.9rem; }
.button-secondary { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.button-secondary:hover { background: var(--navy); color: #fff; }
.button-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.button-ghost:hover { background: #fff; color: var(--navy); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Header ---------- */

.site-header { background: #fff; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.brand { display: block; min-width: 0; flex: 0 1 22rem; }
.brand-logo { display: block; width: 100%; height: auto; }
.partner { display: block; flex: 0 0 auto; }
.partner-logo { display: block; width: 6.5rem; height: auto; border-radius: 2px; }
@media (min-width: 720px) {
  .header-inner { padding-top: 1rem; padding-bottom: 1rem; }
  .partner-logo { width: 10rem; }
}

/* ---------- Navigation (sticky bar) ---------- */

.site-nav {
  position: sticky; top: 0; z-index: 30;
  background: var(--navy);
  box-shadow: 0 2px 10px rgb(7 38 72 / 25%);
}
.nav-inner { position: relative; min-height: var(--nav-h); display: flex; align-items: center; }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: #fff; font-weight: 600; text-decoration: none; padding: 0.4rem 0.2rem;
}
.menu-toggle:hover { color: #cfe6ff; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative;
}
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }

.nav-list {
  display: none; list-style: none; margin: 0; padding: 0.25rem 1.25rem 0.75rem;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--navy); box-shadow: 0 10px 20px rgb(7 38 72 / 30%);
}
.nav-list:target, .nav-list.is-open { display: block; }
.nav-item { margin: 0; }
.nav-item > a {
  display: block; color: #fff; text-decoration: none; font-weight: 600;
  padding: 0.7rem 0.25rem; border-bottom: 1px solid rgb(255 255 255 / 12%);
}
.nav-item:last-child > a { border-bottom: 0; }
.nav-item > a:hover { color: #cfe6ff; }
.nav-item > a[aria-current="page"] { color: #fff; box-shadow: inset 4px 0 0 #5fd0dc; padding-left: 0.85rem; }

@media (min-width: 860px) {
  .menu-toggle { display: none; }
  .nav-list {
    display: flex; position: static; padding: 0; background: none; box-shadow: none; gap: 0 0.25rem;
  }
  .nav-item > a {
    border: 0; padding: 0 0.85rem; line-height: var(--nav-h); border-radius: 0;
  }
  .nav-item:first-child > a { padding-left: 0; }
  .nav-item > a:hover { background: rgb(255 255 255 / 8%); color: #fff; }
  .nav-item:first-child > a:hover { background: none; color: #cfe6ff; }
  .nav-item > a[aria-current="page"] { padding-left: 0.85rem; box-shadow: inset 0 -4px 0 #5fd0dc; }
  .nav-item:first-child > a[aria-current="page"] { padding-left: 0; }
}

/* ---------- Page header and body ---------- */

main:focus { outline: none; }

.page-header {
  background:
    radial-gradient(circle at 85% 0%, rgb(11 122 138 / 14%), transparent 45%),
    linear-gradient(180deg, #eef3f9, #f7f9fc);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0 1.5rem;
}
.page-title { margin: 0.35rem 0 0; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "\203A"; margin: 0 0.5rem; color: #8a96a3; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--navy); }

.page { padding-top: 2rem; padding-bottom: 3.5rem; }
.content { max-width: 52rem; overflow-wrap: break-word; }
.content a { overflow-wrap: anywhere; }
.content > :first-child { margin-top: 0; }
.home .content, .wide .content { max-width: none; }
.home .page { padding-top: 1.5rem; }

.lead { font-size: 1.2rem; color: var(--navy); }

/* ---------- Content building blocks ---------- */

/* Text with pictures beside it */
.media { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 2.5rem; margin: 0 0 2.5rem; align-items: start; }
.media > div > :first-child { margin-top: 0; }
.media-figure { margin: 0; display: grid; gap: 1rem; justify-items: center; }
.media-figure img { border-radius: 8px; }
@media (min-width: 720px) {
  .media { grid-template-columns: minmax(0, 1fr) minmax(0, 16rem); }
  .media--left { grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); }
  .media--left .media-figure { order: -1; }
  .media--narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 10rem); }
}
.content > .media + .media { border-top: 1px solid var(--line); padding-top: 2.5rem; }

/* Boxes */
.callout {
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.5rem;
  background: var(--callout); border-left: 5px solid var(--callout-line);
}
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; color: var(--navy); margin-bottom: 0.4em; }

/* Figures and tables */
.figure { margin: 0 0 2rem; }
.figure img { display: block; border-radius: 8px; }
.figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }
.table { border-collapse: collapse; width: 100%; margin: 0 0 1.5rem; font-size: 0.95rem; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.table th { background: var(--bg-soft); color: var(--navy); }
.table-scroll { overflow-x: auto; }

/* "Quick links" box at the top of long pages */
.toc {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1.2rem 1rem; margin: 0 0 2.5rem;
}
.toc-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem; }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.toc li { margin: 0; }
.toc a {
  display: inline-block; padding: 0.35rem 0.9rem; border-radius: 1.1rem; background: #fff;
  border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 0.92rem; line-height: 1.35;
}
.toc a:hover { border-color: var(--blue); }
.toc a[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.content h2[id] { padding-top: 0.25rem; }

/* Long numbered publication lists */
.publist { font-size: 0.95rem; padding-left: 2.25rem; }
.publist li { margin-bottom: 0.75em; padding-left: 0.25rem; }
.publist li::marker { color: var(--muted); font-weight: 600; }

/* Lists that start with a date (conferences, awards) */
.dated-list { list-style: none; padding: 0; font-size: 0.97rem; }
.dated-list li { padding: 0.65rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.dated-list .date {
  display: inline-block; min-width: 7.5rem; font-weight: 700; color: var(--navy);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 720px) {
  .dated-list li { position: relative; padding-left: 9.5rem; }
  .dated-list .date { position: absolute; left: 0; min-width: 0; }
}

/* Year timeline (awards) */
.timeline { margin: 0 0 2rem; border-left: 3px solid var(--line); padding-left: 1.5rem; }
.timeline-year { position: relative; padding-bottom: 1.5rem; }
.timeline-year::before {
  content: ""; position: absolute; left: calc(-1.5rem - 8.5px); top: 0.3rem;
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #fff;
}
.timeline dt { font-weight: 800; font-size: 1.15rem; color: var(--navy); margin-bottom: 0.4rem; }
.timeline dd {
  margin: 0 0 0.6rem; padding: 0.75rem 1rem; background: var(--bg-soft); border-radius: 8px; font-size: 0.97rem;
}

/* Profile: photo and contact details beside the main text */
.profile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 3rem; margin: 0 0 2rem; }
.profile-card {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; font-size: 0.95rem; align-self: start; overflow-wrap: anywhere;
}
.profile-card img.profile-photo { display: block; width: 100%; border-radius: 8px; margin-bottom: 1rem; }
.profile-links { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.profile-links li { margin: 0; }
.profile-links a {
  display: grid; place-items: center; width: 7.5rem; height: 3.25rem; padding: 0.4rem 0.6rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.profile-links a:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.profile-links img { max-height: 2.25rem; max-width: 100%; width: auto; }
.profile > div > :first-child { margin-top: 0; }
@media (min-width: 860px) {
  .profile { grid-template-columns: 17rem minmax(0, 1fr); }
  .profile-card { position: sticky; top: calc(var(--nav-h) + 1rem); }
  .profile > div { max-width: 52rem; }
}

/* Testimonials: person (photo, name, role) beside their answers */
.testimonial {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 2rem; padding: 1.5rem; margin: 0 0 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.testimonial-person { font-size: 0.95rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 1rem; align-items: center; }
.testimonial-person img, .avatar {
  grid-row: span 2; width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; display: block;
}
.avatar {
  display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; font-size: 1.25rem;
  letter-spacing: 0.04em;
}
.testimonial-name { font-weight: 700; color: var(--navy); margin: 0; align-self: end; }
.testimonial-role { color: var(--muted); margin: 0; align-self: start; font-size: 0.9rem; line-height: 1.45; }
.testimonial h3 { font-size: 1rem; margin: 1.1em 0 0.25em; color: var(--accent-dark); }
.testimonial h3:first-child { margin-top: 0; }
.testimonial p:last-child { margin-bottom: 0; }
@media (min-width: 760px) {
  .testimonial { grid-template-columns: 11rem minmax(0, 1fr); padding: 1.75rem; }
  .testimonial-person { display: block; align-self: start; position: sticky; top: calc(var(--nav-h) + 1rem); }
  .testimonial-person img, .avatar { width: 7rem; height: 7rem; margin-bottom: 0.75rem; }
  .avatar { font-size: 1.9rem; }
  .testimonial-name { margin-bottom: 0.2rem; }
}

/* News list */
.news { list-style: none; padding: 0; margin: 0 0 2rem; }
.news li {
  margin: 0 0 1rem; padding: 1.25rem 1.5rem; border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: var(--radius); background: #fff;
}
.news p { margin: 0 0 0.6em; }
.news p:last-child { margin-bottom: 0; }
.news a { overflow-wrap: anywhere; }

/* ---------- Home page ---------- */

.hero {
  position: relative; color: #fff;
  margin: 0 -1.25rem 2.5rem; padding: 3rem 1.5rem;
  background: linear-gradient(90deg, rgb(7 38 72 / 94%) 0%, rgb(7 38 72 / 78%) 55%, rgb(7 38 72 / 40%) 100%),
              url("../../img/main3.jpg") center / cover no-repeat;
}
@media (min-width: 720px) { .hero { margin: 0 0 2.5rem; padding: 4.5rem 3rem; border-radius: var(--radius); } }
.hero h1 { color: #fff; margin: 0 0 0.5rem; max-width: 18em; font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); }
.hero p { font-size: 1.15rem; max-width: 34em; color: #e9eff4; }
.hero .hero-eyebrow { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #9fe3ea; margin-bottom: 0.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.cards {
  list-style: none; padding: 0; display: grid; gap: 1.25rem; margin: 0 0 3.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
}
.card {
  position: relative; margin: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card img { aspect-ratio: 2 / 1; object-fit: cover; width: 100%; }
@media (min-width: 720px) { .card img { aspect-ratio: 16 / 9; } }
.card-body { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card h3 a { text-decoration: none; color: var(--navy); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card:hover h3 a { color: var(--accent-dark); }
.card:focus-within { outline: 3px solid #f2b705; outline-offset: 2px; }
.card h3 a:focus-visible { outline: none; }
.card p { font-size: 0.95rem; color: var(--muted); margin: 0; }

.feature {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3rem; align-items: center; margin: 0 0 3.5rem;
  background: var(--bg-soft); border-radius: var(--radius); padding: 1.5rem;
}
.feature h2 { margin: 0 0 0.75rem; font-size: 1.75rem; }
.feature-photo { width: 11rem; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (min-width: 720px) {
  .feature { grid-template-columns: 15rem minmax(0, 1fr); padding: 2.5rem; }
  .feature-photo { width: 100%; }
}

.areas { margin: 0 0 3.5rem; }
.areas h2 { margin-top: 0; }
.area-list {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.area-list li { margin: 0; }
.area-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 100%;
  padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--navy); font-weight: 600; line-height: 1.35; background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.area-list a::after { content: "\2192"; color: var(--accent); font-weight: 700; }
.area-list a:hover { border-color: var(--accent); box-shadow: var(--shadow); }

.quick { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); margin-bottom: 1rem; }
.quick-card { background: var(--bg-soft); border-radius: var(--radius); padding: 1.5rem; border-top: 4px solid var(--accent); }
.quick-card h2 { margin: 0 0 0.6rem; font-size: 1.25rem; }
.quick-card > :last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-dark); color: #d6dee5; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #9fe3ea; }
.footer-inner { display: grid; gap: 2rem; padding-top: 2.75rem; padding-bottom: 2rem; }
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.08em; color: #fff; margin: 0 0 0.4rem; }
.footer-tagline { font-style: italic; color: #b9c6d2; }
.footer-heading { font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin: 0 0 0.75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; }
.footer-links--stack { grid-template-columns: 1fr; overflow-wrap: anywhere; }
.footer-links li { margin: 0; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem;
  padding-top: 1rem; padding-bottom: 1.25rem; font-size: 0.875rem;
  background: linear-gradient(rgb(255 255 255 / 12%), rgb(255 255 255 / 12%)) top / 100% 1px no-repeat;
  background-origin: content-box; background-clip: content-box;
}
.footer-bottom p { margin: 0; }

/* Floating back-to-top button (shown by site.js after scrolling) */
.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  background: var(--navy); color: #fff; border-radius: 50%; text-decoration: none; font-size: 1.25rem;
  box-shadow: var(--shadow-lift);
}
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--accent); color: #fff; }

/* ---------- Print ---------- */

@media print {
  .site-nav, .to-top, .skip-link, .toc, .footer-bottom, .hero-actions { display: none !important; }
  body { font-size: 11pt; }
  a { color: inherit; }
  .page-header { background: none; padding: 0; }
  .profile-card, .testimonial-person { position: static; }
  .testimonial, .timeline-year, .card { break-inside: avoid; }
}
