/* ==========================================================================
   FIDES & RATIO - Design System & Stylesheet
   Modern, intellectual, dark-luxury aesthetic for faith and science platform
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #080c16;
  --bg-card: #0e1626;
  --bg-card-hover: #131e33;
  --bg-surface: #152238;
  --bg-input: #0a101d;
  
  --border-color: #1e2e4a;
  --border-focus: #3b82f6;
  --border-gold: rgba(245, 158, 11, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-gold: #f59e0b;
  --accent-gold-light: #fbbf24;
  --accent-gold-glow: rgba(245, 158, 11, 0.18);
  
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.15);
  
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.15);
  
  --accent-danger: #ef4444;
  --accent-purple: #a855f7;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-cinzel: 'Cinzel', serif;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.2);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base & Reset */
*, *::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);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-dark);
}

/* Ambient Background Graphics */
.bg-fx {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.glow-1 {
  top: -10%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0) 70%);
}

.glow-2 {
  top: 40%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(56, 189, 248, 0) 70%);
}

.math-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Helpers - Prevent Clipping & Ensure Wrapping */
h1, h2, h3, h4, p, span, strong, li, a, code {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
}

.gradient-text {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-danger { color: var(--accent-danger) !important; }
.text-warning { color: var(--accent-gold) !important; }
.text-success { color: var(--accent-emerald) !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-normal);
  font-family: var(--font-sans);
}

.btn i {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #080c16;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent-cyan);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.logo-symbol {
  font-size: 1.8rem;
  color: var(--accent-gold);
  line-height: 1;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  display: block;
  padding-top: 1px;
}

.accent-amp {
  color: var(--accent-gold);
}

.logo-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch-container {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.lang-btn.active {
  background: var(--accent-gold);
  color: #080c16;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  z-index: 99;
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mob-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

/* Sections Global */
.section {
  padding: 5.5rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  background: var(--accent-gold-glow);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-gold);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

.text-center {
  text-align: center;
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 5.5rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
  line-height: 1.2;
}

.hero-lead {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  padding: 1.4rem 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.stat-unit {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.visual-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.visual-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 163, 89, 0.15);
}

.hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  display: block;
}

.quote-box {
  position: relative;
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 163, 89, 0.28);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  box-shadow: var(--shadow-md);
}

.quote-separator {
  margin: 0.65rem 0 0.55rem;
  border-top: 1px dashed rgba(212, 163, 89, 0.25);
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--accent-gold);
  line-height: 1;
  opacity: 0.5;
  display: block;
  margin-bottom: -10px;
}

.quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.quote-author {
  font-size: 0.78rem;
  color: var(--accent-gold);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  display: block;
}

/* Motivation Section */
.motivation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.motivation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-gold), var(--accent-cyan));
}

.motivation-author-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.author-avatar {
  width: 56px;
  height: 56px;
  background: var(--accent-gold-glow);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
}

.author-avatar svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5px;
}

.author-name {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.author-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.motivation-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.lead-paragraph {
  font-size: 1.15rem;
  color: var(--text-primary);
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.motivation-body p {
  margin-bottom: 1.2rem;
}

.credo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.credo-item {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.credo-item i {
  color: var(--accent-cyan);
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.credo-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.credo-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

/* Category Filters */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-gold);
}

.filter-btn.active {
  background: var(--accent-gold);
  color: #080c16;
  border-color: var(--accent-gold);
  font-weight: 600;
}

/* Miracles Cards - Robust Grid without Overflow */
.miracles-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  width: 100%;
}

.miracle-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  width: 100%;
  max-width: 100%;
}

.miracle-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: var(--shadow-gold);
}

.miracle-image-wrapper {
  position: relative;
  width: 100%;
  height: 480px;
  background: radial-gradient(circle at center, #0f172a 0%, #030712 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
  border-bottom: 1px solid var(--border-color);
}

.miracle-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.miracle-image-wrapper:hover .miracle-img {
  transform: scale(1.025);
}

.image-zoom-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(8, 12, 22, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 3;
}

.image-zoom-badge:hover {
  background: var(--accent-gold);
  color: #080c16;
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.image-zoom-badge i {
  width: 14px;
  height: 14px;
}

.img-provenance-caption {
  background: rgba(8, 12, 22, 0.96);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.img-provenance-caption i {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--accent-gold);
}

.miracle-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

.m-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
}

.badge-year {
  background: rgba(8, 12, 22, 0.88);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-field {
  background: rgba(245, 158, 11, 0.9);
  color: #080c16;
  font-weight: 700;
}

.miracle-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.miracle-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.35;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.miracle-summary {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.science-breakdown {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
  overflow: hidden;
}

.breakdown-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-gold);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.breakdown-header i {
  width: 18px;
  height: 18px;
}

.breakdown-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 100%;
}

.breakdown-list li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding-left: 1.2rem;
  position: relative;
  overflow-wrap: break-word;
  word-break: normal;
}

