/* ============================================
   GIUSE: Long-form Storytelling Website
   Design System & Styles
   ============================================ */

/* Google Fonts Import - Optimized for Vietnamese */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&family=Nunito:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Colors - Primary Palette */
  --color-cardinal: #722F37;
  --color-cardinal-dark: #5A252C;
  --color-cardinal-light: #8B3A44;

  --color-purple: #5D3A6E;
  --color-purple-dark: #4A2E58;
  --color-purple-light: #7A4D8E;

  --color-gold: #C9A227;
  --color-gold-light: #D4B33D;
  --color-gold-dark: #A8871F;

  /* Colors - Backgrounds - UNIFIED */
  --bg-parchment: #FDFBF7;
  /* Lighter, cleaner parchment */
  --bg-cream: #FFFDF9;
  --bg-dark: #2C2C2C;
  /* Kept for specific elements but not pages */
  --bg-dark-cold: #1F2328;
  --bg-warm-gray: #E8E2D8;

  /* Colors - Text */
  --text-charcoal: #333333;
  /* Darker for better contrast */
  --text-muted: #595959;
  --text-light: #F5F0E6;
  --text-gold: #C9A227;

  /* Typography - Font Families - Optimized for Vietnamese */
  --font-heading: 'Be Vietnam Pro', sans-serif;
  --font-subheading: 'Be Vietnam Pro', sans-serif;
  --font-body: 'Nunito', sans-serif;
  /* Nunito provides excellent Vietnamese character support */
  --font-quote: 'Nunito', sans-serif;
  --font-ui: 'Inter', sans-serif;

  /* Typography - Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 4rem;
  --text-6xl: 5rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --sidebar-width: 280px;
  --content-max-width: 900px;
  /* Increased for academic articles */
  --section-padding: 6rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s ease;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 4px 20px rgba(201, 162, 39, 0.2);
}

/* ============================================
   Base Reset & Typography
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 2.0;
  /* Increased for better academic reading */
  color: var(--text-charcoal);
  background-color: var(--bg-parchment);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-cardinal);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
  font-family: var(--font-subheading);
}

h4 {
  font-size: var(--text-xl);
  font-family: var(--font-subheading);
}

p {
  margin-bottom: var(--space-xl);
  /* Increased spacing between paragraphs for academic text */
}

a {
  color: var(--color-cardinal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg,
      rgba(114, 47, 55, 0.92) 0%,
      rgba(93, 58, 110, 0.88) 50%,
      rgba(44, 44, 44, 0.95) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stained-glass" patternUnits="userSpaceOnUse" width="50" height="50"><path d="M25 0 L50 25 L25 50 L0 25 Z" fill="none" stroke="rgba(201,162,39,0.15)" stroke-width="0.5"/><circle cx="25" cy="25" r="8" fill="none" stroke="rgba(201,162,39,0.1)" stroke-width="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23stained-glass)"/></svg>');
  background-size: 150px 150px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  padding: var(--space-xl);
}

.hero-subtitle {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, var(--text-6xl));
  font-weight: 700;
  color: var(--text-light);
  text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: fadeInUp 1.2s ease 0.8s forwards;
}

.hero-title span {
  display: block;
  color: var(--color-gold);
  font-size: 0.5em;
  margin-top: var(--space-md);
  font-weight: 500;
}

.hero-description {
  font-family: var(--font-quote);
  font-size: var(--text-xl);
  font-style: italic;
  color: rgba(245, 240, 230, 0.9);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  opacity: 0;
  animation: fadeInUp 1s ease 1.2s forwards;
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-gold);
  opacity: 0;
  animation: fadeIn 1s ease 1.8s forwards, bounce 2s ease-in-out 2.5s infinite;
}

.scroll-indicator span {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   Navigation (Sticky TOC)
   ============================================ */
.nav-toc {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-parchment) 100%);
  border-right: 1px solid rgba(114, 47, 55, 0.15);
  padding: var(--space-2xl) var(--space-lg);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform var(--transition-medium);
  overflow-y: auto;
}

.nav-toc.is-visible {
  transform: translateX(0);
}

.nav-toc-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--color-gold);
}

.nav-toc-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-cardinal);
  margin-bottom: var(--space-xs);
}

.nav-toc-subtitle {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-toc-list {
  list-style: none;
}

.nav-toc-item {
  margin-bottom: var(--space-sm);
}

.nav-toc-link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-muted);
  border-radius: 6px;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.nav-toc-link:hover {
  color: var(--color-cardinal);
  background: rgba(114, 47, 55, 0.05);
}

.nav-toc-link.is-active {
  color: var(--color-cardinal);
  background: rgba(114, 47, 55, 0.08);
  border-left-color: var(--color-gold);
  font-weight: 500;
}

.nav-toc-number {
  font-weight: 600;
  color: var(--color-gold);
  min-width: 1.5em;
}

