/* ==========================================================================
   PORTFOLIO DESIGN SYSTEM & CSS STYLESHEET
   Multi-Page HTML Architecture — Tight Interlinking & SEO Optimized
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Color Tokens */
  --bg-dark: #070a12;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-card-solid: #0f172a;
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-bright: rgba(56, 189, 248, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-purple: #c084fc;
  --accent-emerald: #34d399;
  --accent-rose: #f43f5e;
  --accent-amber: #fbbf24;

  --gradient-glow: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.15));
  --gradient-text: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --gradient-micro: linear-gradient(135deg, #34d399 0%, #38bdf8 100%);
  --gradient-android: linear-gradient(135deg, #34d399 0%, #a3e635 100%);
  --gradient-mobile: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  --gradient-blockchain: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  --gradient-math: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --gradient-physics: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-tools: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
  --gradient-algos: linear-gradient(135deg, #f43f5e 0%, #fbbf24 100%);
  --gradient-cloud: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  --gradient-pub: linear-gradient(135deg, #f472b6 0%, #a855f7 100%);
  --gradient-web: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #06b6d4 100%);
  --gradient-ops: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(129, 140, 248, 0.1));

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-glow: 0 0 35px -5px rgba(56, 189, 248, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(129, 140, 248, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(52, 211, 153, 0.05) 0%, transparent 50%),
    var(--bg-dark);
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Top Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-card);
  transition: var(--transition-fast);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-image {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  display: block;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   VERTICAL BRAND SPINE (Book Spine Style Left Strip)
   ========================================================================== */
.vertical-brand-spine {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: rgba(8, 12, 22, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 1.5rem 0;
  user-select: none;
  box-shadow: 3px 0 20px rgba(0, 0, 0, 0.4);
  overflow: visible;
}

.spine-logo-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 104px;
  height: 104px;
  margin-top: 10px;
  margin-left: 14px;
  margin-bottom: 2rem;
  z-index: 1005;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.spine-logo-link:hover {
  transform: scale(1.06);
}

.spine-logo-img {
  width: 104px;
  height: 104px;
  max-width: 104px;
  max-height: 104px;
  border-radius: var(--radius-md);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 18px rgba(56, 189, 248, 0.4));
}

.spine-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  text-decoration: none;
  margin-top: auto;
  margin-bottom: auto;
  padding: 1rem 0;
}

.spine-col {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.spine-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
  transition: var(--transition-base);
}

.spine-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
  transition: var(--transition-base);
}

.spine-link:hover .spine-name {
  color: var(--accent-cyan);
}

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

.spine-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-base);
  margin-top: auto;
}

.spine-social-link:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.spine-social-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Offset body when vertical spine is active on desktop */
@media (min-width: 1024px) {
  body {
    padding-left: 80px;
  }
  .navbar .brand-logo {
    display: none;
  }
  .navbar .nav-container {
    max-width: 100%;
    justify-content: center;
    padding: 0 1.5rem;
  }
}

/* Hide vertical spine on smaller viewports */
@media (max-width: 1023px) {
  .vertical-brand-spine {
    display: none;
  }
  body {
    padding-left: 0;
  }
  .navbar .brand-logo {
    display: flex;
  }
}

/* Multi-Page Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid var(--border-card);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

/* Compact navigation tabs on mid-size desktop screens (1024px - 1320px) */
@media (min-width: 1024px) and (max-width: 1320px) {
  .tab-btn {
    padding: 5px 9px;
    font-size: 0.82rem;
    gap: 0.25rem;
  }
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(129, 140, 248, 0.25));
  border-color: var(--border-card-bright);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 10px rgba(56, 189, 248, 0.2);
}

.tab-badge {
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-badge.micro { background: rgba(52, 211, 153, 0.2); color: var(--accent-emerald); border-color: rgba(52, 211, 153, 0.3); }
.tab-badge.android { background: rgba(163, 230, 53, 0.2); color: #a3e635; border-color: rgba(163, 230, 53, 0.3); }
.tab-badge.mobile { background: rgba(56, 189, 248, 0.2); color: var(--accent-cyan); border-color: rgba(56, 189, 248, 0.3); }
.tab-badge.blockchain { background: rgba(251, 191, 36, 0.2); color: var(--accent-amber); border-color: rgba(251, 191, 36, 0.3); }
.tab-badge.algos { background: rgba(244, 63, 94, 0.2); color: var(--accent-rose); border-color: rgba(244, 63, 94, 0.3); }
.tab-badge.cloud { background: rgba(129, 140, 248, 0.2); color: var(--accent-indigo); border-color: rgba(129, 140, 248, 0.3); }
.tab-badge.math { background: rgba(168, 85, 247, 0.2); color: var(--accent-purple); border-color: rgba(168, 85, 247, 0.3); }
.tab-badge.physics { background: rgba(6, 182, 212, 0.2); color: #06b6d4; border-color: rgba(6, 182, 212, 0.3); }
.tab-badge.tools { background: rgba(56, 189, 248, 0.2); color: var(--accent-cyan); border-color: rgba(56, 189, 248, 0.3); }
.tab-badge.web { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border-color: rgba(56, 189, 248, 0.3); }
.tab-badge.ops { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.tab-badge.pub { background: rgba(244, 114, 182, 0.2); color: #f472b6; border-color: rgba(244, 114, 182, 0.3); }

/* Navigation Dropdown Menus */
.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.dropdown-arrow {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.active .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 320px;
  width: max-content;
  max-width: 420px;
  background: #0f172a;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card-bright);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.15);
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1000;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Show on hover (desktop) or when .open is toggled */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  display: flex;
}

/* Right-align trailing dropdown menu to prevent viewport overflow */
.nav-dropdown:last-child .dropdown-menu {
  left: auto;
  right: 0;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  white-space: nowrap;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(56, 189, 248, 0.12);
  color: var(--text-primary);
}

.dropdown-item.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--text-primary);
  font-weight: 700;
  border-left: 3px solid var(--accent-cyan);
}

/* Compact Hero Banner (2x Reduced Heading Height) */
.hero {
  padding: 1.5rem 0 1.25rem;
  position: relative;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 2.25rem;
  align-items: start;
  position: relative;
}

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

.hero-focus-anchor {
  position: relative;
  width: 100%;
}

/* Small Panel at Top Right (Executive Fast-Track Focus) */
.hero-focus-panel {
  position: relative;
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card-bright);
  border-radius: 14px;
  padding: 0.95rem 1.05rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-focus-panel:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.focus-panel-header {
  margin-bottom: 0.65rem;
}

.focus-panel-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-indigo);
  margin-bottom: 0.25rem;
}

.focus-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-indigo);
  box-shadow: 0 0 6px var(--accent-indigo);
  animation: pulseGlow 2s infinite;
}

.focus-panel-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

.focus-pills-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.focus-role-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  position: relative;
}

.focus-role-pill .pill-leading {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.focus-role-pill .pill-icon {
  font-size: 0.95rem;
}

.focus-role-pill .pill-indicator {
  font-size: 0.7rem;
  opacity: 0;
  transform: translateX(4px);
  transition: all 0.2s ease;
  color: inherit;
}

.focus-role-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: translateX(-2px);
}

/* Individual Pill Color Accents */
.focus-role-pill.pill-indigo {
  border-color: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}
.focus-role-pill.pill-indigo:hover,
.focus-role-pill.pill-indigo.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-indigo);
  color: #ffffff;
}

.focus-role-pill.pill-emerald {
  border-color: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}
.focus-role-pill.pill-emerald:hover,
.focus-role-pill.pill-emerald.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-emerald);
  color: #ffffff;
}

.focus-role-pill.pill-amber {
  border-color: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}
.focus-role-pill.pill-amber:hover,
.focus-role-pill.pill-amber.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-amber);
  color: #ffffff;
}

.focus-role-pill.active .pill-indicator {
  opacity: 1;
  transform: translateX(0);
}

/* Details Flyout (Floats to the LEFT of the pills panel over page text) */
.focus-details-flyout {
  display: none;
}

@media (min-width: 992px) {
  .focus-details-flyout {
    position: absolute;
    right: calc(100% + 14px);
    top: 0;
    width: 440px;
    max-width: calc(100vw - 420px);
    z-index: 80;
    background: rgba(11, 17, 33, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-card-bright);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(99, 102, 241, 0.35);
    animation: flyoutSlideLeft 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

.focus-details-flyout.active {
  display: block !important;
}

@keyframes flyoutSlideLeft {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.focus-flyout-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 2;
}

.focus-flyout-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
  transform: scale(1.08);
}

/* Individual Pathway Content: Strictly hidden unless active */
.focus-pathway-content {
  display: none !important;
  flex-direction: column;
  gap: 0.55rem;
}

.focus-pathway-content.active {
  display: flex !important;
  animation: pathwayFadeIn 0.2s ease;
}

@keyframes pathwayFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.focus-pathway-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-right: 1.75rem; /* Room for close button */
}