.breakdown-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

.breakdown-list strong {
  color: var(--text-primary);
}

/* Formula & Forensic Boxes */
.formula-box {
  background: #070a12;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.8rem;
  max-width: 100%;
  overflow: hidden;
}

.formula-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 0.6rem;
}

.formula-title i {
  width: 16px;
  height: 16px;
}

.formula-content {
  font-size: 1.05rem;
  padding: 0.6rem 0;
  color: #fbbf24;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.formula-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.5rem;
  overflow-wrap: break-word;
}

.forensic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 0.6rem 0;
}

.f-stat {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.f-key {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.f-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.miracle-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

/* Collapsible Drawer & Dossier Links */
.details-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  border-top: 0px solid var(--border-color);
}

.details-drawer.open {
  max-height: 2500px;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.drawer-inner {
  padding-top: 1.5rem;
}

.drawer-inner h4 {
  font-size: 1.05rem;
  color: var(--accent-gold);
  margin-bottom: 0.8rem;
}

.drawer-inner p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.dossier-links {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dossier-links a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  margin: 0 4px;
}

.dossier-links a:hover {
  text-decoration: underline;
}

/* Interactive Science Lab Grid (3 Columns on Large Screens) */
.lab-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.lab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.lab-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.lab-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.ic-yellow { color: var(--accent-gold); }
.ic-blue { color: var(--accent-cyan); }
.ic-amber { color: #f97316; }
.ic-emerald { color: var(--accent-emerald); }
.ic-purple { color: var(--accent-purple); }

.lab-card-title {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.lab-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lab-controls {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  background: var(--bg-surface);
  padding: 1.1rem;
  border-radius: var(--radius-md);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.control-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-gold);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1e293b;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.range-markers {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.lab-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #090e18;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.1rem;
}

.res-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.res-highlight {
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.lab-verdict {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid var(--accent-gold);
  padding: 0.8rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: auto;
}

/* Optics Diagram */
.optics-interactive-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.optics-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.optics-mode-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.optics-mode-btn.active {
  background: var(--accent-emerald);
  color: #080c16;
  border-color: var(--accent-emerald);
}

.optics-diagram {
  background: #060911;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  justify-content: center;
}

.optics-svg {
  width: 100%;
  max-height: 160px;
}

.optics-explanation {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.8rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
}

/* Scientific References Section & Hyperlinks */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.ref-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.ref-card:hover {
  border-color: var(--accent-cyan);
}

.ref-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.ref-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1;
}

.ref-title {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.ref-field {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-cyan);
}

.ref-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.ref-list li {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding-left: 1.2rem;
  position: relative;
}

.ref-list li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: var(--accent-gold);
}

.ref-list strong {
  color: var(--text-primary);
}

.ref-link {
  color: var(--accent-cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.ref-link i {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.ref-link:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

/* Author Section */
.author-profile-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  box-shadow: var(--shadow-lg);
}

.profile-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-right: 2rem;
  border-right: 1px solid var(--border-color);
}

.avatar-large {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(56, 189, 248, 0.2));
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

.avatar-sym {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--accent-gold);
}

.author-credentials h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.author-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.4rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.p-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.profile-right h4 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: var(--accent-gold);
}

.profile-right p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.qed-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--accent-gold);
}

/* Footer & Biblical Scripture Banner */
.site-footer {
  background: #05080e;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 3rem 0;
  margin-top: 4rem;
}

