@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Jost:ital,wght@0,500;0,600;1,400&display=swap');

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

:root {
  /* palette taken from the SoBIG logo */
  --navy: #0B3A5B;        /* deep blue: headers, footer, headings */
  --navy-mid: #124A70;
  --sky: #006BA3;         /* logo blue, deepened for 4.5:1 text contrast: links, buttons */
  --cyan: #00A8F0;        /* logo cyan: accents only (too light for small text) */
  --cyan-text: #33BDF7;   /* cyan for text on navy (5.5:1) */
  --sky-light: #E6F3FA;
  --white: #ffffff;
  --off-white: #E9EFF4;
  --text: #1F2A33;
  --text-mid: #3E4C57;
  --text-light: #5A6770;
  --border: #CFDBE5;
  --card-shadow: 0 1px 2px rgba(11,58,91,0.06), 0 4px 14px rgba(11,58,91,0.07);
  --font-serif: 'Jost', 'Inter', system-ui, sans-serif;   /* headings */
  --font-sans: 'Inter', system-ui, sans-serif;               /* body text */
  --radius: 8px;
  --max-w: 1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
  font-size: 16px;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(11,58,91,0.06);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-logo img {
  height: 48px;
  width: auto;
  display: block;
}
.nav-logo .logo-compact { display: none; }
@media (max-width: 1180px) {
  .nav-logo .logo-full { display: none; }
  .nav-logo .logo-compact { display: block; }
}
@media (max-width: 640px) { .nav-logo img { height: 40px; } }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  display: block;
}

.nav-links a:hover,
.nav-links a.active { background: var(--sky-light); color: var(--navy); }

.nav-links li { position: relative; }
.nav-links li ul {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  list-style: none;
  padding: 6px 0;
  box-shadow: 0 8px 24px rgba(11,58,91,0.12);
}
.nav-links li:hover ul,
.nav-links li:focus-within ul { display: block; z-index: 110; }
/* invisible bridge over the 6px gap so the menu stays open while the mouse moves down */
.nav-links li ul::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-links li ul li a {
  padding: 8px 16px;
  border-radius: 0;
  font-size: 0.82rem;
}

.sub-toggle { display: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy);
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: linear-gradient(115deg, var(--navy) 0%, var(--navy) 55%, var(--sky) 100%);
  padding: 36px 24px 34px;
}
.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #fff;
  font-weight: 600;
}

/* ── HERO (homepage) ── */
.hero {
  position: relative;
  height: clamp(340px, 40vw, 620px);   /* crop mostly sky, a little ground */
  min-height: 340px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-img,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 66%;
  filter: saturate(1.15) contrast(1.04);   /* match the warmer look of the original */
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,40,64,0.62) 0%, rgba(8,40,64,0.22) 32%, rgba(8,40,64,0) 55%);   /* shade only behind the title; video keeps its colours */
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 0 32px 52px;
}
.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.4vw, 2.9rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0,0,0,0.35);
}

/* ── SECTIONS ── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px;
}
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.25;
}
.section-title::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 10px; background: var(--cyan); border-radius: 2px; }
.team-section-title { margin-bottom: 32px; }
.divider { border: none; border-top: 1px solid var(--border); }

/* ── ABOUT (homepage) ── */
.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 64px;
  align-items: start;
}
.about-body {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  line-height: 1.78;
  color: var(--text-mid);
  max-width: none;
}
.about-body p + p { margin-top: 1em; }
.about-sidebar {
  background: var(--sky-light);
  border-left: 3px solid var(--sky);
  padding: 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.sidebar-heading {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 14px;
}
.research-areas { list-style: none; }
.research-areas li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-mid);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.research-areas li:last-child { border-bottom: none; }
.research-areas li::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--sky);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}
.btn {
  display: inline-block;
  margin-top: 28px;
  padding: 10px 22px;
  background: var(--sky);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.btn:hover { background: var(--sky); }

/* ── NEWS GRID ── */
.news-section { background: var(--white); }
.news-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
}
.news-header a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sky);
  text-decoration: none;
}
.news-header a:hover { text-decoration: underline; }
.news-header .section-title a { font-size: inherit; font-weight: inherit; color: inherit; }
.news-header .section-title a:hover { text-decoration: none; color: var(--sky); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.news-card:hover { box-shadow: 0 6px 20px rgba(11,58,91,0.12); transform: translateY(-2px); }
.news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.news-card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.news-card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 10px;
}
.news-card-excerpt {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── TEAM GRID ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 56px;
}
.team-card { text-align: center; }
.team-card img {
  width: 100%;
  max-width: 190px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 14px;
  border: 3px solid var(--border);
}
.team-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.team-card-role {
  font-size: 0.8rem;
  color: var(--sky);
  margin-bottom: 4px;
  font-weight: 500;
}
.team-card-degree {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 6px;
  line-height: 1.4;
}
.team-card-email {
  font-size: 0.75rem;
  color: var(--text-light);
  text-decoration: none;
  overflow-wrap: anywhere;
  display: inline-block;
  max-width: 100%;
}
.team-card-email:hover { color: var(--sky); }
.past-members { margin-top: 24px; }
.past-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.past-card { text-align: center; }
.past-card img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 8px;
  border: 2px solid var(--border);
  filter: grayscale(20%);
}
.past-card-name { font-size: 0.78rem; font-weight: 600; color: var(--text-mid); }
.past-card-role { font-size: 0.7rem; color: var(--text-light); }

