/* ===== RESET & TOKENS ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --forest: #1B4332;
  --forest-mid: #2D6A4F;
  --forest-light: #52B788;
  --signal-yellow: #FFD60A;
  --warm-yellow: #FFC300;
  --chalk: #2E3036;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --graphite: #9A9693;
  --smoke: #666462;
  --paper: #26282E;

  /* Dark theme */
  --bg: #1E1F22;
  --bg-secondary: #26282E;
  --text: #F0EEE8;
  --text-primary: #F0EEE8;
  --text-secondary: #C8C5C0;
  --text-muted: #888480;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --section-padding-top: clamp(6.5rem, 10vw, 11rem);
  --section-padding-bottom: clamp(3.5rem, 6vw, 5.5rem);
  --max-width: 1400px;
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --ticker-duration: 26s;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--signal-yellow) var(--bg-secondary);
}

html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: var(--bg-secondary); }
html::-webkit-scrollbar-thumb { background: var(--signal-yellow); }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: transparent;
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  transform: translateZ(0);
  will-change: transform;
}

h1, h2, h3, h4 {
  color: var(--signal-yellow);
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  line-height: 0.95;
}

a {
  color: var(--signal-yellow);
  text-decoration: none;
  transition: color 0.2s var(--ease-editorial);
}

a:hover {
  color: var(--warm-yellow);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}

section {
  padding: var(--section-padding-top) 0 var(--section-padding-bottom);
  position: relative;
}

section:not(#hero) {
  background: var(--bg);
}

section:nth-of-type(even) {
  background: var(--bg-secondary);
}

/* Dark track behind progress bar — sits above navbar, below the yellow fill */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bg);
  z-index: 1001;
  pointer-events: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--signal-yellow);
  z-index: 1002;
}

/* ===== NAV ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px clamp(1.2rem, 3.5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1E1F22;
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s var(--ease-editorial), transform 0.4s var(--ease-editorial);
}

#navbar.scrolled {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--signal-yellow);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-logo-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: clamp(14px, 2vw, 26px);
}

.nav-links a {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.82rem;
  color: var(--text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--signal-yellow);
  transition: transform 0.2s var(--ease-editorial);
}

.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  padding: 8px 12px;
  border: 2px solid var(--signal-yellow);
  color: var(--signal-yellow) !important;
  background: transparent;
}

.nav-cta:hover {
  background: var(--signal-yellow);
  color: var(--ink) !important;
}

.nav-cta::after { display: none !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  border: none;
  background: transparent;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s var(--ease-editorial), opacity 0.2s var(--ease-editorial);
}

/* ===== SECTION HEADER ===== */
.section-header {
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-label {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--signal-yellow);
  padding: 4px 12px;
  margin-bottom: 1.2rem;
}

.section-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  letter-spacing: -0.02em;
  color: var(--signal-yellow);
  white-space: nowrap;
}

.section-title::after {
  content: '';
  display: block;
  width: 82px;
  height: 3px;
  margin-top: 16px;
  background: linear-gradient(to right, var(--signal-yellow), transparent);
  opacity: 0.4;
}

.section-title.centered { text-align: center; margin-inline: auto; }
.section-title.centered::after { margin-inline: auto; }

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: 80px;
  padding-bottom: 4rem;
  background: transparent;
}

.hero-media {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Videos are kept off-screen for decode only — canvas is the visual layer */
.hero-video-decode {
  position: absolute;
  width: 1px;
  height: 1px;
  top: -9999px;
  left: -9999px;
  pointer-events: none;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.hero-spinner.hidden {
  opacity: 0;
}

.hero-spinner__ring {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 214, 10, 0.2);
  border-top-color: var(--signal-yellow);
  border-radius: 50%;
  animation: hero-spin 0.75s linear infinite;
}

@keyframes hero-spin {
  to { transform: rotate(360deg); }
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    to bottom,
    rgba(30, 31, 34, 0.10) 0%,
    rgba(30, 31, 34, 0.10) 40%,
    rgba(30, 31, 34, 0.65) 68%,
    rgba(30, 31, 34, 0.92) 100%
  );
}

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

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 5rem;
  align-items: end;
}

.hero-left {
  min-width: 0;
}

.hero-right {
  min-width: 0;
  padding-bottom: 0.25rem;
}

.hero-greeting {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink);
  background: var(--signal-yellow);
  padding: 4px 12px;
  margin-bottom: 1.25rem;
}

