/* ── HICS Design System ──────────────────────────────────── */

/* Google Fonts loaded via <link> in base.html for better performance */

:root {
  /* ── Core palette ── */
  --bg: #080b12;
  --surface: #0f1420;
  --surface-2: #151a2c;
  --surface-3: #1b2038;
  --border: #1d2438;
  --border-light: #273050;
  /* Logo SVG: cls-3=#e2e4ed, cls-4=#6c7394 */
  --text: #e2e4ed;
  --text-muted: #7e8db0;
  --text-dim: #4a5472;

  /* ── Brand accent palette — from logos/default_filldot.svg ── */
  /* Mountain polygon: cls-1 = #6296cf  */
  --accent: #6296cf;
  --accent-bright: #7eb0e8;
  --accent-dim: #172440;
  /* Muon track / amber dot: cls-2 = #f0a031 */
  --amber: #f0a031;
  --amber-bright: #f8bc65;
  --amber-dim: #2e1e06;

  /* ── Supplementary palette ── */
  --green: #2ed873;
  --green-dim: #0c2818;
  --teal: #28d4b8;
  --teal-dim: #092520;
  --red: #e85555;
  --red-dim: #280e0e;

  /* ── RGB channels (for rgba() with opacity control) ── */
  --accent-rgb: 98, 150, 207;
  --amber-rgb:  240, 160, 49;
  --green-rgb:  46, 216, 115;
  --red-rgb:    232, 85, 85;
  --border-rgb: 29, 36, 56;

  /* ── Glow tokens (derived from brand colors) ── */
  --glow-accent: 0 0 28px rgba(var(--accent-rgb), 0.20);
  --glow-amber:  0 0 28px rgba(var(--amber-rgb),  0.22);
  --glow-green:  0 0 22px rgba(var(--green-rgb), 0.18);

  /* ── Gradients ── */
  --grad-accent-strip: linear-gradient(90deg, var(--accent-dim) 0%, transparent 100%);
  --grad-card-hover: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);

  /* Typography */
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-sans: var(--font-serif);  /* no separate sans-serif; alias to body font */

  /* Spacing scale */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;

  /* Layout */
  --max-width: 1100px;
  --content-width: 720px;
  --radius: 6px;
  --radius-lg: 12px;
  --header-height: 56px;

  /* ── Shadows ── */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.22);
}

/* ── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-mono);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}
h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin-top: var(--s7);
}
h3 {
  font-size: 1.125rem;
  margin-top: var(--s6);
}

p {
  margin-top: var(--s4);
}
p:first-child {
  margin-top: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s5);
  overflow-x: auto;
  margin: var(--s5) 0;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--s5);
  color: var(--text-muted);
  font-style: italic;
  margin: var(--s6) 0;
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--s5);
}

.content {
  max-width: var(--content-width);
}
/* Prevent rich-text content from overflowing */
.content img,
.content table,
.richtext img,
.richtext table {
  max-width: 100%;
}
.content table,
.richtext table {
  display: block;
  overflow-x: auto;
}

/* ── Site Header ────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--s5);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo__mark {
  height: 36px;
  width: auto;
}
.site-logo__text {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.site-logo:hover {
  text-decoration: none;
}
.site-logo:hover .site-logo__text {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: var(--s6);
  list-style: none;
  align-items: center;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.site-nav a:hover {
  color: var(--text);
}
.site-nav a.active {
  color: var(--text);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 1px;
}

.nav-lang-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-left: var(--s3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}
.lang-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
  cursor: pointer;
}
a.lang-btn:hover {
  color: var(--text);
}
span.lang-btn.active {
  color: var(--accent);
  font-weight: bold;
  cursor: default;
}
.lang-sep {
  color: var(--border);
  user-select: none;
}

/* ── Nav Dropdowns ──────────────────────────────────────────── */
.site-nav li.has-dropdown { position: relative; }

.site-nav li.has-dropdown > a::after {
  content: ' ▾';
  font-size: 0.65em;
  opacity: 0.45;
  vertical-align: middle;
  margin-left: 1px;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  list-style: none;
  padding: 10px 0 var(--s2);
  min-width: 210px;
  z-index: 300;
  white-space: nowrap;
}

