/* ============================================================
   STRATIFY — Global Stylesheet
   Design System: The Kinetic Monolith
   ============================================================ */

:root {
  --primary:       #a4e6ff;
  --primary-dim:   #4cd6ff;
  --primary-ctr:   #00d1ff;
  --secondary:     #ceffdf;
  --secondary-dim: #00e293;
  --surface:       #06090e;
  --surface-low:   #090d14;
  --surface-mid:   #0d1219;
  --surface-hi:    #131a23;
  --surface-top:   #1a222c;
  --outline:       rgba(255,255,255,0.08);
  --text:          #e8eaed;
  --text-body:     #d4dde4;
  --text-muted:    #9ca3af;
  --error:         #ffb4ab;
  --radius-card:   1rem;
  --radius-btn:    0.5rem;
  --nav-h:         68px;
}

/* ── Text colour overrides (replace hardcoded grays) ─────── */
[style*="color:#bbc9cf"] { color: var(--text-body) !important; }
[style*="color:#6b7280"]  { color: var(--text-muted) !important; }
[style*="color:#4b5563"]  { color: #6b7280 !important; }
[style*="color:#374151"]  { color: #4b5563 !important; }

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--surface);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { font-family: 'Space Grotesk', sans-serif; }

/* ── Custom Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface-low); }
::-webkit-scrollbar-thumb { background: var(--outline); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dim); }

/* ── Grid Background ──────────────────────────────────────── */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ── Gradient Orbs ────────────────────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}
.orb-cyan  { background: radial-gradient(circle, rgba(0,209,255,0.18) 0%, transparent 70%); }
.orb-green { background: radial-gradient(circle, rgba(0,226,147,0.14) 0%, transparent 70%); }
.orb-blue  { background: radial-gradient(circle, rgba(100,130,255,0.12) 0%, transparent 70%); }

/* ── Glassmorphism ────────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}
.glass-strong {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
}
.glass-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-card);
  transition: border-color 0.2s;
}
.glass-card:hover {
  border-color: rgba(255,255,255,0.15);
}

/* ── Gradient Border Cards ────────────────────────────────── */
.gradient-border {
  position: relative;
  border-radius: var(--radius-card);
  padding: 1px;
  background: linear-gradient(135deg, rgba(164,230,255,0.2), rgba(0,226,147,0.1), rgba(164,230,255,0.05));
}
.gradient-border > * {
  border-radius: calc(var(--radius-card) - 1px);
}
.gradient-border-hover {
  background: linear-gradient(135deg, rgba(164,230,255,0.05), rgba(0,226,147,0.05));
  transition: background 0.3s;
}
.gradient-border-hover:hover {
  background: linear-gradient(135deg, rgba(164,230,255,0.25), rgba(0,226,147,0.15));
}