.scripture-banner {
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.scripture-cross {
  font-size: 3.5rem;
  color: var(--accent-gold);
  line-height: 1;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  flex-shrink: 0;
}

.scripture-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

.scripture-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.verse-ref {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.verse-text {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
}

.scripture-divider {
  height: 1px;
  background: rgba(245, 158, 11, 0.25);
  width: 100%;
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.footer-links {
  display: flex;
  gap: 1.8rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-copy {
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sub-copy {
  font-style: italic;
  margin-top: 0.2rem;
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
  .lab-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .miracle-image-wrapper {
    height: 420px;
  }
  .ref-grid {
    grid-template-columns: 1fr;
  }
  .author-profile-card {
    grid-template-columns: 1fr;
  }
  .profile-left {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-right: 0;
    padding-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    padding-bottom: 6px;
  }
  .header-inner {
    height: auto;
    min-height: 62px;
    padding: 4px 0;
  }
  .brand-logo {
    flex: 1;
    min-width: 0;
    gap: 0.6rem;
  }
  .logo-symbol {
    font-size: 1.6rem;
    flex-shrink: 0;
  }
  .logo-text {
    min-width: 0;
    justify-content: center;
  }
  .logo-title {
    font-size: 1.05rem;
    line-height: 1.2;
    padding-top: 2px;
    white-space: nowrap;
  }
  .logo-subtitle {
    font-size: 0.7rem;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    color: var(--text-muted);
    letter-spacing: 0.01em;
  }
  .header-actions {
    flex-shrink: 0;
    gap: 0.6rem;
  }
  .mobile-drawer {
    top: calc(64px + max(8px, env(safe-area-inset-top, 0px)));
  }
  .main-nav {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .header-actions .share-icons {
    display: none;
  }
  .hero-title {
    font-size: clamp(1.8rem, 6vw, 2.2rem);
  }
  .section-title {
    font-size: 1.75rem;
  }
  .motivation-card {
    padding: 1.8rem 1.25rem;
  }
  .miracle-content {
    padding: 1.8rem 1.25rem;
  }
  .author-profile-card {
    padding: 1.8rem 1.25rem;
  }
  .lab-card {
    padding: 1.4rem 1.1rem;
  }
  .credo-grid {
    grid-template-columns: 1fr;
  }
  .forensic-grid {
    grid-template-columns: 1fr;
  }
  .scripture-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.8rem 1.25rem;
  }
  .hero-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
  }
  .stat-divider {
    display: none;
  }
  .footer-bottom-row {
    flex-direction: column;
    text-align: center;
  }
  .footer-copy {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  .header-inner {
    min-height: 58px;
  }
  .brand-logo {
    gap: 0.45rem;
  }
  .logo-symbol {
    font-size: 1.45rem;
  }
  .logo-title {
    font-size: 0.95rem;
  }
  .logo-subtitle {
    font-size: 0.65rem;
    line-height: 1.2;
    max-width: none;
  }
  .header-actions {
    gap: 0.4rem;
  }
  .lang-btn {
    padding: 3px 6px;
    font-size: 0.72rem;
  }
  .miracle-image-wrapper {
    height: 240px;
  }
  .miracle-content {
    padding: 1.25rem 0.9rem;
  }
  .image-zoom-badge span {
    display: none;
  }
  .image-zoom-badge {
    padding: 6px 8px;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }
  .miracle-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  .miracle-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .res-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .optics-toggle-group {
    grid-template-columns: 1fr;
  }
  .formula-box {
    padding: 1rem 0.8rem;
  }
}

/* ==========================================================================
   Social Share Icons
   ========================================================================== */

.share-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-btn.share-fb:hover {
  background: #1877F2;
  color: #fff;
  border-color: #1877F2;
}

.share-btn.share-x:hover {
  background: #000;
  color: #fff;
  border-color: #333;
}

/* Footer Share */
.footer-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 1rem;
}

.footer-share-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.footer-share .share-btn {
  width: 38px;
  height: 38px;
}

@media (max-width: 768px) {
  .footer-share {
    justify-content: center;
  }
}

/* ==========================================================================
   Fullscreen Lightbox Modal
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 1.5rem;
}

.lightbox-modal.open,
.lightbox-modal.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 95vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lightboxZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxZoomIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100002;
  width: 46px;
  height: 46px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.lightbox-close-btn:hover {
  background: var(--accent-gold);
  color: #080c16;
  border-color: var(--accent-gold);
  transform: scale(1.08);
}

.lightbox-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 74vh;
  overflow: hidden;
}

.lightbox-img {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-footer {
  margin-top: 0.85rem;
  width: 100%;
  max-width: 850px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lightbox-caption-box {
  flex: 1;
  min-width: 0;
}

.lightbox-title {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-family: var(--font-serif);
}

.lightbox-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.lightbox-actions {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .lightbox-modal {
    padding: 0.75rem;
  }
  .lightbox-image-container {
    max-height: 65vh;
  }
  .lightbox-img {
    max-height: 65vh;
  }
  .lightbox-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem;
    gap: 0.6rem;
  }
  .lightbox-close-btn {
    top: -2.8rem;
    right: 0.2rem;
    width: 38px;
    height: 38px;
  }
}
