@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --ivory: #FAF6EE;
  --charcoal: #2A2622;
  --beige: #EFE6D6;
  --gold: #B08D46;
  --walnut: #6B4428;
  --white: #FFFFFF;
  --line: rgba(42, 38, 34, 0.12);
  --muted: #726A5E;

  /* Restrained green additions */
  --forest: #1F3D2B;
  --olive: #6B7A3A;
  --sage: #EEF2E8;

  /* --accent is set inline on <body> from Site Settings (approved colors only:
     Deep Forest Green / Muted Olive / Muted Gold / Charcoal). Small headings,
     active nav, primary buttons, focus states, timeline markers, featured
     labels and card borders all reference this single variable. */
  --accent: var(--forest);

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1em; color: var(--charcoal); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.9em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Section transition system ----------
   Three approved styles only, selectable per major section from the admin.
   None use diagonal/slash/zigzag marks — calm, editorial transitions instead. */

/* Style A: Spacious Editorial — generous space, small label, thin static line */
.transition-spacious {
  padding: 56px 0 0;
  border-top: 1px solid var(--line);
}
.transition-spacious .transition-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  display: block;
  margin-top: -9px;
  background: var(--ivory);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
}

/* Style B: Soft Background Shift — alternate ivory / sage / beige, no line at all */
.transition-soft-bg { background: var(--sage); }
.transition-soft-bg.tinted { background: var(--beige); }

/* Style C: Image-Led Transition — a wide, softly-cropped image strip between sections */
.transition-image-led {
  height: 220px;
  background: var(--beige);
  overflow: hidden;
  border-radius: 12px;
  margin: 0 auto;
  max-width: calc(var(--max-width) - 48px);
}
.transition-image-led img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .transition-image-led { height: 140px; border-radius: 8px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--ivory); }
.btn-primary:hover { background: var(--charcoal); }
.btn-outline { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: var(--ivory); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--walnut); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Accessibility: skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--charcoal); color: var(--ivory); padding: 12px 20px; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Visible focus ring on interactive elements, beyond browser defaults */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  transition: border-color 0.15s ease;
}
.btn-icon:hover { border-color: var(--accent); }

/* ---------- Header / Nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
header.site-header.is-scrolled {
  box-shadow: 0 4px 16px rgba(42, 38, 34, 0.06);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  min-height: 68px;
  box-sizing: border-box;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.brand span { color: var(--gold); }

nav.main-nav { display: flex; align-items: center; gap: 4px; }
nav.main-nav > .nav-item { position: relative; display: flex; align-items: center; }
nav.main-nav > .nav-item > a,
nav.main-nav > .nav-item > button {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent; /* reserved always, so hover/active never shifts height */
  box-sizing: border-box;
  cursor: pointer;
  color: var(--charcoal);
  padding: 10px 14px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
nav.main-nav > .nav-item > button::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: 0.65;
}
nav.main-nav > .nav-item:hover > a,
nav.main-nav > .nav-item:hover > button { color: var(--accent); border-bottom-color: var(--accent); }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(42, 38, 34, 0.08);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  max-height: 80vh;
  overflow-y: auto;
}
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--charcoal);
}
.dropdown a:hover,
.dropdown a:focus-visible { background: var(--sage); color: var(--accent); }
.dropdown a.active, nav.main-nav > .nav-item > a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-connect-btn { flex-shrink: 0; white-space: nowrap; padding: 10px 20px; font-size: 0.88rem; }

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; }

