/* ==========================================================================
   Electron Scattering Simulator - Landing Page Stylesheet
   Modern Scientific Theme matching the React 19 application
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables & Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand Accents */
  --accent-primary: #4f46e5;       /* Indigo 600 */
  --accent-hover: #6366f1;         /* Indigo 500 */
  --accent-active: #4338ca;        /* Indigo 700 */
  --accent-light: #818cf8;         /* Indigo 400 */
  --accent-subtle: rgba(79, 70, 229, 0.12);
  --accent-glow: rgba(79, 70, 229, 0.25);

  /* Status / Indicator Colors */
  --color-emerald: #059669;
  --color-emerald-bg: rgba(5, 150, 105, 0.12);
  --color-purple: #7c3aed;
  --color-purple-bg: rgba(124, 58, 237, 0.12);
  --color-blue: #2563eb;
  --color-blue-bg: rgba(37, 99, 235, 0.12);
  --color-amber: #d97706;
  --color-amber-bg: rgba(217, 119, 6, 0.12);
  --color-rose: #e11d48;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Layout */
  --container-max: 1200px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme (Default) */
:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  --bg-primary: #090d16;          /* Deepest Slate */
  --bg-surface: #0f172a;          /* Slate 900 */
  --bg-card: #1e293b;             /* Slate 800 */
  --bg-card-hover: #26334a;       /* Slate 800 Elevated */
  --bg-input: #151e2e;
  --bg-code: #0b111e;
  --bg-header: rgba(15, 23, 42, 0.85);

  --border-subtle: #1e293b;
  --border-card: #334155;         /* Slate 700 */
  --border-highlight: #475569;    /* Slate 600 */

  --text-primary: #f8fafc;        /* Slate 50 */
  --text-secondary: #cbd5e1;      /* Slate 300 */
  --text-muted: #94a3b8;          /* Slate 400 */
  --text-dim: #64748b;            /* Slate 500 */

  --nav-backdrop: rgba(15, 23, 42, 0.88);
  --callout-bg: rgba(79, 70, 229, 0.08);
  --callout-border: rgba(99, 102, 241, 0.25);
}

/* Light Theme */
:root[data-theme="light"] {
  --bg-primary: #f8fafc;          /* Slate 50 */
  --bg-surface: #ffffff;          /* Pure White */
  --bg-card: #ffffff;             /* White Card */
  --bg-card-hover: #f1f5f9;       /* Slate 100 */
  --bg-input: #f1f5f9;
  --bg-code: #f1f5f9;
  --bg-header: rgba(255, 255, 255, 0.9);

  --border-subtle: #f1f5f9;
  --border-card: #e2e8f0;         /* Slate 200 */
  --border-highlight: #cbd5e1;    /* Slate 300 */

  --text-primary: #0f172a;        /* Slate 900 */
  --text-secondary: #334155;      /* Slate 700 */
  --text-muted: #64748b;          /* Slate 500 */
  --text-dim: #94a3b8;            /* Slate 400 */

  --nav-backdrop: rgba(255, 255, 255, 0.92);
  --callout-bg: #eef2ff;
  --callout-border: #c7d2fe;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid #ffffff;
}

/* Accessibility: Focus Styles */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Code & Monospace */
code, pre {
  font-family: var(--font-mono);
}

.inline-code {
  background-color: var(--bg-code);
  color: var(--accent-light);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.88em;
  border: 1px solid var(--border-card);
}

:root[data-theme="light"] .inline-code {
  color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   Layout & Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}

:root[data-theme="light"] .section-tag {
  color: var(--accent-primary);
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.section-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1.2;
  text-decoration: none;
}

.btn-large {
  padding: 0.88rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-highlight);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-tertiary {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}

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

.btn-launch-nav {
  background-color: var(--accent-primary);
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-launch-nav:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
}

.btn-block {
  width: 100%;
}

.btn-patreon {
  background-color: #ff424d;
  color: #ffffff;
  border: 1px solid #ff424d;
  box-shadow: 0 4px 14px rgba(255, 66, 77, 0.25);
}

