/*
 * main.css — Mazin Lab :: STARFLEET SCIENCE CONSOLE
 *
 * LCARS-inspired theme: Okuda-era Trek bridge computer aesthetic applied
 * to an academic lab website. Black/amber palette, condensed Antonio display,
 * asymmetric elbow corners, reference codes, and scanline texture.
 *
 * Load order: main.css → components.css → animations.css
 */

/* ============================================================
   GOOGLE FONTS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@400;500;600;700&family=Barlow+Semi+Condensed:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;700&display=swap');


/* ============================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   LCARS palette — Okuda canon, adapted for long-form reading
   ============================================================ */

:root {
  /* Backgrounds — true black with cool-bluish depth steps */
  --bg-primary:   #000000;
  --bg-secondary: #05060a;
  --bg-card:      #0a0c12;
  --bg-surface:   #0d0f17;
  --bg-panel:     #111520;   /* raised panels, inputs */

  /* Text — cool legibility for long-form, warm reserved for chrome */
  --text-primary:   #e8ebf2;
  --text-secondary: #8890a3;
  --text-heading:   #ffffff;
  --text-dim:       #4d5366;

  /* LCARS canon palette — the actual Okudagram colors */
  --lcars-orange:   #ff9900;   /* primary, most common */
  --lcars-gold:     #ffcc66;   /* secondary warm */
  --lcars-salmon:   #ff9966;   /* tertiary warm */
  --lcars-peach:    #ffcc99;   /* pale fill */
  --lcars-lilac:    #cc99cc;   /* cool accent */
  --lcars-violet:   #9966cc;   /* cool accent deep */
  --lcars-blue:     #9999cc;   /* ops color */
  --lcars-red:      #cc6666;   /* alerts/status */
  --lcars-tan:      #cc9966;   /* muted */
  --lcars-plum:     #996699;   /* deep accent */

  /* Legacy aliases — keep existing rules working during the swap */
  --accent-blue:   #9999cc;    /* re-aimed at LCARS ops blue */
  --accent-amber:  #ff9900;    /* LCARS primary */
  --accent-violet: #9966cc;

  /* Borders */
  --border:       #1a1e2a;
  --border-light: #2a2f42;
  --border-lcars: rgba(255, 153, 0, 0.25);

  /* Navigation */
  --nav-bg: rgba(0, 0, 0, 0.92);

  /* Typography */
  --font-display: 'Antonio', 'Barlow Condensed', Impact, system-ui, sans-serif;
  --font-heading: 'Antonio', 'Barlow Condensed', Impact, system-ui, sans-serif;
  --font-body:    'Barlow Semi Condensed', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1.0625rem;  /* 17px */
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border radii — LCARS elbows favor extreme asymmetry */
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   6px;
  --radius-xl:   8px;
  --radius-full: 9999px;
  --radius-elbow: 4px 40px 40px 4px;    /* pill-right */
  --radius-elbow-left: 40px 4px 4px 40px; /* pill-left */

  /* Shadows — LCARS has no drop shadows; use colored glows instead */
  --shadow-sm:   0 0 0 1px rgba(255, 153, 0, 0.08);
  --shadow-md:   0 0 0 1px rgba(255, 153, 0, 0.12);
  --shadow-lg:   0 0 0 1px rgba(255, 153, 0, 0.18);
  --shadow-glow: 0 0 24px rgba(255, 153, 0, 0.15);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Nav height — used for scroll offset compensation */
  --nav-height: 72px;
}


/* ============================================================
   CSS RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Text selection — LCARS orange */
::selection {
  background-color: var(--lcars-orange);
  color: #000000;
}

::-moz-selection {
  background-color: var(--lcars-orange);
  color: #000000;
}

/* Scrollbar — operational feel */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #000000;
}
::-webkit-scrollbar-thumb {
  background: var(--lcars-orange);
  border-radius: 0;
  border: 2px solid #000000;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--lcars-gold);
}


/* ============================================================
   TYPOGRAPHY — LCARS convention: condensed caps for display
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-heading);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 600; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); color: var(--lcars-gold); }
h4 { font-size: 1.5rem; color: var(--lcars-gold); }
h5 { font-size: 1.25rem; color: var(--lcars-salmon); letter-spacing: 0.08em; }
h6 { font-size: 1rem; color: var(--lcars-salmon); letter-spacing: 0.12em; }

/* Within prose, inline strong uses LCARS orange */
p strong, li strong { color: var(--lcars-orange); font-weight: 600; }
p em, li em { color: var(--lcars-gold); font-style: normal; }

p {
  margin-bottom: 1.25em;
}

p:last-child {
  margin-bottom: 0;
}

/* Lead paragraph — the computer explains */
.lead {
  font-size: var(--text-xl);
  color: var(--text-primary);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.005em;
}

/* Section headings — with auto LCARS bar before */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
  color: var(--lcars-orange);
  position: relative;
  padding-left: 0;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Eyebrow / label — LCARS section code */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lcars-gold);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.4em;
  height: 0.55em;
  background: var(--lcars-orange);
  border-radius: 2px 8px 8px 2px;
}

/* Inline code and mono text */
code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: #000000;
  border: 1px solid var(--border-lcars);
  border-radius: 2px;
  padding: 0.1em 0.5em;
  color: var(--lcars-orange);
  letter-spacing: 0.02em;
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  overflow-x: auto;
  line-height: 1.6;
  color: var(--text-primary);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

blockquote {
  border-left: 5px solid var(--lcars-orange);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  color: var(--text-primary);
  font-style: normal;
  font-size: var(--text-lg);
  background: #000000;
  border-radius: 0 6px 6px 0;
  position: relative;
}
blockquote::before {
  content: "TRANSCRIPT";
  position: absolute;
  top: -0.55em;
  left: var(--space-6);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--lcars-orange);
  background: #000000;
  padding: 0 0.5em;
}

blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--text-secondary);
}

/* Lists */
ul, ol {
  padding-left: var(--space-6);
  margin-bottom: 1.25em;
}

li {
  margin-bottom: 0.4em;
}

li:last-child {
  margin-bottom: 0;
}


/* ============================================================
   LINKS
   ============================================================ */

