/* =====================================================================
   SEAL — SLO Experimental Aerospace Lab — Stylesheet
   ---------------------------------------------------------------------
   Organized in sections so future maintainers (including students with
   little CSS experience) can find things quickly:

     1. Design tokens (colors, type, spacing, radii, shadows)
     2. Reset / base element styles
     3. Layout utilities
     4. Accessibility helpers (skip link, focus states, motion)
     5. Header & navigation
     6. Buttons & tags
     7. Hero sections
     8. Stats strip
     9. Section headings & content grid
    10. Research project cards
    11. Publications list
    12. People / team grid
    13. Contact page
    14. Footer
    15. Scroll-reveal animation hooks
    16. Responsive breakpoints
    17. Print styles

   Edit tokens in section 1 to re-theme the whole site.
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. DESIGN TOKENS
   Every color, font size, spacing value, radius, and shadow used across
   the site is defined once here. Change a value here and it updates
   everywhere it's used.
--------------------------------------------------------------------- */
:root {
  /* --- Brand colors (turquoise / cream / coral, deep indigo navy for contrast) --- */
  /* --- Primary / brand scale (blue) --- */
--color-primary-900: #153A76;   /* darkest blue — headers / strong emphasis */
--color-primary-700: #1F57AE;   /* primary links / text accents — WCAG AA+ */
--color-primary-600: #2F6ECF;   /* buttons / hover states — WCAG AA with white text */
--color-primary-500: #73A5F4;   /* literal brand blue — decorative, fills, large UI elements */
--color-primary-100: #E8F0FD;   /* pale blue tint — selected / highlighted backgrounds */

/* --- Complementary accent scale (coral / rose) --- */
--color-accent-700: #9F304A;    /* accent text on light backgrounds — WCAG AAA */
--color-accent-600: #C2415D;    /* accent links / badges — WCAG AA */
--color-accent-500: #E4667D;    /* decorative accent — non-text use */
--color-accent-100: #FCE8EC;    /* subtle accent background */

/* --- Neutral / ink scale (blue-gray) --- */
--color-ink-900: #1A2433;       /* primary body text — very high contrast */
--color-ink-700: #334155;       /* secondary headings / text */
--color-ink-500: #526176;       /* muted / metadata text — WCAG AA */
--color-ink-400: #64748B;       /* lowest recommended normal-text gray on white */
--color-ink-300: #A8B7CC;       /* disabled / decorative only */

/* --- Surfaces --- */
--color-bg: #F7F9FC;            /* cool off-white page background */
--color-surface: #FFFFFF;       /* cards, header, dialogs */
--color-surface-alt: #EEF3FB;   /* alternating sections */
--color-border: #D8E2F0;        /* subtle borders */
--color-border-strong: #A8B7CC; /* stronger dividers / controls */

/* --- Feedback / focus --- */
--color-focus: #1F57AE;         /* high-contrast focus ring */
  --color-accent-onDark: #FF9CAF; /* salmon on dark-navy surfaces (avatars, header mark) — same value in both themes since those elements keep a dark background regardless of theme */
   
  /* --- Typography --- */
  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --fs-2xs: 0.6875rem;  /* 11px */
  --fs-xs:  0.8125rem;  /* 13px */
  --fs-sm:  0.9375rem;  /* 15px */
  --fs-base: 1rem;      /* 16px */
  --fs-md:  1.125rem;   /* 18px */
  --fs-lg:  1.375rem;   /* 22px */
  --fs-xl:  1.75rem;    /* 28px */
  --fs-2xl: clamp(2rem, 3.4vw, 2.75rem);
  --fs-3xl: clamp(2.5rem, 5vw, 3.75rem);

  /* --- Spacing scale (8px base) --- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 6rem;

  /* --- Radii & shadows: restrained, not "app-like" --- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(27, 42, 74, 0.06);
  --shadow-md: 0 6px 24px rgba(27, 42, 74, 0.08);
  --shadow-lg: 0 16px 48px rgba(27, 42, 74, 0.12);

  /* --- Layout --- */
  --page-max: 1180px;
  --page-pad: clamp(20px, 4.5vw, 56px);
  --header-height: 76px;
  --transition-fast: 150ms ease;
  --transition-base: 240ms cubic-bezier(0.2, 0.6, 0.2, 1);

  /* --- Header background needs its own token because it uses
     transparency + blur; the RGB values differ between themes --- */
  --header-bg: rgba(245, 245, 220, 0.94);
}