/* ── PUBLICATIONS ── */
.pub-list { list-style: none; }
.pub-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
}
.pub-year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sky);
  width: 44px;
  padding-top: 3px;
}
.pub-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.35;
}
.pub-authors { font-size: 0.83rem; color: var(--text-mid); margin-bottom: 4px; }
.pub-journal { font-size: 0.83rem; color: var(--text-light); font-style: italic; margin-bottom: 8px; }
.pub-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pub-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--sky);
  text-decoration: none;
  border: 1px solid var(--sky);
  padding: 3px 10px;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
}
.pub-link:hover { background: var(--sky); color: #fff; }

/* ── POST (news) ── */
.post-content {
  max-width: var(--max-w);
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-mid);
}
.post-content h2 { font-size: 1.3rem; color: var(--navy); margin: 1.5em 0 0.5em; }
.post-content p { margin-bottom: 1em; }
.post-content img { max-width: 100%; border-radius: var(--radius); margin: 1.5em 0; }

/* ── CONTACT STRIP ── */
.contact-strip { background: var(--navy); color: rgba(255,255,255,0.85); }
.contact-phones span { display: block; }
.contact-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 24px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}
.contact-block h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan-text);
  margin-bottom: 10px;
}
.contact-block p, .contact-block a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  line-height: 1.6;
}
.contact-block a:hover { color: #fff; }
.social-icons { display: flex; gap: 12px; margin-top: 12px; }
.social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.social-icons a:hover { background: var(--sky); }
.social-icons svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.8); }
/* social icons on light backgrounds (team cards) */
.team-social a { background: var(--white); box-shadow: 0 0 0 1px var(--border), 0 2px 6px rgba(11,58,91,0.08); }
.team-social svg { fill: var(--navy); }
.team-social a:hover svg { fill: #fff; }

/* ── FOOTER ── */
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto; padding: 16px 24px 22px;
  border-top: 1px solid rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.footer-logos { display: flex; gap: 28px; align-items: center; }
.footer-logos img { height: 60px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; transition: opacity 0.15s; }
.footer-logos a:hover img { opacity: 1; }

/* ── PUB YEAR HEADING ── */
.pub-year-group { margin-bottom: 48px; }
.pub-year-heading {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--navy);
  border-bottom: 2px solid var(--sky);
  padding-bottom: 8px;
  margin-bottom: 8px;
  display: inline-block;
}

/* ── FACILITIES ── */
.facilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.facility-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.facility-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}
.facility-body { padding: 20px; }
.facility-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.facility-desc { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; }