.focus-pathway-icon {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.focus-role-heading {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}

.focus-role-heading.role-indigo {
  color: var(--accent-indigo);
}

.focus-role-heading.role-emerald {
  color: var(--accent-emerald);
}

.focus-role-heading.role-amber {
  color: var(--accent-amber);
}

.focus-pathway-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.focus-pathway-desc {
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.focus-metric-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.focus-pathway-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

@media (max-width: 991px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .hero-focus-anchor {
    width: 100%;
  }
  .hero-focus-panel {
    width: 100%;
  }
  .focus-details-flyout {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    max-width: 100%;
    margin-top: 0.75rem;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: pathwayFadeIn 0.22s ease;
  }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  margin-right: 0.3rem;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.hero-title {
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.gradient-text { background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-micro-text { background: var(--gradient-micro); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-android-text { background: var(--gradient-android); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-mobile-text { background: var(--gradient-mobile); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-blockchain-text { background: var(--gradient-blockchain); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-math-text { background: var(--gradient-math); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-physics-text { background: var(--gradient-physics); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-tools-text { background: var(--gradient-tools); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-algos-text { background: var(--gradient-algos); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-cloud-text { background: var(--gradient-cloud); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-web-text { background: var(--gradient-web); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-ops-text { background: var(--gradient-ops); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-pub-text { background: var(--gradient-pub); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.hero-description {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 100%;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

/* Key Metrics Stats Bar */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-card-bright);
  box-shadow: var(--shadow-glow);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-text);
  opacity: 0.7;
}

.stat-card.micro::before { background: var(--gradient-micro); }
.stat-card.android::before { background: var(--gradient-android); }
.stat-card.mobile::before { background: var(--gradient-mobile); }
.stat-card.blockchain::before { background: var(--gradient-blockchain); }
.stat-card.math::before { background: var(--gradient-math); }
.stat-card.physics::before { background: var(--gradient-physics); }
.stat-card.tools::before { background: var(--gradient-tools); }
.stat-card.algos::before { background: var(--gradient-algos); }
.stat-card.cloud::before { background: var(--gradient-cloud); }
.stat-card.web::before { background: var(--gradient-web); }
.stat-card.ops::before { background: var(--gradient-ops); }
.stat-card.pub::before { background: var(--gradient-pub); }

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-subtext {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-top: 0.25rem;
}

/* Section Cards & Layout */
.section-header {
  margin-bottom: 1.25rem;
}

.section-tag {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: block;
  padding: 0.4rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  max-width: 100%;
}

.card .section-desc,
.card > .section-desc,
.section-desc.full-width {
  max-width: 100%;
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Content Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.card-header-inline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.card-header-inline .card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}
.card-header-inline .card-title {
  margin-bottom: 0;
}

.card-text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Feature Bullet Points */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.feature-check {
  color: var(--accent-emerald);
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 3px;
  font-size: 0.95rem;
}

.feature-text {
  flex: 1;
}

.feature-title {
  color: var(--text-primary);
  font-weight: 700;
  margin-right: 0.35rem;
}

/* Tech Badges / Tags */
.tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-cyan);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tag.android { color: #a3e635; border-color: rgba(163, 230, 53, 0.25); }
.tag.blockchain { color: var(--accent-amber); border-color: rgba(251, 191, 36, 0.25); }
.tag.security { color: var(--accent-rose); border-color: rgba(244, 63, 94, 0.25); }
.tag.aidl { color: var(--accent-purple); border-color: rgba(192, 132, 252, 0.25); }
.tag.math { color: var(--accent-purple); border-color: rgba(168, 85, 247, 0.25); }
.tag.physics { color: #06b6d4; border-color: rgba(6, 182, 212, 0.25); }
.tag.tools { color: var(--accent-cyan); border-color: rgba(56, 189, 248, 0.25); }
.tag.algos { color: var(--accent-rose); border-color: rgba(244, 63, 94, 0.25); }
.tag.cloud { color: var(--accent-indigo); border-color: rgba(129, 140, 248, 0.25); }
.tag.ops { color: #f59e0b; border-color: rgba(245, 158, 11, 0.25); }
.tag.pub { color: #f472b6; border-color: rgba(244, 114, 182, 0.25); background: rgba(244, 114, 182, 0.1); }
.tag.upstream { color: #f472b6; border-color: rgba(244, 114, 182, 0.25); background: rgba(244, 114, 182, 0.1); }

/* Publications Filter Pills & Card List */
.pub-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.pub-filter-btn {
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pub-filter-btn:hover, .pub-filter-btn.active {
  background: rgba(244, 114, 182, 0.2);
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.4);
}

.pub-list { display: flex; flex-direction: column; gap: 1rem; }

.pub-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pub-card:hover {
  border-color: rgba(244, 114, 182, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.pub-card-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; }

.pub-type-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.pub-type-badge.patent { background: rgba(251, 191, 36, 0.15); color: var(--accent-amber); border-color: rgba(251, 191, 36, 0.3); }
.pub-type-badge.journal { background: rgba(52, 211, 153, 0.15); color: var(--accent-emerald); border-color: rgba(52, 211, 153, 0.3); }
.pub-type-badge.thesis { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); border-color: rgba(168, 85, 247, 0.3); }

.pub-citations {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #f472b6;
  background: rgba(244, 114, 182, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(244, 114, 182, 0.25);
}

.pub-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); line-height: 1.35; }
.pub-authors { font-size: 0.85rem; color: var(--text-secondary); }
.pub-venue { font-size: 0.82rem; color: var(--accent-cyan); font-style: italic; }

/* =========================================================================
   ACADEMIC DILIGENCE DOSSIER (PUBLICATIONS & RESEARCH PROFILES)
   ========================================================================= */
.academic-dossier-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.academic-dossier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.academic-dossier-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 580px;
}

.academic-dossier-icon {
  font-size: 2rem;
  line-height: 1;
  padding: 0.6rem;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.academic-dossier-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.academic-dossier-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-top: 0.2rem;
}

.academic-dossier-downloads {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dossier-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-base);
}

.dossier-btn.primary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #ffffff;
}

.dossier-btn.primary:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.4));
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.dossier-btn.secondary {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
}

.dossier-btn.secondary:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.academic-badge-row {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
}

.academic-profile-badge {
  flex: 1;
  min-width: 240px;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  text-decoration: none;
  transition: var(--transition-base);
}

.academic-profile-badge:hover {
  transform: translateY(-2px);
}

.academic-profile-badge.scholar:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.academic-profile-badge.orcid:hover {
  border-color: rgba(166, 206, 57, 0.6);
  background: rgba(166, 206, 57, 0.12);
  box-shadow: 0 4px 15px rgba(166, 206, 57, 0.2);
}

.badge-icon {
  font-size: 1.35rem;
}

.badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.badge-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-detail {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.badge-arrow {
  color: var(--text-muted);
  font-size: 1rem;
}

.academic-profile-badge:hover .badge-arrow {
  color: var(--accent-cyan);
}

/* Upstream Open Source Attribution Box */
.attribution-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.attribution-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; }

.attribution-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-indigo);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.upstream-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition-fast);
}

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

.github-repo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.github-repo-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.octocat-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.attribution-desc { font-size: 0.85rem; line-height: 1.45; color: var(--text-secondary); }

.attribution-contribution {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-primary);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-cyan);
}

html {
  scroll-behavior: smooth;
}

.card[id], [id^="detail-"], .attribution-box[id] {
  scroll-margin-top: 5.5rem;
}

/* Table of Contents (TOC) Cards Grid */
.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.toc-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.toc-card:hover {
  border-color: var(--border-card-bright);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}

.toc-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }

.toc-card-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.toc-card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-primary); }
.toc-card-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 1rem; }

.toc-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-card);
}

.view-detail-btn, .view-subpage-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition-fast);
}

.toc-card:hover .view-detail-btn,
.toc-card:hover .view-subpage-btn { transform: translateY(2px); color: var(--accent-cyan); }

/* Sub-Page Detail View Panel */
.subpage-container {
  display: none;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card-bright);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-top: 1.5rem;
  animation: fadeIn 0.4s ease-out forwards;
}

.subpage-container.active { display: block; }

.subpage-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1.25rem;
  transition: var(--transition-fast);
}

.subpage-back-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
  border-color: var(--border-card-bright);
}

/* Pipeline System & Visualizers */
.pipeline-container {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin: 1.75rem 0;
  position: relative;
  overflow: hidden;
}

.pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 0.75rem;
}

.pipeline-title { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 0.6rem; color: var(--text-primary); }

.pipeline-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; position: relative; }

@media (max-width: 1024px) { .pipeline-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pipeline-steps { grid-template-columns: 1fr; } }

.pipeline-step {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  transition: var(--transition-normal);
}

.pipeline-step:hover { border-color: var(--accent-cyan); transform: translateY(-2px); }

.step-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.step-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; color: var(--text-primary); }
.step-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }

/* Image & Plot Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-card-bright);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.gallery-image-wrapper {
  width: 100%;
  height: 180px;
  background: #030712;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-card);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: var(--transition-normal);
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 18, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.gallery-card:hover .gallery-overlay { opacity: 1; }

.zoom-btn {
  padding: 6px 14px;
  background: var(--accent-cyan);
  color: #070a12;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.gallery-content { padding: 1rem; display: flex; flex-direction: column; flex-grow: 1; }
.gallery-tag { font-size: 0.7rem; font-family: var(--font-mono); color: var(--accent-cyan); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.gallery-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }
.gallery-caption { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; }

/* Full-Width Architecture Diagram Card */
.diagram-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: var(--transition-normal);
  cursor: default;
  margin-top: 1.5rem;
}

.diagram-card:hover {
  border-color: var(--border-card-bright);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

/* Interactive Map Top Banner */
.diagram-interactive-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.15rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--border-card);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.02em;
  user-select: none;
}

.diagram-interactive-banner .interactive-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  display: inline-block;
  animation: pulse-ring 2s infinite ease-in-out;
  flex-shrink: 0;
}

.diagram-image-wrapper {
  width: 100%;
  aspect-ratio: 1000 / 520;
  background: #070b14;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-card);
}

.diagram-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition-normal);
}

.inlined-architecture-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Interactive SVG Node Components */
.diagram-interactive-node {
  cursor: pointer;
  transition: filter 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}

.diagram-interactive-node:hover,
.diagram-interactive-node.active-node {
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.8)) brightness(1.15);
}

.diagram-interactive-node.pinned-node {
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.95)) brightness(1.22);
}

/* Floating / Docked Component Inspection Dossier Card */
.diagram-inspect-card {
  position: absolute;
  top: 1.25rem;
  width: 390px;
  max-width: calc(100% - 2.5rem);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card-bright);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(56, 189, 248, 0.15);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.diagram-inspect-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.diagram-inspect-card.pinned {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(168, 85, 247, 0.25);
}

.diagram-inspect-card.theme-purple.pinned {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(168, 85, 247, 0.25);
}

.diagram-inspect-card.theme-emerald.pinned {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(16, 185, 129, 0.25);
}

.diagram-inspect-card.theme-amber.pinned {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(245, 158, 11, 0.25);
}

.diagram-inspect-card.theme-indigo.pinned {
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(99, 102, 241, 0.25);
}

.diagram-inspect-card.theme-cyan.pinned {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 189, 248, 0.25);
}

.diagram-inspect-card.theme-rose.pinned {
  border-color: rgba(244, 63, 94, 0.65);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(244, 63, 94, 0.25);
}

.diagram-inspect-card.theme-lime.pinned {
  border-color: rgba(163, 230, 53, 0.65);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 24px rgba(163, 230, 53, 0.25);
}

/* Card Header */
.inspect-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.inspect-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inspect-stage-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.diagram-inspect-card.theme-purple .inspect-stage-badge {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border-color: rgba(168, 85, 247, 0.35);
}

.diagram-inspect-card.theme-emerald .inspect-stage-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.35);
}

.diagram-inspect-card.theme-amber .inspect-stage-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.35);
}

.diagram-inspect-card.theme-indigo .inspect-stage-badge {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
  border-color: rgba(99, 102, 241, 0.35);
}

.diagram-inspect-card.theme-cyan .inspect-stage-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.35);
}

.diagram-inspect-card.theme-rose .inspect-stage-badge {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.35);
}

.diagram-inspect-card.theme-lime .inspect-stage-badge {
  background: rgba(163, 230, 53, 0.15);
  color: #a3e635;
  border-color: rgba(163, 230, 53, 0.35);
}

.inspect-pinned-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.diagram-inspect-card.theme-purple .inspect-pinned-pill {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
}

.diagram-inspect-card.theme-emerald .inspect-pinned-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.4);
}

.diagram-inspect-card.theme-amber .inspect-pinned-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.4);
}

.diagram-inspect-card.theme-indigo .inspect-pinned-pill {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.4);
}

.diagram-inspect-card.theme-cyan .inspect-pinned-pill {
  background: rgba(56, 189, 248, 0.2);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.4);
}

.diagram-inspect-card.theme-rose .inspect-pinned-pill {
  background: rgba(244, 63, 94, 0.2);
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.4);
}

.diagram-inspect-card.theme-lime .inspect-pinned-pill {
  background: rgba(163, 230, 53, 0.2);
  color: #d9f99d;
  border-color: rgba(163, 230, 53, 0.4);
}

.diagram-inspect-card.theme-purple .inspect-action-link { color: var(--accent-purple); }
.diagram-inspect-card.theme-emerald .inspect-action-link { color: var(--accent-emerald); }
.diagram-inspect-card.theme-amber .inspect-action-link { color: var(--accent-amber); }
.diagram-inspect-card.theme-indigo .inspect-action-link { color: var(--accent-indigo); }
.diagram-inspect-card.theme-cyan .inspect-action-link { color: var(--accent-cyan); }
.diagram-inspect-card.theme-rose .inspect-action-link { color: var(--accent-rose); }
.diagram-inspect-card.theme-lime .inspect-action-link { color: #a3e635; }

.inspect-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.inspect-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* Card Title */
.inspect-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

/* Metrics Strip */
.inspect-metrics-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.inspect-metric-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}

/* Card Body Summary */
.inspect-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0.15rem 0 0 0;
}

/* Card Footer */
.inspect-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-card);
  padding-top: 0.65rem;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.4rem;
}

.inspect-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-cyan);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-fast);
}

.inspect-action-link:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* Disabled old generic overlay */
.diagram-overlay {
  display: none !important;
}