.hero-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--signal-yellow);
  margin-bottom: 1rem;
}

.hero-tagline {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  font-size: clamp(0.82rem, 1.2vw, 1rem);
  letter-spacing: 0.16em;
  color: var(--graphite);
  margin-bottom: 1.3rem;
}

.hero-tagline span {
  color: var(--text);
  font-weight: 700;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.tag {
  padding: 4px 10px;
  background: var(--paper);
  color: var(--forest);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.18s var(--ease-editorial);
}

.tag:hover {
  background: var(--signal-yellow);
  color: var(--ink);
}

.hero-bio {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.03rem, 1.2vw, 1.2rem);
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-bio strong,
.timeline-desc strong,
.civic-desc strong,
#research strong {
  background: #111213;
  padding: 1px 5px;
  color: var(--text);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: 2px solid var(--forest);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s var(--ease-editorial);
}

.btn-primary {
  background: var(--forest);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--signal-yellow);
  color: var(--ink);
}

.btn-outline {
  background: transparent;
  color: var(--forest);
}

.btn-outline:hover {
  background: var(--forest);
  color: var(--white);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-link {
  color: var(--forest-mid);
  display: inline-flex;
  transition: transform 0.18s var(--ease-editorial), color 0.18s var(--ease-editorial);
}

.social-link:hover {
  color: var(--forest);
  transform: translateY(-2px);
}

.social-link svg { width: 21px; height: 21px; }

.scroll-indicator {
  position: absolute;
  left: clamp(1.5rem, 4vw, 4rem);
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.scroll-indicator span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--graphite);
}

.scroll-mouse {
  width: 24px;
  height: 34px;
  border: 2px solid rgba(27, 67, 50, 0.45);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 6px;
  width: 3px;
  height: 7px;
  background: var(--forest);
  transform: translateX(-50%);
  animation: scrollPulse 2s var(--ease-editorial) infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(10px); opacity: 0.2; }
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.2rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

.stat-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--forest-light);
  padding: 20px 18px;
  transition: transform 0.2s var(--ease-editorial), border-left-color 0.2s var(--ease-editorial);
}

.stat-item:hover {
  transform: translateX(4px);
  border-left-color: var(--signal-yellow);
}

.stat-item .number {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1;
  color: var(--signal-yellow);
}

.stat-item .label {
  margin-top: 8px;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: var(--graphite);
}

/* ===== TIMELINE ===== */
.timeline {
  display: grid;
  gap: 1.3rem;
}

.timeline-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--forest-light);
  background: var(--bg-secondary);
  padding: 1.6rem;
  transition: transform 0.2s var(--ease-editorial), border-left-color 0.2s var(--ease-editorial), box-shadow 0.2s var(--ease-editorial);
}

.timeline-item:nth-child(even) {
  margin-left: clamp(0rem, 4vw, 3rem);
}

.timeline-item:hover {
  transform: translateX(4px);
  border-left-color: var(--signal-yellow);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 0.75rem;
}

.timeline-logo {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.22s var(--ease-editorial);
}

.timeline-item:hover .timeline-logo {
  transform: scale(1.07);
}

.timeline-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.timeline-meta {
  display: grid;
  gap: 4px;
}

.timeline-role {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1;
}

.timeline-org {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--signal-yellow);
}

.timeline-period {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.77rem;
  color: var(--smoke);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-location { color: var(--smoke); }

.timeline-desc {
  font-size: 1rem;
  color: var(--text-secondary);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.skill-tag {
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: var(--forest-light);
  transition: color 0.18s var(--ease-editorial), border-color 0.18s var(--ease-editorial);
}

.skill-tag:hover {
  color: var(--signal-yellow);
  border-color: rgba(255, 214, 10, 0.35);
}

/* ===== INFORMAL ===== */
.infed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.infed-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.infed-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.infed-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.infed-card {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-top: 4px solid var(--signal-yellow);
  padding: 1.2rem;
  transition: background 0.2s var(--ease-editorial), transform 0.2s var(--ease-editorial);
}

.infed-card:hover {
  background: var(--chalk);
  transform: translateY(-2px);
}

.infed-category {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest-light);
  margin-bottom: 8px;
}

.infed-card-header .infed-category {
  margin-bottom: 0;
}

.infed-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 6px;
}