/* Mobile Menu Toggle */
.nav-toggle {
  position: fixed;
  top: var(--space-lg);
  left: var(--space-lg);
  z-index: 1001;
  width: 48px;
  height: 48px;
  background: var(--bg-cream);
  border: 1px solid rgba(114, 47, 55, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.nav-toggle:hover {
  background: var(--color-cardinal);
  border-color: var(--color-cardinal);
}

.nav-toggle:hover svg {
  stroke: var(--text-light);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-cardinal);
  stroke-width: 2;
  transition: stroke var(--transition-fast);
}

/* ============================================
   Main Content Layout
   ============================================ */
.main-content {
  margin-left: 0;
  transition: margin-left var(--transition-medium);
}

@media (min-width: 1200px) {
  .nav-toc {
    transform: translateX(0);
  }

  .main-content {
    margin-left: var(--sidebar-width);
  }

  .nav-toggle {
    display: none;
  }
}

/* ============================================
   Content Sections
   ============================================ */
.section {
  padding: var(--section-padding) var(--space-xl);
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

.section-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-number {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-gold);
  border-radius: 20px;
  margin-bottom: var(--space-lg);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-family: var(--font-quote);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-muted);
}

/* Section Themes */
.section--light {
  background-color: var(--bg-parchment);
}

.section--cream {
  background-color: var(--bg-cream);
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-gold);
}

.section--dark .section-number {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.section--dark p {
  color: rgba(245, 240, 230, 0.9);
}

.section--cold {
  background-color: var(--bg-dark-cold);
  color: var(--text-light);
}

.section--cold h2,
.section--cold h3,
.section--cold h4 {
  color: rgba(201, 162, 39, 0.8);
}

.section--gold {
  background: linear-gradient(135deg, var(--bg-cream) 0%, rgba(201, 162, 39, 0.1) 100%);
}

.section--gold .section-number {
  background: var(--color-gold);
  color: var(--bg-dark);
  border-color: var(--color-gold);
}

/* ============================================
   Introduction Section - Drop Cap
   ============================================ */
.intro-text {
  font-size: var(--text-lg);
  line-height: 2;
}

.drop-cap {
  float: left;
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 0.8;
  padding-right: var(--space-md);
  padding-top: var(--space-xs);
  color: var(--color-cardinal);
  position: relative;
}

.drop-cap::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.15) 0%, transparent 60%);
  border-radius: 8px;
  z-index: -1;
}

/* Celtic/Gothic decoration for drop cap */
.drop-cap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
}

/* ============================================
   Vertical Timeline
   ============================================ */
.timeline {
  position: relative;
  padding-left: var(--space-3xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg,
      var(--color-cardinal) 0%,
      var(--color-purple) 50%,
      var(--color-gold) 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-3xl);
  opacity: 0;
  transform: translateX(-20px);
  transition: all var(--transition-slow);
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-3xl) + 0px);
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--bg-parchment);
  border: 3px solid var(--color-cardinal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
}

.timeline-marker svg {
  width: 14px;
  height: 14px;
  fill: var(--color-cardinal);
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.2);
  background: var(--color-cardinal);
}

.timeline-item:hover .timeline-marker svg {
  fill: var(--text-light);
}

.timeline-content {
  background: var(--bg-cream);
  padding: var(--space-xl);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-cardinal);
  transition: all var(--transition-fast);
}

.timeline-item:hover .timeline-content {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.timeline-phase {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.timeline-title {
  font-family: var(--font-subheading);
  font-size: var(--text-xl);
  color: var(--color-cardinal);
  margin-bottom: var(--space-md);
}

/* Dark Timeline Items */
.section--dark .timeline::before,
.section--cold .timeline::before {
  background: linear-gradient(180deg,
      rgba(201, 162, 39, 0.5) 0%,
      rgba(201, 162, 39, 0.8) 100%);
}

.section--dark .timeline-marker,
.section--cold .timeline-marker {
  background: var(--bg-dark);
  border-color: var(--color-gold);
}

.section--dark .timeline-marker svg,
.section--cold .timeline-marker svg {
  fill: var(--color-gold);
}

.section--dark .timeline-content,
.section--cold .timeline-content {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--color-gold);
}

.section--dark .timeline-title,
.section--cold .timeline-title {
  color: var(--color-gold);
}

/* Gold Timeline */
.section--gold .timeline-marker {
  border-color: var(--color-gold);
  background: var(--color-gold);
}

.section--gold .timeline-marker svg {
  fill: var(--bg-dark);
}

.section--gold .timeline-content {
  border-left-color: var(--color-gold);
  box-shadow: var(--shadow-gold);
}

/* ============================================
   Two-Column Layout
   ============================================ */
.two-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (min-width: 900px) {
  .two-column {
    grid-template-columns: 1.2fr 1fr;
  }
}

.column-aside {
  position: sticky;
  top: var(--space-2xl);
}

/* Bible Quote Blockquote */
.bible-quote {
  position: relative;
  background: linear-gradient(135deg, rgba(114, 47, 55, 0.08) 0%, rgba(201, 162, 39, 0.08) 100%);
  padding: var(--space-2xl);
  border-radius: 12px;
  border-left: 4px solid var(--color-gold);
}

.bible-quote::before {
  content: '"';
  position: absolute;
  top: var(--space-md);
  left: var(--space-lg);
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--color-gold);
  opacity: 0.3;
  line-height: 1;
}

.bible-quote-text {
  font-family: var(--font-quote);
  font-size: var(--text-xl);
  font-style: italic;
  line-height: 1.7;
  color: var(--color-cardinal-dark);
  padding-left: var(--space-xl);
}

.bible-quote-source {
  display: block;
  margin-top: var(--space-lg);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: 600;
  color: var(--color-gold);
  text-align: right;
}