.site-nav li.has-dropdown:hover .nav-dropdown,
.site-nav li.has-dropdown:focus-within .nav-dropdown,
.site-nav li.has-dropdown.open .nav-dropdown {
  display: block;
}

.nav-dropdown li a {
  display: block;
  padding: var(--s3) var(--s5);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: none !important;
  transition: color 0.15s, background 0.15s;
}

.nav-dropdown li a:hover {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.07);
}

.nav-dropdown__divider {
  height: 1px;
  background: var(--border);
  margin: var(--s1) 0;
  pointer-events: none;
}

/* Mobile nav: group labels and indented sub-items */
.mobile-nav__group-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: var(--s4) 0 var(--s1);
  font-family: var(--font-mono);
}

.mobile-nav__list li.mobile-nav__sub {
  padding-left: var(--s5);
}

.mobile-nav__sub a {
  padding: var(--s3) 0;
  font-size: 0.8rem;
}

/* Live station widget in header */
.station-live {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--s2);
  white-space: nowrap;
}
.station-live__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
.station-live__dot.offline {
  background: var(--red);
  animation: none;
}
/* Nav live-data pill — links to /data/, shows station status dot */
.nav-data-pill {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-data-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
}


@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ── Hero / Mission ─────────────────────────────────────── */
/* Dot-grid: 24px repeating SVG dots — instrument graph-paper feel */
.hero {
  padding: clamp(4rem, 10vh, 7rem) 0 clamp(3rem, 8vh, 5rem);
  min-height: calc(80vh - var(--header-height));
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--bg);
  /* Brand blue (#6296cf) glow top-right + dot grid */
  background-image:
    radial-gradient(ellipse 50% 55% at 95% 5%, rgba(var(--accent-rgb),0.10) 0%, transparent 65%),
    radial-gradient(ellipse 30% 40% at 10% 90%, rgba(var(--amber-rgb),0.05) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='0.7' fill='%231d2438'/%3E%3C/svg%3E");
  overflow: hidden;
}
/* Thin left-edge accent rule — brand blue to amber */
.hero::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--accent) 25%,
    var(--amber) 75%,
    transparent 100%);
  opacity: 0.4;
}
/* Horizontal scan-line animation — brand blue */
@keyframes hero-scan {
  0%   { top: 2%;  opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 98%; opacity: 0; }
}
.hero__scan {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(var(--accent-rgb),0.00) 5%,
    rgba(var(--accent-rgb),0.40) 30%,
    rgba(var(--accent-rgb),0.60) 50%,
    rgba(var(--accent-rgb),0.40) 70%,
    rgba(var(--accent-rgb),0.00) 95%,
    transparent 100%);
  animation: hero-scan 14s cubic-bezier(0.4,0,0.6,1) infinite;
  pointer-events: none;
}
@keyframes hero-scan-rev {
  0%   { top: 98%; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 2%;  opacity: 0; }
}
.hero__scan--2 {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(var(--amber-rgb),0.00) 15%,
    rgba(var(--amber-rgb),0.22) 40%,
    rgba(var(--amber-rgb),0.35) 55%,
    rgba(var(--amber-rgb),0.22) 70%,
    rgba(var(--amber-rgb),0.00) 85%,
    transparent 100%);
  animation: hero-scan-rev 19s cubic-bezier(0.4,0,0.6,1) infinite;
  animation-delay: -7s;
}
.hero__mission {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 300;
  line-height: 1.8;
  max-width: 580px;
  color: var(--text-muted);
  margin-top: var(--s5);
}
.hero__mission em {
  color: var(--accent-bright);
  font-style: normal;
}
.hero__sub {
  margin-top: var(--s5);
  color: var(--text-muted);
  font-family: var(--font-serif);
  max-width: 560px;
}