.btn-patreon:hover {
  background-color: #e63946;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-indigo {
  background-color: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

:root[data-theme="light"] .badge-indigo {
  color: var(--accent-primary);
}

.badge-emerald {
  background-color: var(--color-emerald-bg);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

:root[data-theme="light"] .badge-emerald {
  color: #047857;
}

.badge-purple {
  background-color: var(--color-purple-bg);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.25);
}

:root[data-theme="light"] .badge-purple {
  color: #6d28d9;
}

.badge-blue {
  background-color: var(--color-blue-bg);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

:root[data-theme="light"] .badge-blue {
  color: #1d4ed8;
}

.badge-amber {
  background-color: var(--color-amber-bg);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

:root[data-theme="light"] .badge-amber {
  color: #b45309;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--nav-backdrop);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-card);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  transition: transform var(--transition-fast);
}

.brand-link:hover .brand-logo {
  transform: scale(1.05);
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background-color: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

:root[data-theme="light"] .brand-badge {
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  padding: 0.35rem 0;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

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

.theme-icon {
  transition: transform var(--transition-fast);
}

/* Theme Icon Visibility */
:root[data-theme="dark"] .icon-moon,
:root:not([data-theme="light"]) .icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun,
:root:not([data-theme="light"]) .icon-sun {
  display: block;
}

:root[data-theme="light"] .icon-sun {
  display: none;
}

:root[data-theme="light"] .icon-moon {
  display: block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

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

.mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}

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

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
}

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

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-link {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-link:hover {
  color: var(--accent-light);
}

.btn-mobile-launch {
  margin-top: 0.75rem;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding-top: 5rem;
  padding-bottom: 5.5rem;
  background: radial-gradient(circle at 50% 15%, rgba(79, 70, 229, 0.12) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  max-width: 950px;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 820px;
  margin-bottom: 2.5rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.hero-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  max-width: 780px;
  padding: 1rem 1.35rem;
  background-color: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: var(--radius-md);
  text-align: left;
}

.callout-icon {
  flex-shrink: 0;
  color: var(--accent-light);
  margin-top: 2px;
}

:root[data-theme="light"] .callout-icon {
  color: var(--accent-primary);
}

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

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

/* --------------------------------------------------------------------------
   Features Grid
   -------------------------------------------------------------------------- */
.features-section {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-card);
}

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

.feature-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-lg);
}

.feature-card-highlight {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(5, 150, 105, 0.05) 100%);
}

.feature-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--color-emerald-bg);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

:root[data-theme="light"] .feature-badge {
  color: #047857;
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.icon-indigo { background-color: var(--accent-subtle); color: var(--accent-light); }
.icon-emerald { background-color: var(--color-emerald-bg); color: #10b981; }
.icon-purple { background-color: var(--color-purple-bg); color: #a78bfa; }
.icon-blue { background-color: var(--color-blue-bg); color: #60a5fa; }
.icon-amber { background-color: var(--color-amber-bg); color: #fbbf24; }

:root[data-theme="light"] .icon-indigo { color: var(--accent-primary); }
:root[data-theme="light"] .icon-emerald { color: #047857; }
:root[data-theme="light"] .icon-purple { color: #6d28d9; }
:root[data-theme="light"] .icon-blue { color: #1d4ed8; }
:root[data-theme="light"] .icon-amber { color: #b45309; }

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-description {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}

:root[data-theme="light"] .tag {
  background-color: var(--bg-primary);
  border-color: var(--border-card);
}

/* --------------------------------------------------------------------------
   How It Works & Architecture Figures
   -------------------------------------------------------------------------- */
.how-it-works-section {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-card);
}

.pipeline-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 4rem;
}

.pipeline-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  text-align: center;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  position: relative;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

:root[data-theme="light"] .step-number {
  color: var(--accent-primary);
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

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

/* Figures Gallery */
.figures-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.figures-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.figures-subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
}

.figures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 2rem;
}

.figure-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.figure-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-lg);
}

.figure-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-card);
}

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

.figure-zoom-btn {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.figure-zoom-btn:hover {
  background-color: var(--accent-primary);
  transform: scale(1.08);
}

.figure-caption {
  padding: 1.35rem 1.5rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.figure-label {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.98rem;
}

/* --------------------------------------------------------------------------
   Validation Section
   -------------------------------------------------------------------------- */
.validation-section {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-card);
}

.validation-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-number {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
}

:root[data-theme="light"] .stat-number {
  color: var(--accent-primary);
}

.stat-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.validation-details-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
}

.validation-details-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.validation-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.validation-text:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Get Started Section
   -------------------------------------------------------------------------- */
.get-started-section {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-card);
}

.get-started-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.get-started-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.card-step-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-light);
  margin-bottom: 0.4rem;
}