a {
  color: var(--lcars-gold);
  text-decoration: none;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--lcars-orange);
  text-decoration: underline;
  text-decoration-color: var(--lcars-orange);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:focus-visible {
  outline: 2px solid var(--lcars-orange);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ============================================================
   IMAGES & MEDIA
   ============================================================ */

img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

img {
  border-radius: var(--radius-md);
}

/* Don't round images inside specific components that manage their own radius */
.card-image,
.person-photo,
.hero-canvas {
  border-radius: 0;
}


/* ============================================================
   HORIZONTAL RULE / DIVIDER
   ============================================================ */

hr,
.divider {
  border: none;
  height: 4px;
  background:
    linear-gradient(90deg,
      var(--lcars-orange) 0 8%,
      transparent 8% 10%,
      var(--lcars-gold) 10% 32%,
      transparent 32% 34%,
      var(--lcars-salmon) 34% 100%);
  margin: var(--space-12) 0;
  border-radius: 2px 8px 8px 2px;
}


/* ============================================================
   LAYOUT — CONTAINERS
   ============================================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-8);
}

#main-content {
  padding-bottom: var(--space-20);
}

.container-narrow {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.container-wide {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--space-8);
}


/* ============================================================
   LAYOUT — GRID UTILITIES
   ============================================================ */

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--space-8);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Fluid grid that auto-fills */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-8);
}

/* Flex utilities */
.flex           { display: flex; }
.flex-center    { display: flex; align-items: center; justify-content: center; }
.flex-between   { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap      { flex-wrap: wrap; }
.gap-2          { gap: var(--space-2); }
.gap-4          { gap: var(--space-4); }
.gap-6          { gap: var(--space-6); }
.gap-8          { gap: var(--space-8); }


/* ============================================================
   LAYOUT — SECTIONS
   ============================================================ */

.section {
  padding: var(--space-24) 0 var(--space-20);
  background-color: #000000;
  position: relative;
}

.section-alt {
  padding: var(--space-24) 0 var(--space-20);
  background-color: #05060a;
  position: relative;
}

/* LCARS section divider — tri-color bar */
.section + .section,
.section-alt + .section,
.section + .section-alt {
  border-top: none;
}
.section + .section::before,
.section-alt + .section::before,
.section + .section-alt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background:
    linear-gradient(90deg,
      var(--lcars-orange) 0 14%,
      transparent 14% 16%,
      var(--lcars-gold) 16% 42%,
      transparent 42% 44%,
      var(--lcars-salmon) 44% 100%);
  opacity: 0.55;
}

.section-header {
  margin-bottom: var(--space-12);
  position: relative;
  padding-left: 0;
}

/* LCARS elbow bar before section titles */
.section-header .section-title::before {
  content: "";
  display: inline-block;
  width: 56px;
  height: 0.55em;
  background: var(--lcars-orange);
  border-radius: 2px 14px 14px 2px;
  margin-right: 0.6em;
  vertical-align: 0.12em;
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin-inline: auto;
}
.section-header.centered .section-title::before {
  display: none; /* no offset bar when the title is centered */
}


/* ============================================================
   NAVIGATION — LCARS Console Header Bar
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: #000000;
  border-bottom: 2px solid var(--lcars-orange);
  transition: border-color var(--transition-base);
}

/* Underbar with color-coded segments — pure LCARS */
.site-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      var(--lcars-orange) 0 18%,
      #000 18% 19%,
      var(--lcars-gold) 19% 34%,
      #000 34% 35%,
      var(--lcars-salmon) 35% 50%,
      #000 50% 51%,
      var(--lcars-lilac) 51% 72%,
      #000 72% 73%,
      var(--lcars-orange) 73% 100%);
}

.site-nav.scrolled {
  background: #000000;
  border-bottom-color: var(--lcars-orange);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--space-6);
  gap: var(--space-6);
}

/* Logo / wordmark — LCARS pill block */
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lcars-orange);
  text-decoration: none;
  flex-shrink: 0;
  transition: color var(--transition-fast), background var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.3em 0.9em 0.3em 0.9em;
  border-radius: 4px 22px 22px 4px;
  background: transparent;
  border: 1.5px solid var(--lcars-orange);
  line-height: 1;
}

.nav-logo-img {
  display: inline-block;
  height: 28px;
  width: auto;
  border-radius: 0;
  border: none;
  filter: drop-shadow(0 0 3px rgba(255, 153, 0, 0.4));
}

.nav-logo:hover {
  background: var(--lcars-orange);
  color: #000000;
  text-decoration: none;
}
.nav-logo:hover .nav-logo-img {
  filter: brightness(0) invert(0); /* tries to darken logo on hover; safe fallback */
}

.nav-logo span {
  color: var(--lcars-gold);
  font-weight: 400;
}
.nav-logo:hover span {
  color: #000000;
}

/* Primary nav list */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links > li {
  margin-bottom: 0;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--lcars-peach);
  text-decoration: none;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
  padding: 0.45em 1em;
  border-radius: 2px 16px 16px 2px;
  line-height: 1;
}

.nav-link:hover,
.nav-link.active,
.nav-link--active {
  color: #000000;
  background: var(--lcars-orange);
  text-decoration: none;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-3));
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: #000000;
  border: 1.5px solid var(--lcars-orange);
  border-radius: 4px 22px 22px 4px;
  box-shadow: 0 0 24px rgba(255, 153, 0, 0.15);
  padding: var(--space-2) 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  transform: translateX(-50%) translateY(-6px);
  z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lcars-peach);
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-dropdown-item:hover {
  color: #000000;
  background: var(--lcars-gold);
  text-decoration: none;
}

/* Dropdown arrow indicator */
.nav-dropdown > .nav-link::after {
  content: '';
  display: inline-block;
  margin-left: var(--space-2);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  vertical-align: middle;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover > .nav-link::after {
  transform: rotate(180deg);
}

/* ── Nav: hamburger button ─────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.nav-hamburger:hover {
  background: rgba(255, 153, 0, 0.18);
}

.nav-hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--lcars-orange);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
  transform-origin: center;
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Active nav link */
.nav-link--active {
  color: var(--text-primary) !important;
}

/* Dropdown wrapper (template uses .nav-item--dropdown) */
.nav-item--dropdown {
  position: relative;
  list-style: none;
}

.nav-item {
  list-style: none;
}

/* Dropdown toggle button */
.nav-dropdown-toggle {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--lcars-peach);
  text-decoration: none;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.45em 1em;
  border-radius: 2px 16px 16px 2px;
  line-height: 1;
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.nav-dropdown-toggle:hover,
.nav-item--dropdown:hover .nav-dropdown-toggle,
.nav-dropdown-toggle[aria-expanded="true"] {
  color: #000000;
  background: var(--lcars-orange);
}

/* Chevron icon */
.nav-chevron {
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}

/* Dropdown list (template uses .nav-dropdown as the <ul>) */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 220px;
  background: #000000;
  border: 1.5px solid var(--lcars-orange);
  border-radius: 4px 22px 22px 4px;
  box-shadow: 0 0 24px rgba(255, 153, 0, 0.18);
  padding: var(--space-2) 0;
  margin-top: var(--space-3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  z-index: 1001;
  list-style: none;
}

/* Invisible bridge to prevent dropdown closing when moving mouse to it */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--space-2) - 6px);
  left: 0;
  right: 0;
  height: calc(var(--space-2) + 6px);
}

