/*
Theme Name: PIXL
Theme URI: https://pixl.cs.princeton.edu/
Author: Princeton ImageX Lab
Description: Princeton ImageX Lab — PIXL website theme
Version: 1.0.7
License: GNU General Public License v2 or later
Text Domain: pixl
*/

/* ============================================================
   PIXL — Design System
   Inspired by Princeton robotics.princeton.edu /
   invent.ai.princeton.edu
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────── */
:root {
  --color-black:        #1d1d1d;
  --color-dark:         #121212;
  --color-white:        #ffffff;
  --color-light-gray:   #f5f5f5;
  /* #5f6770 gives ~5.6:1 on white (WCAG AA); was #6c757d which sat at 4.47:1. */
  --color-mid-gray:     #5f6770;
  --color-border:       #e0e0e0;
  /* Bright Princeton orange — only safe on dark backgrounds or as a background color. */
  --color-orange:       #e77500;
  /* Accessible orange for text/icons on white backgrounds (~5:1 on #fff). */
  --color-orange-dark:  #a85500;
  --color-orange-light: #f5a623;
  --gradient: linear-gradient(90deg, var(--color-orange), var(--color-orange-light));
  --font-heading: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --nav-height: 64px;
  --border-radius-pill: 50px;
}

/* ── Reset / Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-black);
  background: var(--color-white);
  margin: 0;
}

a { color: var(--color-orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Keyboard focus indicator (WCAG 2.4.7 AA) ──────────── */
:focus { outline: none; }
:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.navbar-toggler:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--color-white);
  border-radius: 2px;
}
/* Dark backgrounds (navbar, footer): ring contrasts against dark */
.site-navbar :focus-visible,
.site-footer :focus-visible {
  outline: 3px solid var(--color-orange-light);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--color-dark);
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* ── Navigation ────────────────────────────────────────── */
.site-navbar {
  background: var(--color-black);
  min-height: var(--nav-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Push all page content below the fixed navbar */
body {
  padding-top: var(--nav-height);
}
/* WP admin bar: push navbar below it and add matching body padding */
.admin-bar .site-navbar {
  top: 32px;
}
.admin-bar body {
  padding-top: calc(var(--nav-height) + 32px);
}
@media screen and (max-width: 782px) {
  .admin-bar .site-navbar {
    top: 46px;
  }
  .admin-bar body {
    padding-top: calc(var(--nav-height) + 46px);
  }
}

.site-navbar .navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-white) !important;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
}
.brand-pixl {
  color: var(--color-orange);
  font-weight: 900;
  letter-spacing: .06em;
}
.brand-sep {
  color: var(--color-white);
  font-weight: 300;
}
.brand-full {
  color: var(--color-white);
  font-weight: 700;
  letter-spacing: .01em;
}

.site-navbar .navbar-toggler {
  border-color: rgba(255,255,255,.4);
  flex-shrink: 0;
  margin-left: auto;
}
.site-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-navbar .nav-link {
  color: var(--color-white) !important;
  font-size: .95rem;
  font-weight: 600;
  padding: .25rem 1rem !important;
  transition: color .2s;
  position: relative;
}
.site-navbar .nav-link:hover {
  color: var(--color-white) !important;
}
.site-navbar .nav-item.active .nav-link {
  color: var(--color-white) !important;
}
.site-navbar .nav-item.active .nav-link::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -4px;
  left: 1rem;
  right: 1rem;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
}

/* ── Page Title Bar ────────────────────────────────────── */
#highlighted {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 1.75rem 0;
}

h1.page-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--color-white);
  margin: 0;
}

/* ── Hero (Home) ───────────────────────────────────────── */
.hero {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 4.5rem 0 4rem;
  text-align: center;
}
.hero-eyebrow {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--color-orange);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 900;
  color: var(--color-white);
  margin-bottom: 1.25rem;
}
.hero p {
  font-size: 1.2rem;
  color: var(--color-white);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
/* Same visual style as .btn-hero-outline — transparent pill with white border. */
.btn-hero {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  border-radius: var(--border-radius-pill);
  padding: .75rem 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  transition: background .2s, color .2s;
  display: inline-block;
}
.btn-hero:hover {
  background: var(--color-white);
  color: var(--color-black);
  text-decoration: none;
}
.btn-hero-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  border-radius: var(--border-radius-pill);
  padding: .75rem 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  transition: background .2s, color .2s;
  display: inline-block;
}
.btn-hero-outline:hover {
  background: var(--color-white);
  color: var(--color-black);
  text-decoration: none;
}