.infed-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.infed-verify {
  display: inline-block;
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  color: var(--forest-light);
  transition: color 0.18s var(--ease-editorial);
}

.infed-verify:hover {
  color: var(--signal-yellow);
}

.terminal-block {
  margin-top: 2rem;
  background: #0D1F18;
  color: var(--white);
  padding: 1.35rem;
  border: 1px solid var(--forest-mid);
  overflow-x: auto;
}

.terminal-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  color: var(--signal-yellow);
  margin-bottom: 0.8rem;
}

.terminal-block pre {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--white);
  margin-bottom: 0.8rem;
  white-space: pre;
}

.terminal-meta {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--white);
  margin: 0;
}

/* ===== CIVIC ===== */
.civic-quote {
  margin-bottom: 3rem;
  padding-left: 1.5rem;
  border-left: 4px solid var(--signal-yellow);
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.65;
  color: var(--text-secondary);
}

.ticker-wrap {
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-block: 1px solid rgba(255, 214, 10, 0.3);
  background: var(--signal-yellow);
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  gap: 10px;
  padding: 10px 0;
  min-width: max-content;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--forest);
  font-size: 0.86rem;
  animation: ticker var(--ticker-duration) linear infinite;
}

.ticker-wrap:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.civic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.civic-card {
  border: 1px solid var(--border);
  border-top: 4px solid var(--signal-yellow);
  background: var(--bg-secondary);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--ease-editorial), background 0.2s var(--ease-editorial), box-shadow 0.2s var(--ease-editorial);
}

.civic-card:hover {
  transform: translateY(-2px);
  background: var(--chalk);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.civic-icon {
  font-size: 1.35rem;
  margin-bottom: 12px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.civic-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.22s var(--ease-editorial);
}

.civic-card:hover .civic-icon img {
  transform: scale(1.1);
}

.civic-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.55rem;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.civic-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s var(--ease-editorial);
}

.civic-title a:hover {
  color: var(--signal-yellow);
}

.civic-subtitle {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.civic-desc {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.civic-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--signal-yellow);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: gap 0.2s var(--ease-editorial);
}

.civic-link:hover {
  gap: 10px;
}

.elections-card {
  margin-top: 1.6rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--forest-light);
  background: var(--bg-secondary);
  padding: 1.4rem;
}

.elections-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.4rem;
}

.elections-card__icon { font-size: 1.6rem; flex-shrink: 0; }

.elections-card__title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.7rem;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}

.elections-card__meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

/* Timeline intro milestones */
.elections-timeline-intro {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.4rem;
  border-left: 2px solid var(--border);
  padding-left: 0;
}

.elections-milestone {
  display: flex;
  gap: 0;
  position: relative;
}

.elections-milestone::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--forest-light);
  border: 2px solid var(--bg-secondary);
  flex-shrink: 0;
}

.elections-milestone__year {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--signal-yellow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 58px;
  padding: 6px 12px 6px 18px;
  flex-shrink: 0;
  padding-top: 7px;
}

.elections-milestone__text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 5px 0 10px;
}

.elections-milestone__text strong { color: var(--text); }

/* Collapsible events */
.elections-events-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease-editorial);
}

.elections-events-wrap.open {
  grid-template-rows: 1fr;
}

.elections-events-wrap > .election-events {
  overflow: hidden;
}

/* Toggle button */
.elections-toggle-row {
  display: flex;
  justify-content: center;
  margin-top: 1.2rem;
}

.elections-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.18s var(--ease-editorial), border-color 0.18s var(--ease-editorial), background 0.18s var(--ease-editorial);
}

.elections-toggle-btn:hover {
  color: var(--ink);
  background: var(--signal-yellow);
  border-color: var(--signal-yellow);
}

.elections-toggle-btn__arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease-editorial);
}

.elections-toggle-btn.open .elections-toggle-btn__arrow {
  transform: rotate(180deg);
}


.election-events {
  margin-top: 1rem;
  display: grid;
  gap: 0;
}

.election-event {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-left: 2px solid var(--border);
  padding: 12px 0 12px 14px;
  transition: border-color 0.2s;
}

.election-event:hover {
  border-left-color: var(--forest-light);
}

.election-event__body {
  flex: 1;
  min-width: 0;
}

.election-event__date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.election-event__title {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--signal-yellow);
  margin-bottom: 6px;
}

.election-event__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
}