/* ── Inner-page hero (lighter variant for About, Research, etc.) ─── */
.page-hero {
  padding: clamp(2.5rem, 6vh, 4rem) 0 clamp(2rem, 5vh, 3rem);
  min-height: 28vh;
  border-bottom: 1px solid var(--border);
  position: relative;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 40% 60% at 90% 10%, rgba(var(--accent-rgb),0.07) 0%, transparent 65%),
    url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='0.7' fill='%231d2438'/%3E%3C/svg%3E");
  overflow: hidden;
}
/* Nepal map outline — add to contextually relevant heroes only */
.page-hero--map {
  background-image:
    radial-gradient(ellipse 40% 60% at 90% 10%, rgba(var(--accent-rgb),0.07) 0%, transparent 65%),
    url("/static/img/nepal-outline.svg"),
    url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='0.7' fill='%231d2438'/%3E%3C/svg%3E");
  background-size: auto, 60% auto, auto;
  background-position: center, right 2% center, center;
  background-repeat: no-repeat, no-repeat, repeat;
}
/* Same left-edge rule as homepage hero */
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--accent) 30%,
    var(--amber) 80%,
    transparent 100%);
  opacity: 0.35;
}
.page-hero .section__label {
  margin-bottom: var(--s4);
}
.page-hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0;
}
.page-hero .hero__sub {
  margin-top: var(--s4);
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 1.6vw, 1.075rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 600px;
}

/* ── Cards ──────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s4);
  margin-top: var(--s5);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s5);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover {
  border-color: rgba(var(--accent-rgb),0.35);
  background: var(--grad-card-hover);
  box-shadow: var(--glow-accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.card__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--s3);
}
.card__title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: var(--s3);
}
.card__body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Status badges */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 2px;
  margin-top: var(--s3);
}
.badge--active {
  background: var(--green-dim);
  color: var(--green);
}
.badge--building {
  background: var(--accent-dim);
  color: var(--accent);
}
.badge--planned {
  background: var(--surface-2);
  color: var(--text-muted);
}

/* ── Live Data Widget ───────────────────────────────────── */
.data-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s5) var(--s6);
  margin: var(--s6) 0;
}
.data-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s5);
  flex-wrap: wrap;
  gap: var(--s3);
}
.data-widget__title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.data-widget__readings {
  display: flex;
  gap: var(--s6);
  flex-wrap: wrap;
}
.reading {
  display: flex;
  flex-direction: column;
}
.reading__value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.reading__unit {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-left: 2px;
}
.reading__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: var(--s2);
}

/* ── Chart container ────────────────────────────────────── */
.chart-wrap {
  position: relative;
  height: 200px;
  margin: var(--s5) 0;
}

/* ── Lab Notes ──────────────────────────────────────────── */
.note-list {
  margin-top: var(--s5);
}
.note-item {
  border-top: 1px solid var(--border);
  padding: var(--s5) 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--s5);
}
.note-item__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.note-item__date {
  color: var(--text-dim);
}
.note-item__type {
  margin-top: var(--s2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.6875rem;
}
.note-item__title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: var(--s2);
}
.note-item__summary {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Page sections ──────────────────────────────────────── */
.section {
  padding: var(--s8) 0;
  border-bottom: 1px solid var(--border);
}
.section:last-child {
  border-bottom: none;
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent);
  margin-bottom: var(--s4);
  padding: 3px 12px 3px var(--s3);
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(var(--accent-rgb),0.08) 0%, transparent 80%);
}

/* ── Site Footer ────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--s8) 0 var(--s5);
  margin-top: var(--s9);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-dim);
}
.site-footer a {
  color: var(--text-muted);
  transition: color 0.15s;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--accent);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--s7);
  align-items: start;
}
.site-footer__logo {
  display: block;
  margin-bottom: var(--s2);
  opacity: 0.9;
  max-width: 260px;
}
.site-footer__tagline {
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--s3);
  font-style: italic;
}
.site-footer__coords {
  font-size: 0.6875rem;
  color: var(--text-dim);
}
.site-footer__nav-col {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.site-footer__nav-heading {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--s2);
}
.site-footer__nav-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s2) var(--s6);
}
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
  font-size: 0.6875rem;
  color: var(--text-dim);
}
.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.lang-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
  padding: 2px var(--s2);
  border-radius: var(--radius);
}
.lang-link:hover {
  color: var(--text);
}
.lang-link.active {
  color: var(--accent);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ── Utilities ──────────────────────────────────────────── */