:root[data-theme="light"] .card-step-badge {
  color: var(--accent-primary);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.get-started-description {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.card-benefits {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.benefit-item {
  font-size: 0.88rem;
  font-weight: 500;
  color: #10b981;
}

:root[data-theme="light"] .benefit-item {
  color: #047857;
}

.code-block-wrapper {
  background-color: var(--bg-code);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.85rem;
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-card);
}

.code-language {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.btn-copy-code {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-copy-code:hover {
  color: var(--text-primary);
  background-color: var(--bg-card);
}

.code-pre {
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

.code-content {
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.code-note {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.text-link {
  color: var(--accent-light);
  text-decoration: underline;
}

:root[data-theme="light"] .text-link {
  color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   Citation Section
   -------------------------------------------------------------------------- */
.citation-section {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-card);
}

.citation-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
}

.citation-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
}

.citation-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.citation-text-block {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
}

.bibtex-box {
  background-color: var(--bg-code);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-card);
}

.bibtex-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-copy-bibtex {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.btn-copy-bibtex:hover {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.bibtex-content {
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.citation-notice {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.citation-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.citation-marker {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background-color: var(--accent-subtle);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 2px;
}

:root[data-theme="light"] .citation-marker {
  color: var(--accent-primary);
}

.doi-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-light);
  text-decoration: underline;
}

:root[data-theme="light"] .doi-link {
  color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   Team Section
   -------------------------------------------------------------------------- */
.team-section {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-card);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.team-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.team-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
}

.team-avatar-initials {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background-color: var(--accent-subtle);
  color: var(--accent-light);
  border: 2px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

:root[data-theme="light"] .team-avatar-initials {
  color: var(--accent-primary);
}

.team-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.team-role {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

:root[data-theme="light"] .team-role {
  color: var(--accent-primary);
}

.team-affiliation {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.team-links {
  display: flex;
  justify-content: center;
}

.orcid-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  transition: all var(--transition-fast);
}

.orcid-link:hover {
  border-color: #a6ce39;
  color: var(--text-primary);
}

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

.research-group-badge {
  text-align: center;
  padding: 1.15rem 1.75rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

.research-group-badge strong {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Licence Section
   -------------------------------------------------------------------------- */
.licence-section {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-card);
}

.licence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.licence-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
}

.licence-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.licence-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.licence-description {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.licence-copyright, .licence-terms {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.licence-notice {
  padding: 1rem 1.5rem;
  background-color: var(--bg-card);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.licence-notice strong {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Support Section
   -------------------------------------------------------------------------- */
.support-section {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-card);
}

.support-content-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.support-heading {
  font-size: clamp(1.4rem, 2.8vw, 1.95rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.support-text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.25rem auto;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-surface);
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.35fr 2fr;
  gap: 3.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-tagline {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 360px;
}

.footer-links-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

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

.footer-heading {
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-card);
  font-size: 0.86rem;
  color: var(--text-dim);
}

.footer-copy strong {
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Lightbox Modal
   -------------------------------------------------------------------------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-modal.is-active {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  z-index: 1;
}

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

.lightbox-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.lightbox-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.lightbox-close-btn:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.lightbox-body {
  padding: 1.5rem;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  max-height: 65vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.lightbox-footer {
  padding: 1rem 1.5rem;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-card);
}

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

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .citation-layout {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 1100px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

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

@media (max-width: 640px) {
  .section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

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

  .get-started-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-links-group {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .support-actions {
    flex-direction: column;
    width: 100%;
  }

  .support-actions .btn {
    width: 100%;
  }
}

/* Ensure completely accessible down to 360px without overflow */
@media (max-width: 420px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .feature-card,
  .get-started-card,
  .citation-card,
  .pipeline-card,
  .validation-details-card,
  .licence-card {
    padding: 1.5rem 1.25rem;
  }

  .brand-title {
    font-size: 0.95rem;
  }

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

/* --------------------------------------------------------------------------
   Reduced Motion Preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Keep long code (BibTeX, shell) inside its card instead of widening the page. */
.citation-layout > *,
.get-started-grid > *,
.citation-card {
  min-width: 0;
}

pre {
  max-width: 100%;
  overflow-x: auto;
}

/* Phones: the hamburger menu and hero already offer "Launch the app". */
@media (max-width: 640px) {
  .btn-launch-nav,
  .brand-badge {
    display: none;
  }

  .nav-container {
    gap: 0.5rem;
  }
}