.nav-item--dropdown:hover .nav-dropdown,
.nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Dropdown link */
.nav-dropdown-link {
  display: block;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lcars-peach);
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-dropdown-link:hover {
  color: #000000;
  background: var(--lcars-gold);
  text-decoration: none;
}

/* ── Mobile nav panel ───────────────────────────────────────── */
/* Note: position:absolute (not fixed) because .site-nav has
   backdrop-filter which creates a new containing block */
.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - var(--nav-height));
  background: #000000;
  overflow-y: auto;
  z-index: 999;
  border-top: 2px solid var(--lcars-orange);
  padding: var(--space-6) var(--space-6);
}

.nav-mobile--open {
  display: block;
}

.nav-mobile-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-mobile-item {
  border-bottom: 1px solid rgba(255, 153, 0, 0.25);
}

.nav-mobile-link {
  display: block;
  padding: var(--space-4) var(--space-3);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--lcars-orange);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px 16px 16px 2px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-mobile-link:hover,
.nav-mobile-link.active,
.nav-mobile-link--active {
  color: #000000;
  background: var(--lcars-orange);
  text-decoration: none;
}

.nav-mobile-sub {
  list-style: none;
  padding: 0 0 var(--space-3) var(--space-4);
  margin: 0;
}

.nav-mobile-sub-link {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lcars-peach);
  text-decoration: none;
}

.nav-mobile-sub-link:hover {
  color: var(--lcars-orange);
  text-decoration: none;
}

/* Prevent body scroll when mobile nav is open */
body.nav-mobile-open {
  overflow: hidden;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.6rem 0.7rem 1.2rem;
  border-radius: 4px 28px 28px 4px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast),
              border-color var(--transition-fast), box-shadow var(--transition-fast),
              transform var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--lcars-gold);
  outline-offset: 3px;
}

/* Primary: LCARS orange pill, black text */
.btn-primary {
  background: var(--lcars-orange);
  color: #000000;
  border-color: var(--lcars-orange);
}

.btn-primary:hover {
  background: var(--lcars-gold);
  border-color: var(--lcars-gold);
  color: #000000;
  box-shadow: 0 0 22px rgba(255, 153, 0, 0.45);
}

/* Secondary: outlined orange */
.btn-secondary {
  background: transparent;
  color: var(--lcars-orange);
  border-color: var(--lcars-orange);
}

.btn-secondary:hover {
  background: var(--lcars-orange);
  color: #000000;
  box-shadow: 0 0 18px rgba(255, 153, 0, 0.35);
}

/* Ghost: minimal */
.btn-ghost {
  background: transparent;
  color: var(--lcars-gold);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--lcars-orange);
  background: rgba(255, 153, 0, 0.1);
}

/* Amber / gold variant */
.btn-amber {
  background: var(--lcars-gold);
  color: #000000;
  border-color: var(--lcars-gold);
  font-weight: 600;
}

.btn-amber:hover {
  background: var(--lcars-peach);
  border-color: var(--lcars-peach);
  color: #000000;
  box-shadow: 0 0 22px rgba(255, 204, 102, 0.45);
}

/* BEM-style aliases — same LCARS language */
.btn--primary {
  background: var(--lcars-orange);
  color: #000000;
  border-color: var(--lcars-orange);
}
.btn--primary:hover {
  background: var(--lcars-gold);
  border-color: var(--lcars-gold);
  color: #000000;
  box-shadow: 0 0 22px rgba(255, 153, 0, 0.45);
}
.btn--ghost {
  background: transparent;
  color: var(--lcars-gold);
  border-color: rgba(255, 204, 102, 0.35);
}
.btn--ghost:hover {
  color: #000000;
  background: var(--lcars-gold);
  border-color: var(--lcars-gold);
}
.btn--outline {
  background: transparent;
  color: var(--lcars-orange);
  border-color: var(--lcars-orange);
}
.btn--outline:hover {
  background: var(--lcars-orange);
  color: #000000;
  box-shadow: 0 0 18px rgba(255, 153, 0, 0.35);
}

/* Size modifiers */
.btn-sm {
  padding: 0.45rem 1.1rem 0.45rem 0.85rem;
  font-size: 0.75rem;
  border-radius: 2px 20px 20px 2px;
}

.btn-lg {
  padding: 0.95rem 2.1rem 0.95rem 1.6rem;
  font-size: 1rem;
  border-radius: 4px 36px 36px 4px;
}

/* Icon-only button */
.btn-icon {
  padding: 0.625rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}


/* ============================================================
   BADGES & TAGS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2em 0.7em;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

.badge-active {
  background: rgba(77, 166, 255, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(77, 166, 255, 0.3);
}

.badge-legacy {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.badge-upcoming {
  background: rgba(244, 162, 97, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(244, 162, 97, 0.3);
}

/* BEM aliases for badges */
.badge--active { background: rgba(77, 166, 255, 0.15); color: var(--accent-blue); border: 1px solid rgba(77, 166, 255, 0.3); }
.badge--legacy { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-light); }
.badge--upcoming { background: rgba(244, 162, 97, 0.15); color: var(--accent-amber); border: 1px solid rgba(244, 162, 97, 0.3); }

/* Badge positioning inside card images */
.card-img-wrap .badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
}

/* Section CTA — centered link below card grids */
.section-cta {
  text-align: center;
  margin-top: var(--space-10);
}

/* Card tag — LCARS pill */
.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.25em 0.75em;
  border-radius: 2px 10px 10px 2px;
  background: var(--lcars-orange);
  color: #000000;
  line-height: 1.4;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.card-tag:hover {
  background: var(--lcars-gold);
  text-decoration: none;
}

.card-tag-amber {
  background: var(--lcars-salmon);
  color: #000000;
}

.card-tag-amber:hover {
  background: var(--lcars-peach);
}


/* ============================================================
   CARDS — LCARS science panels
   ============================================================ */

.card {
  background: #0a0c12;
  border: 1.5px solid rgba(255, 153, 0, 0.22);
  border-radius: 4px 4px 18px 4px;
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-base), box-shadow var(--transition-base),
              border-color var(--transition-base);
}

/* Color-coded LCARS bar down left edge — deterministic per-card via nth-child */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--lcars-orange);
  z-index: 3;
}
.card:nth-child(3n+2)::before { background: var(--lcars-salmon); }
.card:nth-child(3n+3)::before { background: var(--lcars-gold); }
.card:nth-child(4n)::before   { background: var(--lcars-lilac); }
.card:nth-child(7n)::before   { background: var(--lcars-blue); }

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 28px rgba(255, 153, 0, 0.18);
  border-color: rgba(255, 153, 0, 0.6);
}