.text-muted {
  color: var(--text-muted);
}
.text-mono {
  font-family: var(--font-mono);
}
.text-accent {
  color: var(--accent);
}
.text-green {
  color: var(--green);
}
.text-amber {
  color: var(--amber);
}
.text-dim {
  color: var(--text-dim);
}
.mt-0 {
  margin-top: 0;
}
.mt-4 {
  margin-top: var(--s4);
}
.mt-5 {
  margin-top: var(--s5);
}
.mt-6 {
  margin-top: var(--s6);
}
.mt-7 {
  margin-top: var(--s7);
}

/* ── Mobile Menu ────────────────────────────────────────── */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}
.mobile-menu-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.mobile-menu-toggle.active .mobile-menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active .mobile-menu-toggle__bar:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active .mobile-menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background: var(--bg);
  z-index: 1090;
  padding: var(--s6) var(--s5);
  overflow-y: auto;
}
.mobile-nav.open {
  display: block;
}
.mobile-nav__list {
  list-style: none;
}
.mobile-nav__list li {
  border-bottom: 1px solid var(--border);
}
.mobile-nav__list a {
  display: block;
  padding: var(--s4) 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: none;
}
.mobile-nav__list a:hover {
  color: var(--text);
}
.mobile-nav__station {
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--border);
}
.mobile-nav__lang {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.mobile-nav__lang-label {
  color: var(--accent);
  font-weight: 600;
}
.mobile-nav__lang-link {
  color: var(--text-muted);
  text-decoration: none;
}
.mobile-nav__lang-link:hover {
  color: var(--text);
}

/* ── Hero Title (institutional name) ───────────────────── */
.hero__title {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.hero__title::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.hero__tagline {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 500;
  font-style: normal;
  color: var(--text);
  margin-bottom: var(--s5);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero__tagline .t-accent  { color: var(--accent-bright); }
.hero__tagline .t-amber   { color: var(--amber); }
.hero__tagline .t-teal    { color: var(--teal); }
.hero__links {
  margin-top: var(--s6);
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
}
.hero__links a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
  background: var(--surface);
}
.hero__links a:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: var(--accent-dim);
  box-shadow: var(--glow-accent);
  text-decoration: none;
}

/* ── Active Work Cards ─────────────────────────────────── */
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s5);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.work-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--teal) 100%);
  opacity: 0;
  transition: opacity 0.25s;
}
.work-card:hover {
  border-color: rgba(var(--accent-rgb),0.35);
  background: var(--grad-card-hover);
  box-shadow: var(--glow-accent);
  transform: translateY(-3px);
}
.work-card:hover::before {
  opacity: 1;
}
.work-card__status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: var(--s3);
}
.work-card__title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: var(--s3);
  color: var(--text);
}
.work-card__body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.work-card__image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--s4);
  border: 1px solid var(--border);
  transition: filter 0.25s;
}
.work-card:hover .work-card__image {
  filter: brightness(1.08);
}

/* ── Pipeline List ─────────────────────────────────────── */
.pipeline-subhead {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--s4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pipeline-list {
  list-style: none;
  margin-top: var(--s3);
}
.pipeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s3);
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  align-items: baseline;
}
.pipeline-item__icon {
  color: var(--accent);
  text-align: center;
  font-weight: 700;
}
.pipeline-item__name {
  color: var(--text);
  font-weight: 600;
}
.pipeline-item__desc {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: var(--s3);
}

/* ── Education Cards ───────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s4);
  margin-top: var(--s5);
}

/* ── CTA Section ───────────────────────────────────────── */
.cta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s3) var(--s5);
  margin-top: var(--s5);
}
.cta-label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}
.cta-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Map Container ─────────────────────────────────────── */
.map-wrap {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: var(--s5);
  background: var(--surface);
}
.map-summary {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--s4);
  text-align: center;
}

/* ── Data Gap Panels (homepage) ────────────────────────── */
.gap-panels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s5);
}
.gap-panel {
  padding: var(--s5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.gap-panel__icon {
  margin-bottom: var(--s4);
}
.gap-panel__label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--s3);
}
.gap-panel__text {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ── About Page ────────────────────────────────────────── */
/* ── About Page — Section Alt ──────────────────────────── */
/* .section-alt: full-bleed dark band using negative margins — for use at container root level only */
.section-alt {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: var(--s8) 0;
  position: relative;
}
/* Contained variant — same background treatment but no negative-margin bleed */
.section-inset {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s6);
  margin: var(--s6) 0;
  position: relative;
}
.section-inset::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-dim) 40%, var(--amber-dim) 70%, transparent 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-dim) 40%, var(--amber-dim) 70%, transparent 100%);
}