/* ---------------------------------------------------------------------
   1b. DARK THEME OVERRIDES
   Toggled by setting data-theme="dark" on <html> (see js/theme.js).
   Every variable below shares a name with a light-mode variable in
   section 1, so nothing else in this file needs to change — the
   cascade does the work.
--------------------------------------------------------------------- */
:root[data-theme="dark"] {
  /* --- Primary / brand scale (blue) --- */
--color-primary-700: #73A5F4;   /* primary links / accents — ~7.3:1 on page bg */
--color-primary-600: #8DB7F7;   /* hover / active state — ~8.9:1 on page bg */
--color-primary-500: #A9C9FA;   /* brighter highlight / decorative emphasis */
--color-primary-300: #C9DDFC;   /* subtle icons / selected-state details */

/* Important:
   Use dark text, not white text, on #73A5F4 buttons.
   White on #73A5F4 is only ~2.5:1.
*/
--color-primary-on: #0C1524;


/* --- Complementary accent scale (coral / rose) --- */
--color-accent-600: #F08A9D;    /* accent text / icons — ~7.7:1 on page bg */
--color-accent-700: #FF9CAF;    /* brighter accent / hover — ~9.3:1 on page bg */
--color-accent-onDark: #FF9CAF; /* accent text on dark surfaces */
--color-accent-300: #FFC4CE;    /* subtle decorative / selected details */


/* --- Neutral / ink scale (cool blue-gray) --- */
--color-ink-900: #EEF0F5;       /* primary body text — ~16:1 on page bg */
--color-ink-700: #C7CCDC;       /* secondary text — ~11.4:1 */
--color-ink-500: #9EA9C1;       /* muted / metadata text — ~7.7:1 */
--color-ink-300: #55627E;       /* disabled / decorative only */


/* --- Surfaces --- */
--color-bg: #0C1524;            /* main page background */
--color-surface: #131E33;       /* cards, header, modals */
--color-surface-alt: #182545;   /* elevated / alternating sections */

--color-border: #223255;        /* subtle structural borders */
--color-border-strong: #304368; /* prominent dividers / controls */


/* --- Feedback / focus --- */
--color-focus: #73A5F4;         /* highly visible focus ring on dark surfaces */


/* --- Header --- */
--header-bg: rgba(12, 21, 36, 0.90);


/* --- Shadows --- */
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
--shadow-md: 0 6px 24px rgba(0, 0, 0, 0.45);
--shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
}

/* Respect the OS preference the first time a visitor arrives, before
   js/theme.js has a chance to read/write localStorage. js/theme.js
   overrides this by setting data-theme explicitly once it runs. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------------
   2. RESET / BASE ELEMENT STYLES
--------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-ink-900);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-base), color var(--transition-base);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 var(--sp-3); letter-spacing: -0.01em; }
p { margin: 0 0 var(--sp-4); }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

/* ---------------------------------------------------------------------
   3. LAYOUT UTILITIES
--------------------------------------------------------------------- */
.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

main { display: block; }

/* ---------------------------------------------------------------------
   4. ACCESSIBILITY HELPERS
--------------------------------------------------------------------- */
.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;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -60px;
  z-index: 100;
  background: var(--color-primary-900);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: var(--sp-3);
}