.diagram-content {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.diagram-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.diagram-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.diagram-caption {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Lightbox Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-container {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card-bright);
  border-radius: var(--radius-xl);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--shadow-glow);
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-group { display: flex; flex-direction: column; }
.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-subtitle { font-size: 0.78rem; color: var(--accent-cyan); font-family: var(--font-mono); }

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.modal-close:hover { background: var(--accent-rose); color: white; }

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.modal-image {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: #030712;
}

.modal-description {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Code Snippet Box */
.code-block {
  background: #030712;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 1rem 0;
  font-family: var(--font-mono);
}

.code-header {
  background: rgba(15, 23, 42, 0.9);
  padding: 6px 14px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-lang { color: var(--accent-cyan); font-weight: 600; }
.code-content { padding: 1rem; overflow-x: auto; font-size: 0.85rem; line-height: 1.55; color: #e2e8f0; }

.kw { color: #f43f5e; font-weight: 600; }
.fn { color: #38bdf8; }
.str { color: #34d399; }
.cm { color: #64748b; font-style: italic; }
.num { color: #fbbf24; }

/* Callout Box */
.callout {
  background: rgba(56, 189, 248, 0.08);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem;
  margin: 1.25rem 0;
}

.callout.android { background: rgba(163, 230, 53, 0.08); border-left-color: #a3e635; }
.callout.blockchain { background: rgba(251, 191, 36, 0.08); border-left-color: var(--accent-amber); }
.callout.math { background: rgba(168, 85, 247, 0.08); border-left-color: var(--accent-purple); }
.callout.physics { background: rgba(6, 182, 212, 0.08); border-left-color: #06b6d4; }
.callout.tools { background: rgba(56, 189, 248, 0.08); border-left-color: var(--accent-cyan); }
.callout.algos { background: rgba(244, 63, 94, 0.08); border-left-color: var(--accent-rose); }
.callout.cloud { background: rgba(129, 140, 248, 0.08); border-left-color: var(--accent-indigo); }

.callout-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.callout.android .callout-title { color: #a3e635; }
.callout.blockchain .callout-title { color: var(--accent-amber); }
.callout.math .callout-title { color: var(--accent-purple); }
.callout.physics .callout-title { color: #06b6d4; }
.callout.tools .callout-title { color: var(--accent-cyan); }
.callout.algos .callout-title { color: var(--accent-rose); }
.callout.cloud .callout-title { color: var(--accent-indigo); }

.callout-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }

/* Domain Card Links */
.domain-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid var(--border-card-bright);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  margin-top: 1rem;
}

.domain-card-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(129, 140, 248, 0.4));
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.domain-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.domain-card:hover {
  border-color: var(--border-card-bright);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.domain-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.domain-badge.active {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(52, 211, 153, 0.3);
}

/* Static domain artwork replaces the earlier shared-renderer previews. */
.domain-card[data-scene] {
  isolation: isolate;
}

.domain-card[data-scene] > .card-icon {
  display: none;
}

.domain-visual {
  position: relative;
  height: 150px;
  flex: 0 0 150px;
  margin: -1.35rem -1.35rem 1.15rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(56, 189, 248, 0.16);
  background:
    radial-gradient(circle at 24% 35%, rgba(56, 189, 248, 0.14), transparent 34%),
    radial-gradient(circle at 78% 42%, rgba(168, 85, 247, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(7, 12, 25, 0.72), rgba(9, 17, 31, 0.95));
}

.domain-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%);
  z-index: 1;
}

.domain-visual::after {
  content: attr(data-kicker);
  position: absolute;
  left: 1rem;
  bottom: 0.68rem;
  z-index: 60;
  color: rgba(226, 232, 240, 0.72);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 8px #020617;
}

.domain-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.04) brightness(0.76);
  transform: scale(1.01);
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 400ms ease;
}

.domain-picture-left img {
  object-position: 28% center;
}

.domain-picture::before {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.05) 35%, rgba(2, 6, 23, 0.7) 100%),
    linear-gradient(rgba(56, 189, 248, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.035) 1px, transparent 1px);
  background-size: auto, 22px 22px, 22px 22px;
}

.domain-card:hover .domain-picture img,
.domain-card:focus-within .domain-picture img {
  transform: scale(1.045);
  filter: saturate(0.98) contrast(1.06) brightness(0.88);
}

.domain-card[data-scene] .domain-badge {
  z-index: 60;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 5px 18px rgba(2, 6, 23, 0.28);
}

.domain-card[data-scene] .card-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.domain-card[data-scene]:hover .domain-visual,
.domain-card[data-scene].scene-active .domain-visual {
  border-bottom-color: rgba(56, 189, 248, 0.42);
  background:
    radial-gradient(circle at 24% 35%, rgba(56, 189, 248, 0.21), transparent 36%),
    radial-gradient(circle at 78% 42%, rgba(168, 85, 247, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(7, 12, 25, 0.7), rgba(9, 17, 31, 0.94));
}

@media (max-width: 640px) {
  .domain-visual {
    height: 128px;
    flex-basis: 128px;
  }

  .domain-card[data-scene] .card-text {
    -webkit-line-clamp: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .domain-card[data-scene]:hover {
    transform: none;
  }
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* Footer */
.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border-card);
  background: rgba(7, 10, 18, 0.96);
  padding: 3.5rem 0 2rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

.footer-cta-card {
  width: 100%;
  max-width: 860px;
  text-align: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 27, 75, 0.45) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.footer-cta-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.footer-cta-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.footer-cta-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-wrap: pretty;
}

.footer-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.4rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: var(--transition-base);
}

.footer-cta-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent-indigo);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.footer-cta-bullet {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.footer-bottom-bar {
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links { display: flex; gap: 1.25rem; }

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-link:hover { color: var(--accent-cyan); }

/* Responsiveness */
@media (max-width: 768px) {
  .nav-container { height: auto; padding: 0.75rem 0; flex-direction: column; gap: 0.75rem; }
  .nav-tabs { width: 100%; overflow-x: auto; justify-content: flex-start; padding: 4px; }
  .hero { padding: 1.25rem 0 1rem; }
  .hero-title { font-size: 1.25rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; text-align: center; }
  .algo-outputs-grid { grid-template-columns: 1fr; }
}

/* Clinical Grade Algorithm Outputs Grid */
.algo-outputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.algo-output-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.algo-output-card:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 63, 94, 0.4);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 28px -8px rgba(244, 63, 94, 0.25);
}

.algo-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.algo-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.algo-icon-wrap .material-symbols-outlined {
  font-size: 22px;
}

.pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.pill.fda-cleared {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pill.fda-pending {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.45);
}

.pill.clinical-grade {
  background: rgba(129, 140, 248, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.algo-output-metric {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.algo-output-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.algo-output-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.algo-output-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
}

.algo-unit {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 600;
}

.algo-tag {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* ==========================================================================
   INTERACTIVE TRIAD & VENN / EXPERTISE / EXPERIENCE EXPLORER
   ========================================================================== */

.triad-wrapper {
  margin: 1.5rem 0 2.5rem;
}

.triad-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.triad-circle {
  --triad-accent: #38bdf8;
  --triad-rgb: 56, 189, 248;
  width: 188px;
  height: 188px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  appearance: none;
  color: inherit;
  font: inherit;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.triad-circle::before {
  content: '';
  position: absolute;
  inset: 6px;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 25%, rgba(var(--triad-rgb), 0.16), transparent 37%),
    conic-gradient(from 180deg, transparent 0 73%, rgba(var(--triad-rgb), 0.15) 82%, transparent 91%);
  animation: triad-halo 8s linear infinite;
}

.triad-circle::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  top: 44%;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(var(--triad-rgb), 0.38), transparent);
  animation: triad-scan 3.4s ease-in-out infinite;
}

#triad-domains { --triad-accent: #38bdf8; --triad-rgb: 56, 189, 248; }
#triad-tech { --triad-accent: #818cf8; --triad-rgb: 129, 140, 248; }
#triad-expertise { --triad-accent: #c084fc; --triad-rgb: 192, 132, 252; }
#triad-experience { --triad-accent: #34d399; --triad-rgb: 52, 211, 153; }

.triad-circle:hover {
  transform: translateY(-6px) scale(1.04);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.triad-circle:focus-visible {
  outline: 2px solid var(--triad-accent);
  outline-offset: 5px;
}

.triad-circle.active {
  background: rgba(15, 23, 42, 0.95);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.4);
}

.triad-circle#triad-domains.active { border-color: #38bdf8; box-shadow: 0 0 35px rgba(56, 189, 248, 0.45); }
.triad-circle#triad-tech.active { border-color: #818cf8; box-shadow: 0 0 35px rgba(129, 140, 248, 0.45); }
.triad-circle#triad-expertise.active { border-color: #c084fc; box-shadow: 0 0 35px rgba(192, 132, 252, 0.45); }
.triad-circle#triad-experience.active { border-color: #34d399; box-shadow: 0 0 35px rgba(52, 211, 153, 0.45); }

.triad-motion {
  position: relative;
  width: 76px;
  height: 52px;
  flex: 0 0 52px;
  margin-bottom: 0.28rem;
  color: var(--triad-accent);
}

/* Domains: intersecting orbital systems around a shared architecture core. */
.domain-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 12px rgba(var(--triad-rgb), 0.7);
  animation: domain-core-pulse 2.2s ease-in-out infinite;
}

.domain-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 28px;
  margin: -14px 0 0 -33px;
  border: 1px solid rgba(var(--triad-rgb), 0.45);
  border-radius: 50%;
  animation: domain-orbit 5.2s linear infinite;
}

.domain-orbit-b {
  transform: rotate(90deg);
  animation-name: domain-orbit-b;
  animation-duration: 4.1s;
  animation-direction: reverse;
}

.domain-orbit i {
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

/* Tech: a live signal moving through a compact processor. */
.tech-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 1px solid currentColor;
  border-radius: 7px;
  background: rgba(var(--triad-rgb), 0.1);
  font-size: 1rem;
  box-shadow: inset 0 0 13px rgba(var(--triad-rgb), 0.16), 0 0 13px rgba(var(--triad-rgb), 0.24);
  animation: tech-chip-pulse 1.9s ease-in-out infinite;
}

.tech-trace {
  position: absolute;
  top: 50%;
  width: 19px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  overflow: visible;
}

.tech-trace::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: tech-signal 1.5s ease-in-out infinite;
}

.trace-a { left: 0; }
.trace-b { right: 0; transform: rotate(180deg); }
.trace-b::after { animation-delay: -0.5s; }
.trace-c { left: 28px; top: 5px; transform: rotate(90deg); }
.trace-c::after { animation-delay: -1s; }

/* Expertise: a continuously resolving target. */
.target-ring,
.target-core,
.target-sweep {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
}

.target-outer { width: 50px; height: 50px; margin: -25px; border: 1px solid rgba(var(--triad-rgb), 0.4); }
.target-middle { width: 31px; height: 31px; margin: -15.5px; border: 1px solid rgba(var(--triad-rgb), 0.68); }
.target-core {
  width: 10px;
  height: 10px;
  margin: -5px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: target-pulse 1.8s ease-in-out infinite;
}

.target-sweep {
  width: 58px;
  height: 58px;
  margin: -29px;
  animation: target-orbit 3.3s linear infinite;
}

.target-sweep i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

/* Experience: milestones with a runner moving through the production years. */
.timeline-track {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, rgba(var(--triad-rgb), 0.2), currentColor, rgba(var(--triad-rgb), 0.2));
}

.timeline-node,
.timeline-runner {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--bg-card-solid);
}

.node-a { left: 5px; }
.node-b { left: 26px; }
.node-c { right: 26px; }
.node-d { right: 5px; }
.timeline-runner {
  left: 5px;
  z-index: 2;
  border: 0;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: timeline-run 3.7s ease-in-out infinite;
}

.triad-label {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.triad-sub {
  max-width: 142px;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
  line-height: 1.25;
}

@keyframes triad-halo {
  to { transform: rotate(360deg); }
}

@keyframes triad-scan {
  0%, 100% { transform: translateY(-12px); opacity: 0.18; }
  50% { transform: translateY(24px); opacity: 0.72; }
}

@keyframes domain-core-pulse {
  0%, 100% { transform: translate(-50%, -50%) rotate(45deg) scale(0.88); opacity: 0.72; }
  50% { transform: translate(-50%, -50%) rotate(135deg) scale(1.08); opacity: 1; }
}

@keyframes domain-orbit {
  to { transform: rotate(360deg); }
}

@keyframes domain-orbit-b {
  from { transform: rotate(90deg); }
  to { transform: rotate(450deg); }
}

@keyframes tech-chip-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.93); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes tech-signal {
  0%, 100% { transform: translateX(-13px); opacity: 0.15; }
  55% { transform: translateX(0); opacity: 1; }
}

@keyframes target-pulse {
  0%, 100% { transform: scale(0.7); opacity: 0.55; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes target-orbit {
  to { transform: rotate(360deg); }
}

@keyframes timeline-run {
  0%, 10% { transform: translateX(0); }
  30% { transform: translateX(21px); }
  55% { transform: translateX(40px); }
  80%, 100% { transform: translateX(58px); }
}

.triad-circle:hover .triad-motion,
.triad-circle.active .triad-motion {
  filter: drop-shadow(0 0 7px rgba(var(--triad-rgb), 0.44));
}

@media (prefers-reduced-motion: reduce) {
  .triad-circle::before,
  .triad-circle::after,
  .triad-motion *,
  .triad-motion *::after {
    animation-play-state: paused !important;
  }
}

@media (max-width: 640px) {
  .triad-container {
    display: grid;
    grid-template-columns: repeat(2, 144px);
    gap: 0.65rem;
  }

  .triad-circle {
    width: 144px;
    height: 144px;
    padding: 0.65rem;
  }

  .triad-motion {
    transform: scale(0.82);
    margin-bottom: 0.15rem;
  }

  .triad-label {
    font-size: 1rem;
  }

  .triad-sub {
    font-size: 0.6rem;
  }
}

/* Interactive Panels */
.interactive-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(16px);
  animation: fadeIn 0.3s ease-out;
}

.interactive-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tech Filter Buttons */
.tech-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

/* Tech Layout Grid - Stacked Vertical Layout */
.tech-explorer-layout {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Organic Word Cloud Matrix */
.bubble-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.25rem 1.5rem;
  background: rgba(10, 15, 30, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 260px;
}

.tech-bubble {
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid;
  user-select: none;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tech-bubble:hover, .tech-bubble.selected {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

/* Tech Bubble Categories */
.tech-bubble[data-cat="embedded"] {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
}
.tech-bubble[data-cat="embedded"]:hover, .tech-bubble[data-cat="embedded"].selected {
  border-color: #34d399;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}

.tech-bubble[data-cat="cloud"] {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}
.tech-bubble[data-cat="cloud"]:hover, .tech-bubble[data-cat="cloud"].selected {
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.tech-bubble[data-cat="ai"] {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}
.tech-bubble[data-cat="ai"]:hover, .tech-bubble[data-cat="ai"].selected {
  border-color: #f43f5e;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
}

.tech-bubble[data-cat="physics"] {
  background: rgba(192, 132, 252, 0.12);
  border-color: rgba(192, 132, 252, 0.4);
  color: #e9d5ff;
}
.tech-bubble[data-cat="physics"]:hover, .tech-bubble[data-cat="physics"].selected {
  border-color: #c084fc;
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
}

/* Pronounced Bubble Size Hierarchy (Word Cloud Scale) */
.tech-bubble.size-xl {
  font-size: 1.45rem;
  font-weight: 800;
  padding: 0.85rem 1.75rem;
  border-width: 2.5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.tech-bubble.size-lg {
  font-size: 1.18rem;
  font-weight: 700;
  padding: 0.65rem 1.35rem;
  border-width: 2px;
}

.tech-bubble.size-md {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.45rem 1.05rem;
  border-width: 1.5px;
}

.tech-bubble.size-sm {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-width: 1.5px;
  opacity: 0.92;
}

/* Tech Detail Card - Full Width Stacked Beneath */
.tech-detail-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-card-bright);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.25s ease-out;
}

.tech-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-detail-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.tech-detail-years {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.15);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.tech-detail-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 950px;
}

.tech-detail-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.tech-project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.tech-project-link:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateX(3px);
}

/* Venn Intersections Highlight Bar */
.venn-intersections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.venn-intersect-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: var(--transition-normal);
}

.venn-intersect-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.venn-intersect-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.35rem;
}

.venn-intersect-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Expertise Grid */
.competencies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.competency-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition-normal);
}