.election-event__photo {
  flex-shrink: 0;
  width: 130px;
  position: relative;
  background: var(--bg-secondary);
}

.election-event__photo::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 214, 10, 0.2);
  border-top-color: var(--signal-yellow);
  border-radius: 50%;
  animation: hero-spin 0.75s linear infinite;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1;
}

.election-event__photo.img-loaded::after {
  opacity: 0;
  animation: none;
}

.election-event__img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: opacity 0.2s, border-color 0.2s, transform 0.22s var(--ease-editorial);
}

.election-event__img:hover {
  opacity: 0.9;
  border-color: var(--forest-light);
  transform: scale(1.04);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.orgs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.org-card {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 1rem;
  display: flex;
  gap: 12px;
}

.org-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}

.org-icon--emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.org-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.org-name {
  color: var(--text);
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.2rem;
}

.org-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s var(--ease-editorial);
}

.org-name a:hover {
  color: var(--signal-yellow);
}

.org-role,
.org-period {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
}

.org-role { color: var(--signal-yellow); }
.org-period { color: var(--smoke); }

.orgs-past-heading {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 1.8rem;
  margin-bottom: 0.9rem;
}

.org-card--past {
  opacity: 0.5;
}

.org-card--past:hover {
  opacity: 0.75;
}

/* ===== RESEARCH ===== */
.research-card {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 1.5rem;
}

.research-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: rotate(-2deg);
  border: 2px solid var(--signal-yellow);
  padding: 4px 14px;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--signal-yellow);
  margin-bottom: 0.9rem;
  background: transparent;
}

.research-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 0.98;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.research-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.research-stats {
  margin: 1.2rem 0;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.research-section-heading {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--signal-yellow);
  margin: 1.4rem 0 0.5rem;
}

.research-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 1.2rem;
}

.research-meta-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--forest-light);
  padding: 0.8rem 1rem;
}

.research-meta-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.research-meta-value {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.research-sub-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0.8rem 0 1rem;
  counter-reset: sub-q;
}

.research-sub-q {
  counter-increment: sub-q;
  display: flex;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.research-sub-q::before {
  content: counter(sub-q) ".";
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--forest-light);
  flex-shrink: 0;
  padding-top: 2px;
}

.research-phases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.research-phase {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1rem;
}

.research-phase-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.research-phase-title {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 8px;
}

.research-phase p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 768px) {
  .research-meta-row,
  .research-phases {
    grid-template-columns: 1fr;
  }
}

.research-stat .number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 600;
  color: var(--signal-yellow);
  line-height: 1;
  display: block;
}

.research-stat .label {
  margin-top: 6px;
  display: block;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
  color: var(--graphite);
}

.research-stat--compact .number {
  font-size: clamp(1rem, 2vw, 1.4rem);
}

.manifesto {
  margin-top: 2rem;
  border-left: 6px solid var(--signal-yellow);
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
}

.manifesto-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  line-height: 1.4;
  color: var(--text);
}

.manifesto-text strong {
  color: var(--signal-yellow);
  font-style: italic;
}

/* ===== MAP ===== */
.map-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  color: var(--graphite);
}

.legend-dot,
.location-chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.lived,
.location-chip .dot.lived { background: var(--signal-yellow); }
.legend-dot.visited,
.location-chip .dot.visited { background: var(--forest-light); }

#map {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border);
}

.locations-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

/* Bio section */
.bio-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.bio-text strong { color: var(--text); }

.bio-map-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--forest-light);
  padding: 1.4rem;
}

.bio-map-col .map-legend {
  margin-bottom: 10px;
}

.bio-chips-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 768px) {
  .bio-map-layout {
    grid-template-columns: 1fr;
  }
  .bio-chips-col {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.location-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 10px 12px;
  transition: background 0.18s var(--ease-editorial), border-color 0.18s var(--ease-editorial), transform 0.18s var(--ease-editorial);
}

.location-chip:hover {
  background: var(--chalk);
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.location-chip .country {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--smoke);
}

/* ===== CONTACTS ===== */
.contacts-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: start;
}