/* ============================================
   Flip Cards Grid
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.flip-card {
  perspective: 1000px;
  height: 320px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-xl);
  text-align: center;
}

.flip-card-front {
  background: linear-gradient(135deg, var(--color-cardinal) 0%, var(--color-purple) 100%);
  color: var(--text-light);
  box-shadow: var(--shadow-lg);
}

.flip-card-front::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(201,162,39,0.1)" stroke-width="0.5"/></svg>');
  background-size: 80px;
  opacity: 0.5;
  border-radius: 16px;
}

.flip-card-icon {
  width: 60px;
  height: 60px;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: rgba(201, 162, 39, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.flip-card-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--color-gold);
}

.flip-card-number {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.flip-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--text-light);
  position: relative;
  z-index: 1;
}

.flip-card-subtitle {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--space-sm);
  position: relative;
  z-index: 1;
}

.flip-card-back {
  background: var(--bg-cream);
  color: var(--text-charcoal);
  transform: rotateY(180deg);
  border: 2px solid var(--color-gold);
  box-shadow: var(--shadow-md);
}

.flip-card-back-title {
  font-family: var(--font-subheading);
  font-size: var(--text-lg);
  color: var(--color-cardinal);
  margin-bottom: var(--space-md);
}

.flip-card-back-text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-charcoal);
}

.flip-card-hint {
  position: absolute;
  bottom: var(--space-md);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================
   Tooltips for Citations
   ============================================ */
.citation {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  font-family: var(--font-ui);
  font-size: 0.7em;
  font-weight: 600;
  color: var(--color-cardinal);
  background: rgba(114, 47, 55, 0.1);
  border-radius: 50%;
  cursor: help;
  vertical-align: super;
  margin: 0 2px;
  transition: all var(--transition-fast);
}

.citation:hover {
  background: var(--color-cardinal);
  color: var(--text-light);
}

.citation-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: max-content;
  max-width: 300px;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 400;
  padding: var(--space-sm) var(--space-md);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 100;
  pointer-events: none;
}

.citation-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-dark);
}

.citation:hover .citation-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-12px);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-cold) 100%);
  color: var(--text-light);
  padding: var(--space-4xl) var(--space-xl);
}

.footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-quote {
  font-family: var(--font-quote);
  font-size: var(--text-2xl);
  font-style: italic;
  color: rgba(245, 240, 230, 0.9);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.footer-quote-source {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gold);
}

.footer-divider {
  width: 60px;
  height: 2px;
  background: var(--color-gold);
  margin: var(--space-2xl) auto;
}

.footer-note {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.footer-references {
  margin-top: var(--space-2xl);
  text-align: left;
}

.footer-references-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gold);
  background: transparent;
  border: 1px solid var(--color-gold);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.footer-references-toggle:hover {
  background: var(--color-gold);
  color: var(--bg-dark);
}

.footer-references-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium);
  margin-top: var(--space-lg);
}

.footer-references-list.is-open {
  max-height: 2000px;
}

.footer-references-list ol {
  list-style-position: inside;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: rgba(245, 240, 230, 0.7);
  line-height: 2;
}

.footer-references-list a {
  color: var(--color-gold);
  word-break: break-all;
}

.footer-copyright {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(201, 162, 39, 0.2);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Scroll Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: 4rem;
  }

  h1 {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .drop-cap {
    font-size: 3.5rem;
  }

  .timeline {
    padding-left: var(--space-2xl);
  }

  .timeline-marker {
    left: calc(-1 * var(--space-2xl) - 2px);
    width: 22px;
    height: 22px;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .column-aside {
    position: relative;
    top: 0;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .flip-card {
    height: 280px;
  }

  .bible-quote {
    padding: var(--space-lg);
  }

  .bible-quote::before {
    font-size: 3rem;
  }

  .bible-quote-text {
    font-size: var(--text-lg);
    padding-left: var(--space-lg);
  }
}

/* ============================================
   Subsection Styling
   ============================================ */
.subsection {
  margin-bottom: var(--space-2xl);
}

.subsection-title {
  font-family: var(--font-subheading);
  font-size: var(--text-xl);
  color: var(--color-cardinal);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-gold);
  display: inline-block;
}

.section--dark .subsection-title,
.section--cold .subsection-title {
  color: var(--color-gold);
  border-bottom-color: rgba(201, 162, 39, 0.5);
}

/* ============================================
   Data Table Styling
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
}

.data-table th,
.data-table td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid rgba(114, 47, 55, 0.15);
}

.data-table th {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-cardinal);
  background: rgba(114, 47, 55, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: rgba(201, 162, 39, 0.05);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

  .nav-toc,
  .nav-toggle,
  .scroll-indicator,
  .top-nav {
    display: none !important;
  }

  .main-content,
  .page-content {
    margin-left: 0 !important;
  }

  .section {
    page-break-inside: avoid;
  }

  .flip-card {
    height: auto;
  }

  .flip-card-inner {
    transform: none !important;
  }

  .flip-card-back {
    display: block;
    position: relative;
    transform: none;
    margin-top: var(--space-md);
  }
}

/* ============================================
   Top Navigation Bar (Multi-page)
   ============================================ */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(253, 248, 240, 0.98) 0%, rgba(245, 240, 230, 0.95) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(114, 47, 55, 0.1);
  transition: all var(--transition-medium);
}

.top-nav--transparent {
  background: transparent;
  box-shadow: none;
}