/* ── Text Gradients ───────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-rev {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-ctr) 0%, var(--primary-dim) 100%);
  color: #003543;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0,209,255,0.3);
}
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(49,53,60,0.5);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(60,73,78,0.6);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  text-decoration: none;
}
.btn-ghost:hover {
  background: rgba(49,53,60,0.8);
  border-color: rgba(164,230,255,0.25);
  transform: translateY(-1px);
}

/* ── Nav ──────────────────────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(6,9,14,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
#site-nav.scrolled { background: rgba(6,9,14,0.97); }

#site-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.375rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: -0.01em;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--primary); }

.nav-cta { display: flex; align-items: center; gap: 1rem; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: all 0.3s;
}
.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); }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(10,14,20,0.98);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(60,73,78,0.4);
  padding: 1.5rem 2.5rem;
  z-index: 99;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(60,73,78,0.2);
}
.mobile-menu a:hover { color: var(--primary); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-cta .btn-primary { padding: 0.6rem 1.2rem; font-size: 0.8rem; }
}

/* ── Footer ───────────────────────────────────────────────── */
#site-footer {
  background: #030508;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 4rem 2.5rem 2rem;
}
#site-footer .footer-inner {
  max-width: 1440px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand p {
  font-size: 0.8125rem;
  color: #4b5563;
  line-height: 1.7;
  max-width: 260px;
  margin-top: 1rem;
}
.footer-col h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4b5563;
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: 0.8125rem;
  color: #4b5563;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-muted); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(60,73,78,0.25);
  font-size: 0.75rem;
  color: #374151;
}
.footer-badges { display: flex; gap: 1.5rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: #374151;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-22px) scale(1.02); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,209,255,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(0,209,255,0); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes barFill {
  from { width: 0; }
}
@keyframes slideRight {
  from { transform: translateX(-16px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes counterUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes borderRotate {
  from { --angle: 0deg; }
  to   { --angle: 360deg; }
}
@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes blink {
  50% { border-color: transparent; }
}
@keyframes progressPulse {
  0%   { width: 0%; }
  100% { width: var(--target-width, 100%); }
}
@keyframes scanLine {
  0%   { top: 0; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes nodeGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(0,209,255,0.4)); }
  50%       { filter: drop-shadow(0 0 12px rgba(0,209,255,0.8)); }
}

/* ── Scroll Reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Shimmer Text ─────────────────────────────────────────── */
.shimmer-text {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 40%, var(--primary) 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ── Animated Gradient BG ─────────────────────────────────── */
.animated-gradient-bg {
  background: linear-gradient(270deg, #10141a, #0a1018, #0d1520, #10141a);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

/* ── Stats Ticker ─────────────────────────────────────────── */
.stat-item { animation: counterUp 0.6s ease both; }

/* ── Glow effects ─────────────────────────────────────────── */
.glow-cyan { text-shadow: 0 0 20px rgba(0,209,255,0.5); }
.glow-green { text-shadow: 0 0 20px rgba(0,226,147,0.5); }
.glow-box-cyan { box-shadow: 0 0 30px rgba(0,209,255,0.15); }
.glow-box-green { box-shadow: 0 0 30px rgba(0,226,147,0.15); }

/* ── Ping animation ───────────────────────────────────────── */
.ping { animation: ping 1.5s cubic-bezier(0,0,0.2,1) infinite; }

/* ── Range Input Styling ──────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-top);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-ctr);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(0,209,255,0.2);
  transition: box-shadow 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 6px rgba(0,209,255,0.3);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-ctr);
  cursor: pointer;
  border: none;
}

/* ── Tag / Badge ──────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.875rem;
  border-radius: 100px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tag-cyan {
  background: rgba(0,209,255,0.1);
  border: 1px solid rgba(0,209,255,0.2);
  color: var(--primary-dim);
}
.tag-green {
  background: rgba(0,226,147,0.1);
  border: 1px solid rgba(0,226,147,0.2);
  color: var(--secondary-dim);
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--outline) 30%, var(--outline) 70%, transparent);
  opacity: 0.4;
}

/* ── Section Spacing ──────────────────────────────────────── */
.section { padding: 7rem 2.5rem; }
.section-sm { padding: 4rem 2.5rem; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-header { max-width: 680px; margin: 0 auto 4rem; text-align: center; }
.section-header h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1rem; }
.section-header p { color: var(--text-body); font-size: 1.0625rem; line-height: 1.7; }

/* ── Origin note (index footer band) ─────────────────────── */
.origin-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-align: center;
}

/* ── Abstract identifier (team cards) ────────────────────── */
.abstract-id {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 4px,
    rgba(0,209,255,0.08) 4px,
    rgba(0,209,255,0.08) 8px
  );
}

/* ── Chart Bar ────────────────────────────────────────────── */
.bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary-ctr), var(--secondary-dim));
  animation: barFill 1.2s cubic-bezier(0.4, 0, 0.2, 1) both;
  transform-origin: left;
}

/* ── Capability Badge ─────────────────────────────────────── */
.capability-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ── Animated Dots ────────────────────────────────────────── */
.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  position: relative;
}
.dot-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--secondary);
  animation: ping 1.5s ease-out infinite;
}

/* ── Progress Bar ─────────────────────────────────────────── */
.progress-track {
  height: 4px;
  background: var(--surface-top);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary-ctr), var(--secondary-dim));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Tooltip ──────────────────────────────────────────────── */
.tooltip-wrap { position: relative; }
.tooltip-wrap:hover .tooltip { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--surface-top);
  border: 1px solid var(--outline);
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}

/* ── Selection ────────────────────────────────────────────── */
::selection { background: rgba(0,209,255,0.25); color: var(--text); }

/* ── Loading Spinner ──────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0,209,255,0.2);
  border-top-color: var(--primary-ctr);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Noise texture overlay ────────────────────────────────── */
.noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

/* ============================================================
   V2 — Minimal Design Extensions
   ============================================================ */