.contacts-photo {
  width: 320px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.contacts-photo__base {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  position: relative;
  z-index: 1;
  transition: filter 0.35s ease;
}

.contacts-photo:hover .contacts-photo__base {
  filter: brightness(1.06) saturate(1.1);
}

/* pixelated full-frame overlay */
.contacts-photo__px {
  position: absolute;
  inset: 0;
  background: url('images/square_photo_pixelated.jpg') center / cover no-repeat;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

/* horizontal slice layers */
.contacts-photo__slice {
  position: absolute;
  inset: 0;
  background: url('images/square_photo_pixelated.jpg') center / cover no-repeat;
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

.contacts-photo__slice--a {
  filter: hue-rotate(80deg) saturate(2);
}

.contacts-photo__slice--b {
  filter: hue-rotate(-80deg) saturate(2);
}

/* scanline grid overlay */
.contacts-photo__scanlines {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.12) 3px,
    rgba(0, 0, 0, 0.12) 4px
  );
}

/* ---- glitch keyframes ---- */
@keyframes glitch-px {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  9%   { opacity: 0; }
  14%  { opacity: 0.9; }
  20%  { opacity: 0; }
  28%  { opacity: 1; }
  34%  { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes glitch-base-flash {
  0%   { filter: none; }
  4%   { filter: brightness(1.15) contrast(1.1); }
  9%   { filter: none; }
  28%  { filter: brightness(1.1); }
  34%  { filter: none; }
  100% { filter: none; }
}

@keyframes glitch-slice-a {
  0%   { opacity: 0; }
  3%   { opacity: 1; clip-path: inset(8% 0 87% 0);   transform: translateX(-7px); }
  8%   {              clip-path: inset(44% 0 42% 0);  transform: translateX(6px);  }
  13%  {              clip-path: inset(70% 0 18% 0);  transform: translateX(-5px); }
  17%  {              clip-path: inset(25% 0 65% 0);  transform: translateX(8px);  }
  22%  {              clip-path: inset(58% 0 30% 0);  transform: translateX(-4px); }
  26%  { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes glitch-slice-b {
  0%   { opacity: 0; }
  6%   { opacity: 1; clip-path: inset(60% 0 26% 0);  transform: translateX(9px);  }
  11%  {              clip-path: inset(14% 0 77% 0);  transform: translateX(-6px); }
  16%  {              clip-path: inset(80% 0 12% 0);  transform: translateX(5px);  }
  20%  {              clip-path: inset(36% 0 52% 0);  transform: translateX(-8px); }
  24%  {              clip-path: inset(50% 0 38% 0);  transform: translateX(4px);  }
  28%  { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes glitch-scanlines {
  0%   { opacity: 0; }
  4%   { opacity: 0.7; }
  34%  { opacity: 0.7; }
  36%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ---- triggered state ---- */
.contacts-photo--glitching .contacts-photo__base {
  animation: glitch-base-flash 0.55s steps(1) forwards;
}
.contacts-photo--glitching .contacts-photo__px {
  animation: glitch-px 0.55s steps(1) forwards;
}
.contacts-photo--glitching .contacts-photo__slice--a {
  animation: glitch-slice-a 0.55s steps(1) forwards;
}
.contacts-photo--glitching .contacts-photo__slice--b {
  animation: glitch-slice-b 0.55s steps(1) forwards;
}
.contacts-photo--glitching .contacts-photo__scanlines {
  animation: glitch-scanlines 0.55s linear forwards;
}

.contacts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.contacts-item {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}

.contacts-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 1;
  min-width: 7rem;
  flex-shrink: 0;
}

.contacts-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contacts-link:hover {
  color: var(--signal-yellow);
  border-bottom-color: var(--signal-yellow);
}

@media (max-width: 768px) {
  .contacts-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contacts-photo {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 3rem 0;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.footer-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2rem;
  color: var(--signal-yellow);
}

.footer-tagline {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.footer-slogan {
  font-family: 'Instrument Serif', Georgia, serif;
  color: var(--text);
  font-style: italic;
  font-size: 1.4rem;
}

.footer-meta {
  margin-top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--smoke);
  font-size: 0.72rem;
}

/* ===== ANIMATION ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.55s var(--ease-editorial), transform 0.55s var(--ease-editorial);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s var(--ease-editorial), transform 0.45s var(--ease-editorial);
}

.stagger > *.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== LEAFLET THEME ===== */
.leaflet-container {
  background: var(--bg-secondary) !important;
  font-family: 'Source Serif 4', Georgia, serif;
}

.leaflet-tile-pane { filter: saturate(0.7) contrast(0.92); }

.leaflet-popup-content-wrapper {
  background: var(--bg-secondary) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-popup-tip { background: var(--bg-secondary) !important; }

.leaflet-popup-content {
  color: var(--text) !important;
  font-family: 'Source Serif 4', Georgia, serif !important;
  font-size: 0.9rem !important;
}

.leaflet-popup-content strong { color: var(--signal-yellow) !important; }

.map-popup-type {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  padding: 2px 8px;
  margin-top: 5px;
  display: inline-block;
  border: 1px solid transparent;
}

.map-popup-type.lived-city {
  background: #1a3328;
  color: var(--forest-light);
  border-color: #2a4f3e;
}

.map-popup-type.visited-country {
  background: #1e2b25;
  color: var(--forest-light);
  border-color: #253d2f;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .timeline-item:nth-child(even) {
    margin-left: 0;
  }

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

  .research-stats {
    grid-template-columns: 1fr;
  }
}

/* Nav collapses to hamburger at 768px */
@media (max-width: 768px) {
  .nav-links { display: none; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--bg);
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    z-index: 999;
  }

  .nav-links.open a {
    color: var(--white);
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.8rem, 8vw, 3rem);
    text-transform: none;
    letter-spacing: 0;
  }

  .hamburger { display: flex; z-index: 1001; position: relative; }
  .hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .hamburger.open span { background: var(--white); }
}

@media (max-width: 640px) {
  body::before { display: none; }

  section { padding-top: 5.5rem; padding-bottom: 3.5rem; }

  #navbar { padding: 14px 1rem; }

  /* Section titles: allow wrapping on small screens */
  .section-title {
    white-space: normal;
    font-size: clamp(1.8rem, 8vw, 4.8rem);
  }

  .hero-name {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn { width: 100%; }

  .stats-grid,
  .civic-grid,
  .infed-grid,
  .orgs-grid,
  .locations-grid {
    grid-template-columns: 1fr;
  }

  .scroll-indicator { display: none; }

  #map { height: 280px; }

  /* Timeline: smaller role title on narrow screens */
  .timeline-role { font-size: 1.2rem; }

  /* Election events: stack photo below body text */
  .election-event {
    flex-direction: column;
  }

  .election-event__photo {
    width: 100%;
    max-width: 300px;
  }

  /* Terminal block: wrap long lines instead of horizontal scroll */
  .terminal-block pre {
    white-space: pre-wrap;
    word-break: break-all;
  }

  /* Contacts: stack label above value on small screens */
  .contacts-item {
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 0;
  }

  .contacts-label { min-width: unset; }

  /* Civic modal: ensure it doesn't overflow */
  .civic-modal-overlay {
    padding: 0.75rem;
    align-items: flex-end;
  }

  .civic-modal {
    max-height: 85vh;
  }

  /* Stats bar: tighten up */
  .stats-bar { padding: 1.5rem 0; }

  /* Hero: less bottom padding */
  #hero { padding-bottom: 2.5rem; }
}

/* ===== POLISH & MICRO-INTERACTIONS ===== */


/* --- Hero entrance stagger --- */
@keyframes heroEntrance {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-greeting {
    opacity: 0; transform: translateY(14px);
    animation: heroEntrance 0.65s var(--ease-editorial) 0.2s forwards;
  }
  .hero-name {
    opacity: 0; transform: translateY(22px);
    animation: heroEntrance 0.7s var(--ease-editorial) 0.34s forwards;
  }
  .hero-tagline {
    opacity: 0; transform: translateY(14px);
    animation: heroEntrance 0.6s var(--ease-editorial) 0.48s forwards;
  }
  .hero-bio {
    opacity: 0; transform: translateY(14px);
    animation: heroEntrance 0.6s var(--ease-editorial) 0.6s forwards;
  }
}

/* --- Active nav link --- */
.nav-links a.active { color: var(--signal-yellow); }
.nav-links a.active::after { transform: scaleX(1); }

/* --- Map marker pulse ring --- */
@keyframes markerPulse {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.55; }
  100% { transform: translate(-50%, -50%) scale(3.2); opacity: 0; }
}

.marker-pulse-ring {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 214, 10, 0.4);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .marker-pulse-ring { animation: markerPulse 2.8s ease-out infinite; }
}

/* --- Counter pop on complete --- */
@keyframes counterPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .counter-pop { animation: counterPop 0.32s var(--ease-editorial); }
}

/* --- Research badge hover tilt --- */
.research-badge {
  transition: transform 0.3s var(--ease-editorial);
}
.research-card:hover .research-badge {
  transform: rotate(1deg);
}

/* --- Footer heartbeat --- */
@keyframes heartbeat {
  0%, 78%, 100% { transform: scale(1); }
  85%  { transform: scale(1.22); }
  93%  { transform: scale(1.08); }
}

@media (prefers-reduced-motion: no-preference) {
  .footer-heart {
    display: inline-block;
    animation: heartbeat 3.2s ease-in-out infinite;
  }
}

.footer-year { color: var(--signal-yellow); }

/* ===== CIVIC MODALS ===== */

.civic-card-footer {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 1.2rem;
}

.civic-read-more {
  padding: 7px 22px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.18s var(--ease-editorial), border-color 0.18s var(--ease-editorial), background 0.18s var(--ease-editorial);
}

.civic-read-more:hover {
  color: var(--ink);
  background: var(--signal-yellow);
  border-color: var(--signal-yellow);
}

/* Overlay */
.civic-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.82);
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  backdrop-filter: blur(2px);
}

.civic-modal-overlay.open { display: flex; }

/* Modal panel */
.civic-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--signal-yellow);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--signal-yellow) var(--bg);
}