/* ── Stats Strip ───────────────────────────────────────── */
.stats-strip {
  background: var(--color-black);
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.stats-item { padding: 0 2.5rem; }
.stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-orange);
  line-height: 1;
}
.stat-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-white);
  margin-top: .3rem;
}
.stats-divider {
  width: 1px;
  background: rgba(255,255,255,.12);
  align-self: stretch;
  margin: .25rem 0;
}

/* ── Section Eyebrow Label ─────────────────────────────── */
.section-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--color-mid-gray);
  margin-bottom: .6rem;
}

/* ── Home: Mission Section ─────────────────────────────── */
.section-mission {
  padding: 5rem 0;
}
.section-mission h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}
.section-mission .lead {
  font-size: 1.05rem;
  color: #444;
  margin-bottom: 1.75rem;
}
.btn-outline-pixl {
  display: inline-block;
  border: 2px solid var(--color-black);
  border-radius: var(--border-radius-pill);
  padding: .6rem 1.75rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--color-black);
  transition: background .2s, color .2s;
}
.btn-outline-pixl:hover {
  background: var(--color-black);
  color: var(--color-white);
  text-decoration: none;
}
.mission-graphic {
  background: var(--color-light-gray);
  border-radius: 12px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.mission-label-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  width: 100%;
}
.mission-label-grid span {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-black);
  text-align: center;
  line-height: 1.3;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ── Home: Research Focus Areas ────────────────────────── */
.section-areas {
  background: var(--color-light-gray);
  padding: 5rem 0;
}
.section-areas h2 {
  font-size: 1.75rem;
  margin-bottom: 2rem;
}
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.area-card {
  background: var(--color-white);
  border-radius: 10px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  color: var(--color-black);
  transition: box-shadow .2s, transform .2s;
  display: block;
}
.area-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  transform: translateY(-2px);
  color: var(--color-black);
  text-decoration: none;
}
.area-icon {
  font-size: 2rem;
  margin-bottom: .75rem;
}
.area-name {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.3;
}

/* ── Home: Events Preview ──────────────────────────────── */
.section-events-preview {
  padding: 5rem 0;
}
.section-events-preview h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 900;
  text-transform: uppercase;
  text-align: left;
  margin-bottom: .75rem;
}
.home-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.home-section-header h2 { margin-bottom: 0; font-size: 1.75rem; }
.home-event-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}
.home-event-item:last-child { border-bottom: none; }
.home-event-body { flex: 1; min-width: 0; }
.home-event-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .3rem;
}
.home-event-title a { color: var(--color-black); }
.home-event-title a:hover { color: var(--color-orange-dark); text-decoration: none; }
.home-event-meta {
  font-size: .875rem;
  color: var(--color-mid-gray);
}

/* ── Home: Highlight Cards ─────────────────────────────── */
.section-highlights {
  background: var(--color-light-gray);
  padding: 4rem 0;
}
.section-highlights h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
}
.highlight-card {
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  height: 100%;
  transition: box-shadow .2s;
}
.highlight-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.14); }
.highlight-card .card-img-top {
  height: 180px;
  object-fit: cover;
  background: #ddd;
}
.highlight-card .card-body { padding: 1.25rem; }
.highlight-card .card-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-orange-dark);
  margin-bottom: .5rem;
}
.highlight-card .card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: .75rem;
  line-height: 1.3;
}
.highlight-card .btn-card {
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-orange-dark);
  padding: 0;
}
.highlight-card .btn-card:hover { color: var(--color-black); }

/* ── Sidebar (People) ──────────────────────────────────── */
.sidebar-nav {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}
.sidebar-nav .sidebar-heading {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--color-mid-gray);
  padding: .5rem 0 .25rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: .5rem;
}
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav ul li a {
  display: block;
  padding: .4rem .5rem;
  color: var(--color-black);
  font-size: .9rem;
  border-radius: 4px;
  transition: background .15s;
}
.sidebar-nav ul li a:hover {
  background: var(--color-light-gray);
  text-decoration: none;
}
.sidebar-nav ul li a.active-section {
  color: var(--color-orange-dark);
  font-weight: 600;
}