.competency-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-purple);
  box-shadow: 0 10px 25px -5px rgba(192, 132, 252, 0.2);
}

.competency-icon {
  font-size: 1.85rem;
  margin-bottom: 0.75rem;
}

.competency-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.competency-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Experience Timeline */
.experience-timeline {
  position: relative;
  padding-left: 2rem;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 2px;
  background: rgba(56, 189, 248, 0.3);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

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

.timeline-badge {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f172a;
  border: 3px solid var(--accent-cyan);
}

.timeline-badge.milestone {
  border-color: var(--accent-emerald);
}

.timeline-content {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: var(--transition-normal);
}

.timeline-content:hover {
  border-color: var(--accent-cyan);
  transform: translateX(4px);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.timeline-company {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}




/* ==========================================================================
   TIER 1 & TIER 2 PROGRESSIVE DISCLOSURE STYLES
   ========================================================================== */

/* Breadcrumb Navigation Bar */
.breadcrumb-nav,
.breadcrumb-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-card-bright);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}
.breadcrumb-nav a,
.breadcrumb-bar a,
.breadcrumb-link {
  color: var(--accent-indigo);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-base);
}
.breadcrumb-nav a:hover,
.breadcrumb-bar a:hover,
.breadcrumb-link:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}
.breadcrumb-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-indigo);
  opacity: 0.75;
  user-select: none;
}
.breadcrumb-chevron {
  display: block;
  stroke: var(--accent-indigo);
}
.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

/* Executive Context Strip on Case Studies */
.case-study-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
.strip-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.strip-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  font-family: var(--font-mono);
}
.strip-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Tier 1 Signature Case Studies Grid */
.signature-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-top: 1.5rem;
  margin-bottom: 3.5rem;
}
@media (max-width: 900px) {
  .signature-cases-grid {
    grid-template-columns: 1fr;
  }
}

.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.case-card-cover {
  position: relative;
  height: 185px;
  flex: 0 0 185px;
  margin: -2rem -2rem 1.4rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: #070d1a;
}

.case-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 52%, rgba(7, 10, 18, 0.48) 100%),
    radial-gradient(circle at 50% 40%, transparent 45%, rgba(7, 10, 18, 0.18) 100%);
}

.case-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.04) brightness(0.88);
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 400ms ease;
}

.case-card:hover .case-card-cover img {
  transform: scale(1.035);
  filter: saturate(1) contrast(1.06) brightness(0.96);
}

@media (max-width: 600px) {
  .case-card-cover {
    height: 160px;
    flex-basis: 160px;
  }
}

/* Subpage Visual Hero Cover Banner */
.subpage-visual-card {
  position: relative;
  width: 100%;
  margin: 1.5rem 0 2.25rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
}

.subpage-visual-card:hover {
  border-color: var(--border-card-bright);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.subpage-visual-cover {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #070d1a;
}

@media (max-width: 900px) {
  .subpage-visual-cover {
    height: 220px;
  }
}

@media (max-width: 600px) {
  .subpage-visual-cover {
    height: 160px;
  }
}

.subpage-visual-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04) brightness(0.82);
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 500ms ease;
}

.subpage-visual-card:hover .subpage-visual-cover img {
  transform: scale(1.025);
  filter: saturate(1) contrast(1.06) brightness(0.92);
}

.subpage-visual-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 2;
  pointer-events: none;
}

.subpage-visual-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 10, 18, 0.1) 0%, rgba(7, 10, 18, 0.85) 100%),
    radial-gradient(circle at 50% 50%, transparent 60%, rgba(7, 10, 18, 0.4) 100%);
  z-index: 3;
  pointer-events: none;
}

.subpage-visual-overlay {
  position: absolute;
  left: 1.5rem;
  bottom: 1.25rem;
  right: 1.5rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
}

.subpage-visual-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.subpage-visual-caption {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}
.case-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-indigo);
  opacity: 0;
  transition: var(--transition-base);
}
.case-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 16px 36px rgba(0,0,0,0.4);
}
.case-card:hover::before {
  opacity: 1;
}

.case-card.pillar-fda::before { background: var(--accent-emerald); }
.case-card.pillar-sciona::before { background: var(--accent-cyan); }
.case-card.pillar-cloud::before { background: var(--accent-indigo); }
.case-card.pillar-ops::before { background: var(--accent-purple); }

.case-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  width: fit-content;
}
.case-card-badge.fda {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.case-card-badge.sciona {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.case-card-badge.cloud {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.case-card-badge.ops {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.case-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.case-card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.case-metrics-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.case-metric-pill {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Deep Dive Contextual Callout Boxes (Tier 2 -> Tier 3 Links) */
.deep-dive-callout-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
}
.deep-dive-callout-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.deep-dive-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}
.deep-dive-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: var(--transition-base);
}
.deep-dive-link-card:hover {
  border-color: var(--accent-indigo);
  transform: translateX(3px);
}
.deep-dive-link-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.deep-dive-link-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Executive Call To Action Card */
.executive-cta-card {
  margin-top: 3.5rem;
  margin-bottom: 2rem;
  padding: 2.75rem 2.5rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.75) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.2);
  position: relative;
  overflow: hidden;
}

.executive-cta-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition-base);
}

.cta-btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.cta-btn-secondary {
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-card-bright);
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition-base);
}

.cta-btn-secondary:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--accent-indigo);
  color: var(--accent-indigo) !important;
  transform: translateY(-2px);
}

/* ==========================================================================
   EXECUTIVE TL;DR IMPACT CARD & PILLAR BREADCRUMB NAVIGATION
   ========================================================================== */
.executive-tldr-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 27, 75, 0.45) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tldr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tldr-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tldr-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.tldr-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.tldr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .tldr-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.tldr-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tldr-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tldr-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* Pillar Context Bar & Breadcrumbs */
.pillar-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.6rem 1rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
}

.pillar-breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.pillar-breadcrumb-back:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.pillar-breadcrumb-sep {
  color: var(--text-muted);
}

.pillar-breadcrumb-context {
  color: var(--text-secondary);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Hero Header Row with Next Button */
.hero-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.hero-header-row .hero-title {
  margin-bottom: 0;
  flex: 1;
}

.hero-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.22));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.25rem;
  transition: var(--transition-base);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
}

.hero-next-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(99, 102, 241, 0.35));
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateX(3px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
}

@media (max-width: 768px) {
  .hero-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .hero-next-btn {
    margin-top: 0;
    align-self: flex-start;
  }
}

/* ==========================================================================
   INTERACTION MODES EXPLORER (Text vs 3D World vs 3D Point Cloud)
   ========================================================================== */
.interaction-modes-section {
  margin-top: 2.75rem;
  margin-bottom: 3.5rem;
}

.interaction-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.interaction-mode-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.interaction-mode-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-text);
  opacity: 0.6;
  transition: opacity 0.35s ease;
}

.interaction-mode-panel.mode-text::before {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-emerald) 100%);
}

.interaction-mode-panel.mode-world::before {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #ec4899 100%);
}

.interaction-mode-panel.mode-pointcloud::before {
  background: linear-gradient(135deg, var(--accent-amber) 0%, var(--accent-cyan) 100%);
}

.interaction-mode-panel:hover {
  transform: translateY(-6px);
}

.interaction-mode-panel.mode-text:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 20px 40px -10px rgba(56, 189, 248, 0.25);
}

.interaction-mode-panel.mode-world:hover {
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 20px 40px -10px rgba(168, 85, 247, 0.3);
}

.interaction-mode-panel.mode-pointcloud:hover {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 20px 40px -10px rgba(251, 191, 36, 0.25);
}