.top-nav--dark {
  background: linear-gradient(180deg, rgba(31, 35, 40, 0.98) 0%, rgba(44, 44, 44, 0.95) 100%);
}

.top-nav--gold {
  background: linear-gradient(180deg, rgba(253, 248, 240, 0.98) 0%, rgba(201, 162, 39, 0.1) 100%);
}

.top-nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.top-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-cardinal);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  font-size: var(--text-2xl);
  color: var(--color-gold);
}

.top-nav--transparent .top-nav-brand,
.top-nav--dark .top-nav-brand {
  color: var(--text-light);
}

.top-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: rgba(114, 47, 55, 0.1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: var(--space-sm);
  transition: all var(--transition-fast);
}

.top-nav-toggle:hover {
  background: var(--color-cardinal);
}

.top-nav-toggle:hover svg {
  stroke: var(--text-light);
}

.top-nav-toggle svg {
  width: 100%;
  height: 100%;
  stroke: var(--color-cardinal);
}

.top-nav--transparent .top-nav-toggle svg,
.top-nav--dark .top-nav-toggle svg {
  stroke: var(--text-light);
}

.top-nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
  flex-wrap: wrap;
  justify-content: center;
}

.top-nav-menu li a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.top-nav-menu li a:hover {
  color: var(--color-cardinal);
  background: rgba(114, 47, 55, 0.08);
}

.top-nav-menu li a.active {
  color: var(--color-cardinal);
  background: rgba(114, 47, 55, 0.1);
  font-weight: 600;
}

.top-nav--transparent .top-nav-menu li a {
  color: rgba(255, 255, 255, 0.8);
}

.top-nav--transparent .top-nav-menu li a:hover,
.top-nav--transparent .top-nav-menu li a.active {
  color: var(--color-gold);
  background: rgba(201, 162, 39, 0.2);
}

.top-nav--dark .top-nav-menu li a {
  color: rgba(255, 255, 255, 0.7);
}

.top-nav--dark .top-nav-menu li a:hover,
.top-nav--dark .top-nav-menu li a.active {
  color: var(--color-gold);
  background: rgba(201, 162, 39, 0.15);
}

/* Mobile Navigation */
@media (max-width: 1100px) {
  .top-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .top-nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-cream);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-sm);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition-medium);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .top-nav-menu.is-visible {
    transform: translateY(0);
    opacity: 1;
  }

  .top-nav-menu li a {
    padding: var(--space-md);
    font-size: var(--text-base);
  }

  .top-nav--dark .top-nav-menu {
    background: var(--bg-dark-cold);
  }
}

/* ============================================
   Page Header (Multi-page)
   ============================================ */
.page-header {
  padding: calc(var(--space-2xl) + 40px) var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, var(--color-cardinal) 0%, var(--color-purple) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="p" patternUnits="userSpaceOnUse" width="50" height="50"><path d="M25 0 L50 25 L25 50 L0 25 Z" fill="none" stroke="rgba(201,162,39,0.1)" stroke-width="0.5"/></pattern></defs><rect fill="url(%23p)" width="100" height="100"/></svg>');
  background-size: 100px;
  opacity: 0.5;
}

.page-header-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.page-header .section-number {
  color: var(--color-gold);
  border-color: rgba(201, 162, 39, 0.5);
  background: rgba(201, 162, 39, 0.1);
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, var(--text-4xl));
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: var(--space-md);
  text-shadow: 2px 4px 15px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
  font-family: var(--font-quote);
  font-size: var(--text-lg);
  font-style: italic;
  color: rgba(245, 240, 230, 0.85);
}

/* Page Header Variants */
.page-header--warm {
  background: linear-gradient(135deg, var(--bg-warm-gray) 0%, var(--bg-cream) 100%);
}

.page-header--warm .page-title {
  color: var(--color-cardinal);
  text-shadow: none;
}

.page-header--warm .page-subtitle {
  color: var(--text-muted);
}

.page-header--dark {
  background: linear-gradient(135deg, var(--bg-dark-cold) 0%, var(--bg-dark) 100%);
}

.page-header--dark .section-number {
  color: rgba(201, 162, 39, 0.8);
  border-color: rgba(201, 162, 39, 0.4);
}

.page-header--dark .page-title {
  color: rgba(255, 255, 255, 0.95);
}

.page-header--gold {
  background: linear-gradient(135deg, #d4a845 0%, var(--color-gold) 50%, #a8871F 100%);
}

.page-header--gold .page-title {
  color: var(--bg-dark);
  text-shadow: 1px 2px 10px rgba(255, 255, 255, 0.2);
}

.page-header--gold .page-subtitle {
  color: rgba(44, 44, 44, 0.8);
}

.page-header--gold .section-number {
  background: rgba(44, 44, 44, 0.2);
  color: var(--bg-dark);
  border-color: rgba(44, 44, 44, 0.3);
}

/* ============================================
   Page Content (Multi-page)
   ============================================ */
.page-content {
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-parchment);
  min-height: 50vh;
}

.page-content--dark {
  background: var(--bg-dark-cold);
  color: var(--text-light);
}

.page-content--dark h3 {
  color: var(--color-gold);
}

.page-content--dark .timeline-content {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--color-gold);
}

.page-content--gold {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.08) 0%, var(--bg-parchment) 100%);
}

.article-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.subsection {
  margin-bottom: var(--space-3xl);
}