/* ── Two Column Layout ────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s7);
}

/* ── Flow Chain (redesigned) ──────────────────────────── */
.flow-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  margin: var(--s4) 0;
}
.flow-chain__node {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
}
.flow-chain__arrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

/* ── Mission Quote ────────────────────────────────────── */
.mission-quote {
  border-left: 3px solid var(--accent);
  padding-left: var(--s6);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text);
  font-style: normal;
  margin: 0;
}

/* ── Vision Grid ──────────────────────────────────────── */
.vision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
.vision-item {
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
}
.vision-item__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.vision-item__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Domain Cards (4 areas of work) ───────────────────── */
.domain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
.domain-card {
  display: flex;
  gap: var(--s5);
  padding: var(--s5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s;
}
.domain-card:hover {
  border-color: rgba(var(--accent-rgb),0.30);
}
.domain-card__letter {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.domain-card__title {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--s1);
}
.domain-card__sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s3);
}
.domain-card__body {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.domain-card__count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: var(--s3);
}

/* ── Principles Grid ──────────────────────────────────── */
.principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5) var(--s7);
}
.principle {
  margin-top: 0;
}
.principle__label {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--s2);
}
.principle__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Founder Card ─────────────────────────────────────── */
.founder-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--s6);
  align-items: start;
}
.founder-card__photo {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ── Partner Grid ─────────────────────────────────────── */
.partner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
.partner-item {
  padding: var(--s5);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.partner-item__name {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--s1);
}
.partner-item__location {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent);
  margin-bottom: var(--s3);
}
.partner-item__text {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ── Network Tags ─────────────────────────────────────── */
.network-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}
.network-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--text-muted);
}
.network-tag--active {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ── Image Block Sizes ────────────────────────────────── */
.block-image--content {
  max-width: var(--content-width);
}
.block-image--small {
  max-width: 400px;
}

/* ── StreamField Block Components ─────────────────────── */

/* Columns block */
.hics-grid-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -1.25rem;
  margin-left: -1.25rem;
  row-gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.hics-grid-col {
  position: relative;
  width: 100%;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .hics-grid-col--12 { flex: 0 0 100%; max-width: 100%; }
  .hics-grid-col--9  { flex: 0 0 75%; max-width: 75%; }
  .hics-grid-col--8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .hics-grid-col--6  { flex: 0 0 50%; max-width: 50%; }
  .hics-grid-col--4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .hics-grid-col--3  { flex: 0 0 25%; max-width: 25%; }
}
@media (max-width: 767px) {
  .hics-grid-col { flex: 0 0 100%; max-width: 100%; margin-bottom: 1.5rem; }
  .hics-grid-col:last-child { margin-bottom: 0; }
}

/* Divider block */
.hics-divider {
  border: 0;
  width: 100%;
}
.hics-divider--solid  { border-top: 1.5px solid var(--border); }
.hics-divider--dashed { border-top: 1.5px dashed var(--border); }
.spacing-small  { margin-top: 1.5rem; margin-bottom: 1.5rem; height: 1.5rem; }
.spacing-medium { margin-top: 3.5rem; margin-bottom: 3.5rem; height: 3.5rem; }
.spacing-large  { margin-top: 7rem;   margin-bottom: 7rem;   height: 7rem; }
.hics-spacer { display: block; width: 100%; }

/* Video block */
.video-embed-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.video-embed-wrapper iframe,
.video-embed-wrapper embed,
.video-embed-wrapper object {
  width: 100% !important;
  aspect-ratio: 16 / 9;
  height: auto !important;
  display: block;
}
.local-video-player {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: block;
}
.hics-video-caption {
  font-size: 0.75rem;
  margin-top: var(--s2);
  padding-left: 0.25rem;
}

/* ── Accordion Details ────────────────────────────────── */
.accordion-item[open] summary span {
  transform: rotate(90deg);
}
.accordion-item summary span {
  transition: transform 0.2s;
  display: inline-block;
}

/* ── Contact Cards ─────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
.contact-card {
  display: block;
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.contact-card:hover {
  border-color: rgba(var(--accent-rgb),0.30);
  background: var(--surface-2);
}
.contact-card__icon {
  margin-bottom: var(--s4);
}
.contact-card__label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--s2);
}
.contact-card__text {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: var(--s4);
}
.contact-card__cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}
.card-inline-email {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.card-inline-email:hover {
  color: var(--text) !important;
}

/* ── Contact Form Styling ──────────────────────────────── */
.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s6);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-bottom: var(--s5);
}
.form-group:last-of-type {
  margin-bottom: var(--s6);
}
.form-group label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) / 2);
  padding: var(--s3) var(--s4);
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
  outline: none;
  width: 100%;
}
.form-group textarea {
  resize: vertical;
  line-height: 1.5;
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
  background: var(--surface-2);
}
.select-wrapper {
  position: relative;
}
.select-wrapper::after {
  content: "";
  position: absolute;
  right: var(--s4);
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text-muted);
  pointer-events: none;
}
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--s6);
}
/* ── Button Components ───────────────────────────────────── */
/* Base button — used by StreamField ButtonBlock (class="btn btn-primary" etc.) */
.btn {
  display: inline-block;
  padding: var(--s3) var(--s5);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
}
.btn:hover {
  text-decoration: none;
}