/* A single, consistent, highly visible focus style for every
   interactive element — required for keyboard-only users. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------
   5. HEADER & NAVIGATION
--------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: var(--header-height);
  padding-inline: var(--page-pad);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--color-ink-900);
  letter-spacing: -0.01em;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: transparent;
  box-shadow: none;
  color: var(--color-accent-onDark);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.brand .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand .brand-text small {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-ink-500);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
  color: var(--color-ink-900);
}

.nav { display: flex; align-items: center; gap: var(--sp-6); }

.nav a {
  position: relative;
  text-decoration: none;
  color: var(--color-ink-700);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: var(--sp-2) 0;
  transition: color var(--transition-fast);
}

.nav a:hover { color: var(--color-primary-700); }

.nav a[aria-current="page"] {
  color: var(--color-primary-900);
}
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--color-accent-700);
}

/* Groups the nav links + theme toggle so they sit together on the
   right side of the header, independent of the hamburger button. */
.header-actions { display: flex; align-items: center; gap: var(--sp-5); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink-700);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.theme-toggle:hover { border-color: var(--color-primary-700); color: var(--color-primary-700); }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
/* Only one of the two icons shows at a time, controlled by the
   current data-theme attribute on <html>. */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------------------------------------------------------------------
   6. BUTTONS & TAGS
--------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border: 1px solid var(--color-primary-900);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-5);
  background: var(--color-primary-900);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.button:hover { background: var(--color-primary-600); border-color: var(--color-primary-600); }
.button:active { transform: translateY(1px); }

.button.secondary {
  background: transparent;
  color: var(--color-ink-900);
  border-color: var(--color-border-strong);
}
.button.secondary:hover { border-color: var(--color-primary-900); color: var(--color-primary-900); }

.button.on-dark { border-color: rgba(255,255,255,0.5); color: #fff; background: transparent; }
.button.on-dark:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-accent-700);
  background: rgba(255, 127, 80, 0.12);
  border: 1px solid rgba(255, 127, 80, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-accent-700);
  margin: 0 0 var(--sp-3);
}

/* ---------------------------------------------------------------------
   7. HERO SECTIONS
--------------------------------------------------------------------- */
.hero {
  background: linear-gradient(160deg, var(--color-primary-900) 0%, #071f18 100%);
  color: #fff;
  border-bottom: 4px solid var(--color-accent-600);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--sp-8);
  align-items: center;
  padding-block: var(--sp-9) var(--sp-8);
}

.hero h1 { font-size: var(--fs-3xl); color: #fff; margin-bottom: var(--sp-4); }
.hero .lead { font-size: var(--fs-lg); color: rgba(255,255,255,0.82); max-width: 46ch; line-height: 1.55; }
.hero .eyebrow { color: var(--color-accent-onDark); }
.hero .actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-6); }

.hero-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-card .preview-frame {
  aspect-ratio: 3 / 4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.hero-card .preview-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.hero-card .hero-card-body { padding: var(--sp-5); }
.hero-card .hero-card-body h2 {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-2xs);
  color: var(--color-accent-onDark);
  margin-bottom: var(--sp-2);
}
.hero-card .hero-card-body p { color: rgba(255,255,255,0.85); margin: 0; font-size: var(--fs-sm); }

/* Secondary page hero — shorter, used on interior pages */
.page-hero {
  background: var(--color-primary-900);
  color: #fff;
  border-bottom: 4px solid var(--color-accent-600);
}
.page-hero .wrap { padding-block: var(--sp-8) var(--sp-7); }
.page-hero h1 { color: #fff; font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.page-hero .lead { color: rgba(255,255,255,0.82); font-size: var(--fs-md); max-width: 62ch; }
.page-hero .eyebrow { color: var(--color-accent-onDark); }

/* ---------------------------------------------------------------------
   7b. SEAL POD ILLUSTRATION (homepage only)
--------------------------------------------------------------------- */
.seal-section .wrap { text-align: center; }
.seal-section .section-head { max-width: 62ch; margin-left: auto; margin-right: auto; }
.seal-illustration {
  width: 100%;
  max-width: 900px;
  height: auto;
  margin-top: var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-4);
}

/* Fun tagline under the People page <h1> — "Meet the Pod" */
.pod-tagline {
  font-style: italic;
  font-weight: 600;
  color: var(--color-accent-onDark);
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
}