/* Card with link wrapper — full-card clickable */
a.card,
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card:hover,
.card-link:hover {
  text-decoration: none;
  color: inherit;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform var(--transition-slow);
}

.card:hover .card-image {
  transform: scale(1.03);
}

.card-image-wrapper {
  overflow: hidden;
}

/* Card img (project cards use .card-img-wrap + .card-img) */
.card-img-wrap {
  position: relative;
  overflow: hidden;
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.card:hover .card-img {
  transform: scale(1.03);
}

.card-img--placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
}

.card-img--placeholder svg {
  width: 80px;
  height: 60px;
  opacity: 0.4;
}

.card-body {
  padding: var(--space-5) var(--space-6) var(--space-5) calc(var(--space-6) + 10px);
}

.card-title-link {
  color: inherit;
  text-decoration: none;
}

.card-title-link:hover {
  color: var(--lcars-orange);
  text-decoration: none;
}

.card-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lcars-orange);
  text-decoration: none;
  transition: color var(--transition-fast), gap var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: var(--space-3);
}
.card-link::after {
  content: "›";
  font-size: 1.2em;
  line-height: 1;
  transition: transform var(--transition-fast);
}
.card-link:hover {
  color: var(--lcars-gold);
  text-decoration: none;
}
.card-link:hover::after {
  transform: translateX(4px);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lcars-gold);
  margin-bottom: var(--space-2);
}

.card-specs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.card-spec {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--lcars-gold);
  background: rgba(255, 204, 102, 0.08);
  border: 1px solid rgba(255, 204, 102, 0.25);
  padding: 2px 10px;
  border-radius: 2px 10px 10px 2px;
}

.card-content {
  padding: var(--space-6) var(--space-6) var(--space-6) calc(var(--space-6) + 10px);
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--lcars-gold);
  margin-bottom: var(--space-2);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.08;
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.card-footer {
  padding: var(--space-3) var(--space-6) var(--space-4) calc(var(--space-6) + 10px);
  border-top: 1px solid rgba(255, 153, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* Horizontal / wide card variant */
.card-horizontal {
  display: grid;
  grid-template-columns: 240px 1fr;
}

.card-horizontal .card-image {
  aspect-ratio: auto;
  height: 100%;
}


/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  background-color: #000000;
}

/* Corner bracket overlays — viewscreen frame */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  z-index: 5;
  pointer-events: none;
  border: 2px solid var(--lcars-orange);
}
.hero::before {
  top: calc(var(--nav-height) + 24px);
  left: 24px;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 2px;
}
.hero::after {
  bottom: 24px;
  right: 24px;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 2px;
}

/* Background photo — dimmed so warp stars remain readable, but still present */
.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 40%;
  z-index: 0;
  border-radius: 0;
  opacity: 0.48;
  filter: saturate(0.7) brightness(0.82) hue-rotate(-8deg) contrast(1.02);
}

/* Canvas for starfield / particle animations */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  border-radius: 0;
  mix-blend-mode: screen;
}

/* Gradient overlay — fades starfield to page background at bottom */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.55) 72%,
    rgba(0, 0, 0, 1) 100%
  );
  z-index: 2;
}

/* Radial glow behind hero text — LCARS warm amber */
.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 45% at 28% 55%,
    rgba(255, 153, 0, 0.10) 0%,
    transparent 70%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 760px;
  margin-right: auto;
  margin-left: 6%;
  text-align: left;
  padding: calc(var(--nav-height) + var(--space-20)) 0 var(--space-24);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--lcars-orange);
  margin-bottom: var(--space-6);
  padding: 0.35em 1em 0.35em 1.2em;
  background: rgba(0, 0, 0, 0.7);
  border-left: 3px solid var(--lcars-orange);
  border-radius: 2px 18px 18px 2px;
}
.hero-eyebrow::before {
  content: "◊";
  color: var(--lcars-gold);
  font-size: 1.1em;
  letter-spacing: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
}

.hero-title em {
  font-style: normal;
  color: var(--lcars-orange);
  display: inline-block;
  position: relative;
}

/* Blinking cursor after title — terminal feel */
.hero-title::after {
  content: "_";
  display: inline-block;
  margin-left: 0.1em;
  color: var(--lcars-orange);
  animation: lcarsBlink 1.1s steps(2, end) infinite;
}

@keyframes lcarsBlink {
  50% { opacity: 0; }
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-primary);
  max-width: 620px;
  margin-left: 0;
  margin-right: auto;
  margin-bottom: var(--space-10);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

.hero-cta,
.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Scroll indicator at bottom of hero */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.hero-scroll-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lcars-orange);
}

.hero-scroll-line {
  width: 2px;
  height: 44px;
  background: linear-gradient(to bottom, var(--lcars-orange), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.5; }
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--lcars-orange);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--transition-fast);
  animation: bounce 2.5s ease-in-out infinite;
}

.hero-scroll:hover {
  color: var(--lcars-gold);
  text-decoration: none;
}

.hero-scroll-icon {
  width: 24px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: 12px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 6px;
}

.hero-scroll-dot {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  animation: scroll-dot 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

@keyframes scroll-dot {
  0%   { transform: translateY(0); opacity: 1; }
  80%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}


/* ============================================================
   PERSON CARDS (TEAM)
   ============================================================ */

.person-card {
  position: relative;
  display: flex;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-5) + 10px);
  background: #0a0c12;
  border: 1.5px solid rgba(255, 153, 0, 0.2);
  border-radius: 4px 4px 18px 4px;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base),
              transform var(--transition-base);
}

/* LCARS left color bar — cycles through palette for visual rhythm */
.person-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--lcars-orange);
}
.person-card:nth-child(3n+2)::before { background: var(--lcars-salmon); }
.person-card:nth-child(3n+3)::before { background: var(--lcars-gold); }
.person-card:nth-child(4n)::before   { background: var(--lcars-lilac); }
.person-card:nth-child(7n)::before   { background: var(--lcars-blue); }

.person-card:hover {
  border-color: rgba(255, 153, 0, 0.55);
  box-shadow: 0 0 24px rgba(255, 153, 0, 0.15);
  transform: translateY(-2px);
}

.person-card:hover .person-card-photo {
  filter: brightness(1.08) saturate(1.05);
}

/* Person card photo (used by person-card.html partial) */
.person-card-photo-wrap {
  flex-shrink: 0;
  width: 120px;
}

.person-card-photo {
  width: 120px;
  height: auto;
  border-radius: 2px 2px 14px 2px;
  object-fit: cover;
  display: block;
  transition: filter var(--transition-base);
  border: 1px solid rgba(255, 153, 0, 0.25);
}