.subsection-title {
  font-family: var(--font-subheading);
  font-size: var(--text-xl);
  color: var(--color-cardinal);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-gold);
}

/* ============================================
   Page Navigation Buttons
   ============================================ */
.page-navigation {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-top: var(--space-4xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(114, 47, 55, 0.15);
}

.page-navigation--dark {
  border-top-color: rgba(201, 162, 39, 0.3);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-cardinal);
  background: var(--bg-cream);
  border: 1px solid rgba(114, 47, 55, 0.2);
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background: var(--color-cardinal);
  color: var(--text-light);
  border-color: var(--color-cardinal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-btn-prev {
  margin-right: auto;
}

.nav-btn-next {
  margin-left: auto;
}

.page-navigation--dark .nav-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-gold);
  border-color: rgba(201, 162, 39, 0.3);
}

.page-navigation--dark .nav-btn:hover {
  background: var(--color-gold);
  color: var(--bg-dark);
  border-color: var(--color-gold);
}

/* ============================================
   Page Footer
   ============================================ */
.page-footer {
  padding: var(--space-2xl) var(--space-xl);
  background: var(--bg-cream);
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-muted);
  border-top: 1px solid rgba(114, 47, 55, 0.1);
}

.page-footer--dark {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.6);
  border-top-color: rgba(201, 162, 39, 0.2);
}

/* ============================================
   Hero Home Variant
   ============================================ */
.hero--home {
  padding-top: 100px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--bg-dark);
  background: var(--color-gold);
  border-radius: 50px;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-gold);
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
}

.hero-cta:hover {
  background: var(--color-gold-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201, 162, 39, 0.4);
  color: var(--bg-dark);
}

.hero-cta svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   Chapters Section (Home Page)
   ============================================ */
.chapters-section {
  padding: var(--space-4xl) var(--space-xl);
  background: var(--bg-parchment);
}

.chapters-content {
  max-width: 1200px;
  margin: 0 auto;
}

.chapters-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--color-cardinal);
  margin-bottom: var(--space-md);
}

.chapters-subtitle {
  text-align: center;
  font-family: var(--font-quote);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: var(--space-3xl);
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

.chapter-card {
  position: relative;
  padding: var(--space-2xl);
  background: var(--bg-cream);
  border-radius: 16px;
  text-decoration: none;
  border: 1px solid rgba(114, 47, 55, 0.1);
  transition: all var(--transition-medium);
  overflow: hidden;
}

.chapter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-cardinal), var(--color-purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-medium);
}

.chapter-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-cardinal);
}

.chapter-card:hover::before {
  transform: scaleX(1);
}

.chapter-number {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: rgba(114, 47, 55, 0.1);
  position: absolute;
  top: var(--space-md);
  right: var(--space-lg);
  transition: color var(--transition-fast);
}

.chapter-card:hover .chapter-number {
  color: rgba(201, 162, 39, 0.3);
}

.chapter-title {
  font-family: var(--font-subheading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-cardinal);
  margin-bottom: var(--space-sm);
}

.chapter-desc {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

/* Chapter Card Variants */
.chapter-card--dark {
  background: var(--bg-dark-cold);
  border-color: rgba(201, 162, 39, 0.2);
}

.chapter-card--dark::before {
  background: linear-gradient(90deg, var(--color-gold), rgba(201, 162, 39, 0.5));
}

.chapter-card--dark .chapter-title {
  color: var(--color-gold);
}

.chapter-card--dark .chapter-desc {
  color: rgba(255, 255, 255, 0.7);
}

.chapter-card--dark .chapter-number {
  color: rgba(201, 162, 39, 0.15);
}

.chapter-card--gold {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.15) 0%, var(--bg-cream) 100%);
  border-color: var(--color-gold);
}

.chapter-card--gold::before {
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
}

.chapter-card--featured {
  background: linear-gradient(135deg, var(--color-cardinal) 0%, var(--color-purple) 100%);
  color: var(--text-light);
  border: none;
}