/* Amber / highlight variant */
.btn-accent {
  background: var(--amber);
  color: var(--bg);
  border: 1.5px solid var(--amber);
}
.btn-accent:hover {
  background: var(--amber-bright);
  border-color: var(--amber-bright);
  box-shadow: var(--glow-amber);
  transform: translateY(-2px);
  color: var(--bg);
}

/* Primary button — solid accent fill, high-contrast CTA */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: calc(var(--radius) / 2);
  padding: var(--s3) var(--s5);
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  box-shadow: var(--glow-accent);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--bg);
}
.btn-primary:active {
  transform: translateY(0);
}

/* Outline button — used for secondary actions (PDF downloads, open access links) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: calc(var(--radius) / 2);
  padding: var(--s2) var(--s4);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-bright);
  text-decoration: none;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--text);
  border: none;
  border-radius: calc(var(--radius) / 2);
  padding: var(--s3) var(--s5);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-submit:hover {
  background: var(--accent);
  color: var(--bg);
}
.btn-submit:active {
  transform: translateY(1px);
}
.form-success-card {
  text-align: center;
  padding: var(--s5) var(--s2);
}
.form-success-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
/* Accessible hide — visually hidden but screen-reader visible */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure last real form-group before button gets correct spacing */
.form-group + .visually-hidden + .btn-submit {
  margin-top: var(--s5);
}

.form-error-alert {
  padding: var(--s4);
  background: var(--red-dim);
  border: 1px solid rgba(var(--red-rgb),0.25);
  border-radius: calc(var(--radius) / 2);
  color: var(--red);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ── Tablet breakpoint (768–900px) ─────────────────────── */
@media (max-width: 900px) {
  .gap-panels {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3col {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Responsive ─────────────────────────────────────────── */
/* ── Responsive grid helpers — used in templates to replace inline grid styles ── */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}
.grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s5);
}
.card-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}