.person-card-photo--initials {
  width: 120px;
  height: 120px;
  border-radius: 2px 2px 14px 2px;
  background: #0d0f17;
  border: 1px solid rgba(255, 153, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.person-card-initials {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--lcars-orange);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.person-card-body {
  flex: 1;
  min-width: 0;
}

.person-card-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: var(--space-1);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.05;
}

.person-card-name-link {
  color: inherit;
  text-decoration: none;
}

.person-card-name-link:hover {
  color: var(--lcars-orange);
  text-decoration: none;
}

.person-card-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--lcars-gold);
  margin-bottom: var(--space-2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.person-card-institution {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.person-card-fellowships {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3) 0;
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.fellowship-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.28em 0.75em;
  border-radius: 2px 12px 12px 2px;
  background: var(--lcars-gold);
  color: #000000;
  border: none;
}

.person-card-phd-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.22em 0.7em;
  border-radius: 2px 10px 10px 2px;
  background: var(--lcars-salmon);
  color: #000000;
  border: none;
  margin-left: var(--space-2);
  vertical-align: middle;
}

.person-card-bio {
  font-size: 0.94rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin-bottom: var(--space-3);
}

.person-card-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.person-card-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lcars-orange);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.22em 0.75em 0.22em 0.55em;
  border-radius: 2px 12px 12px 2px;
  border: 1px solid rgba(255, 153, 0, 0.3);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.person-card-link:hover {
  background: var(--lcars-orange);
  color: #000000;
  border-color: var(--lcars-orange);
  text-decoration: none;
}

.person-card-link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.person-photo {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
  display: block;
}

.person-photo-placeholder {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-secondary);
}

.person-info {
  flex: 1;
  min-width: 0;
}

.person-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
}

.person-role {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.person-bio {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.person-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.person-link {
  font-size: var(--text-sm);
  color: var(--accent-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: opacity var(--transition-fast);
}

.person-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* Grid layout for team page */
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: var(--space-6);
}

/* Alumni — more compact */
.person-card-compact {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.person-card-compact .person-photo {
  width: 56px;
  height: 56px;
}

.person-card-compact .person-photo-placeholder {
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
}


/* ============================================================
   TIMELINE
   ============================================================ */

.timeline {
  position: relative;
  padding-left: var(--space-10);
}

/* Vertical rule */
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--border-light) 10%,
    var(--border-light) 90%,
    transparent
  );
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-10);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* Connector dot on the vertical line */
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-10) - 5px);
  top: 0.375rem;
  width: 12px;
  height: 12px;
  background: var(--accent-blue);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.2);
}

.timeline-dot-amber {
  background: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.2);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-amber);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.timeline-content:hover {
  border-color: var(--border-light);
}

.timeline-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--text-heading);
  margin-bottom: var(--space-2);
}

.timeline-body {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: #000000;
  border-top: none;
  padding: var(--space-16) 0 var(--space-6);
  position: relative;
}

/* LCARS segmented top bar */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background:
    linear-gradient(90deg,
      var(--lcars-orange) 0 22%,
      #000 22% 23%,
      var(--lcars-gold) 23% 36%,
      #000 36% 37%,
      var(--lcars-salmon) 37% 58%,
      #000 58% 59%,
      var(--lcars-lilac) 59% 76%,
      #000 76% 77%,
      var(--lcars-blue) 77% 88%,
      #000 88% 89%,
      var(--lcars-orange) 89% 100%);
  border-radius: 0 0 4px 4px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lcars-orange);
  margin-bottom: var(--space-5);
  padding-left: 0.75em;
  border-left: 3px solid var(--lcars-orange);
  border-radius: 2px 8px 8px 2px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* Lab identity column */
.footer-lab-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lcars-orange);
  margin-bottom: var(--space-3);
  line-height: 1;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: var(--space-4);
  max-width: 30em;
}

.footer-ucsb-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lcars-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-ucsb-link:hover {
  color: var(--lcars-orange);
}

/* Quick links column */
.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-link {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lcars-peach);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: 0.15em 0;
}

.footer-link:hover {
  color: var(--lcars-orange);
  text-decoration: none;
}

/* Contact column */
.footer-contact-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-contact-item {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
}

.footer-contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lcars-gold);
  min-width: 4.5rem;
}

.footer-contact-value {
  color: var(--text-primary);
  font-size: 0.92rem;
  margin: 0;
}

.footer-contact-value a {
  color: var(--lcars-peach);
  text-decoration: none;
}

.footer-contact-value a:hover {
  color: var(--lcars-orange);
}

.footer-contact-item--address .footer-contact-value {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Social row — bordered LCARS strip */
.footer-social {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) 0;
  margin-bottom: var(--space-5);
  border-top: 1px solid rgba(255, 153, 0, 0.25);
  border-bottom: 1px solid rgba(255, 153, 0, 0.25);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lcars-peach);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-social-link:hover {
  color: var(--lcars-orange);
}

.footer-social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.footer-built-with {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--lcars-gold);
}

.footer-built-with a {
  color: var(--lcars-orange);
  text-decoration: none;
}

/* Bottom bar — stardate readout row */
.footer-bottom {
  border-top: 1px solid rgba(255, 153, 0, 0.2);
  padding-top: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lcars-gold);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-bottom-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lcars-peach);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--lcars-orange);
}


/* ============================================================
   UTILITY CLASSES
   ============================================================ */

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Text alignment */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

/* Text colors */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-accent    { color: var(--lcars-orange); }
.text-amber     { color: var(--lcars-gold); }
.text-heading   { color: var(--text-heading); }
.text-lcars     { color: var(--lcars-orange); }
.text-lcars-gold { color: var(--lcars-gold); }
.text-lcars-salmon { color: var(--lcars-salmon); }

/* Font family overrides */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

/* Spacing helpers */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* Display */
.hidden   { display: none; }
.block    { display: block; }
.relative { position: relative; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Width helpers */
.w-full  { width: 100%; }
.max-w-prose { max-width: 65ch; }

/* Background helpers */
.bg-card    { background: var(--bg-card); }
.bg-surface { background: var(--bg-surface); }

/* Border helpers */
.border          { border: 1px solid var(--border); }
.border-light    { border: 1px solid var(--border-light); }
.rounded         { border-radius: var(--radius-md); }
.rounded-lg      { border-radius: var(--radius-lg); }
.rounded-full    { border-radius: var(--radius-full); }

/* Padding */
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* No list style */
.list-none { list-style: none; padding-left: 0; }

/* Truncate text */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Aspect ratios */
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1; }
.aspect-photo  { aspect-ratio: 4 / 3; }


/* ============================================================
   RESPONSIVE — 1200px
   ============================================================ */