.chapter-card--featured::before {
  background: var(--color-gold);
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.chapter-card--featured:hover::before {
  opacity: 0.1;
  transform: scaleX(1);
}

.chapter-card--featured .chapter-title {
  color: var(--text-light);
}

.chapter-card--featured .chapter-desc {
  color: rgba(255, 255, 255, 0.85);
}

.chapter-card--featured .chapter-number {
  color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Quote Section (Home Page)
   ============================================ */
.quote-section {
  padding: var(--space-4xl) var(--space-xl);
  background: linear-gradient(135deg, var(--color-cardinal) 0%, var(--color-purple) 100%);
  text-align: center;
}

.quote-content {
  max-width: 800px;
  margin: 0 auto;
}

.featured-quote {
  position: relative;
  padding: var(--space-3xl);
}

.featured-quote-text {
  font-family: var(--font-quote);
  font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
  font-style: italic;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
}

.featured-quote-source {
  display: block;
  margin-top: var(--space-xl);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: 600;
  color: var(--color-gold);
}

/* ============================================
   Home Footer
   ============================================ */
.home-footer {
  padding: var(--space-3xl) var(--space-xl);
  background: var(--bg-cream);
  text-align: center;
}

.home-footer .footer-content {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.home-footer p {
  margin-bottom: var(--space-sm);
}

/* ============================================
   Conclusion Box
   ============================================ */
.conclusion-box {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl);
  background: linear-gradient(135deg, rgba(114, 47, 55, 0.08) 0%, rgba(201, 162, 39, 0.08) 100%);
  border-radius: 16px;
  border-left: 4px solid var(--color-gold);
}

.conclusion-box h3 {
  font-family: var(--font-heading);
  color: var(--color-cardinal);
  margin-bottom: var(--space-lg);
}

/* ============================================
   Dark Timeline for Multi-page
   ============================================ */
.timeline--dark::before {
  background: linear-gradient(180deg,
      rgba(201, 162, 39, 0.5) 0%,
      rgba(201, 162, 39, 0.8) 100%);
}

.timeline--dark .timeline-marker {
  background: var(--bg-dark-cold);
  border-color: var(--color-gold);
}

.timeline--dark .timeline-marker svg {
  fill: var(--color-gold);
}

.timeline--dark .timeline-content {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--color-gold);
}

.timeline--dark .timeline-title {
  color: var(--color-gold);
}

.timeline--dark .timeline-content p {
  color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   Compact Inline Navigation
   ============================================ */
.top-nav--compact .top-nav-container {
  padding: var(--space-sm) var(--space-xl);
}

.top-nav-menu--inline {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: center;
}

.top-nav-menu--inline li a {
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

@media (min-width: 1100px) {
  .top-nav-menu--inline li a {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }
}

/* Compact Quote Section */
.quote-section--compact {
  padding: var(--space-2xl) var(--space-xl);
}

.featured-quote--minimal {
  padding: var(--space-xl);
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.featured-quote--minimal::before {
  content: '"';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 6rem;
  color: rgba(201, 162, 39, 0.2);
  line-height: 1;
}

.featured-quote--minimal .featured-quote-text {
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
  line-height: 1.7;
  margin-bottom: 0;
}

.featured-quote--minimal .featured-quote-source {
  margin-top: var(--space-md);
  font-size: var(--text-xs);
}

/* Themed Home Footer */
.home-footer--themed {
  padding: var(--space-xl) var(--space-xl);
  background: linear-gradient(135deg, var(--color-cardinal) 0%, var(--color-purple) 100%);
  border-top: 3px solid var(--color-gold);
}

.home-footer--themed .footer-content {
  color: rgba(255, 255, 255, 0.9);
}

.home-footer--themed .footer-copyright {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* Mobile improvements for compact nav */
@media (max-width: 1100px) {
  .top-nav--compact .top-nav-menu {
    top: 56px;
  }

  .top-nav-menu--inline {
    flex-direction: column;
    flex-wrap: wrap;
  }

  .top-nav-menu--inline li a {
    padding: var(--space-md);
    font-size: var(--text-base);
  }
}

/* ============================================
   ACADEMIC STYLING SYSTEM
   Table of Contents, Typography, APA References
   ============================================ */

/* Academic Layout Container */
.academic-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* Table of Contents Sidebar */
.toc-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: var(--space-md);
  background: linear-gradient(135deg, rgba(253, 248, 240, 0.95) 0%, rgba(245, 240, 230, 0.9) 100%);
  border: 1px solid rgba(114, 47, 55, 0.15);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.toc-sidebar::-webkit-scrollbar {
  width: 4px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
  background: rgba(114, 47, 55, 0.3);
  border-radius: 2px;
}

.toc-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-cardinal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-gold);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: var(--space-xs);
}

.toc-list a {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-charcoal);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--color-cardinal);
  background: rgba(114, 47, 55, 0.08);
  border-left-color: var(--color-cardinal);
}

.toc-list a.active {
  color: var(--color-cardinal);
  background: rgba(114, 47, 55, 0.1);
  border-left-color: var(--color-gold);
  font-weight: 500;
}

.toc-list .toc-sub {
  padding-left: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Academic Content Area */
.academic-content {
  max-width: 900px;
}

.academic-content h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-cardinal);
  margin: var(--space-2xl) 0 var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid rgba(201, 162, 39, 0.4);
}

.academic-content h3 {
  font-family: var(--font-subheading);
  font-size: var(--text-xl);
  color: var(--color-purple);
  margin: var(--space-xl) 0 var(--space-md);
  font-weight: 600;
}

.academic-content h4 {
  font-family: var(--font-subheading);
  font-size: var(--text-lg);
  color: var(--text-charcoal);
  margin: var(--space-lg) 0 var(--space-sm);
  font-weight: 600;
  font-style: italic;
}

.academic-content p {
  font-family: var(--font-body);
  font-size: 1.15rem;
  /* Slightly larger for better readability */
  line-height: 2.1;
  /* Very generous for academic reading */
  color: var(--text-charcoal);
  margin-bottom: var(--space-lg);
  text-align: justify;
  hyphens: auto;
}

.academic-content p:first-of-type::first-letter {
  font-size: 3.5em;
  float: left;
  line-height: 1;
  margin-right: 0.1em;
  font-family: var(--font-heading);
  color: var(--color-cardinal);
}

/* Academic Citation Superscript */
.cite-ref {
  font-size: 0.7em;
  vertical-align: super;
  color: var(--color-cardinal);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.cite-ref:hover {
  color: var(--color-gold);
}

/* Academic Blockquote */
.academic-quote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, rgba(93, 58, 110, 0.08) 0%, rgba(114, 47, 55, 0.05) 100%);
  border-left: 4px solid var(--color-purple);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-quote);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-charcoal);
  line-height: 1.7;
}