/* ── People Cards ──────────────────────────────────────── */
.people-section { padding: 2.5rem 0 1rem; }
.people-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.section-accent-bar {
  display: inline-block;
  width: 5px;
  height: 1.8rem;
  background: var(--color-orange);
  border-radius: 2px;
  flex-shrink: 0;
  align-self: center;
}
.person-card {
  margin-bottom: 2rem;
  background: var(--color-white);
  border-radius: 6px;
  overflow: hidden;
  padding-bottom: .75rem;
}
.person-card .person-photo {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 0 .75rem;
}
.person-card .person-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  background: #eee;
  margin: 0 0 .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #bbb;
}
.person-card .person-name,
.person-card .person-dept {
  padding: 0 .75rem;
}
.person-card .person-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .2rem;
}
.person-card .person-name a {
  color: var(--color-black);
}
.person-card .person-name a:hover { color: var(--color-orange-dark); text-decoration: none; }
.person-card .person-dept {
  font-size: .85rem;
  color: var(--color-mid-gray);
}
.person-card .person-dept a {
  color: var(--color-mid-gray);
  text-decoration: none;
}
.person-card .person-dept a:hover { text-decoration: underline; }

/* ── Research Cards ────────────────────────────────────── */
.research-filters {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.research-filters label {
  font-weight: 600;
  font-size: .9rem;
  margin-right: .75rem;
}
.research-filters select {
  border-radius: 4px;
  border: 1px solid var(--color-border);
  padding: .375rem .75rem;
  font-size: .9rem;
  background: var(--color-light-gray);
  cursor: pointer;
}

.research-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  transition: box-shadow .2s;
}
.research-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); }
.research-card .research-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .4rem;
  line-height: 1.35;
}
.research-card .research-title a { color: var(--color-black); }
.research-card .research-title a:hover { color: var(--color-orange-dark); text-decoration: none; }
.research-card .research-authors {
  font-size: .9rem;
  color: var(--color-mid-gray);
  margin-bottom: .25rem;
}
.research-card .research-venue {
  font-size: .875rem;
  color: var(--color-black);
  margin-bottom: .5rem;
}
.research-card .research-venue em {
  font-style: italic;
}
.research-card .research-year {
  font-weight: 600;
}
.badge-area {
  display: inline-block;
  background: var(--color-light-gray);
  color: var(--color-black);
  border-radius: var(--border-radius-pill);
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .8rem;
}

/* ── Events List ───────────────────────────────────────── */
.event-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.event-item:last-child { border-bottom: none; }

.date-badge {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}
.date-badge .month {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-mid-gray);
  letter-spacing: .05em;
}
.date-badge .day {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-black);
}