/* ── Interior page hero (no canvas, minimal orb) ─────────── */
.page-hero {
  padding: calc(var(--nav-h) + 5rem) 2.5rem 4.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero-centered { text-align: center; }
.page-hero-centered .page-hero-inner { max-width: 720px; margin: 0 auto; }

/* ── Minimal card (no glass blur, no glow) ────────────────── */
.minimal-card {
  background: rgba(14,18,26,0.7);
  border: 1px solid rgba(60,73,78,0.3);
  border-radius: var(--radius-card);
  transition: border-color 0.2s;
}
.minimal-card:hover { border-color: rgba(60,73,78,0.6); }

/* ── Comparison table ─────────────────────────────────────── */
.compare-table-wrap {
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid rgba(60,73,78,0.3);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
.compare-table thead tr { background: rgba(10,14,20,0.95); }
.compare-table th {
  padding: 1rem 1.25rem;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  border-bottom: 1px solid rgba(60,73,78,0.4);
  white-space: nowrap;
}
.compare-table th:first-child { text-align: left; min-width: 220px; }
.compare-table th.col-strat { color: #4cd6ff; background: rgba(0,209,255,0.06); border-left: 1px solid rgba(0,209,255,0.15); border-right: 1px solid rgba(0,209,255,0.15); }
.compare-table td {
  padding: 0.875rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid rgba(60,73,78,0.12);
  font-size: 0.8125rem;
  color: #4b5563;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: rgba(255,255,255,0.012); }
.compare-table td:first-child { text-align: left; color: var(--text-muted); font-size: 0.875rem; }
.compare-table td.col-strat { background: rgba(0,209,255,0.03); border-left: 1px solid rgba(0,209,255,0.1); border-right: 1px solid rgba(0,209,255,0.1); }
.cell-yes  { color: #00e293; font-weight: 700; font-size: 1rem; }
.cell-no   { color: #374151; font-size: 1rem; }
.cell-note { color: #6b7280; font-size: 0.75rem; font-weight: 600; }

/* ── Blog filter tabs ─────────────────────────────────────── */
.filter-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-tab {
  cursor: pointer;
  padding: 0.4375rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(60,73,78,0.4);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  user-select: none;
}
.filter-tab:hover, .filter-tab.active {
  color: var(--primary-dim);
  border-color: rgba(0,209,255,0.3);
  background: rgba(0,209,255,0.06);
}

/* ── Article card ─────────────────────────────────────────── */
.article-card {
  background: rgba(14,18,26,0.7);
  border: 1px solid rgba(60,73,78,0.25);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover { border-color: rgba(60,73,78,0.55); }
.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  font-size: 0.75rem;
  color: #4b5563;
}
.article-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  color: var(--text);
  transition: color 0.2s;
}
.article-card:hover h3 { color: var(--primary); }
.article-card p { font-size: 0.875rem; color: #6b7280; line-height: 1.7; flex: 1; }
.article-card-footer { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(60,73,78,0.2); font-size: 0.75rem; color: #374151; }

/* ── Featured article card ────────────────────────────────── */
.featured-article {
  background: rgba(14,18,26,0.7);
  border: 1px solid rgba(60,73,78,0.3);
  border-radius: 1.25rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 768px) { .featured-article { grid-template-columns: 1fr; } }
.featured-article-body { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.featured-article-visual {
  background: rgba(10,14,20,0.8);
  border-left: 1px solid rgba(60,73,78,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

/* ── Role card ────────────────────────────────────────────── */
.role-card {
  background: rgba(14,18,26,0.7);
  border: 1px solid rgba(60,73,78,0.3);
  border-radius: var(--radius-card);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transition: border-color 0.2s;
}
.role-card:hover { border-color: rgba(0,209,255,0.25); }
@media (max-width: 640px) { .role-card { flex-direction: column; align-items: flex-start; gap: 1rem; } }

/* ── Milestone row ────────────────────────────────────────── */
.milestone-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(60,73,78,0.15);
}
.milestone-row:last-child { border-bottom: none; }
.milestone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-ctr);
  margin-top: 5px;
  flex-shrink: 0;
}

/* ── Responsive footer grid (V2 5-col) ───────────────────── */
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
@media (max-width: 768px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px)  { .footer-grid { grid-template-columns: 1fr; } }

/* ── Language Switcher ────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-btn {
  padding: 0.3125rem 0.625rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}
.lang-btn:first-child { border-right: 1px solid rgba(255,255,255,0.1); }
.lang-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.lang-btn.active { color: var(--primary-dim); background: rgba(0,209,255,0.08); }
@media (max-width: 768px) { .lang-switcher { display: none; } }


/* ═══════════════════════════════════════════════════════════
   LIGHT MODE
   Applied via html.light-mode (avoids breaking position:fixed)
   ═══════════════════════════════════════════════════════════ */
html.light-mode {
  --surface:      #f5f7fa;
  --surface-low:  #edf0f5;
  --surface-mid:  #e4e8f0;
  --surface-hi:   #d9dfe8;
  --surface-top:  #cdd4e0;
  --outline:      rgba(0,0,0,0.09);
  --text:         #0d1117;
  --text-muted:   #4a5568;
}

html.light-mode body {
  background-color: var(--surface);
  color: var(--text);
}

html.light-mode .grid-bg {
  background-image:
    linear-gradient(rgba(0,0,0,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Nav */
html.light-mode #site-nav {
  background: rgba(245,247,250,0.92);
  border-bottom-color: rgba(0,0,0,0.08);
}
html.light-mode #site-nav.scrolled {
  background: rgba(245,247,250,0.98);
}
html.light-mode .mobile-menu {
  background: rgba(245,247,250,0.99);
  border-bottom-color: rgba(0,0,0,0.09);
}
html.light-mode .mobile-menu a { border-bottom-color: rgba(0,0,0,0.07); }

/* Footer */
html.light-mode #site-footer {
  background: #edf0f5;
  border-top-color: rgba(0,0,0,0.08);
}

/* Cards */
html.light-mode .minimal-card {
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,0,0,0.1);
}
html.light-mode .minimal-card:hover { border-color: rgba(0,0,0,0.18); }
html.light-mode .glass-card,
html.light-mode .glass,
html.light-mode .glass-strong {
  background: rgba(255,255,255,0.65);
  border-color: rgba(0,0,0,0.08);
}
html.light-mode .article-card,
html.light-mode .featured-article {
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,0,0,0.1);
}
html.light-mode .article-card:hover,
html.light-mode .featured-article:hover { border-color: rgba(0,0,0,0.18); }
html.light-mode .role-card {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.1);
}

/* Compare table */
html.light-mode .compare-table-wrap { border-color: rgba(0,0,0,0.12); }
html.light-mode .compare-table thead tr { background: rgba(0,0,0,0.03); }
html.light-mode .compare-table th { border-bottom-color: rgba(0,0,0,0.1); }
html.light-mode .compare-table td { border-bottom-color: rgba(0,0,0,0.05); }
html.light-mode .compare-table tr:hover td { background: rgba(0,0,0,0.015); }

/* Buttons */
html.light-mode .btn-ghost {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: var(--text);
}
html.light-mode .btn-ghost:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.22);
}

/* Filter tabs */
html.light-mode .filter-tab {
  border-color: rgba(0,0,0,0.15);
  color: #4a5568;
}

/* Lang switcher */
html.light-mode .lang-switcher { border-color: rgba(0,0,0,0.12); }
html.light-mode .lang-btn:first-child { border-right-color: rgba(0,0,0,0.12); }
html.light-mode .lang-btn:hover { background: rgba(0,0,0,0.04); color: var(--text); }

/* Theme button */
html.light-mode .theme-btn { border-color: rgba(0,0,0,0.12); }
html.light-mode .theme-btn:hover { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.18); }
html.light-mode .theme-icon-dark { display: none; }
html.light-mode .theme-icon-light { display: flex; }

/* Divider */
html.light-mode .divider {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.1) 70%, transparent);
}