.academic-quote cite {
  display: block;
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

/* Key Concepts Box */
.concept-box {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.1) 0%, rgba(201, 162, 39, 0.05) 100%);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 8px;
}

.concept-box-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.concept-box-title::before {
  content: '💡';
}

.concept-box p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-xs);
}

.concept-box p:last-child {
  margin-bottom: 0;
}

/* Academic Statistics Box */
.stats-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--bg-cream);
  border-radius: 8px;
  border: 1px solid rgba(114, 47, 55, 0.1);
}

.stat-item {
  text-align: center;
  padding: var(--space-md);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-cardinal);
  display: block;
}

.stat-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-xs);
}

/* APA References Section */
.references-section {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 2px solid rgba(114, 47, 55, 0.2);
}

.references-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-cardinal);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.references-list {
  list-style: none;
  padding: 0;
  counter-reset: ref-counter;
}

.references-list li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-charcoal);
  /* APA hanging indent */
  text-indent: -2rem;
  padding-left: 2rem;
  margin-left: 2rem;
}

.references-list li::before {
  counter-increment: ref-counter;
  content: "[" counter(ref-counter) "]";
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--color-cardinal);
  font-size: var(--text-xs);
}

.references-list li em {
  font-style: italic;
}

.references-list li a {
  color: var(--color-purple);
  text-decoration: none;
  word-break: break-all;
}

.references-list li a:hover {
  text-decoration: underline;
}

/* Academic Tables */
.academic-table {
  width: 100%;
  margin: var(--space-xl) 0;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: var(--text-sm);
}

.academic-table thead {
  background: linear-gradient(135deg, var(--color-cardinal) 0%, var(--color-purple) 100%);
  color: var(--text-light);
}

.academic-table th {
  padding: var(--space-md);
  text-align: left;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.academic-table td {
  padding: var(--space-md);
  border-bottom: 1px solid rgba(114, 47, 55, 0.1);
  vertical-align: top;
}

.academic-table tbody tr:hover {
  background: rgba(201, 162, 39, 0.05);
}

/* Dark Theme TOC */
.theme-dark .toc-sidebar {
  background: linear-gradient(135deg, rgba(44, 44, 44, 0.95) 0%, rgba(31, 35, 40, 0.9) 100%);
  border-color: rgba(201, 162, 39, 0.2);
}

.theme-dark .toc-title {
  color: var(--color-gold);
}

.theme-dark .toc-list a {
  color: rgba(255, 255, 255, 0.8);
}

.theme-dark .toc-list a:hover,
.theme-dark .toc-list a.active {
  color: var(--color-gold);
  background: rgba(201, 162, 39, 0.1);
}

.theme-dark .academic-content h2 {
  color: var(--color-gold);
}

.theme-dark .academic-content h3 {
  color: rgba(201, 162, 39, 0.8);
}

.theme-dark .academic-content p {
  color: rgba(255, 255, 255, 0.9);
}

.theme-dark .academic-content p:first-of-type::first-letter {
  color: var(--color-gold);
}

.theme-dark .references-section {
  border-top-color: rgba(201, 162, 39, 0.3);
}

.theme-dark .references-title {
  color: var(--color-gold);
}

.theme-dark .references-list li {
  color: rgba(255, 255, 255, 0.85);
}

.theme-dark .references-list li::before {
  color: var(--color-gold);
}

/* Gold Theme TOC */
.theme-gold .toc-sidebar {
  background: linear-gradient(135deg, rgba(253, 248, 240, 0.98) 0%, rgba(255, 248, 230, 0.95) 100%);
  border-color: rgba(201, 162, 39, 0.3);
}

.theme-gold .toc-title {
  color: var(--color-gold-dark);
  border-bottom-color: var(--color-gold);
}

.theme-gold .toc-list a:hover,
.theme-gold .toc-list a.active {
  color: var(--color-gold-dark);
  border-left-color: var(--color-gold);
}

/* Mobile Responsive TOC */
@media (max-width: 1024px) {
  .academic-layout {
    grid-template-columns: 1fr;
    padding: var(--space-lg);
  }

  .toc-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    margin-bottom: var(--space-xl);
  }

  .toc-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
  }

  .toc-list .toc-sub {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .toc-list {
    grid-template-columns: 1fr;
  }

  .academic-content p {
    text-align: left;
    hyphens: none;
  }

  .academic-content p:first-of-type::first-letter {
    font-size: 2.5em;
  }

  .stats-box {
    grid-template-columns: repeat(2, 1fr);
  }

  .references-list li {
    font-size: var(--text-xs);
    text-indent: 0;
    padding-left: 1.5rem;
    margin-left: 0;
  }

  .references-list li::before {
    position: static;
    display: inline;
    margin-right: var(--space-xs);
  }
}

/* Enhance Hero Title */
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 8vw, var(--text-6xl));
  /* Increased size */
  font-weight: 800;
  /* Bolder */
  color: var(--color-gold);
  /* Gold color */
  text-shadow: 0 4px 25px rgba(201, 162, 39, 0.4);
  /* Stronger glow */
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: fadeInUp 1.2s ease 0.8s forwards;
  letter-spacing: -0.02em;
}