@media (max-width: 960px) {
  nav.main-nav { display: none; }
  .nav-connect-btn { display: none; }
  .mobile-toggle { display: block; }
}
@media (max-width: 400px) {
  .nav-row { min-height: 60px; padding: 12px 0; }
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.mobile-menu.open { display: block; }
.mobile-menu details { border-bottom: 1px solid var(--line); }
.mobile-menu summary {
  padding: 16px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu a { display: block; padding: 10px 24px 10px 36px; font-size: 0.92rem; color: var(--muted); }
.mobile-menu > a { padding: 16px 24px; display: block; font-weight: 600; border-bottom: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-portrait {
  aspect-ratio: 4 / 5;
  background: var(--beige);
  overflow: hidden;
  border-radius: var(--radius);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero-title { color: var(--charcoal); }
.hero-role { font-family: var(--font-mono); font-size: 0.85rem; color: var(--walnut); letter-spacing: 0.04em; margin-bottom: 20px; }
.hero-welcome { font-size: 1.08rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 320px; }
}

/* ---------- Sections ---------- */
section.block { padding: 64px 0; }
section.block.tinted { background: var(--beige); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 36px; gap: 20px; flex-wrap: wrap; }
.section-head .link-all { font-size: 0.88rem; font-weight: 600; border-bottom: 1px solid var(--charcoal); padding-bottom: 2px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.card-image { aspect-ratio: 4/3; background: var(--beige); overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { font-size: 0.94rem; color: var(--muted); flex: 1; }
.card-meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.card-link { margin-top: 14px; font-size: 0.88rem; font-weight: 600; border-bottom: 1px solid var(--charcoal); align-self: flex-start; transition: color 0.15s ease, border-color 0.15s ease; }
.card-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Timeline (journey) ---------- */
.timeline { position: relative; padding-left: 8px; }
.timeline-item {
  position: relative;
  padding: 0 0 44px 42px;
  border-left: none;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 6px;
  bottom: -44px;
  width: 3px;
  background-image: repeating-linear-gradient(180deg, var(--gold) 0 6px, transparent 6px 14px);
}
.timeline-item:last-child::before { display: none; }
.timeline-item::after {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}
.timeline-year { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold); margin-bottom: 6px; display: block; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 20px; }
.field.full { grid-column: 1 / -1; }
label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
label .req { color: var(--gold); }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--charcoal);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 120px; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--muted); }
.consent-row input { width: auto; margin-top: 4px; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 22px; font-size: 0.92rem; }
.alert-success { background: #E9F0E4; color: #3B5A34; border: 1px solid #C6D9BE; }
.alert-error { background: #F6E6E1; color: #7A3B2A; border: 1px solid #E8C3B6; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--charcoal); color: var(--ivory); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
footer .brand { color: var(--ivory); margin-bottom: 10px; }
footer p { color: rgba(250,246,238,0.68); font-size: 0.92rem; }
footer h4 { font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 16px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 10px; }
footer a { color: rgba(250,246,238,0.82); font-size: 0.92rem; }
footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(250,246,238,0.14); padding-top: 22px; font-size: 0.82rem; color: rgba(250,246,238,0.55); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Homepage stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-item {
  padding: 32px 20px;
  text-align: center;
  border-left: 1px solid var(--line);
}
.stat-item:first-child { border-left: none; }
.stat-value { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; color: var(--walnut); line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 8px; letter-spacing: 0.01em; }
.stat-placeholder-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold); border-radius: 20px;
  padding: 1px 8px; margin-top: 8px;
}
@media (max-width: 700px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2n+1) { border-left: none; }
  .stat-item:nth-child(n) { border-top: 1px solid var(--line); }
  .stat-item:nth-child(-n+2) { border-top: none; }
}

/* ---------- Homepage introduction split ---------- */
.intro-split { display: grid; grid-template-columns: 1fr 0.85fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .intro-split { grid-template-columns: 1fr; } }
.intro-image { aspect-ratio: 4/3; background: var(--beige); overflow: hidden; border-radius: var(--radius); }
.intro-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Horizontal / alternating timeline (homepage + journey desktop) ---------- */
.h-timeline { position: relative; padding: 30px 0; }
.h-timeline-track {
  display: flex; gap: 0; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity;
}
.h-timeline-item {
  flex: 0 0 260px; padding: 0 20px; position: relative; scroll-snap-align: start;
}
.h-timeline-item::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background-image: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 14px);
}
.h-timeline-item::after {
  content: ''; position: absolute; top: -5px; left: 0; width: 12px; height: 12px;
  background: var(--accent); transform: rotate(45deg);
}
.h-timeline-item .timeline-year { margin-top: 20px; }

.alt-timeline { position: relative; }
.alt-timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px;
  background-image: repeating-linear-gradient(180deg, var(--gold) 0 6px, transparent 6px 14px);
}
.alt-row { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: start; margin-bottom: 8px; }
.alt-row .alt-card { padding: 24px 0; }
.alt-row:nth-child(odd) .alt-card.left { grid-column: 1; text-align: right; }
.alt-row:nth-child(odd) .alt-card.right { grid-column: 3; visibility: hidden; }
.alt-row:nth-child(even) .alt-card.left { grid-column: 1; visibility: hidden; }
.alt-row:nth-child(even) .alt-card.right { grid-column: 3; text-align: left; }
.alt-dot {
  grid-column: 2; width: 14px; height: 14px; background: var(--accent); transform: rotate(45deg);
  margin-top: 28px; justify-self: center;
}
@media (max-width: 860px) {
  .alt-timeline::before { left: 10px; margin-left: 0; }
  .alt-row { grid-template-columns: 30px 1fr; }
  .alt-row .alt-card.left, .alt-row .alt-card.right { grid-column: 2 !important; text-align: left !important; visibility: visible !important; }
  .alt-dot { grid-column: 1; margin-top: 28px; }
}

.milestone-details { margin-top: 10px; }
.milestone-details summary {
  cursor: pointer; font-size: 0.86rem; font-weight: 600; color: var(--walnut); list-style: none;
}
.milestone-details summary::-webkit-details-marker { display: none; }
.milestone-details summary::after { content: ' + Read more'; font-weight: 500; }
.milestone-details[open] summary::after { content: ' – Show less'; }
.milestone-details .details-body { padding-top: 12px; font-size: 0.92rem; color: var(--muted); }