.civic-modal::-webkit-scrollbar { width: 5px; }
.civic-modal::-webkit-scrollbar-track { background: var(--bg); }
.civic-modal::-webkit-scrollbar-thumb { background: var(--signal-yellow); }

/* Close button */
.civic-modal-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 1;
  margin: 1rem 1rem 0 0;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  transition: color 0.18s var(--ease-editorial), border-color 0.18s var(--ease-editorial);
}

.civic-modal-close:hover {
  color: var(--signal-yellow);
  border-color: rgba(255, 214, 10, 0.4);
}

/* Modal body content */
.civic-modal-body { padding: 2rem 2rem 2.5rem; }

/* Template-rendered content */
.cmodal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.cmodal-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  flex-shrink: 0;
}

.cmodal-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--signal-yellow);
  line-height: 1;
  margin-bottom: 6px;
}

.cmodal-subtitle {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.cmodal-content {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.cmodal-content p { margin-bottom: 1rem; }
.cmodal-content p:last-child { margin-bottom: 0; }
.cmodal-content strong { color: var(--text); }

.cmodal-content h3 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 1.6rem 0 0.6rem;
}

.cmodal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.2rem;
  color: var(--signal-yellow);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: gap 0.2s var(--ease-editorial);
}

.cmodal-link:hover { gap: 10px; }