.hero-title span {
  display: block;
  color: var(--text-light);
  /* White for subtitle */
  font-size: 0.4em;
  margin-top: var(--space-md);
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.9;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Enhance Hero CTA Button */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--color-gold) 0%, #E5C163 100%);
  color: var(--color-cardinal);
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(201, 162, 39, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
}

.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.5s;
}

.hero-cta:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(201, 162, 39, 0.5);
  color: #5a232b;
}

.hero-cta:hover::before {
  transform: translateX(100%) skewX(-15deg);
}

.hero-cta span {
  position: relative;
  z-index: 1;
}

.hero-cta svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.hero-cta:hover svg {
  transform: translateX(5px);
}

/* Update Quote Section Colors */
.quote-section--compact {
  background-color: var(--bg-parchment);
  border-top: 4px solid var(--color-gold);
  border-bottom: 1px solid rgba(114, 47, 55, 0.1);
}

.featured-quote--minimal .featured-quote-text {
  color: var(--color-cardinal);
  font-family: var(--font-heading);
  font-weight: 600;
}

.featured-quote--minimal .featured-quote-source {
  color: var(--text-muted);
}

/* Update Footer Colors */
.home-footer--themed {
  background-color: var(--color-cardinal);
  color: rgba(255, 255, 255, 0.8);
  border-top: none;
}

.home-footer--themed .footer-copyright {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  opacity: 0.8;
}

/* ============================================
   Catholic Liturgical Color Theme Override
   For GIUSE: Coming-of-Age Story
   ============================================ */

/* Override Hero Section with Catholic Colors */
.hero {
  background: linear-gradient(135deg,
      #2D5A3D 0%,
      /* Liturgical Green - Hope & Growth */
      #4A2C6E 50%,
      /* Liturgical Purple - Trials & Preparation */
      #1F4029 100%) !important;
  /* Deep Forest Green */
}

.hero::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cross" patternUnits="userSpaceOnUse" width="40" height="40"><path d="M20 5 L20 35 M5 20 L35 20" fill="none" stroke="rgba(201,162,39,0.15)" stroke-width="1"/><circle cx="20" cy="20" r="6" fill="none" stroke="rgba(201,162,39,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23cross)"/></svg>') !important;
  background-size: 80px 80px !important;
}

/* Enhanced Hero Title - Gold Glory */
.hero-title {
  color: #C9A227 !important;
  text-shadow: 0 0 40px rgba(201, 162, 39, 0.5), 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.hero-title span {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Quote Section - Warm Catholic */
.quote-section--compact {
  background: linear-gradient(135deg, #FDFBF7 0%, #F5EFE0 100%) !important;
  border-top: 3px solid #C9A227 !important;
  padding: 2rem 1rem !important;
}

.featured-quote-text {
  color: #4A2C6E !important;
  font-size: 1.1rem !important;
}

.featured-quote-source {
  color: #2D5A3D !important;
  font-weight: 600 !important;
}

/* Footer - Deep Purple Catholic */
.home-footer--themed {
  background: linear-gradient(135deg, #4A2C6E 0%, #3A2258 100%) !important;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 1.5rem !important;
}

.home-footer--themed .footer-copyright {
  color: rgba(201, 162, 39, 0.9) !important;
}

/* ============================================
   Enhanced Quote Section - Stand Out Colors
   ============================================ */
.quote-section--compact {
  background: linear-gradient(135deg, #4A2C6E 0%, #2D5A3D 100%) !important;
  border-top: none !important;
  border-bottom: none !important;
  padding: 3rem 2rem !important;
  position: relative;
  overflow: hidden;
}

.quote-section--compact::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 8rem;
  font-family: Georgia, serif;
  color: rgba(201, 162, 39, 0.15);
  line-height: 1;
}

.featured-quote--minimal {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.featured-quote--minimal .featured-quote-text {
  color: #FFFFFF !important;
  font-size: 1.35rem !important;
  font-style: italic !important;
  line-height: 1.8 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.featured-quote--minimal .featured-quote-source {
  color: #C9A227 !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  margin-top: 1rem;
  display: block;
}

/* ============================================
   Unified Footer Style - All Pages
   ============================================ */
.page-footer {
  background: linear-gradient(135deg, #4A2C6E 0%, #3A2258 100%) !important;
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 1.5rem 2rem !important;
  text-align: center !important;
  border-top: 3px solid #C9A227 !important;
}

.page-footer p {
  color: rgba(201, 162, 39, 0.9) !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.08em !important;
  margin: 0 !important;
}

/* ============================================
   Enhanced Hero Animations - Continuous Effects
   ============================================ */

@keyframes glowText {

  0%,
  100% {
    text-shadow: 0 0 30px rgba(201, 162, 39, 0.4), 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  50% {
    text-shadow: 0 0 50px rgba(201, 162, 39, 0.8), 0 0 20px rgba(201, 162, 39, 0.4), 0 4px 20px rgba(0, 0, 0, 0.4);
  }
}

@keyframes pulseBtn {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.4);
    transform: scale(1);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(201, 162, 39, 0);
    transform: scale(1.02);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(201, 162, 39, 0);
    transform: scale(1);
  }
}

.hero-title {
  animation: fadeInUp 1.2s ease 0.8s forwards, glowText 3s ease-in-out 2s infinite !important;
}

.hero-cta {
  animation: fadeInUp 1s ease 1.5s forwards, pulseBtn 2s infinite 2.5s !important;
}