/* ---------------------------------------------------------------------
   8. STATS STRIP
--------------------------------------------------------------------- */
.stats {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.stats .stat {
  padding: var(--sp-6) var(--sp-5);
  border-left: 1px solid var(--color-border);
}
.stats .stat:first-child { border-left: none; padding-left: 0; }
.stats .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--color-primary-900);
  margin-bottom: var(--sp-1);
}
.stats .stat span { color: var(--color-ink-500); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------------
   9. SECTION HEADINGS & CONTENT GRID
--------------------------------------------------------------------- */
.section { padding-block: var(--sp-9); }
.section.alt { background: var(--color-surface-alt); }
.section-head { max-width: 68ch; margin-bottom: var(--sp-7); }
.section-head h2 { font-size: var(--fs-2xl); color: var(--color-ink-900); }
.section-head .lead { color: var(--color-ink-700); font-size: var(--fs-md); }

.grid { display: grid; gap: var(--sp-5); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.theme-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.theme-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.theme-card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); color: var(--color-ink-900); }
.theme-card p { color: var(--color-ink-700); margin: 0; font-size: var(--fs-sm); }

/* ---------------------------------------------------------------------
   10. RESEARCH PROJECT CARDS
--------------------------------------------------------------------- */
.project-list { display: grid; gap: var(--sp-6); }
.project-list.cols-3 { grid-template-columns: repeat(3, 1fr); }
.project-list.cols-2 { grid-template-columns: repeat(2, 1fr); }

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}
.project-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
}

.project-card .card-media {
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  /* Project thumbnails are portrait document previews (report cover
     pages), so the frame matches that aspect ratio rather than a
     landscape photo ratio — keeps the preview large instead of
     letterboxed. */
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
}
.project-card .card-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 16px rgba(20,24,28,0.14);
}

.project-card .card-body { padding: var(--sp-5); display: flex; flex-direction: column; flex: 1; }
.project-card .tag { margin-bottom: var(--sp-3); }
.project-card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.project-card p.summary { color: var(--color-ink-700); font-size: var(--fs-sm); flex: 1; }
.project-card .people {
  font-size: var(--fs-xs);
  color: var(--color-ink-500);
  margin-bottom: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--color-border);
}
.project-card .card-actions { margin-top: auto; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-primary-700);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}
.text-link:hover { border-color: currentColor; }
.text-link .icon { font-family: var(--font-mono); }

/* ---------------------------------------------------------------------
   11. PUBLICATIONS LIST
--------------------------------------------------------------------- */
.pub-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--color-border); }

.pub-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: var(--sp-5);
  align-items: start;
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--color-border);
}

.pub-row .pub-thumb {
  aspect-ratio: 3 / 4;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.pub-row .pub-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.pub-row .pub-body h3 { font-size: var(--fs-lg); margin: var(--sp-2) 0 var(--sp-2); }
.pub-row .pub-body p.summary { color: var(--color-ink-700); font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.pub-row .pub-body p.people { color: var(--color-ink-500); font-size: var(--fs-xs); margin: 0; }

.pub-row .pub-action { align-self: center; }

/* --- Publications search bar --- */
.pub-search {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-6);
  max-width: 520px;
}
.pub-search svg { width: 18px; height: 18px; stroke: var(--color-ink-500); fill: none; flex-shrink: 0; }
.pub-search input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--color-ink-900);
  width: 100%;
}
.pub-search input::placeholder { color: var(--color-ink-500); }
.pub-meta { color: var(--color-ink-500); font-size: var(--fs-xs); margin-bottom: var(--sp-5); }
.pub-empty { display: none; padding: var(--sp-7) 0; text-align: center; color: var(--color-ink-500); }
.pub-empty.is-visible { display: block; }

/* ---------------------------------------------------------------------
   12. PEOPLE / TEAM GRID
--------------------------------------------------------------------- */
.person-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  text-align: left;
}
.person-card .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-primary-900);
  color: var(--color-accent-onDark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-4);
}
.person-card h3 { font-size: var(--fs-md); margin-bottom: 2px; }
.person-card .role { color: var(--color-accent-700); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--sp-3); }
.person-card p.bio { color: var(--color-ink-700); font-size: var(--fs-sm); margin: 0; }