@media (max-width: 1200px) {
  .container,
  .container-narrow,
  .container-wide {
    padding-inline: var(--space-6);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}


/* ============================================================
   RESPONSIVE — 1024px
   ============================================================ */

@media (max-width: 1024px) {
  .nav-links {
    gap: var(--space-4);
  }

  h1 { font-size: 2.75rem; }
  h2 { font-size: 2.1rem; }
  h3 { font-size: 1.7rem; }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .card-horizontal {
    grid-template-columns: 180px 1fr;
  }

  .person-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   RESPONSIVE — 768px (MOBILE)
   ============================================================ */

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.3rem; }

  /* Mobile navigation — show hamburger, hide desktop links */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card-horizontal {
    grid-template-columns: 1fr;
  }

  .card-horizontal .card-image {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
  }

  /* Hero */
  .hero-title {
    font-size: clamp(2rem, 7vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  /* Sections */
  .section,
  .section-alt {
    padding: var(--space-16) 0;
  }

  /* Person cards */
  .person-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .person-links {
    justify-content: center;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-about {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .footer-contact-item {
    flex-direction: column;
    gap: var(--space-1);
  }

  .footer-contact-value {
    word-break: break-word;
  }

  /* Timeline */
  .timeline {
    padding-left: var(--space-8);
  }

  /* Containers */
  .container,
  .container-narrow,
  .container-wide {
    padding-inline: var(--space-5);
  }
}


/* ============================================================
   RESPONSIVE — 480px
   ============================================================ */

@media (max-width: 480px) {
  html { font-size: 16px; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .section,
  .section-alt {
    padding: var(--space-12) 0;
  }

  .container,
  .container-narrow,
  .container-wide {
    padding-inline: var(--space-4);
  }

  .card-content {
    padding: var(--space-4);
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: var(--text-sm);
  }

  .section-header {
    margin-bottom: var(--space-8);
  }
}


/* ============================================================
   HOMEPAGE — ABOUT SECTION
   ============================================================ */

.about-section {
  padding: var(--space-24) 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(90, 175, 255, 0.04) 0%, transparent 70%),
    var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

.about-text {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.about-text p {
  margin-bottom: var(--space-4);
}

.text-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.text-link:hover {
  color: var(--text-primary);
}

.about-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

/* LCARS-style readout tile: color bar on top, big Antonio numeral,
   mono uppercase label. Each tile picks a different palette color
   so the row reads as a bridge-console panel, not a row of identical boxes. */
.stat-item {
  position: relative;
  background: #0a0c12;
  border: 1.5px solid rgba(255, 153, 0, 0.22);
  border-radius: 4px 4px 18px 4px;
  padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-5) + 10px);
  text-align: left;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base),
              transform var(--transition-base);
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--lcars-orange);
}
.stat-item:nth-child(2)::before { background: var(--lcars-gold); }
.stat-item:nth-child(3)::before { background: var(--lcars-salmon); }
.stat-item:nth-child(4)::before { background: var(--lcars-lilac); }

/* Small ref code in the top-right corner — "STAT 01" etc. */
.stat-item::after {
  counter-increment: stat-counter;
  content: "STAT " counter(stat-counter, decimal-leading-zero);
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--lcars-gold);
  opacity: 0.7;
}
.about-stats { counter-reset: stat-counter; }

.stat-item:hover {
  border-color: rgba(255, 153, 0, 0.55);
  box-shadow: 0 0 20px rgba(255, 153, 0, 0.18);
  transform: translateY(-2px);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.5vw, 3rem);
  font-weight: 600;
  color: var(--lcars-orange);
  margin-bottom: var(--space-2);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--lcars-peach);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  line-height: 1.4;
}


/* ============================================================
   HOMEPAGE — CARD GRID (research highlights)
   ============================================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

.section-title--centered,
.section-subtitle--centered {
  text-align: center;
}

.section-subtitle--centered {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-10);
}

/* Research highlights section gets distinct background */
.research-highlights {
  background:
    radial-gradient(ellipse 50% 60% at 20% 30%, rgba(90, 175, 255, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 70%, rgba(244, 162, 97, 0.03) 0%, transparent 70%),
    var(--bg-primary);
  border-top: 1px solid var(--border);
}


/* ============================================================
   HOMEPAGE — NEWS SECTION
   ============================================================ */

.news-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.news-item {
  display: flex;
  gap: var(--space-5);
  align-items: baseline;
  padding: var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.news-item:hover {
  background: rgba(90, 175, 255, 0.03);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent-amber);
  white-space: nowrap;
  min-width: 10ch;
}

.news-body {
  flex: 1;
}

.news-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.news-desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.news-desc a {
  color: var(--accent-blue);
  text-decoration: none;
}

.news-desc a:hover {
  text-decoration: underline;
}


/* ============================================================
   HOMEPAGE — YOUTUBE CHANNEL
   ============================================================ */

.youtube-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

.youtube-container {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  max-width: 900px;
}

.youtube-logo-link {
  flex-shrink: 0;
  display: block;
  transition: transform var(--transition-base);
}

.youtube-logo-link:hover {
  transform: scale(1.03);
}

.youtube-logo-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 0;
  border: none;
}

.youtube-title {
  font-size: 1.75rem;
  margin-bottom: var(--space-3);
}

.youtube-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.youtube-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .youtube-container {
    flex-direction: column;
    text-align: center;
    gap: var(--space-6);
  }

  .youtube-logo-img {
    width: 160px;
    height: 160px;
  }
}


/* ============================================================
   HOMEPAGE — GROUP PHOTO
   ============================================================ */

.group-photo-section {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.group-photo-figure {
  position: relative;
  margin: 0;
}

.group-photo-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  border-radius: 0;
}

.group-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 14, 26, 0.3),
    rgba(10, 14, 26, 0.7)
  );
}

.group-photo-caption {
  position: absolute;
  bottom: var(--space-8);
  left: var(--space-8);
  z-index: 1;
}

.group-photo-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-heading);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.group-photo-year {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}


/* ============================================================
   HOMEPAGE — CONTACT CTA
   ============================================================ */

.contact-cta-section {
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.container--narrow {
  max-width: 700px;
  margin: 0 auto;
}

.contact-cta-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  margin-top: var(--space-6);
}


/* ============================================================
   PROSE (content pages)
   ============================================================ */

.prose {
  color: var(--text-primary);
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: 75ch;
}