/* Scrollbar */
html.light-mode ::-webkit-scrollbar-track { background: var(--surface-low); }
html.light-mode ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
html.light-mode ::-webkit-scrollbar-thumb:hover { background: var(--primary-dim); }

/* ── Inline text color overrides ──────────────────────────
   Inline styles beat class selectors, so we use [style*=]
   attribute selectors + !important to override hardcoded
   light-on-dark text colors that become invisible in light mode.
   ─────────────────────────────────────────────────────────── */

/* #bbc9cf — primary body text (near-white on dark) */
html.light-mode [style*="color:#bbc9cf"],
html.light-mode [style*="color: #bbc9cf"]  { color: #334155 !important; }

/* #e8eaed — brightest text */
html.light-mode [style*="color:#e8eaed"],
html.light-mode [style*="color: #e8eaed"]  { color: #0f172a !important; }

/* #8a939c — text-muted value */
html.light-mode [style*="color:#8a939c"],
html.light-mode [style*="color: #8a939c"]  { color: #475569 !important; }

/* SVG text fills */
html.light-mode [fill="#bbc9cf"],
html.light-mode [fill="#e8eaed"],
html.light-mode [fill="#8a939c"]            { fill: #475569; }

/* Page-specific CSS classes that hardcode light colors */
html.light-mode .hero-sub                   { color: #475569 !important; }
html.light-mode .section-header p           { color: #475569 !important; }
html.light-mode .stat-label                 { color: #64748b !important; }
html.light-mode .footer-brand p             { color: #64748b !important; }
html.light-mode .footer-col a               { color: #64748b !important; }
html.light-mode .footer-bottom              { color: #64748b !important; }
html.light-mode .badge                      { color: #64748b !important; }

/* Mobile menu links */
html.light-mode .mobile-menu a             { color: #475569 !important; }
html.light-mode .mobile-menu a:hover       { color: var(--primary-ctr) !important; }

/* Article cards */
html.light-mode .article-card p            { color: #475569 !important; }
html.light-mode .article-card-meta         { color: #64748b !important; }
html.light-mode .article-card-footer       { color: #94a3b8 !important; }
html.light-mode .article-card h3           { color: var(--text) !important; }
