/* Basic reset */
body, h1, h2, h3, p, ul, ol, figure {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; 
  scroll-padding-top: 100px; 
}

body {
  background-color: #fafafa;
  color: #333;
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  line-height: 1.7;
  font-size: 18px;
  margin: 0;
  padding: 0;
}

/* Contents toggle button (hidden on desktop) */
.toc-toggle-floating {
  display: none; /* Hide by default */

  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  background: #006400;
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
}

@media (max-width: 768px) {
  .toc-toggle-floating {
    display: block;
  }
}


.hero-controls {
  margin-top: 2rem;
}

@media (min-width: 769px) {
  .hero-controls {
    display: none; /* Hide on desktop */
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .site-container {
    flex-direction: column;
  }

  .site-toc {
    display: none; /* Hide sidebar by default on mobile */
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fafafa;
    border-top: 1px solid #eee;
    z-index: 999;
    max-height: 70vh;
    overflow-y: auto;
    padding: 1rem;
  }

  .site-toc.open {
    display: block; /* Show when opened */
  }

  .toc-toggle {
    display: inline-block; /* Show the Contents button */
    margin-left: 1rem;
  }

  .site-main {
    padding: 2rem 1rem;
    max-width: 100%;
  }
}

/* --- Hero Block --- */
.hero {
  background-color: #fafafa;
  padding: 6rem 2rem 6rem 2rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 3rem;
  color: #111;
  margin-bottom: 1.5rem;
  border-bottom: 0px;
}

.hero-subtitle {
font-family: 'Source Sans Pro', system-ui, sans-serif;  font-size: 1.3rem;
  color: #333;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* --- Scroll Down Arrow --- */
.scroll-down {
  margin-top: 3rem;
  font-size: 2rem;
  color: #006400;
  animation: bounce 2s infinite;
  cursor: pointer;
}

/* Subtle bounce animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0); 
  }
  40% {
    transform: translateY(8px);
  }
  60% {
    transform: translateY(4px);
  }
}


/* --- Page Layout --- */
.site-container {
  display: flex;
  margin-top: 64px; /* Offset for fixed header */
}

/* --- TOC Sidebar --- */
.site-toc {
  width: 280px;
  flex-shrink: 0;
  padding: 2rem 1rem;
  position: sticky;
  top: 0px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  background: #fafafa;
  border-right: 1px solid #eee;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05); /* <<< soft floating shadow */
  transition: box-shadow 0.3s ease;
}


.site-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-toc li {
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.site-toc a {
  color: #006400;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px dotted #006400;
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.site-toc a:hover {
  color: #004d00;
  text-decoration: underline;
}

.site-toc a.active {
  background-color: #e0f2e9;
  color: #004d00;
  font-weight: normal;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}


/* --- Main Essay Area --- */
.site-main {
  max-width: 720px;
  padding: 2rem 2rem;
  margin: 0 auto;
}
/* --- Typography (Updated) --- */
h1, h2, h3, h4 {
  font-family: 'Libre Baskerville', Georgia, serif;
  color: #111;
  margin-top: 6rem; /* More breathing space for big transitions */
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem; /* Space for subtle underline */
}

/* Main big headings */
h1 {
  font-size: 2.2rem;
}

/* Section headings */
h2 {
  font-size: 1.7rem;
}

/* Inside headings, bold number styling */
h1 strong, h2 strong {
  color: #000;
  font-weight: 700;
  margin-right: 0.5rem;
}


/* Smaller subheadings */
h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
}

h4 {
  font-size: 1.2rem;
  margin-top: 3rem;
}

/* Subtle separator under major headings */
h1::after, h2::after {
  content: "";
  display: block;
  width: 40%; /* Start shorter */
  border-bottom: 2px solid #006400; /* Dark green underline */
  margin-top: 0.5rem;
  transition: width 0.8s ease;
}

h1.in-view::after, h2.in-view::after {
  width: 100%;
}


/* Optional: slightly dim smaller headings */
h3, h4 {
  color: #333;
}

/* --- Paragraphs --- */
p {
  margin-bottom: 1.5rem;
}

/* --- Links --- */
a {
  color: #006400;
  text-decoration: none;
  border-bottom: 1px dotted #006400;
  padding: 0.2rem 0rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

a:hover {
  color: #004d00;
  background-color: #e0f2e9; /* <<< Light green background on hover */
  text-decoration: none;
}


/* --- Figures --- */

figure {
  margin: 4rem 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

figcaption {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.8rem;
  text-align: center;
}

figure {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

figure.in-view {
  opacity: 1;
  transform: translateY(0);
}


/* --- Lists --- */
ul, ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

/* --- Blockquotes --- */
blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background-color: #f0f0f0;
  border-left: 4px solid #ccc;
  border-radius: 6px;
  color: #555;
}

/* Layered blockquotes */
blockquote.layer1 {
  background-color: #f0f4c3;
  border-left: 4px solid #c0ca33;
}

blockquote.layer2 {
  background-color: #d7ccc8;
  border-left: 4px solid #8d6e63;
}

blockquote.layer3 {
  background-color: #ffe0b2;
  border-left: 4px solid #ff9800;
}

blockquote.layer4 {
  background-color: #f8bbd0;
  border-left: 4px solid #ec407a;
}

/* Step blockquotes */
blockquote.step1 {
  background-color: #f0f4c3;
  border-left: 4px solid #c0ca33;
}

blockquote.step2 {
  background-color: #d7ccc8;
  border-left: 4px solid #8d6e63;
}

blockquote.step3 {
  background-color: #ffe0b2;
  border-left: 4px solid #ff9800;
}

blockquote.step4 {
  background-color: #f8bbd0;
  border-left: 4px solid #ec407a;
}

/* Special formatting inside blockquotes */
blockquote h4 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #222;
}

blockquote.step1 strong, 
blockquote.step2 strong,
blockquote.step3 strong,
blockquote.step4 strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #222;
}

/* Special "ending" blockquotes */
blockquote.ending-green {
  background-color: #e0f2e9;
  border-left: 4px solid #006400;
  border-radius: 6px;
  padding: 1.5rem;
  margin: 4rem 0;
  color: #003300;
}

blockquote.ending-red {
  background-color: #fdecea;
  border-left: 4px solid #f44336;
  border-radius: 6px;
  padding: 1.5rem;
  margin: 4rem 0;
  color: #660000;
}


/* Transition markers */
p.transition-marker {
  text-align: center;
  margin: 1rem 0;
  font-size: 2rem;
  color: #006400;
  font-style: normal;
  letter-spacing: 0.05em;

}

/* Images */
img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  display: block;
}

/* Footnotes or small text */
small, .small-text {
  font-size: 0.85rem;
  color: #666;
}

.site-footer {
  text-align: center;
  font-size: 0.9rem;
  color: #888;
  margin: 8rem 0 4rem 0;
  line-height: 1.6;
}

.site-footer a {
  color: #006400;
  text-decoration: none;
  border-bottom: 1px dotted #006400;
}

.site-footer a:hover {
  color: #004d00;
  text-decoration: underline;
}

.small-text {
  font-size: 0.8rem;
  color: #999;
}

blockquote.model-card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-left: 6px solid #006400;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  margin: 2rem auto 4rem auto; /* << tightened top margin */
  max-width: 720px;
  color: #333;
  font-size: 1rem;
  line-height: 1.7;
}

blockquote.model-card ul {
  padding-left: 1.5rem;
  margin-top: 1rem;
}

blockquote.model-card li {
  margin-bottom: 0.8rem;
}

h3 + blockquote.model-card {
  margin-top: 1rem;
}