.event-body { flex: 1; min-width: 0; }
.event-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .3rem;
}
.event-title a { color: var(--color-black); }
.event-title a:hover { color: var(--color-orange-dark); text-decoration: none; }
.event-meta {
  font-size: .875rem;
  color: var(--color-mid-gray);
  margin-bottom: .5rem;
}
.event-meta span::before { content: '·'; margin: 0 .4rem; }
.event-meta span:first-child::before { content: none; }
.event-abstract {
  font-size: .9rem;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-image {
  flex-shrink: 0;
  width: 120px;
  align-self: flex-start;
}
.event-image img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

/* ── News Cards ────────────────────────────────────────── */
.news-card {
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  margin-bottom: 2rem;
  transition: box-shadow .2s;
  height: 100%;
}
.news-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,.13); }
.news-card .news-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: var(--color-light-gray);
}
.news-card .news-img-placeholder {
  width: 100%;
  height: 180px;
  background: var(--color-light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ccc;
}
.news-card .news-body {
  padding: 1rem 1.1rem 1.25rem;
}
.news-card .news-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}
.news-card .news-title a { color: var(--color-black); }
.news-card .news-title a:hover { color: var(--color-orange-dark); text-decoration: none; }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  background: #333;
  color: var(--color-white);
  padding: 2rem 0 0;
  margin-top: auto;
  border-top: 5px solid var(--color-orange);
}
.site-footer .footer-brand {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-white);
  display: block;
  margin-bottom: .5rem;
}
.site-footer .footer-tagline {
  font-size: .875rem;
  color: var(--color-white);
}
.site-footer h5 {
  color: var(--color-white);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1rem;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer ul li { margin-bottom: .4rem; }
.site-footer ul li a {
  color: var(--color-white);
  font-size: .9rem;
  transition: color .2s;
}
.site-footer ul li a:hover { color: var(--color-white); text-decoration: none; }
.site-footer .footer-address {
  font-size: .9rem;
  color: var(--color-white);
  margin-bottom: 0;
  line-height: 1.6;
}
.site-footer .footer-address a {
  color: var(--color-white);
  text-decoration: underline;
}
.site-footer .footer-address a:hover { text-decoration: none; }

/* Subfooter: legal links | copyright | Princeton shield (same dark band as main) */
.site-footer .subfooter {
  background: #333;
  color: var(--color-white);
  border-top: 1px solid #262626;
  margin-top: 1rem;
  padding: 1rem 0;
  font-size: .85rem;
}
.site-footer .subfooter .subfooter-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .25rem 1.75rem;
}
.site-footer .subfooter .subfooter-links li { margin: 0; display: inline-block; }
.site-footer .subfooter .subfooter-links a {
  color: var(--color-white);
  text-decoration: underline;
}
.site-footer .subfooter .subfooter-links a:hover { text-decoration: none; }
/* Suppress any injected external-link icons in the subfooter */
.site-footer .subfooter .subfooter-links a::after,
.site-footer .subfooter .subfooter-links a::before,
.site-footer .subfooter .subfooter-links a svg,
.site-footer .subfooter .subfooter-links a .dashicons,
.site-footer .subfooter .subfooter-links a .wp-exclude-emoji {
  display: none !important;
  content: none !important;
}
.site-footer .subfooter .copyright-text {
  margin: 0;
  color: var(--color-white);
  text-align: center;
}
.site-footer .subfooter .pu-logo { display: inline-block; }
.site-footer .subfooter .pu-logo img {
  height: 48px;
  width: auto;
  display: block;
}
@media (max-width: 767.98px) {
  .site-footer .subfooter .subfooter-links ul { justify-content: center; }
  .site-footer .subfooter .subfooter-copyright,
  .site-footer .subfooter .subfooter-links,
  .site-footer .subfooter .subfooter-pu-logo { text-align: center; margin-bottom: .75rem; }
  .site-footer .subfooter .pu-logo img { margin: 0 auto; }
}

/* ── Home: Images Are Everywhere ───────────────────────── */
.section-everywhere {
  padding: 5rem 0;
  background: var(--color-white);
}
.section-everywhere h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 900;
  text-transform: uppercase;
  text-align: left;
  margin-bottom: .75rem;
}
.everywhere-card { text-align: center; }
.everywhere-card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: block;
}
.everywhere-card-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto .6rem;
  display: block;
  object-fit: contain;
}
.everywhere-card-label {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-black);
}

/* ── Home: Mission Image + X ────────────────────────────── */
.section-mission-new {
  background: var(--color-light-gray);
  padding: 5rem 0;
}
.section-mission-new h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 900;
  text-transform: uppercase;
  text-align: left;
  margin-bottom: 1rem;
}
.mission-blocks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}
.mission-blocks::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}
.mission-block {
  position: relative;
  z-index: 1;
  background: var(--color-white);
  border-radius: 10px;
  padding: 1.75rem 1.25rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.mission-block-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  border: 3px solid var(--color-white);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.mission-block-title {
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--color-black);
  margin-bottom: .75rem;
}
.mission-block-items {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .875rem;
  color: #555;
  line-height: 2;
}
.mission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.mission-tag {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-pill);
  padding: .3rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-black);
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.mission-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Mission Pipeline ───────────────────────────────────── */
.mission-pipeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  margin-bottom: 2.5rem;
}
.mission-pipeline::before {
  content: '';
  position: absolute;
  top: 90px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}