.prose h2 {
  color: var(--text-heading);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  color: var(--text-heading);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.prose p {
  margin-bottom: var(--space-4);
}

.prose a {
  color: var(--accent-blue);
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.prose ul, .prose ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.prose li {
  margin-bottom: var(--space-2);
}

.prose img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: var(--space-8) 0;
  border: 1px solid var(--border);
}

.prose figure {
  margin: var(--space-10) 0;
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: visible;
}

.prose figure img {
  width: 100%;
  margin: 0 0 var(--space-3) 0;
  border: none;
  border-radius: 0;
}

.figure.half {
  max-width: 50%;
}

@media (max-width: 768px) {
  .figure.half {
    max-width: 100%;
  }
}

.prose figcaption {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
  font-style: italic;
}

/* Prose horizontal rules — tighter tri-color LCARS bar inside markdown,
   since 6rem separations read as gaps in dense article content. */
.prose hr {
  border: none;
  height: 3px;
  background:
    linear-gradient(90deg,
      var(--lcars-orange) 0 10%,
      transparent 10% 12%,
      var(--lcars-gold) 12% 30%,
      transparent 30% 32%,
      var(--lcars-salmon) 32% 100%);
  margin: var(--space-6) 0;
  border-radius: 2px 8px 8px 2px;
  opacity: 0.7;
}

.prose blockquote {
  border-left: 3px solid var(--lcars-orange);
  padding-left: var(--space-5);
  margin: var(--space-6) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-card);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

.prose pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  overflow-x: auto;
  margin: var(--space-6) 0;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
}

.prose details[open] {
  padding-bottom: var(--space-6);
}

.prose details summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-heading);
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.prose details summary::-webkit-details-marker {
  display: none;
}

.prose details summary::before {
  content: '';
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid var(--accent-blue);
  border-bottom: 2px solid var(--accent-blue);
  transform: rotate(-45deg);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.prose details[open] summary::before {
  transform: rotate(45deg);
}

.prose details summary:hover {
  color: var(--accent-blue);
}


/* ============================================================
   PAGE HEADERS (for content pages)
   ============================================================ */

.page-header {
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-12);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.page-header--hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}

.page-header--hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 14, 26, 0.4),
    rgba(10, 14, 26, 0.9)
  );
}

.page-header--hero .container {
  position: relative;
  z-index: 1;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--text-heading);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.breadcrumb {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-blue);
}

.breadcrumb-separator {
  color: var(--border-light);
}


/* ============================================================
   RESPONSIVE — about section
   ============================================================ */

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  /* On narrow screens, drop the stat value below the "STAT 0X" corner tag
     so they don't collide horizontally. */
  .stat-item {
    padding: calc(var(--space-5) + 0.75rem) var(--space-4) var(--space-4)
             calc(var(--space-4) + 8px);
  }

  .stat-item::after {
    top: var(--space-2);
    right: var(--space-3);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
  }

  .stat-value {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .stat-label {
    font-size: 0.64rem;
    letter-spacing: 0.18em;
  }

  .news-item {
    flex-direction: column;
    gap: var(--space-2);
  }

  .contact-cta-actions {
    flex-direction: column;
  }

  .group-photo-img {
    height: 250px;
  }
}


/* ============================================================
   PAGE HERO — plain header for list pages
   ============================================================ */

.page-hero {
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-12);
  background: #05060a;
  position: relative;
}

.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background:
    linear-gradient(90deg,
      var(--lcars-orange) 0 16%,
      transparent 16% 18%,
      var(--lcars-gold) 18% 38%,
      transparent 38% 40%,
      var(--lcars-salmon) 40% 100%);
  opacity: 0.55;
}

.page-hero--plain {
  margin-bottom: var(--space-10);
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255, 153, 0, 0.05) 0%, transparent 60%),
    #05060a;
}

.page-hero--image {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
  margin-bottom: var(--space-10);
}

.page-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  z-index: 0;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.8) 50%,
    #000000 100%
  );
  z-index: 1;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-12);
}

.page-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  color: var(--lcars-orange);
  margin-bottom: var(--space-3);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  letter-spacing: 0.02em;
}
.page-hero-title::before {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.25em;
  background: var(--lcars-orange);
  border-radius: 2px 10px 10px 2px;
}

.page-hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 650px;
  line-height: 1.7;
}

.page-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 700px;
  margin-top: var(--space-4);
}

.section-intro {
  margin-bottom: var(--space-12);
}


/* ============================================================
   PROJECT HERO — full-bleed header for research/single pages
   ============================================================ */

.project-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-height) + var(--space-12)) 0 var(--space-12);
  background-color: #05060a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 3px solid var(--lcars-orange);
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.85) 70%,
    #000000 100%
  );
}

.project-hero-content {
  position: relative;
  z-index: 1;
}

.project-status-badge {
  margin-bottom: var(--space-3);
}

.project-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--lcars-orange);
  margin-bottom: var(--space-2);
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 0 28px rgba(0, 0, 0, 0.9);
}

.project-hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}


/* ============================================================
   PROJECT BODY — two-column layout (content + specs sidebar)
   ============================================================ */

.project-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-12);
  padding: var(--space-10) 0;
  align-items: start;
}

.project-content {
  min-width: 0;
}

/* Specs sidebar */
.project-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
}

.specs-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.specs-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-heading);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.specs-list {
  margin: 0;
  padding: 0;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 400;
}

.spec-value {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--accent-amber);
  font-weight: 500;
  text-align: right;
}

.specs-btn {
  width: 100%;
  margin-top: var(--space-5);
}


/* ============================================================
   BREADCRUMB — project pages
   ============================================================ */

.breadcrumb-list {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-link:hover {
  color: var(--accent-blue);
}

.breadcrumb-sep {
  color: var(--border-light);
}

.breadcrumb-item--current {
  color: var(--text-primary);
}


/* ============================================================
   TIMELINE — research list page
   ============================================================ */

.timeline {
  position: relative;
  padding: var(--space-12) 0;
  padding-left: var(--space-16);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-blue), var(--border), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-10);
}

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-16) + 8px);
  top: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.timeline-marker::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: 2px solid var(--bg-primary);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(90, 175, 255, 0.4);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-blue);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.timeline-card {
  margin-left: 0;
}

.timeline-card-img-wrap {
  position: relative;
}

.timeline-card-badge-only {
  padding: var(--space-3) var(--space-5);
}

.timeline-telescope {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.icon-inline {
  flex-shrink: 0;
}

.timeline-specs {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-4);
}

.timeline-spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-spec-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timeline-spec-value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent-blue);
}


/* ============================================================
   RESPONSIVE — project pages
   ============================================================ */

@media (max-width: 900px) {
  .project-body {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .project-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .project-hero {
    min-height: 240px;
    padding-bottom: var(--space-8);
  }

  .timeline {
    padding-left: var(--space-10);
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-marker {
    left: calc(-1 * var(--space-10) + 4px);
  }

  .timeline-marker::before {
    width: 10px;
    height: 10px;
  }
}


/* ============================================================
   EASTER EGG — Alien peek animation
   ============================================================ */

#alien-peek {
  position: fixed;
  top: var(--nav-height, 64px);
  left: -80px;
  width: 80px;
  z-index: 99999;
  pointer-events: none;
  display: none;
}

#alien-peek.alien-active {
  display: block;
  animation: alien-peek-in 6s ease-in-out forwards;
}