.interaction-mode-panel:hover::before {
  opacity: 1;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
  width: fit-content;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.mode-badge.world-badge {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border-color: rgba(168, 85, 247, 0.35);
}

.mode-badge.pointcloud-badge {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-amber);
  border-color: rgba(251, 191, 36, 0.35);
}

.mode-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease;
}

.mode-text .mode-icon-wrapper {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
}

.mode-world .mode-icon-wrapper {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
}

.mode-pointcloud .mode-icon-wrapper {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.interaction-mode-panel:hover .mode-icon-wrapper {
  transform: scale(1.1);
}

/* Descriptive Image Preview / Thumbnails */
.mode-thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.mode-thumbnail-wrapper picture,
.mode-thumbnail-img {
  width: 100%;
  height: 100%;
  display: block;
}

.mode-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-text .mode-thumbnail-wrapper {
  background: rgba(56, 189, 248, 0.05);
  border-color: rgba(56, 189, 248, 0.25);
}

.mode-world .mode-thumbnail-wrapper {
  background: rgba(168, 85, 247, 0.06);
  border-color: rgba(168, 85, 247, 0.3);
}

.mode-pointcloud .mode-thumbnail-wrapper {
  background: rgba(251, 191, 36, 0.05);
  border-color: rgba(251, 191, 36, 0.3);
}

.interaction-mode-panel:hover .mode-thumbnail-img {
  transform: scale(1.04);
}

.interaction-mode-panel.mode-text:hover .mode-thumbnail-wrapper {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 6px 20px -2px rgba(56, 189, 248, 0.3);
}

.interaction-mode-panel.mode-world:hover .mode-thumbnail-wrapper {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 6px 20px -2px rgba(168, 85, 247, 0.35);
}

.interaction-mode-panel.mode-pointcloud:hover .mode-thumbnail-wrapper {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 6px 20px -2px rgba(251, 191, 36, 0.3);
}

.mode-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.mode-subtitle {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

.mode-text .mode-subtitle {
  color: var(--accent-cyan);
}

.mode-world .mode-subtitle {
  color: var(--accent-purple);
}

.mode-pointcloud .mode-subtitle {
  color: var(--accent-amber);
}

.mode-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.mode-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.mode-text .mode-cta {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
}

.mode-world .mode-cta {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--accent-purple);
}

.mode-pointcloud .mode-cta {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: var(--accent-amber);
}

.interaction-mode-panel:hover .mode-cta {
  background: var(--bg-card-hover);
  border-color: var(--border-card-bright);
  color: var(--text-primary);
}

.interaction-mode-panel:hover .mode-arrow {
  transform: translateX(4px);
}

.mode-text:hover .mode-arrow {
  transform: translateY(4px);
}

.mode-arrow {
  transition: transform 0.25s ease;
  font-family: var(--font-mono);
  font-size: 1.1rem;
}

@media (max-width: 960px) {
  .interaction-modes-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .interaction-mode-panel {
    padding: 1.75rem 1.5rem;
  }
}

/* ==========================================================================
   MULTI-THEME STYLESHEET SYSTEM & PERSONALITY PALETTES
   Custom Handcrafted Visual Aesthetics:
   - Default: Obsidian Cyber (Dark Cyan / Indigo / Midnight)
   - Editorial: Swiss Editorial (Ivory / Archival Paper / Ink / Terracotta)
   - Apollo: Apollo Amber (Warm Vintage Aerospace / Phosphor Gold)
   - Nordic: Nordic Frost (Sub-zero Slate / Titanium Silver / Ice Blue)
   - Emerald: Quantum Forest (Abyssal Jade / Bio-Signal Mint)
   ========================================================================== */

/* --------------------------------------------------------------------------
   THEME 1: SWISS EDITORIAL (Clean Archival Light Mode)
   Aesthetic: Architectural monograph, museum paper, rich printer's ink, terracotta
   -------------------------------------------------------------------------- */
[data-theme="editorial"] {
  --bg-dark: #fbf9f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f7f4ed;
  --bg-card-solid: #ffffff;
  --border-card: rgba(28, 25, 23, 0.12);
  --border-card-bright: rgba(194, 65, 12, 0.35);

  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #78716c;

  --accent-cyan: #c2410c; /* Terracotta primary accent */
  --accent-indigo: #1e3a5f; /* Deep Prussian Blue */
  --accent-purple: #6b21a8; /* Tyrian purple */
  --accent-emerald: #047857; /* Deep Pine */
  --accent-rose: #be123c; /* Crimson wax */
  --accent-amber: #b45309; /* Warm ochre */

  --gradient-glow: linear-gradient(135deg, rgba(194, 65, 12, 0.08), rgba(30, 58, 95, 0.08));
  --gradient-text: linear-gradient(135deg, #1c1917 0%, #c2410c 60%, #1e3a5f 100%);
  --gradient-micro: linear-gradient(135deg, #047857 0%, #0284c7 100%);
  --gradient-android: linear-gradient(135deg, #15803d 0%, #65a30d 100%);
  --gradient-mobile: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  --gradient-blockchain: linear-gradient(135deg, #b45309 0%, #c2410c 100%);
  --gradient-math: linear-gradient(135deg, #6b21a8 0%, #be123c 100%);
  --gradient-physics: linear-gradient(135deg, #0369a1 0%, #1e3a5f 100%);
  --gradient-tools: linear-gradient(135deg, #c2410c 0%, #047857 100%);
  --gradient-algos: linear-gradient(135deg, #be123c 0%, #c2410c 100%);
  --gradient-cloud: linear-gradient(135deg, #0284c7 0%, #1e3a5f 100%);
  --gradient-pub: linear-gradient(135deg, #be123c 0%, #6b21a8 100%);
  --gradient-web: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --gradient-ops: linear-gradient(135deg, #b45309 0%, #9a3412 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(194, 65, 12, 0.3), rgba(30, 58, 95, 0.15));

  --shadow-glow: 0 0 25px rgba(194, 65, 12, 0.12);
  --shadow-card: 0 10px 25px -5px rgba(28, 25, 23, 0.08), 0 1px 3px rgba(28, 25, 23, 0.04);
}

[data-theme="editorial"] body {
  background:
    radial-gradient(circle at 15% 15%, rgba(194, 65, 12, 0.035) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(30, 58, 95, 0.035) 0%, transparent 45%),
    #fbf9f5;
  color: var(--text-primary);
}

/* Swiss Editorial Specific Component Tuning */
[data-theme="editorial"] .vertical-brand-spine {
  background: #f4efe6;
  border-right: 1px solid rgba(28, 25, 23, 0.12);
  box-shadow: 2px 0 15px rgba(28, 25, 23, 0.06);
}

[data-theme="editorial"] .spine-social-link {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
  color: #57534e;
}

[data-theme="editorial"] .spine-social-link:hover {
  background: #fdf6ee;
  border-color: #c2410c;
  color: #c2410c;
}

[data-theme="editorial"] .navbar {
  background: rgba(251, 249, 245, 0.94);
  border-bottom: 1px solid rgba(28, 25, 23, 0.1);
}

[data-theme="editorial"] .nav-tabs {
  background: #f0eae1;
  border-color: rgba(28, 25, 23, 0.1);
}

[data-theme="editorial"] .tab-btn {
  color: #57534e;
}

[data-theme="editorial"] .tab-btn:hover {
  color: #1c1917;
  background: rgba(255, 255, 255, 0.7);
}

[data-theme="editorial"] .tab-btn.active {
  color: #1c1917;
  background: #ffffff;
  border-color: rgba(194, 65, 12, 0.35);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.08);
}

[data-theme="editorial"] .dropdown-menu {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
  box-shadow: 0 12px 32px rgba(28, 25, 23, 0.1);
}

[data-theme="editorial"] .dropdown-item {
  color: #57534e;
}

[data-theme="editorial"] .dropdown-item:hover,
[data-theme="editorial"] .dropdown-item.active {
  background: #f8f4ec;
  color: #1c1917;
}

[data-theme="editorial"] .footer {
  background: #f2ece2;
  border-top: 1px solid rgba(28, 25, 23, 0.1);
  color: #57534e;
}

[data-theme="editorial"] .footer-cta-card {
  background: #ffffff;
  border-color: rgba(194, 65, 12, 0.2);
  box-shadow: 0 12px 32px rgba(28, 25, 23, 0.06);
}

[data-theme="editorial"] .footer-cta-name {
  color: #1c1917;
}

[data-theme="editorial"] .code-block {
  background: #18181b;
  border-color: rgba(28, 25, 23, 0.15);
}

[data-theme="editorial"] .code-header {
  background: #27272a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
}

[data-theme="editorial"] .toc-card:hover .view-detail-btn,
[data-theme="editorial"] .toc-card:hover .view-subpage-btn {
  color: #c2410c;
}

[data-theme="editorial"] .interaction-mode-panel {
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.06);
}

[data-theme="editorial"] .mode-icon-wrapper,
[data-theme="editorial"] .mode-thumbnail-wrapper {
  background: #f7f4ed;
  border-color: rgba(28, 25, 23, 0.12);
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.06);
}

[data-theme="editorial"] .hero-pill {
  background: #f0eae1;
  border-color: rgba(28, 25, 23, 0.12);
  color: #57534e;
}

/* Editorial Card, Callout, & Heading Overrides */
[data-theme="editorial"] .case-card {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.12);
  box-shadow: 0 4px 20px rgba(28, 25, 23, 0.05);
}

[data-theme="editorial"] .triad-circle {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.16);
  box-shadow: 0 4px 18px rgba(28, 25, 23, 0.06);
}

[data-theme="editorial"] .triad-circle.active {
  background: #fbf8f2;
  border-color: #c2410c;
  box-shadow: 0 0 25px rgba(194, 65, 12, 0.2);
}

[data-theme="editorial"] .triad-circle#triad-domains.active { border-color: #0284c7; box-shadow: 0 0 25px rgba(2, 132, 199, 0.2); }
[data-theme="editorial"] .triad-circle#triad-tech.active { border-color: #4f46e5; box-shadow: 0 0 25px rgba(79, 70, 229, 0.2); }
[data-theme="editorial"] .triad-circle#triad-expertise.active { border-color: #7c3aed; box-shadow: 0 0 25px rgba(124, 58, 237, 0.2); }
[data-theme="editorial"] .triad-circle#triad-experience.active { border-color: #059669; box-shadow: 0 0 25px rgba(5, 150, 105, 0.2); }

[data-theme="editorial"] .triad-label {
  color: #1c1917;
}

[data-theme="editorial"] .triad-sub {
  color: #78716c;
}

[data-theme="editorial"] .domain-visual {
  border-bottom-color: rgba(28, 25, 23, 0.12);
  background: #f4efe6;
}

[data-theme="editorial"] .domain-visual::after {
  color: #fed7aa;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

[data-theme="editorial"] .case-card-cover {
  border-bottom-color: rgba(28, 25, 23, 0.12);
  background: #f4efe6;
}

[data-theme="editorial"] .subpage-visual-card {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.14);
}

[data-theme="editorial"] .subpage-visual-cover::after {
  background:
    linear-gradient(180deg, rgba(251, 248, 242, 0.05) 0%, rgba(28, 25, 23, 0.85) 100%);
}

[data-theme="editorial"] .subpage-visual-kicker {
  color: #fed7aa;
}

[data-theme="editorial"] .case-card-title {
  color: #1c1917;
}

[data-theme="editorial"] .case-card-desc {
  color: #57534e;
}

[data-theme="editorial"] .case-metric-pill {
  background: #f4efe6;
  border-color: rgba(28, 25, 23, 0.12);
  color: #1c1917;
}

[data-theme="editorial"] .executive-tldr-card {
  background: #ffffff;
  border: 1px solid rgba(194, 65, 12, 0.25);
  border-left: 4px solid var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(28, 25, 23, 0.05);
}

[data-theme="editorial"] .tldr-header {
  border-bottom: 1px solid rgba(28, 25, 23, 0.1);
}

[data-theme="editorial"] .tldr-heading {
  color: #1c1917;
}

[data-theme="editorial"] .tldr-label {
  color: var(--accent-cyan);
}

[data-theme="editorial"] .tldr-text {
  color: #57534e;
}

[data-theme="editorial"] .deep-dive-callout-box {
  background: #f4efe6;
  border-color: rgba(28, 25, 23, 0.12);
}

[data-theme="editorial"] .deep-dive-callout-header {
  color: #1c1917;
}

[data-theme="editorial"] .deep-dive-link-card {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
}

[data-theme="editorial"] .deep-dive-link-title {
  color: #1c1917;
}

[data-theme="editorial"] .executive-cta-card {
  background: #ffffff;
  border-color: rgba(194, 65, 12, 0.25);
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.08);
}

[data-theme="editorial"] .executive-cta-card::before {
  display: none;
}

[data-theme="editorial"] .cta-btn-secondary {
  background: #f4efe6;
  border-color: rgba(28, 25, 23, 0.15);
  color: #1c1917 !important;
}

[data-theme="editorial"] .cta-btn-secondary:hover {
  background: #ede6d9;
  color: #c2410c !important;
}

[data-theme="editorial"] .pillar-breadcrumb-bar {
  background: #f4efe6;
  border-color: rgba(28, 25, 23, 0.12);
}

[data-theme="editorial"] .pillar-breadcrumb-context {
  color: #57534e;
}

[data-theme="editorial"] .hero-next-btn {
  background: #ffffff;
  border-color: rgba(194, 65, 12, 0.35);
  color: #1c1917;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.06);
}

[data-theme="editorial"] .hero-next-btn:hover {
  background: #fdf6ee;
  border-color: #c2410c;
  color: #c2410c;
}

[data-theme="editorial"] .breadcrumb-current {
  background: #ede6d9;
  border-color: rgba(28, 25, 23, 0.15);
  color: #1c1917;
}

[data-theme="editorial"] .pipeline-step {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
}

[data-theme="editorial"] .tag {
  background: #f0eae1;
  border-color: rgba(28, 25, 23, 0.12);
}

[data-theme="editorial"] .tab-badge.android { background: rgba(21, 128, 61, 0.12); color: #15803d; border-color: rgba(21, 128, 61, 0.3); }
[data-theme="editorial"] .tab-badge.mobile { background: rgba(194, 65, 12, 0.12); color: #c2410c; border-color: rgba(194, 65, 12, 0.3); }
[data-theme="editorial"] .tab-badge.physics { background: rgba(3, 105, 161, 0.12); color: #0369a1; border-color: rgba(3, 105, 161, 0.3); }
[data-theme="editorial"] .tab-badge.tools { background: rgba(194, 65, 12, 0.12); color: #c2410c; border-color: rgba(194, 65, 12, 0.3); }
[data-theme="editorial"] .tab-badge.web { background: rgba(2, 132, 199, 0.12); color: #0284c7; border-color: rgba(2, 132, 199, 0.3); }
[data-theme="editorial"] .tab-badge.ops { background: rgba(180, 83, 9, 0.12); color: #b45309; border-color: rgba(180, 83, 9, 0.3); }
[data-theme="editorial"] .tab-badge.pub { background: rgba(190, 18, 60, 0.12); color: #be123c; border-color: rgba(190, 18, 60, 0.3); }

[data-theme="editorial"] .academic-dossier-card {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.14);
  box-shadow: 0 4px 20px rgba(28, 25, 23, 0.05);
}

[data-theme="editorial"] .academic-dossier-icon {
  background: rgba(67, 56, 202, 0.08);
  border-color: rgba(67, 56, 202, 0.2);
}

[data-theme="editorial"] .dossier-btn.primary {
  background: #4338ca;
  color: #ffffff;
  border-color: #3730a3;
}

[data-theme="editorial"] .dossier-btn.primary:hover {
  background: #3730a3;
  box-shadow: 0 4px 12px rgba(67, 56, 202, 0.25);
}

[data-theme="editorial"] .dossier-btn.secondary {
  background: #f7f4ed;
  border-color: rgba(28, 25, 23, 0.16);
  color: #1c1917;
}

[data-theme="editorial"] .dossier-btn.secondary:hover {
  background: #ede7dc;
  border-color: rgba(28, 25, 23, 0.25);
}

[data-theme="editorial"] .academic-badge-row {
  border-top-color: rgba(28, 25, 23, 0.08);
}

[data-theme="editorial"] .academic-profile-badge {
  background: #fdfcf9;
  border-color: rgba(28, 25, 23, 0.12);
}

[data-theme="editorial"] .academic-profile-badge.scholar:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

[data-theme="editorial"] .academic-profile-badge.orcid:hover {
  background: #f7fee7;
  border-color: #bef264;
}

[data-theme="editorial"] .pub-filter-btn {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
  color: #57534e;
}

[data-theme="editorial"] .pub-filter-btn:hover,
[data-theme="editorial"] .pub-filter-btn.active {
  background: #fdf6ee;
  color: #c2410c;
  border-color: #c2410c;
}

[data-theme="editorial"] .pub-card {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
  box-shadow: 0 2px 10px rgba(28, 25, 23, 0.04);
}

[data-theme="editorial"] .pub-citations {
  background: #fdf6ee;
  color: #c2410c;
  border-color: rgba(194, 65, 12, 0.3);
}

[data-theme="editorial"] .pub-type-badge {
  background: #f4efe6;
  border-color: rgba(28, 25, 23, 0.12);
  color: #57534e;
}

[data-theme="editorial"] .pub-type-badge.patent {
  background: rgba(180, 83, 9, 0.1);
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.25);
}

[data-theme="editorial"] .pub-type-badge.journal {
  background: rgba(4, 120, 87, 0.1);
  color: #047857;
  border-color: rgba(4, 120, 87, 0.25);
}

[data-theme="editorial"] .pub-type-badge.thesis {
  background: rgba(107, 33, 168, 0.1);
  color: #6b21a8;
  border-color: rgba(107, 33, 168, 0.25);
}

[data-theme="editorial"] .gallery-card {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
  box-shadow: 0 4px 15px rgba(28, 25, 23, 0.05);
}

[data-theme="editorial"] .gallery-image-wrapper {
  background: #f8f4ec;
  border-bottom-color: rgba(28, 25, 23, 0.1);
}

[data-theme="editorial"] .diagram-card {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
  box-shadow: 0 4px 20px rgba(28, 25, 23, 0.05);
}

[data-theme="editorial"] .diagram-interactive-banner {
  background: #fbf8f2;
  border-bottom-color: rgba(28, 25, 23, 0.12);
  color: #c2410c;
}

[data-theme="editorial"] .diagram-interactive-banner .interactive-pulse {
  background-color: #c2410c;
  box-shadow: 0 0 6px #c2410c;
}

[data-theme="editorial"] .diagram-inspect-card {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(28, 25, 23, 0.16);
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.12);
}

[data-theme="editorial"] .diagram-inspect-card.pinned {
  border-color: #c2410c;
  box-shadow: 0 18px 45px rgba(28, 25, 23, 0.18);
}

[data-theme="editorial"] .inspect-metric-pill {
  background: #f8f4ec;
  border-color: rgba(28, 25, 23, 0.12);
  color: #44403c;
}

[data-theme="editorial"] .inspect-stage-badge {
  background: rgba(194, 65, 12, 0.1);
  color: #c2410c;
  border-color: rgba(194, 65, 12, 0.25);
}

[data-theme="editorial"] .diagram-inspect-card.theme-purple .inspect-stage-badge {
  background: rgba(107, 33, 168, 0.12);
  color: #6b21a8;
  border-color: rgba(107, 33, 168, 0.3);
}

[data-theme="editorial"] .diagram-inspect-card.theme-emerald .inspect-stage-badge {
  background: rgba(4, 120, 87, 0.12);
  color: #047857;
  border-color: rgba(4, 120, 87, 0.3);
}

[data-theme="editorial"] .diagram-inspect-card.theme-amber .inspect-stage-badge {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.3);
}

[data-theme="editorial"] .diagram-inspect-card.theme-indigo .inspect-stage-badge {
  background: rgba(67, 56, 202, 0.12);
  color: #4338ca;
  border-color: rgba(67, 56, 202, 0.3);
}

[data-theme="editorial"] .diagram-inspect-card.theme-cyan .inspect-stage-badge {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.3);
}

[data-theme="editorial"] .diagram-inspect-card.theme-rose .inspect-stage-badge {
  background: rgba(190, 18, 60, 0.12);
  color: #be123c;
  border-color: rgba(190, 18, 60, 0.3);
}

[data-theme="editorial"] .diagram-inspect-card.theme-lime .inspect-stage-badge {
  background: rgba(101, 163, 13, 0.12);
  color: #4d7c0f;
  border-color: rgba(101, 163, 13, 0.3);
}

[data-theme="editorial"] .inspect-close-btn:hover {
  background: rgba(28, 25, 23, 0.08);
  color: #1c1917;
}

[data-theme="editorial"] .zoom-btn {
  background: #c2410c;
  color: #ffffff;
}

[data-theme="editorial"] .attribution-box {
  background: #fbf8f2;
  border-color: rgba(28, 25, 23, 0.15);
}

[data-theme="editorial"] .github-repo-btn {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.15);
  color: #1c1917;
}

[data-theme="editorial"] .github-repo-btn:hover {
  background: #fdf6ee;
  border-color: #c2410c;
  color: #c2410c;
}

[data-theme="editorial"] .domain-card-btn {
  background: #fdf6ee;
  border-color: rgba(194, 65, 12, 0.35);
  color: #c2410c;
}

[data-theme="editorial"] .domain-card-btn:hover {
  background: #c2410c;
  color: #ffffff;
}

[data-theme="editorial"] .footer-cta-btn {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.15);
  color: #1c1917;
}

[data-theme="editorial"] .footer-cta-btn:hover {
  background: #fdf6ee;
  border-color: #c2410c;
  color: #c2410c;
}

[data-theme="editorial"] .interaction-mode-panel:hover .mode-cta {
  background: #fdf6ee;
  border-color: rgba(28, 25, 23, 0.2);
  color: #1c1917;
}

/* Editorial Theme Overrides for Focus Panel */
[data-theme="editorial"] .hero-focus-panel {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
  box-shadow: 0 4px 18px rgba(28, 25, 23, 0.06);
}

[data-theme="editorial"] .focus-details-flyout {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.16);
  box-shadow: 0 20px 50px rgba(28, 25, 23, 0.16), 0 0 0 1px rgba(194, 65, 12, 0.25);
}

[data-theme="editorial"] .focus-panel-eyebrow {
  color: #c2410c;
}

[data-theme="editorial"] .focus-pulse-dot {
  background-color: #c2410c;
  box-shadow: 0 0 6px #c2410c;
}

[data-theme="editorial"] .focus-panel-title {
  color: #1c1917;
}

[data-theme="editorial"] .focus-flyout-close-btn {
  background: rgba(28, 25, 23, 0.06);
  border-color: rgba(28, 25, 23, 0.12);
  color: #57534e;
}

[data-theme="editorial"] .focus-flyout-close-btn:hover {
  background: rgba(28, 25, 23, 0.12);
  color: #1c1917;
}

[data-theme="editorial"] .focus-role-pill {
  background: #fdfbf7;
  color: #44403c;
  border-color: rgba(28, 25, 23, 0.1);
}

[data-theme="editorial"] .focus-role-pill.pill-indigo {
  color: #4338ca;
  border-color: rgba(67, 56, 202, 0.25);
}
[data-theme="editorial"] .focus-role-pill.pill-indigo:hover,
[data-theme="editorial"] .focus-role-pill.pill-indigo.active {
  background: #eef2ff;
  border-color: #4338ca;
  color: #312e81;
}

[data-theme="editorial"] .focus-role-pill.pill-emerald {
  color: #047857;
  border-color: rgba(4, 120, 87, 0.25);
}
[data-theme="editorial"] .focus-role-pill.pill-emerald:hover,
[data-theme="editorial"] .focus-role-pill.pill-emerald.active {
  background: #ecfdf5;
  border-color: #047857;
  color: #064e3b;
}

[data-theme="editorial"] .focus-role-pill.pill-amber {
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.25);
}
[data-theme="editorial"] .focus-role-pill.pill-amber:hover,
[data-theme="editorial"] .focus-role-pill.pill-amber.active {
  background: #fffbeb;
  border-color: #b45309;
  color: #78350f;
}

[data-theme="editorial"] .focus-role-heading.role-indigo {
  color: #4338ca;
}

[data-theme="editorial"] .focus-role-heading.role-emerald {
  color: #047857;
}

[data-theme="editorial"] .focus-role-heading.role-amber {
  color: #b45309;
}

[data-theme="editorial"] .focus-pathway-title {
  color: #1c1917;
}

[data-theme="editorial"] .focus-pathway-desc {
  color: #57534e;
}

/* Apollo Amber Theme Overrides for Focus Panel */
[data-theme="apollo"] .focus-details-flyout {
  background: rgba(28, 24, 20, 0.98);
  border-color: rgba(245, 158, 11, 0.45);
}

/* --------------------------------------------------------------------------
   THEME 2: APOLLO AMBER (Vintage Analog Aerospace & Telemetry)
   Aesthetic: Phosphor amber CRT, mission control telemetry, deep umber charcoal
   -------------------------------------------------------------------------- */
[data-theme="apollo"] {
  --bg-dark: #0f0d0b;
  --bg-card: rgba(28, 24, 20, 0.75);
  --bg-card-hover: rgba(45, 38, 32, 0.85);
  --bg-card-solid: #1b1612;
  --border-card: rgba(245, 158, 11, 0.16);
  --border-card-bright: rgba(245, 158, 11, 0.4);

  --text-primary: #fef3c7;
  --text-secondary: #d97706;
  --text-muted: #92400e;

  --accent-cyan: #f59e0b; /* Phosphor amber */
  --accent-indigo: #ea580c; /* Solar flare */
  --accent-purple: #f97316; /* Propulsion orange */
  --accent-emerald: #10b981; /* Telemetry nominal green */
  --accent-rose: #ef4444; /* Abort warning red */
  --accent-amber: #fbbf24; /* Radar gold */

  --gradient-glow: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(234, 88, 12, 0.12));
  --gradient-text: linear-gradient(135deg, #fef3c7 0%, #fbbf24 50%, #ea580c 100%);
  --gradient-micro: linear-gradient(135deg, #10b981 0%, #f59e0b 100%);
  --gradient-android: linear-gradient(135deg, #10b981 0%, #fbbf24 100%);
  --gradient-mobile: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  --gradient-blockchain: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  --gradient-math: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --gradient-physics: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --gradient-tools: linear-gradient(135deg, #f59e0b 0%, #10b981 100%);
  --gradient-algos: linear-gradient(135deg, #ef4444 0%, #fbbf24 100%);
  --gradient-cloud: linear-gradient(135deg, #fbbf24 0%, #ea580c 100%);
  --gradient-pub: linear-gradient(135deg, #f97316 0%, #fbbf24 100%);
  --gradient-web: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-ops: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(234, 88, 12, 0.15));

  --shadow-glow: 0 0 35px -5px rgba(245, 158, 11, 0.28);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

[data-theme="apollo"] body {
  background:
    radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(234, 88, 12, 0.07) 0%, transparent 45%),
    #0f0d0b;
  color: var(--text-primary);
}

[data-theme="apollo"] .vertical-brand-spine {
  background: rgba(18, 15, 12, 0.96);
  border-right: 1px solid rgba(245, 158, 11, 0.18);
}

[data-theme="apollo"] .navbar {
  background: rgba(15, 13, 11, 0.92);
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
}

[data-theme="apollo"] .nav-tabs {
  background: rgba(28, 24, 20, 0.85);
  border-color: rgba(245, 158, 11, 0.2);
}

[data-theme="apollo"] .tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(234, 88, 12, 0.28));
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

[data-theme="apollo"] .dropdown-menu {
  background: rgba(24, 20, 16, 0.97);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 20px rgba(245, 158, 11, 0.2);
}

[data-theme="apollo"] .footer {
  background: rgba(12, 10, 8, 0.98);
  border-top: 1px solid rgba(245, 158, 11, 0.18);
}

[data-theme="apollo"] .footer-cta-card {
  background: linear-gradient(135deg, rgba(28, 24, 20, 0.9) 0%, rgba(45, 28, 15, 0.5) 100%);
  border-color: rgba(245, 158, 11, 0.3);
}

/* --------------------------------------------------------------------------
   THEME 3: NORDIC FROST (Clean Minimalist Slate & Titanium)
   Aesthetic: Sub-zero graphite, glacial ice blue, linear precision hardware
   -------------------------------------------------------------------------- */
[data-theme="nordic"] {
  --bg-dark: #0a0d14;
  --bg-card: rgba(18, 24, 38, 0.65);
  --bg-card-hover: rgba(28, 38, 58, 0.8);
  --bg-card-solid: #111827;
  --border-card: rgba(148, 163, 184, 0.14);
  --border-card-bright: rgba(125, 211, 252, 0.38);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #7dd3fc; /* Glacial ice */
  --accent-indigo: #60a5fa; /* Fjord blue */
  --accent-purple: #818cf8; /* Twilight */
  --accent-emerald: #38bdf8; /* Aurora */
  --accent-rose: #fb7185; /* Arctic berry */
  --accent-amber: #fde047; /* Polar sun */

  --gradient-glow: linear-gradient(135deg, rgba(125, 211, 252, 0.14), rgba(96, 165, 250, 0.12));
  --gradient-text: linear-gradient(135deg, #f8fafc 0%, #7dd3fc 50%, #60a5fa 100%);
  --gradient-micro: linear-gradient(135deg, #38bdf8 0%, #7dd3fc 100%);
  --gradient-android: linear-gradient(135deg, #7dd3fc 0%, #a5f3fc 100%);
  --gradient-mobile: linear-gradient(135deg, #7dd3fc 0%, #60a5fa 100%);
  --gradient-blockchain: linear-gradient(135deg, #fde047 0%, #fb923c 100%);
  --gradient-math: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  --gradient-physics: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 100%);
  --gradient-tools: linear-gradient(135deg, #7dd3fc 0%, #60a5fa 100%);
  --gradient-algos: linear-gradient(135deg, #fb7185 0%, #fde047 100%);
  --gradient-cloud: linear-gradient(135deg, #7dd3fc 0%, #60a5fa 100%);
  --gradient-pub: linear-gradient(135deg, #f472b6 0%, #818cf8 100%);
  --gradient-web: linear-gradient(135deg, #38bdf8 0%, #60a5fa 100%);
  --gradient-ops: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(125, 211, 252, 0.35), rgba(96, 165, 250, 0.1));

  --shadow-glow: 0 0 30px -5px rgba(125, 211, 252, 0.22);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

[data-theme="nordic"] body {
  background:
    radial-gradient(circle at 15% 15%, rgba(125, 211, 252, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(96, 165, 250, 0.07) 0%, transparent 45%),
    #0a0d14;
  color: var(--text-primary);
}

[data-theme="nordic"] .vertical-brand-spine {
  background: rgba(10, 13, 20, 0.96);
  border-right: 1px solid rgba(148, 163, 184, 0.15);
}

[data-theme="nordic"] .navbar {
  background: rgba(10, 13, 20, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

[data-theme="nordic"] .nav-tabs {
  background: rgba(18, 24, 38, 0.85);
  border-color: rgba(148, 163, 184, 0.15);
}

[data-theme="nordic"] .tab-btn.active {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.22), rgba(96, 165, 250, 0.22));
  border-color: rgba(125, 211, 252, 0.38);
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.2);
}

[data-theme="nordic"] .dropdown-menu {
  background: rgba(16, 22, 34, 0.97);
  border-color: rgba(125, 211, 252, 0.3);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(125, 211, 252, 0.15);
}

[data-theme="nordic"] .footer {
  background: rgba(8, 11, 17, 0.98);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

/* --------------------------------------------------------------------------
   THEME 4: QUANTUM FOREST (Abyssal Jade & Bio-Signal Mint)
   Aesthetic: Computational biology, bioluminescent mint, abyssal evergreen
   -------------------------------------------------------------------------- */
[data-theme="emerald"] {
  --bg-dark: #040d0c;
  --bg-card: rgba(8, 28, 25, 0.65);
  --bg-card-hover: rgba(15, 45, 40, 0.8);
  --bg-card-solid: #092622;
  --border-card: rgba(52, 211, 153, 0.16);
  --border-card-bright: rgba(52, 211, 153, 0.42);

  --text-primary: #ecfdf5;
  --text-secondary: #a7f3d0;
  --text-muted: #059669;

  --accent-cyan: #34d399; /* Electric mint */
  --accent-indigo: #10b981; /* Emerald signal */
  --accent-purple: #14b8a6; /* Deep sea teal */
  --accent-emerald: #6ee7b7; /* Fluorophore */
  --accent-rose: #f43f5e; /* Pulse crimson */
  --accent-amber: #a3e635; /* Bio lime */

  --gradient-glow: linear-gradient(135deg, rgba(52, 211, 153, 0.18), rgba(20, 184, 166, 0.14));
  --gradient-text: linear-gradient(135deg, #ecfdf5 0%, #34d399 50%, #10b981 100%);
  --gradient-micro: linear-gradient(135deg, #34d399 0%, #14b8a6 100%);
  --gradient-android: linear-gradient(135deg, #34d399 0%, #a3e635 100%);
  --gradient-mobile: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --gradient-blockchain: linear-gradient(135deg, #a3e635 0%, #f59e0b 100%);
  --gradient-math: linear-gradient(135deg, #14b8a6 0%, #10b981 100%);
  --gradient-physics: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --gradient-tools: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
  --gradient-algos: linear-gradient(135deg, #f43f5e 0%, #34d399 100%);
  --gradient-cloud: linear-gradient(135deg, #34d399 0%, #14b8a6 100%);
  --gradient-pub: linear-gradient(135deg, #14b8a6 0%, #34d399 100%);
  --gradient-web: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-ops: linear-gradient(135deg, #a3e635 0%, #10b981 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(52, 211, 153, 0.4), rgba(20, 184, 166, 0.15));

  --shadow-glow: 0 0 35px -5px rgba(52, 211, 153, 0.28);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

[data-theme="emerald"] body {
  background:
    radial-gradient(circle at 15% 15%, rgba(52, 211, 153, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(20, 184, 166, 0.07) 0%, transparent 45%),
    #040d0c;
  color: var(--text-primary);
}

[data-theme="emerald"] .vertical-brand-spine {
  background: rgba(4, 13, 12, 0.96);
  border-right: 1px solid rgba(52, 211, 153, 0.16);
}

[data-theme="emerald"] .navbar {
  background: rgba(4, 13, 12, 0.92);
  border-bottom: 1px solid rgba(52, 211, 153, 0.16);
}

[data-theme="emerald"] .nav-tabs {
  background: rgba(8, 28, 25, 0.85);
  border-color: rgba(52, 211, 153, 0.18);
}

[data-theme="emerald"] .tab-btn.active {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(20, 184, 166, 0.25));
  border-color: rgba(52, 211, 153, 0.42);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.25);
}

[data-theme="emerald"] .dropdown-menu {
  background: rgba(6, 20, 18, 0.97);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 20px rgba(52, 211, 153, 0.2);
}

[data-theme="emerald"] .footer {
  background: rgba(3, 10, 9, 0.98);
  border-top: 1px solid rgba(52, 211, 153, 0.16);
}

/* ==========================================================================
   THEME SWITCHER CONTROLS & DOCKED POPOVER
   ========================================================================== */

/* 1. Theme Button inside Left Vertical Spine */
.spine-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-base);
  margin-top: 0.75rem;
  font-size: 1.15rem;
}

.spine-theme-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: scale(1.08);
}

/* 2. Docked Theme Button directly NEXT to Left Spine */
.spine-docked-theme-switch {
  position: fixed;
  left: 92px;
  bottom: 24px;
  z-index: 1002;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-card-solid);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card-bright);
  border-radius: 9999px;
  padding: 0.45rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.spine-docked-theme-switch:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), var(--shadow-glow);
}

.theme-dock-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.theme-dock-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.theme-dock-arrow {
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.spine-docked-theme-switch.active .theme-dock-arrow {
  transform: rotate(180deg);
}

/* 3. Theme Selector Popover (Docked right above the switch button) */
.spine-theme-popover {
  position: fixed;
  left: 92px;
  bottom: 68px;
  width: 320px;
  background: var(--bg-card-solid);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card-bright);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
  z-index: 1050;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  animation: themePopoverIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.spine-theme-popover.open {
  display: flex;
}

@keyframes themePopoverIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.theme-popover-header {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-card);
}

.theme-popover-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.theme-popover-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.theme-popover-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.theme-choice-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.theme-choice-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-card);
}

.theme-choice-btn.active {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.theme-choice-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.theme-choice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-choice-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.theme-choice-active-indicator {
  display: none;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.theme-choice-btn.active .theme-choice-active-indicator {
  display: inline-block;
}

.theme-choice-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Swatch Preview Discs */
.theme-swatch-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.swatch-obsidian {
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #818cf8 50%, #070a12 100%);
}

.swatch-editorial {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #c2410c 50%, #1c1917 100%);
  border-color: rgba(28, 25, 23, 0.25);
}

.swatch-apollo {
  background: radial-gradient(circle at 35% 35%, #fbbf24 0%, #ea580c 50%, #0f0d0b 100%);
}

.swatch-nordic {
  background: radial-gradient(circle at 35% 35%, #7dd3fc 0%, #3b82f6 50%, #0a0d14 100%);
}

.swatch-emerald {
  background: radial-gradient(circle at 35% 35%, #34d399 0%, #10b981 50%, #040d0c 100%);
}

/* 4. Navbar Theme Button (Mobile / Quick Switcher) */
.nav-theme-btn {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-left: auto;
}

.nav-theme-btn:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}

/* Responsive adjustments */
@media (max-width: 1023px) {
  .spine-docked-theme-switch {
    left: 16px;
    bottom: 16px;
  }
  .spine-theme-popover {
    left: 16px;
    bottom: 64px;
    width: calc(100vw - 32px);
    max-width: 340px;
  }
  .nav-theme-btn {
    display: inline-flex;
  }
}

/* ==========================================================================
   Executive ROI & Capital Efficiency Section
   ========================================================================== */
.roi-section {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.roi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.roi-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.roi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-text);
  opacity: 0.8;
  transition: var(--transition-fast);
}

/* 4 Unique Panel Theme Accents */
.roi-card.theme-emerald::before { background: linear-gradient(90deg, #34d399, #10b981); }
.roi-card.theme-purple::before  { background: linear-gradient(90deg, #c084fc, #a855f7); }
.roi-card.theme-amber::before   { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.roi-card.theme-cyan::before    { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }

.roi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.45);
}

.roi-card.theme-emerald:hover { border-color: rgba(52, 211, 153, 0.4); box-shadow: 0 12px 28px -8px rgba(52, 211, 153, 0.2); }
.roi-card.theme-purple:hover  { border-color: rgba(192, 132, 252, 0.4); box-shadow: 0 12px 28px -8px rgba(192, 132, 252, 0.2); }
.roi-card.theme-amber:hover   { border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 12px 28px -8px rgba(245, 158, 11, 0.2); }
.roi-card.theme-cyan:hover    { border-color: rgba(56, 189, 248, 0.4); box-shadow: 0 12px 28px -8px rgba(56, 189, 248, 0.2); }

.roi-card:hover::before {
  opacity: 1;
  height: 4px;
}

/* 1. Target Audience Pill (First item in panel, size matches roi-card-title) */
.roi-audience-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 1.15rem;
  border: 1px solid var(--border-card);
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.3;
}

.roi-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.roi-card.theme-emerald .roi-audience-pill {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.35);
}
.roi-card.theme-emerald .roi-pill-dot {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.roi-card.theme-purple .roi-audience-pill {
  background: rgba(192, 132, 252, 0.1);
  border-color: rgba(192, 132, 252, 0.35);
}
.roi-card.theme-purple .roi-pill-dot {
  background: #c084fc;
  box-shadow: 0 0 8px #c084fc;
}

.roi-card.theme-amber .roi-audience-pill {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
}
.roi-card.theme-amber .roi-pill-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.roi-card.theme-cyan .roi-audience-pill {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.35);
}
.roi-card.theme-cyan .roi-pill-dot {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

/* 2. Metric Badge on its own line, increased size, unique colors */
.roi-badge-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.65rem;
}

.roi-metric-badge {
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.roi-metric-label {
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.roi-metric-badge.emerald {
  background: rgba(52, 211, 153, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.roi-metric-badge.purple {
  background: rgba(192, 132, 252, 0.18);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.4);
}

.roi-metric-badge.amber {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.roi-metric-badge.cyan {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}


.roi-metric-label.emerald {
  color: #34d399;
}

.roi-metric-label.purple {
  color: #c084fc;
}

.roi-metric-label.amber {
  color: #fbbf24;
}

.roi-metric-label.cyan {
  color: #38bdf8;
}

/* 3. Stat Number beneath badge, contrasting color matching panel */
.roi-stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.95rem;
}

.roi-stat-num.emerald {
  color: #34d399;
  text-shadow: 0 0 14px rgba(52, 211, 153, 0.3);
}

.roi-stat-num.purple {
  color: #c084fc;
  text-shadow: 0 0 14px rgba(192, 132, 252, 0.3);
}

.roi-stat-num.amber {
  color: #fbbf24;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.3);
}

.roi-stat-num.cyan {
  color: #38bdf8;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.roi-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.roi-card-sub {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-bottom: 0.75rem;
}

.roi-card.theme-emerald .roi-card-sub { color: #34d399; }
.roi-card.theme-purple .roi-card-sub  { color: #c084fc; }
.roi-card.theme-amber .roi-card-sub   { color: #fbbf24; }
.roi-card.theme-cyan .roi-card-sub    { color: #38bdf8; }

.roi-card-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.roi-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-card);
}

.roi-link {
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition-fast);
}

.roi-card.theme-emerald .roi-link { color: #34d399; }
.roi-card.theme-purple .roi-link  { color: #c084fc; }
.roi-card.theme-amber .roi-link   { color: #fbbf24; }
.roi-card.theme-cyan .roi-link    { color: #38bdf8; }

.roi-link:hover {
  transform: translateX(4px);
  filter: brightness(1.2);
}

/* ==========================================================================
   The Unbroken Continuum Interactive Stepper
   ========================================================================== */
.continuum-interactive-section {
  margin-top: 2rem;
}

.continuum-pipeline-track {
  display: flex;
  gap: 0.5rem;
  position: relative;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card-bright) transparent;
}

.continuum-step-btn {
  flex: 1 1 0;
  min-width: 170px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  transition: var(--transition-fast);
  position: relative;
}

.continuum-step-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: var(--transition-fast);
}

.continuum-step-btn:hover {
  border-color: var(--border-card-bright);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.continuum-step-btn.active {
  background: rgba(15, 23, 42, 0.9);
  border-color: var(--accent-cyan);
  box-shadow: 0 6px 20px -6px rgba(56, 189, 248, 0.3);
}

.continuum-step-btn.active::after {
  background: var(--accent-cyan);
}

.continuum-step-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.continuum-step-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.continuum-step-btn.active .continuum-step-num {
  color: var(--accent-cyan);
}

.continuum-step-btn-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.continuum-step-btn-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.continuum-display-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card-bright);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.continuum-display-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .continuum-display-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.continuum-silo-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-left: 4px solid var(--accent-rose);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}

.continuum-silo-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-rose);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.continuum-silo-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.continuum-solution-box {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-left: 4px solid var(--accent-emerald);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin: 1rem 0 1.25rem;
}

.continuum-solution-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.continuum-solution-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.continuum-code-panel {
  background: #080c16;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.continuum-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-card);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.continuum-code-lang {
  color: var(--accent-cyan);
  font-weight: 600;
}

.continuum-code-pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #e2e8f0;
  max-height: 380px;
  scrollbar-width: thin;
}

.continuum-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-card);
  flex-wrap: wrap;
  gap: 1rem;
}

.continuum-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.continuum-nav-btn:hover:not(:disabled) {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
  color: var(--accent-cyan);
}

.continuum-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.continuum-indicator {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Theme overrides for Editorial */
[data-theme="editorial"] .roi-section,
[data-theme="editorial"] .roi-card,
[data-theme="editorial"] .continuum-step-btn,
[data-theme="editorial"] .continuum-display-card {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.12);
}

[data-theme="editorial"] .roi-card:hover,
[data-theme="editorial"] .continuum-step-btn.active {
  background: #fdfbf7;
  border-color: #c2410c;
}

[data-theme="editorial"] .roi-audience-pill {
  background: #f8f4ec;
  border-color: rgba(28, 25, 23, 0.15);
  color: #1c1917;
}

[data-theme="editorial"] .roi-stat-num.emerald { color: #047857; text-shadow: none; }
[data-theme="editorial"] .roi-stat-num.purple  { color: #7c3aed; text-shadow: none; }
[data-theme="editorial"] .roi-stat-num.amber   { color: #b45309; text-shadow: none; }
[data-theme="editorial"] .roi-stat-num.cyan    { color: #0284c7; text-shadow: none; }

[data-theme="editorial"] .roi-metric-badge.emerald { background: #ecfdf5; color: #047857; border-color: rgba(4, 120, 87, 0.3); }
[data-theme="editorial"] .roi-metric-badge.purple  { background: #f5f3ff; color: #7c3aed; border-color: rgba(124, 58, 237, 0.3); }
[data-theme="editorial"] .roi-metric-badge.amber   { background: #fffbeb; color: #b45309; border-color: rgba(180, 83, 9, 0.3); }
[data-theme="editorial"] .roi-metric-badge.cyan    { background: #f0f9ff; color: #0284c7; border-color: rgba(2, 132, 199, 0.3); }

[data-theme="editorial"] .roi-card.theme-emerald .roi-card-sub,
[data-theme="editorial"] .roi-card.theme-emerald .roi-link { color: #047857; }
[data-theme="editorial"] .roi-card.theme-purple .roi-card-sub,
[data-theme="editorial"] .roi-card.theme-purple .roi-link  { color: #7c3aed; }
[data-theme="editorial"] .roi-card.theme-amber .roi-card-sub,
[data-theme="editorial"] .roi-card.theme-amber .roi-link   { color: #b45309; }
[data-theme="editorial"] .roi-card.theme-cyan .roi-card-sub,
[data-theme="editorial"] .roi-card.theme-cyan .roi-link    { color: #0284c7; }

[data-theme="editorial"] .continuum-code-panel {
  background: #1c1917;
}

[data-theme="editorial"] .continuum-step-btn.active::after {
  background: #c2410c;
}

[data-theme="editorial"] .continuum-silo-box {
  background: #fff1f2;
  border-color: rgba(225, 29, 72, 0.2);
}

[data-theme="editorial"] .continuum-solution-box {
  background: #f0fdf4;
  border-color: rgba(22, 163, 74, 0.2);
}