/* ---------- Impact cards ---------- */
.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .impact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .impact-grid { grid-template-columns: 1fr; } }
.impact-card { background: var(--white); border: 1px solid var(--line); padding: 28px 24px; transition: border-color 0.2s ease; }
.impact-card:hover { border-color: var(--accent); }
.impact-card .impact-image { width: 44px; height: 44px; border-radius: 50%; background: var(--beige); margin-bottom: 16px; overflow: hidden; }
.impact-card .impact-image img { width: 100%; height: 100%; object-fit: cover; }
.impact-card h3 { font-size: 1.1rem; }
.impact-card p { font-size: 0.9rem; color: var(--muted); }
.impact-card a.card-link { font-size: 0.85rem; }

/* ---------- Media & recognition grid ---------- */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .media-grid { grid-template-columns: 1fr; } }
.media-item { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--beige); }
.media-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.media-item:hover img { transform: scale(1.04); }
.media-item .media-tag {
  position: absolute; top: 10px; left: 10px; background: rgba(42,38,34,0.82); color: var(--ivory);
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px;
}
.media-item .media-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px 12px;
  background: linear-gradient(to top, rgba(42,38,34,0.85), transparent);
  color: var(--ivory); font-size: 0.85rem; font-weight: 600;
}

/* ---------- About page structured sections ---------- */
.about-section { padding: 44px 0; border-top: 1px solid var(--line); }
.about-section:first-child { border-top: none; }
.quote-block {
  font-family: var(--font-display); font-size: 1.3rem; font-style: italic; color: var(--walnut);
  border-left: 3px solid var(--gold); padding-left: 20px; margin: 24px 0;
}
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 10px; }
@media (max-width: 700px) { .values-grid { grid-template-columns: 1fr 1fr; } }
.value-item h4 { font-size: 0.98rem; margin-bottom: 4px; }
.value-item p { font-size: 0.86rem; color: var(--muted); }

/* ---------- Leadership & Education ---------- */
.role-card { display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.role-card:last-child { border-bottom: none; }
.role-logo { width: 72px; height: 72px; border-radius: 50%; background: var(--beige); overflow: hidden; }
.role-logo img { width: 100%; height: 100%; object-fit: cover; }
.role-dates { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold); }
@media (max-width: 600px) { .role-card { grid-template-columns: 56px 1fr; } .role-logo { width: 48px; height: 48px; } }

.edu-card { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.edu-card:last-child { border-bottom: none; }
.edu-year { font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold); min-width: 130px; }
@media (max-width: 600px) { .edu-card { flex-direction: column; gap: 6px; } .edu-year { min-width: 0; } }

/* ---------- Featured content marker ---------- */
.featured-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent); border: 1px solid var(--accent); border-radius: 20px;
  padding: 2px 9px; margin-bottom: 8px;
}
.card--featured { border-color: var(--accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Long-form CMS body text ----------
   Applied only to genuine body copy (biography, descriptions, article text,
   development-stage notes, etc.) — never to headings, card titles, nav,
   buttons, labels, captions, dates, quotations, stats, or tags, which all
   keep their own left-aligned styling untouched. */
.body-copy {
  text-align: justify;
  text-align-last: left; /* the final line of a paragraph never stretches oddly */
  line-height: 1.75;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
}
.body-copy p { margin-bottom: 1.1em; }
.body-copy p:last-child { margin-bottom: 0; }
/* Lists, quotes and subheadings inside body copy stay left-aligned even
   though the surrounding paragraphs are justified. */
.body-copy ul, .body-copy ol { text-align: left; text-align-last: left; }
.body-copy blockquote, .body-copy .quote-block { text-align: left; text-align-last: left; }
.body-copy h2, .body-copy h3, .body-copy h4 { text-align: left; }

/* On narrow phones, justification tends to create uneven word gaps in short
   line lengths — fall back to left alignment there, per the brief. */
@media (max-width: 560px) {
  .body-copy { text-align: left; text-align-last: left; }
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.empty-state { padding: 60px 24px; text-align: center; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.filters select { width: auto; }

/* =========================================================
   Phase 3 — Inventions detail, stages, gallery, media hub
   ========================================================= */

/* ---------- Filter pills (reused across inventions/gallery/media) ---------- */
.pill-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.pill-filters a {
  font-size: 0.82rem; padding: 7px 16px; border: 1px solid var(--line); border-radius: 20px;
  color: var(--muted); transition: all 0.15s ease;
}
.pill-filters a:hover { border-color: var(--accent); color: var(--accent); }
.pill-filters a.active { background: var(--accent); border-color: var(--accent); color: var(--ivory); }

/* ---------- Invention detail hero ---------- */
.invention-hero { padding: 50px 0 40px; }
.invention-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center; }
@media (max-width: 860px) { .invention-hero-grid { grid-template-columns: 1fr; } }
.invention-hero-image { aspect-ratio: 4/3; background: var(--beige); border-radius: 8px; overflow: hidden; }
.invention-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.status-pill {
  display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 4px 12px; border-radius: 20px; background: var(--sage); color: var(--forest);
  margin-bottom: 14px;
}

/* ---------- Development stage timeline ---------- */
.stage-nav { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 18px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.stage-nav a {
  flex: 0 0 auto; font-size: 0.82rem; padding: 8px 14px; border-radius: 20px; color: var(--muted);
  border: 1px solid var(--line); white-space: nowrap;
}
.stage-nav a.active, .stage-nav a:hover { border-color: var(--accent); color: var(--accent); }

.stage-block { padding: 40px 0; border-bottom: 1px solid var(--line); }
.stage-block:last-child { border-bottom: none; }
.stage-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.stage-number {
  font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); font-weight: 600; line-height: 1;
}
.stage-status-tag {
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 20px; padding: 2px 10px;
}
.stage-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }

.stage-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 16px; }
.stage-image-grid .thumb { aspect-ratio: 4/3; overflow: hidden; border-radius: 6px; background: var(--beige); cursor: pointer; position: relative; }
.stage-image-grid .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.stage-image-grid .thumb:hover img { transform: scale(1.05); }
.stage-image-grid .thumb .thumb-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; font-size: 0.72rem; color: var(--ivory);
  background: linear-gradient(to top, rgba(42,38,34,0.75), transparent);
}