/* ── GALLERY ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  transition: opacity 0.2s;
  cursor: pointer;
}
.gallery-grid img:hover { opacity: 0.88; }

/* ── LINKS ── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.link-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.link-card:hover { box-shadow: 0 6px 20px rgba(11,58,91,0.1); transform: translateY(-2px); }
.link-card-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--navy);
}
.link-card-icon svg { width: 100%; height: 100%; }
.link-card-title { font-weight: 600; font-size: 0.95rem; color: var(--navy); margin-bottom: 6px; }
.link-card-desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.55; }

/* ── RESEARCH GRID ── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.research-card {
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  border: 1px solid var(--border);
}
.research-card:hover {
  box-shadow: 0 8px 24px rgba(11,58,91,0.12);
  transform: translateY(-3px);
}
.research-card-img {
  height: 180px;
  background-size: cover;
  background-position: center;
}
.research-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.research-card-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--sky);
  margin-bottom: 8px;
}
.research-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.3;
}
.research-card-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
}
.research-card-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sky);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .past-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .research-grid { grid-template-columns: 1fr 1fr; }
  .facilities-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .links-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: block;
    position: absolute;
    top: 80px; left: 0; right: 0;
    background: var(--white);
    padding: 4px 0 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(11,58,91,0.12);
    max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .nav-links.open > li { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--border); margin: 0 12px; }
  .nav-links.open > li > a:hover { background: transparent; color: var(--sky); }
  .nav-links.open > li:last-child { border-bottom: none; }
  .nav-links.open > li > a {
    flex: 1; padding: 17px 28px; font-size: 1.2rem; font-weight: 500; border-radius: 0;
    border-left: 3px solid transparent;
  }
  .nav-links.open > li > a.active { background: transparent; border-left-color: var(--cyan); color: var(--sky); }
  .nav-links.open li ul {
    display: none; position: static; width: 100%;
    border: none; border-radius: 0; box-shadow: none; min-width: 0;
    padding: 4px 0 10px; background: var(--off-white);
  }
  .nav-links.open li.expanded > ul { display: block; }
  .nav-links.open li ul::before { display: none; }
  .nav-links.open li ul li a { font-size: 1.05rem; padding: 12px 28px 12px 46px; color: var(--text-mid); border-radius: 0; }
  .nav-links.open li ul li a:hover { background: var(--sky-light); }
  .sub-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 52px; align-self: stretch; background: none; border: none;
    color: var(--navy); cursor: pointer; margin-right: 12px;
  }
  .sub-toggle svg { transition: transform 0.2s; }
  li.expanded > .sub-toggle svg { transform: rotate(180deg); }
  .nav-toggle .icon-close { display: none; }
  nav.menu-open .nav-toggle .icon-open { display: none; }
  nav.menu-open .nav-toggle .icon-close { display: block; }
  .nav-toggle { display: block; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .team-card-email { font-size: 0.7rem; }
  .news-grid { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .facilities-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .links-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero { height: 320px; min-height: 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .past-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── research topic pages ── */
.topic-hero .hero-eyebrow a { color: inherit; text-decoration: none; }
.topic-hero .hero-eyebrow a:hover { text-decoration: underline; }
.topic-hero h1 { max-width: 30ch; line-height: 1.25; }
.topic-hero h1 a { color: inherit; text-decoration: none; }
.topic-hero h1 a:hover { text-decoration: underline; }
.topic-authors { margin-top: 14px; font-size: 0.95rem; color: rgba(255,255,255,0.75); }
.topic-body {
  max-width: none;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--text-mid);
}
.topic-body p + p { margin-top: 1em; }
.topic-body a { color: var(--sky); }
.topic-figure { margin: 36px 0; }
.topic-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
}
.topic-figure figcaption { margin-top: 10px; font-family: var(--font-sans); font-size: 0.82rem; color: var(--text-light); text-align: center; }
.topic-video { display: block; width: 100%; border-radius: var(--radius); background: #000; }
.topic-subhead {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin: 40px 0 14px;
}
.topic-pubs { list-style: none; font-family: var(--font-sans); font-size: 0.92rem; line-height: 1.6; }
.topic-pubs li { padding: 12px 0 12px 16px; border-left: 3px solid var(--sky); background: var(--white); margin-bottom: 10px; padding-right: 16px; border-radius: 0 var(--radius) var(--radius) 0; }
.topic-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; font-family: var(--font-sans); }
.topic-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy) !important;
  font-size: 0.9rem; font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.topic-link:hover { box-shadow: 0 6px 20px rgba(11,58,91,0.1); transform: translateY(-2px); }
.topic-link img { height: 40px; width: auto; }
.topic-callout { margin-top: 48px; padding: 28px; background: var(--sky-light); border-left: 3px solid var(--sky); border-radius: 0 var(--radius) var(--radius) 0; }
.topic-callout .topic-subhead { margin-top: 0; }
.topic-callout .btn { color: #fff; margin-top: 16px; }
.topic-back { margin-top: 56px; font-size: 0.88rem; }
.topic-back a { color: var(--sky); text-decoration: none; font-weight: 600; }
.topic-back a:hover { text-decoration: underline; }

/* ── gallery/home/facilities ── */
/* home */
.hero-tagline {
  display: inline-block;
  text-shadow: 0 1px 10px rgba(0,0,0,0.35);
  margin-top: 14px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.88);
  max-width: none;
  text-wrap: balance;
}
.home-about { max-width: none; }
.home-about .about-body { max-width: none; }