@media (max-width: 700px) {
  .site-nav-desktop {
    display: none;
  }
  .station-live {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .note-item {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }
  .data-widget__readings {
    gap: var(--s5);
  }
  .reading__value {
    font-size: 1.5rem;
  }
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s3);
  }
  .cta-grid {
    grid-template-columns: 1fr;
  }
  .map-wrap {
    height: 280px;
  }
  .pipeline-item {
    font-size: 0.8rem;
  }
  /* About page + homepage grids → single column on mobile */
  .two-col,
  .vision-grid,
  .domain-grid,
  .principles-grid,
  .gap-panels,
  .contact-grid,
  .partner-grid {
    grid-template-columns: 1fr;
  }
  .founder-card {
    grid-template-columns: 100px 1fr;
    gap: var(--s4);
  }
  .domain-card__letter {
    font-size: 1.25rem;
  }
  .section-alt {
    padding: var(--s6) 0;
  }
  /* Image blocks */
  .block-image--small {
    max-width: 100%;
  }
  /* Footer nav 2-col → 1-col */
  .site-footer__nav-links {
    grid-template-columns: 1fr;
  }
  /* Responsive grid helpers → single column */
  .grid-2col,
  .grid-3col,
  .card-grid--2col {
    grid-template-columns: 1fr;
  }
  /* Hero height: don't lock mobile to 80vh */
  .hero {
    min-height: 0;
    padding: clamp(3rem, 8vh, 5rem) 0 clamp(2.5rem, 6vh, 4rem);
  }
  /* Page hero: tighten padding */
  .page-hero {
    min-height: 0;
  }
  /* Nepal map: shrink on mobile so it doesn't dominate */
  .page-hero--map {
    background-size: auto, 80% auto, auto;
    background-position: center, center bottom, center;
  }
  /* Ensure canvas charts never overflow their container */
  canvas {
    max-width: 100% !important;
  }
  /* Data widget station name + status bar */
  .data-widget__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s2);
  }
  /* Station list page spacing */
  .station-card {
    padding: var(--s4);
  }
  /* Publications listing */
  .publication-row {
    flex-direction: column;
    gap: var(--s2);
  }
}

/* ── Custom Cursor ───────────────────────────────────────── */
/* Only on pointer-capable devices */
@media (pointer: fine) {
  body,
  body * {
    cursor: none !important;
  }

  .cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 5px; height: 5px;
    background: var(--accent-bright);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: background 0.15s, transform 0.08s;
    will-change: transform;
  }

  .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 26px; height: 26px;
    border: 1.5px solid rgba(var(--accent-rgb),0.55);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s, background 0.2s;
    will-change: transform;
  }

  /* Hover state — ring expands over clickable elements */
  .cursor-ring.is-hovering {
    width: 40px;
    height: 40px;
    border-color: rgba(var(--accent-rgb),0.30);
    background: rgba(var(--accent-rgb),0.06);
  }

  /* Press state */
  .cursor-dot.is-clicking {
    transform: translate(-50%, -50%) scale(0.6);
    background: var(--teal);
  }
}

/* ── Page-load staggered reveal ──────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__title    { animation: fade-up 0.5s ease both; animation-delay: 0.05s; }
.hero__tagline  { animation: fade-up 0.5s ease both; animation-delay: 0.15s; }
.hero__mission  { animation: fade-up 0.5s ease both; animation-delay: 0.28s; }
.hero__links    { animation: fade-up 0.5s ease both; animation-delay: 0.42s; }

/* ── Premium CMS Table Styling ───────────────────────────── */
.responsive-table-container {
  width: 100%;
  overflow-x: auto;
  margin: var(--s6) 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.responsive-table-container table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
}

.responsive-table-container th {
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 600;
  text-align: left;
  padding: var(--s3) var(--s4);
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.responsive-table-container td {
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.responsive-table-container tr:last-child td {
  border-bottom: none;
}

.responsive-table-container tr:hover td {
  background: rgba(var(--accent-rgb),0.04);
}

/* ── Premium Education Hub Resources Layouts ────────────────── */

/* A. Syllabus/Curriculum Track */
.syllabus-track {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  margin-top: var(--s4);
}
.syllabus-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: start;
  gap: var(--s5);
  padding: var(--s5) var(--s6);
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.syllabus-item:hover {
  transform: translateX(4px);
  border-color: rgba(var(--accent-rgb),0.40);
}
.syllabus-item__grade {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--surface-2);
  padding: var(--s1) var(--s3);
  border-radius: 4px;
  text-align: center;
  border: 1px solid var(--border);
}
.syllabus-item__title {
  margin: 0 0 var(--s2) 0;
  font-size: 1.15rem;
  color: var(--text);
}
.syllabus-item__desc {
  margin: 0;
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.syllabus-item__instrument {
  display: inline-block;
  margin-top: var(--s3);
  font-size: 0.775rem;
  color: var(--text-dim);
}

/* B. Premium Lab Build Guides Grid */
.build-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s5);
  margin-top: var(--s4);
}
.build-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  text-decoration: none !important;
}
.build-card:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.build-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s4);
}
.build-card__difficulty {
  font-size: 0.675rem !important;
  padding: 2px 8px !important;
}
.build-card__cost {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.build-card__title {
  margin: 0 0 var(--s2) 0;
  font-size: 1.15rem;
  color: var(--text);
}
.build-card__desc {
  margin: 0 0 var(--s4) 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}
.build-card__action {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
  transition: color 0.15s ease;
}
.build-card:hover .build-card__action {
  color: var(--accent-bright);
}

/* C. Developer Jupyter Notebook Directory */
.notebook-directory {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  margin-top: var(--s4);
  box-shadow: var(--shadow-sm);
}
.notebook-item {
  display: grid;
  grid-template-columns: var(--s8) 1fr 120px;
  align-items: center;
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
  text-decoration: none !important;
}
.notebook-item:last-child {
  border-bottom: none;
}
.notebook-item:hover {
  background: var(--surface-2);
}
.notebook-item__icon {
  font-size: 1.25rem;
  color: var(--accent);
}
.notebook-item__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.notebook-item__desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.notebook-item__meta {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-dim);
}