.cmodal-project-img {
  display: block;
  width: 100%;
  margin-bottom: 1.4rem;
  border: 1px solid var(--border);
}

.cmodal-yt-thumb {
  display: block;
  position: relative;
  width: 100%;
  margin-bottom: 1.6rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.cmodal-yt-thumb img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.2s var(--ease-editorial);
}

.cmodal-yt-thumb:hover img {
  opacity: 0.85;
}

.cmodal-yt-thumb__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--signal-yellow);
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.2s var(--ease-editorial);
  pointer-events: none;
}

.cmodal-yt-thumb:hover .cmodal-yt-thumb__play {
  background: rgba(0, 0, 0, 0.55);
}

.cmodal-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.5rem 0 1.2rem;
}

.cmodal-feature {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--forest-light);
  padding: 0.75rem 1rem;
}

.cmodal-feature-title {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 6px;
}

.cmodal-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cmodal-feature-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 2px 0;
  padding-left: 10px;
  position: relative;
}

.cmodal-feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--forest-light);
  font-size: 0.75rem;
}

.cmodal-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
  margin-bottom: 1.6rem;
}

.cmodal-gallery__main {
  grid-column: 1 / -1;
}

.cmodal-gallery img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.cmodal-gallery__main img {
  height: 260px;
}

@media (max-width: 640px) {
  .cmodal-gallery { grid-template-columns: 1fr 1fr; }
  .cmodal-gallery img { height: 120px; }
  .cmodal-gallery__main img { height: 200px; }
}

.cmodal-eu-note {
  margin-top: 1.4rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--signal-yellow);
  background: var(--bg);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .cmodal-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .civic-modal-body { padding: 1.2rem 1.2rem 2rem; }
  .cmodal-header { gap: 12px; }
  .cmodal-icon { width: 44px; height: 44px; }
}