/* contact strip: 4 blocks (Location / Mail / Phone / social) */
.contact-inner { grid-template-columns: 1.4fr 1fr 1fr auto; }
.contact-social { align-self: center; }
@media (max-width: 860px) { .contact-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contact-inner { grid-template-columns: 1fr; } }

/* page hero with background photo */
.page-hero .hero-eyebrow a { color: inherit; text-decoration: none; }
.page-hero .hero-eyebrow a:hover { text-decoration: underline; }

/* facilities */
.facility-photo {
  display: block;
  width: 100%;
  aspect-ratio: 388 / 215;
  object-fit: cover;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.facility-at { font-family: var(--font-sans); font-size: 0.8rem; font-weight: 400; color: var(--text-light); }
.facility-at a, .facility-brand a { color: var(--sky); text-decoration: none; }
.facility-at a:hover, .facility-brand a:hover { text-decoration: underline; }
.facility-brand { font-size: 0.9rem; font-weight: 600; color: var(--text-mid); margin-bottom: 8px; }
.facility-features { list-style: none; font-size: 0.85rem; color: var(--text-light); line-height: 1.6; }
.facility-features li { padding-left: 14px; position: relative; }
.facility-features li::before {
  content: ''; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--sky);
}

/* gallery landing */
.gallery-sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery-section-card {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: 260px; padding: 24px 28px;
  background-color: var(--navy); background-size: cover; background-position: center;
  border-radius: 8px; text-decoration: none;
  box-shadow: 0 2px 10px rgba(11,58,91,0.10);
  transition: box-shadow 0.25s, transform 0.25s;
}
.gallery-section-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,40,64,0.88) 0%, rgba(8,40,64,0.35) 55%, rgba(8,40,64,0.1) 100%);
  transition: background 0.25s;
}
.gallery-section-card:hover { box-shadow: 0 10px 28px rgba(11,58,91,0.22); transform: translateY(-3px); }
.gallery-section-card:hover::before { background: linear-gradient(to top, rgba(8,40,64,0.92) 0%, rgba(0,119,179,0.45) 100%); }
.gallery-section-card h2 { position: relative; font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: #fff; }
.gallery-section-card h2::after { content: " →"; opacity: 0.8; }

/* photos */
.photo-masonry { columns: 3 280px; column-gap: 12px; }
.photo-item { break-inside: avoid; margin: 0 0 12px; }
.photo-item img { display: block; width: 100%; height: auto; border-radius: var(--radius); transition: opacity 0.2s; }
.photo-item a:hover img { opacity: 0.88; }
.photo-item figcaption { font-size: 0.78rem; color: var(--text-light); padding: 6px 2px 0; }

/* links */
.links-intro { font-family: var(--font-sans); font-size: 1.08rem; color: var(--text-mid); margin-bottom: 40px; }
.link-group { margin-bottom: 36px; }
.link-group-heading {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; color: var(--navy);
  border-bottom: 2px solid var(--sky); padding-bottom: 6px; margin-bottom: 12px;
}
.link-list { list-style: none; }
.link-list li { padding: 6px 0; font-size: 0.95rem; }
.link-list a { color: var(--sky); text-decoration: none; font-weight: 500; }
.link-list a:hover { text-decoration: underline; }
.link-note { color: var(--text-light); font-size: 0.88rem; }

/* press */
.press-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.press-card {
  display: block; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow 0.2s, transform 0.2s;
}
.press-card:hover { box-shadow: 0 6px 20px rgba(11,58,91,0.1); transform: translateY(-2px); }
.press-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
.press-card-body { padding: 16px 20px; }
.press-card-title { font-weight: 600; color: var(--navy); }
.press-card-date { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

/* 404 */
.notfound { text-align: center; }
.notfound .about-body { margin: 0 auto; }
.notfound-code { font-family: var(--font-serif); font-size: 4rem; line-height: 1; color: var(--navy); margin-bottom: 16px; }

@media (max-width: 860px) { .gallery-sections { grid-template-columns: 1fr; } }
/* ── end gallery/home/facilities ── */

/* ── team page: open positions callout ── */
.team-join {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-bottom: 56px; padding: 24px 28px;
  background: var(--sky-light); border-left: 3px solid var(--sky); border-radius: 0 var(--radius) var(--radius) 0;
}
.team-join-title { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.team-join-text { font-size: 0.95rem; color: var(--text-mid); }
.team-join .btn { color: #fff; flex-shrink: 0; }
@media (max-width: 640px) { .team-join { flex-direction: column; align-items: flex-start; } }

/* ── home page overview sections ── */
.home-band { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.home-research-grid { grid-template-columns: repeat(4, 1fr); }
.news-card-date { font-size: 0.78rem; color: var(--text-light); margin-bottom: 6px; }
.home-team { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 44px; }
.home-team-member { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; width: 88px; }
.home-team-member img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); transition: border-color 0.15s, transform 0.15s; }
.home-team-member span { font-size: 0.82rem; color: var(--text-mid); }
.home-team-member:hover img { border-color: var(--sky); transform: translateY(-2px); }
.home-join { margin-bottom: 0; }
@media (max-width: 900px) { .home-research-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-research-grid { grid-template-columns: 1fr; } .home-team { gap: 14px; } .home-team-member, .home-team-member img { width: 72px; } .home-team-member img { height: 72px; } }

/* ── boxes: visible edge + soft shadow on any background ── */
.news-card, .research-card, .facility-card, .link-card, .press-card, .topic-link {
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}
.home-band .research-card { background: var(--white); }
.home-band { background: #FAFCFD; }

/* ── phones: tighter vertical spacing everywhere ── */
@media (max-width: 640px) {
  .section { padding: 36px 18px; }
  .page-hero { padding: 26px 18px 24px; }
  .section-title { margin-bottom: 16px; }
  .team-section-title { margin-bottom: 22px; }
  .news-header { margin-bottom: 20px; }
  .about-grid { gap: 28px; }
  .team-grid { gap: 28px 12px; }
  .topic-figure { margin: 22px 0; }
  .topic-callout { margin-top: 28px; padding: 20px; }
  .topic-back { margin-top: 32px; }
  .link-group { margin-bottom: 24px; }
  .home-team { margin-bottom: 26px; }

  /* open-positions box: button sits right under the text */
  .team-join { gap: 12px; padding: 18px 20px; margin-bottom: 32px; }
  .team-join .btn, .topic-callout .btn { margin-top: 4px; }
  .home-join { margin-bottom: 0; }

  /* Join Us page inline spacing */
  .section-label[style*="margin-top:40px"] { margin-top: 24px !important; }

  /* footer: compact single column */
  .contact-inner { gap: 16px; padding: 24px 18px 14px; }
  .contact-block h3 { margin-bottom: 4px; }
  .contact-social { align-self: start; }
  .footer-bottom { padding: 14px 18px 20px; gap: 12px; }
  .footer-logos img { height: 50px; }
}

/* ── team photos: one consistent look (ring + soft, even color) ── */
.team-card img, .home-team-member img {
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--border), 0 6px 18px rgba(11,58,91,0.14);
  filter: saturate(0.82) contrast(1.04) brightness(1.04);
  transition: filter 0.25s, transform 0.15s, box-shadow 0.15s;
}
.team-card:hover img, .home-team-member:hover img {
  filter: none;
  box-shadow: 0 0 0 2px var(--cyan), 0 8px 22px rgba(11,58,91,0.18);
}

/* ── accessibility ── */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 3px; }
.hero-pause { position: absolute; right: 18px; bottom: 18px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.6); background: rgba(8,40,64,0.55); color: #fff; cursor: pointer; display: grid; place-items: center; }
.hero-pause:hover { background: rgba(8,40,64,0.8); }
.hero-pause svg { width: 16px; height: 16px; fill: currentColor; }
.hero-pause .icon-play { display: none; }
.hero.paused .hero-pause .icon-play { display: block; }
.hero.paused .hero-pause .icon-pause { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.video-desc { font-size: 0.9rem; color: var(--text-light); margin-top: 8px; }
.footer-bottom p a { color: inherit; text-decoration: underline; }
.a11y-statement ul { margin: 0.4em 0 1em 1.4em; }
.a11y-date { font-size: 0.85rem; color: var(--text-light); }
.a11y-statement a { color: var(--sky); }