.pipeline-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}
.pipeline-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  box-shadow: 0 2px 16px rgba(0,0,0,.14);
  background: var(--color-white);
}
.pipeline-label {
  font-size: .85rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-black);
  margin-bottom: .75rem;
}
.pipeline-items {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: .9rem 1rem;
  font-size: .85rem;
  color: #555;
  line-height: 1.9;
  margin: 0 .5rem;
}

/* ── Utility ───────────────────────────────────────────── */
.section-pad { padding: 1.5rem 0 3rem; }
.section-pad-lg { padding: 4.5rem 0; }
.text-orange { color: var(--color-orange-dark); }
.bg-light-gray { background: var(--color-light-gray); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar-nav { position: static; margin-bottom: 1.5rem; }
  .event-image { display: none; }

  /* Navbar dropdown: drop absolutely below the fixed navbar bar */
  .site-navbar .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-black);
    border-top: 1px solid rgba(255,255,255,.1);
    padding: .5rem 1.5rem 1rem;
    z-index: 999;
    /* smooth open/close — override Bootstrap's height animation */
    transition: opacity .2s ease, transform .2s ease;
    transform-origin: top;
  }
  .site-navbar .navbar-collapse:not(.show) {
    opacity: 0;
    transform: scaleY(0);
    pointer-events: none;
  }
  .site-navbar .navbar-collapse.show,
  .site-navbar .navbar-collapse.collapsing {
    opacity: 1;
    transform: scaleY(1);
    /* override Bootstrap's height transition with our own */
    height: auto !important;
    transition: opacity .2s ease, transform .2s ease !important;
  }
  .site-navbar .nav-item.active .nav-link::after { display: none; }

  /* Brand: prevent cropping by toggler button */
  .site-navbar .navbar-brand {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 56px);
  }
  .brand-full { display: inline; }
}

@media (max-width: 767.98px) {
  .hero { padding: 4rem 0; }
  .hero h1 { font-size: 2rem; }
  h1.page-title { font-size: 1.75rem; }
  .event-item { flex-direction: column; gap: .75rem; }
  .date-badge { width: 64px; height: 64px; }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-item { padding: 0 1.25rem; }
  .stat-number { font-size: 1.5rem; }
  .home-section-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .mission-label-grid { grid-template-columns: 1fr 1fr; }
  .mission-blocks { grid-template-columns: repeat(2, 1fr); }
  .mission-blocks::before { display: none; }

  /* Pipeline: 2×2 grid instead of 4-in-a-row */
  .mission-pipeline { flex-wrap: wrap; }
  .mission-pipeline::before { display: none; }
  .pipeline-step { flex: 0 0 50%; max-width: 50%; margin-bottom: 2rem; }
  .pipeline-img { width: 130px; height: 130px; }

  /* Research: visible card margins */
  .research-card { margin-left: .75rem; margin-right: .75rem; }

  /* Events: more breathing room — padding on container + between items */
  .section-pad { padding: 1.5rem 1rem 3rem; }
  .event-item { padding: 2rem 0; gap: 1.25rem; }
  .event-title { font-size: 1.05rem; }
  .event-abstract { -webkit-line-clamp: 2; }

  /* Sidebar: horizontal scrollable pill strip instead of vertical stack */
  .sidebar-nav { margin-bottom: 1.25rem; }
  .sidebar-nav .sidebar-heading { display: none; }
  .sidebar-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0;
    border-bottom: none;
  }
  .sidebar-nav ul li a {
    display: inline-block;
    background: var(--color-light-gray);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-pill);
    padding: .3rem .9rem;
    font-size: .85rem;
    white-space: nowrap;
  }

  /* People/Research/Events: reduce sidebar column width on tablet */
  .section-pad .col-md-3 { margin-bottom: 0; }
}

@media (max-width: 480px) {
  .mission-blocks { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: 1fr 1fr; }
  .stats-strip .row { flex-direction: column; gap: 1.25rem; }
  .stats-divider { display: none; }

  /* Pipeline: single column on very small screens */
  .pipeline-step { flex: 0 0 100%; max-width: 100%; }
  .pipeline-img { width: 150px; height: 150px; }

  .date-badge { flex-shrink: 0; }
}