/* ---------------------------------------------------------------------
   13. CONTACT PAGE
--------------------------------------------------------------------- */
.section.narrow .wrap { max-width: 760px; }
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-7);
}
.contact-card h2 { font-size: var(--fs-xl); margin-bottom: var(--sp-4); }
.contact-card dl { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-4); margin: 0; }
.contact-card dt { font-weight: 600; color: var(--color-ink-500); font-size: var(--fs-sm); }
.contact-card dd { margin: 0; font-size: var(--fs-sm); color: var(--color-ink-900); }
.contact-card .divider { grid-column: 1 / -1; height: 1px; background: var(--color-border); margin: var(--sp-3) 0; }

/* ---------------------------------------------------------------------
   14. FOOTER
--------------------------------------------------------------------- */
.footer {
  background: var(--color-primary-900);
  color: rgba(255,255,255,0.7);
}
.footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-7);
  padding-block: var(--sp-8) var(--sp-6);
}
.footer h4 {
  font-family: var(--font-body);
  color: #fff;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-4);
}
.footer p { font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.footer a { text-decoration: none; color: rgba(255,255,255,0.7); font-size: var(--fs-sm); }
.footer a:hover { color: #fff; }
.footer ul li { margin-bottom: var(--sp-2); }
.footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: var(--sp-4);
  font-size: var(--fs-xs);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* ---------------------------------------------------------------------
   14b. IMAGE GALLERY + LIGHTBOX
--------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.gallery-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  cursor: pointer;
  padding: 0;
  display: block;
  width: 100%;
  text-align: left;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.gallery-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery-item .thumb-frame {
  aspect-ratio: 3 / 4;
  background: var(--color-surface-alt);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
}
.gallery-item img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 4px 16px rgba(20,24,28,0.14); }
.gallery-item .caption { padding: var(--sp-4); border-top: 1px solid var(--color-border); }
.gallery-item .caption p { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--color-ink-900); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 10, 0.92);
  padding: var(--sp-6);
}
.lightbox.is-open { display: flex; }
.lightbox figure { margin: 0; max-width: min(880px, 92vw); max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); }
.lightbox img { max-width: 100%; max-height: 72vh; object-fit: contain; background: #fff; box-shadow: var(--shadow-lg); }
.lightbox figcaption { color: #fff; font-size: var(--fs-sm); text-align: center; }
.lightbox-close {
  position: absolute;
  top: var(--sp-5); right: var(--sp-5);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.18); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.18); }
.lightbox-nav.prev { left: var(--sp-5); }
.lightbox-nav.next { right: var(--sp-5); }

/* ---------------------------------------------------------------------
   14c. EQUIPMENT / FACILITIES PAGE
--------------------------------------------------------------------- */
.equipment-list { display: flex; flex-direction: column; gap: var(--sp-7); }
.equipment-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.equipment-row .equip-media {
  background: var(--color-surface-alt);
  border-right: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5);
}
.equipment-row .equip-media img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 4px 16px rgba(20,24,28,0.14); }
.equipment-row .equip-body { padding: var(--sp-6) var(--sp-6) var(--sp-6) 0; display: flex; flex-direction: column; }
.equipment-row .equip-body h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
/* Real apparatus specs read as short descriptive phrases rather than
   single numbers, so the spec sheet uses one column with a small
   caption label above each value instead of a dense 2-column grid. */
.equipment-row .spec-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); margin: var(--sp-4) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--color-border); }
.equipment-row .spec-list .spec-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--color-ink-500);
  margin-bottom: 2px;
}
.equipment-row .spec-list strong { display: block; color: var(--color-ink-900); font-size: var(--fs-sm); font-weight: 600; }