@keyframes alien-peek-in {
  0%   { left: -90px; transform: rotate(0deg); }
  10%  { left: 10px;  transform: rotate(-10deg); }
  20%  { left: 10px;  transform: rotate(-10deg); }
  30%  { left: 10px;  transform: rotate(15deg); }
  42%  { left: 10px;  transform: rotate(-15deg); }
  52%  { left: 10px;  transform: rotate(10deg); }
  62%  { left: 10px;  transform: rotate(-5deg); }
  72%  { left: 10px;  transform: rotate(0deg); }
  75%  { left: 0px;   transform: rotate(0deg); }
  95%  { left: -100px; transform: rotate(0deg); }
  100% { left: -100px; transform: rotate(0deg); }
}

.alien-pupil-l,
.alien-pupil-r {
  animation: alien-look 5s ease-in-out forwards;
}

@keyframes alien-look {
  0%, 12%  { transform: translate(0, 0); }
  30%      { transform: translate(3px, -1px); }
  40%      { transform: translate(-3px, 1px); }
  50%      { transform: translate(2px, 0); }
  60%      { transform: translate(-1px, -1px); }
  72%, 100% { transform: translate(0, 0); }
}


/* ============================================================
   LCARS UTILITIES  —  bridge-console chrome
   ============================================================ */

/* Subtle CRT scanline overlay — laid over entire viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 153, 0, 0.02) 0px,
      rgba(255, 153, 0, 0.02) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: screen;
  opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
  body::before { opacity: 0; }
}

/* Elbow corner piece — use as decoration inside containers */
.lcars-elbow {
  display: inline-block;
  width: 72px;
  height: 18px;
  background: var(--lcars-orange);
  border-radius: 2px 18px 18px 2px;
}
.lcars-elbow--gold   { background: var(--lcars-gold); }
.lcars-elbow--salmon { background: var(--lcars-salmon); }
.lcars-elbow--lilac  { background: var(--lcars-lilac); }
.lcars-elbow--blue   { background: var(--lcars-blue); }

/* Ref code — "SECTION 47-A" style label */
.lcars-ref {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--lcars-gold);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.lcars-ref::before {
  content: "■";
  color: var(--lcars-orange);
  font-size: 0.75em;
  line-height: 1;
}

/* Console bar — full-width segmented horizontal bar */
.lcars-bar {
  display: block;
  height: 6px;
  background:
    linear-gradient(90deg,
      var(--lcars-orange) 0 18%,
      transparent 18% 20%,
      var(--lcars-gold) 20% 42%,
      transparent 42% 44%,
      var(--lcars-salmon) 44% 100%);
  border-radius: 2px 12px 12px 2px;
  margin: var(--space-4) 0;
}

/* Status pill — colored indicator */
.lcars-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.25em 0.85em;
  border-radius: 2px 14px 14px 2px;
  background: rgba(255, 153, 0, 0.12);
  color: var(--lcars-orange);
  border: 1px solid rgba(255, 153, 0, 0.35);
}
.lcars-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lcars-orange);
  box-shadow: 0 0 6px var(--lcars-orange);
  animation: lcarsPulse 2.2s ease-in-out infinite;
}
.lcars-status--active   { color: var(--lcars-orange); border-color: rgba(255, 153, 0, 0.4); }
.lcars-status--active::before   { background: var(--lcars-orange); box-shadow: 0 0 6px var(--lcars-orange); }
.lcars-status--legacy   { color: var(--lcars-lilac); border-color: rgba(204, 153, 204, 0.35); background: rgba(204, 153, 204, 0.08); }
.lcars-status--legacy::before   { background: var(--lcars-lilac); box-shadow: 0 0 6px var(--lcars-lilac); animation: none; }
.lcars-status--upcoming { color: var(--lcars-gold); border-color: rgba(255, 204, 102, 0.4); background: rgba(255, 204, 102, 0.08); }
.lcars-status--upcoming::before { background: var(--lcars-gold); box-shadow: 0 0 6px var(--lcars-gold); }

@keyframes lcarsPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Viewscreen corner brackets (reusable) */
.lcars-viewscreen {
  position: relative;
}
.lcars-viewscreen::before,
.lcars-viewscreen::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid var(--lcars-orange);
  pointer-events: none;
}
.lcars-viewscreen::before {
  top: 8px; left: 8px;
  border-right: 0;
  border-bottom: 0;
}
.lcars-viewscreen::after {
  bottom: 8px; right: 8px;
  border-left: 0;
  border-top: 0;
}

/* Responsive: hide scanlines on small screens where they're distracting */
@media (max-width: 640px) {
  body::before { opacity: 0.35; }
  .hero::before,
  .hero::after { width: 40px; height: 40px; }
}


/* ============================================================
   404 — "Off Course" bridge-console error page
   ============================================================ */

.section--404 {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-20);
}

.lcars-404 {
  position: relative;
  padding: var(--space-10) var(--space-8) var(--space-10) calc(var(--space-8) + 12px);
  background: #050609;
  border: 1.5px solid rgba(255, 153, 0, 0.3);
  border-radius: 4px 4px 24px 4px;
}
.lcars-404::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 8px; height: 100%;
  background: var(--lcars-red);
}

.lcars-404-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--lcars-salmon);
}

.lcars-404-pill {
  background: var(--lcars-red);
  color: #000000;
  padding: 0.3em 0.9em 0.3em 0.7em;
  border-radius: 2px 14px 14px 2px;
  font-weight: 600;
  letter-spacing: 0.2em;
  animation: lcarsPulse 2s ease-in-out infinite;
}

.lcars-404-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 600;
  color: var(--lcars-orange);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.lcars-404-subtitle {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--text-primary);
  max-width: 38em;
  margin-bottom: var(--space-8);
}

.lcars-404-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.lcars-404-log {
  list-style: none;
  padding: var(--space-4) var(--space-5);
  margin: 0;
  background: #000000;
  border: 1px solid rgba(255, 153, 0, 0.2);
  border-radius: 2px 14px 14px 2px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.lcars-404-log li {
  display: flex;
  gap: var(--space-4);
  padding: 0.35em 0;
  border-bottom: 1px solid rgba(255, 153, 0, 0.1);
  color: var(--text-primary);
}
.lcars-404-log li:last-child { border-bottom: none; }
.lcars-404-log li code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--lcars-gold);
}
.lcars-404-log-label {
  color: var(--lcars-salmon);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  min-width: 12em;
}

@media (max-width: 640px) {
  .lcars-404-log li { flex-direction: column; gap: 0.25em; }
  .lcars-404-log-label { min-width: 0; }
}