@media (max-width: 700px) {
  .syllabus-item {
    grid-template-columns: 1fr;
    gap: var(--s3);
  }
  .notebook-item {
    grid-template-columns: var(--s8) 1fr;
    gap: var(--s2);
  }
  .notebook-item__meta {
    display: none;
  }
}

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

/* Premium Focus Indicators */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ── Skip Navigation ── */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: var(--s3) var(--s5);
  z-index: 9999;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-nav:focus {
  top: 0;
}

/* ── Reduced Motion ── */
/* ── Person StreamField block ──────────────────────────── */
.person-block {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--s5);
  align-items: start;
}
@media (max-width: 700px) {
  .person-block {
    grid-template-columns: 80px 1fr;
    gap: var(--s3);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cursor-dot, .cursor-ring { display: none; }
  .hero__scan, .hero__scan--2 { display: none; }
}

/* ── Footer Newsletter Form ─────────────────────────────── */
.footer-nl {
  margin-top: var(--s5);
}
.footer-nl__heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: var(--s3);
}
.footer-nl__form {
  display: flex;
  gap: var(--s2);
}
.footer-nl__input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: var(--s1) var(--s3);
  font-size: 0.8rem;
  border-radius: calc(var(--radius) / 2);
  font-family: var(--font-mono);
  transition: border-color 0.2s;
}
.footer-nl__input:focus {
  outline: none;
  border-color: var(--accent);
}
.footer-nl__btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: var(--s1) var(--s3);
  font-size: 0.8rem;
  border-radius: calc(var(--radius) / 2);
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-mono);
  transition: background 0.2s;
}
.footer-nl__btn:hover {
  background: var(--accent-bright);
}
.footer-nl__note {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: var(--s2);
  line-height: 1.5;
  margin-bottom: 0;
}

/* ── Team Grid and Cards ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s5);
  margin-top: var(--s5);
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.team-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: var(--grad-card-hover);
  box-shadow: var(--glow-accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.team-card__image-container {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.team-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.team-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--text-muted);
}

.team-card__role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amber);
  margin-bottom: var(--s2);
}

.team-card__name {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 var(--s2) 0;
}

.team-card__bio-snippet {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0;
  flex-grow: 1;
}

.team-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}

/* ── Team Member Profile Page ── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s6);
  margin: var(--s6) 0;
  align-items: start;
}

@media (min-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr 2fr;
    gap: var(--s7);
  }
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

.profile-photo-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.profile-photo {
  width: 100%;
  display: block;
}

.profile-contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.profile-contact-link {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.profile-contact-link:hover {
  color: var(--text);
  text-decoration: none;
}

.profile-contact-link svg {
  color: var(--accent);
}

.profile-section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--s2);
}

/* ── Breadcrumb links in section labels ─────────────────── */
.section__label a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.section__label a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ── Sub-navigation ─────────────────────────────────────── */
.sub-nav-container {
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s6);
}
.sub-nav {
  display: flex;
  gap: var(--s5);
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar Firefox */
  padding: 0;
  margin: 0;
}
.sub-nav::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}
.sub-nav a {
  display: inline-block;
  padding: 0.875rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.sub-nav a:hover {
  color: var(--accent);
}
.sub-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