/* ---------- Lightbox (keyboard + click accessible) ---------- */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; background: rgba(20, 18, 16, 0.92); z-index: 200;
  align-items: center; justify-content: center; padding: 30px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 4px; }
.lightbox-caption { color: var(--ivory); text-align: center; margin-top: 14px; font-size: 0.9rem; max-width: 70ch; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255,255,255,0.08); color: var(--ivory); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%; width: 42px; height: 42px; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--accent); border-color: var(--accent); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) { .lightbox-prev, .lightbox-next { width: 36px; height: 36px; } }

/* ---------- Gallery layouts ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid .g-item { aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--beige); cursor: pointer; }
.gallery-grid .g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.gallery-grid .g-item:hover img { transform: scale(1.05); }

.gallery-masonry { columns: 4 220px; column-gap: 14px; }
@media (max-width: 900px) { .gallery-masonry { columns: 3 160px; } }
@media (max-width: 600px) { .gallery-masonry { columns: 2 140px; } }
.gallery-masonry .g-item { break-inside: avoid; margin-bottom: 14px; border-radius: 4px; overflow: hidden; background: var(--beige); cursor: pointer; }
.gallery-masonry .g-item img { width: 100%; display: block; }

.gallery-slideshow { position: relative; aspect-ratio: 16/9; background: var(--beige); border-radius: 8px; overflow: hidden; }
.gallery-slideshow .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s ease; }
.gallery-slideshow .slide.active { opacity: 1; }
.gallery-slideshow .slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-slideshow .slide-controls { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.gallery-slideshow .slide-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; border: none; padding: 0; }
.gallery-slideshow .slide-dot.active { background: var(--ivory); }

.album-card { display: block; }
.album-card .card-image { aspect-ratio: 4/3; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .album-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .album-grid { grid-template-columns: 1fr; } }

/* ---------- Media hub ---------- */
.media-hub-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 900px) { .media-hub-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .media-hub-grid { grid-template-columns: repeat(2, 1fr); } }
.media-hub-tile {
  aspect-ratio: 1; background: var(--sage); border-radius: 8px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 14px; border: 1px solid var(--line);
  transition: border-color 0.15s ease;
}
.media-hub-tile:hover { border-color: var(--accent); }
.media-hub-tile .count { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); }
.media-hub-tile .label { font-size: 0.82rem; margin-top: 6px; }

/* ---------- Video embed ---------- */
.video-embed { position: relative; aspect-ratio: 16/9; background: var(--beige); border-radius: 6px; overflow: hidden; }
.video-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Prev/Next navigation ---------- */
.prev-next-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }
.prev-next-nav a { flex: 1; font-size: 0.86rem; }
.prev-next-nav a.next { text-align: right; }
.prev-next-nav .pn-label { display: block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }

/* ---------- Impact activity cards (Mentorship/Philanthropy/Youth/Community) ---------- */
.activity-card { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.activity-card:last-child { border-bottom: none; }
.activity-card .activity-image { aspect-ratio: 4/3; background: var(--beige); border-radius: 6px; overflow: hidden; }
.activity-card .activity-image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .activity-card { grid-template-columns: 1fr; } }