/* ---------------------------------------------------------------------
   14d. PROJECT DETAIL PAGE
--------------------------------------------------------------------- */
.detail-hero { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--sp-8); align-items: start; }
.detail-hero .detail-media {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.detail-hero .detail-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail-body h1 { font-size: var(--fs-2xl); margin: var(--sp-3) 0 var(--sp-3); }
.detail-body .citation { font-size: var(--fs-sm); color: var(--color-ink-500); margin-bottom: var(--sp-4); }
.detail-body .citation em { font-style: italic; color: var(--color-ink-700); }
.detail-body .meta-row { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); margin: var(--sp-5) 0; padding: var(--sp-4) 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.detail-body .meta-row div { font-size: var(--fs-xs); flex: 1 1 200px; max-width: 280px; }
.detail-body .meta-row dt { color: var(--color-ink-500); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 2px; }
.detail-body .meta-row dd { margin: 0; color: var(--color-ink-900); font-weight: 600; font-size: var(--fs-sm); }
.detail-body .overview { color: var(--color-ink-700); font-size: var(--fs-md); line-height: 1.7; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--color-ink-500); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--sp-6); }
.back-link:hover { color: var(--color-primary-700); }

/* ---------------------------------------------------------------------
   15. SCROLL-REVEAL ANIMATION HOOKS
   JS (js/reveal.js) toggles the .is-visible class via IntersectionObserver.
   Kept purely additive so content is fully visible/functional even if
   JS fails to load — nothing here hides content by default beyond a
   short, subtle offset.
--------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------------
   16. RESPONSIVE BREAKPOINTS
--------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-card { max-width: 420px; }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
  .equipment-row { grid-template-columns: 1fr; }
  .equipment-row .equip-media { border-right: none; border-bottom: 1px solid var(--color-border); aspect-ratio: 16/9; }
  .equipment-row .equip-body { padding: var(--sp-6); }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-hero .detail-media { max-width: 360px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .header-actions { position: static; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: var(--sp-3) var(--page-pad) var(--sp-5);
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding-block: var(--sp-3); border-bottom: 1px solid var(--color-border); }
  .nav a:last-child { border-bottom: none; }

  .grid.cols-3, .grid.cols-2,
  .project-list.cols-3, .project-list.cols-2 { grid-template-columns: 1fr; }

  .stats .wrap { grid-template-columns: 1fr; }
  .stats .stat { border-left: none; border-top: 1px solid var(--color-border); padding-left: 0; }
  .stats .stat:first-child { border-top: none; }

  .pub-row { grid-template-columns: 72px 1fr; }
  .pub-row .pub-action { grid-column: 1 / -1; }

  .footer .wrap { grid-template-columns: 1fr; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-nav.prev { left: var(--sp-3); }
  .lightbox-nav.next { right: var(--sp-3); }

  .quote-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   17b. QUOTES PAGE
--------------------------------------------------------------------- */
.quote-list { display: grid; gap: var(--sp-5); grid-template-columns: repeat(2, 1fr); }
.quote-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary-700);
  border-radius: var(--radius-md);
  padding: var(--sp-5) var(--sp-6);
}
.quote-card.is-red { border-left-color: var(--color-accent-700); }
.quote-card.is-blue { border-left-color: #2E5FA3; }
.quote-card.is-featured {
  grid-column: 1 / -1;
  border-left-width: 6px;
  border-left-color: var(--color-accent-700);
  background: var(--color-surface-alt);
}
.quote-card blockquote {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lg);
  line-height: 1.4;
  color: var(--color-ink-900);
}
.quote-card.is-featured blockquote { font-size: var(--fs-xl); }
.quote-card cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-ink-500);
}
.quote-legend {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--color-border);
  color: var(--color-ink-500);
  font-size: var(--fs-xs);
}
.quote-legend strong { color: var(--color-ink-700); }

/* ---------------------------------------------------------------------
   17. PRINT STYLES
   Publication and project pages are often printed for offline review.
--------------------------------------------------------------------- */
@media print {
  .site-header, .footer, .nav-toggle, .actions { display: none; }
  body { background: #fff; }
  .hero, .page-hero { background: none !important; color: #000 !important; border: none; }
  .hero h1, .page-hero h1, .hero .lead, .page-hero .lead { color: #000 !important; }
}
