/* ==========================================================================
   Coffee Research Lab — Main Stylesheet
   Color Palette: Espresso #2C1810 | Cream #F5F0EB | Roast #8B5E3C
                  Gold #C4956A | White #FFFFFF
   Typography:    Georgia (headings) | system-ui (body)
   Breakpoints:   768px (tablet) | 480px (mobile)
   ========================================================================== */

/* ----- CSS Custom Properties ----- */
:root {
  --espresso: #2C1810;
  --cream: #F5F0EB;
  --roast: #8B5E3C;
  --gold: #C4956A;
  --white: #FFFFFF;
  --espresso-90: rgba(44, 24, 16, 0.9);
  --shadow-sm: 0 2px 8px rgba(44, 24, 16, 0.08);
  --shadow-md: 0 4px 16px rgba(44, 24, 16, 0.12);
  --shadow-lg: 0 8px 32px rgba(44, 24, 16, 0.16);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--espresso);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--espresso);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { list-style: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.section-padding {
  padding: 5rem 0;
}

.text-center { text-align: center; }

.btn-primary,
.btn-secondary,
.btn-outline {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  border: 2px solid transparent;
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.btn-primary:hover {
  background-color: var(--roast);
  border-color: var(--roast);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn-secondary:hover {
  background-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn-outline:hover {
  background-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ----- Fade-in Animation (CSS only) ----- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in.delay-1 { animation-delay: 0.15s; }
.fade-in.delay-2 { animation-delay: 0.3s; }
.fade-in.delay-3 { animation-delay: 0.45s; }
.fade-in.delay-4 { animation-delay: 0.6s; }

/* Scroll animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   1. Navigation — .navbar, .nav-container, .nav-logo, .nav-toggle, .nav-links
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: var(--espresso);
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.nav-logo:hover { color: var(--gold); }

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

.nav-links li {
  list-style: none;
}

.nav-links a {
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after { width: 100%; }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

.nav-toggle .hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--cream);
  transition: all var(--transition);
  border-radius: 2px;
}

.nav-toggle:hover .hamburger-line { background-color: var(--gold); }

/* ==========================================================================
   2. Hero Section — .hero, .hero-content, .hero-cta
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: var(--nav-height);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(44, 24, 16, 0.85) 0%,
    rgba(139, 94, 60, 0.7) 50%,
    rgba(44, 24, 16, 0.8) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 2rem 1.5rem;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
}

.hero-content p {
  color: var(--cream);
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-subheadline {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem) !important;
  margin-bottom: 1rem !important;
}

.hero-intro {
  font-size: 1rem !important;
  opacity: 0.85;
  margin-bottom: 2rem !important;
}

.hero-personal {
  font-size: 0.95rem !important;
  opacity: 0.8;
  font-style: italic;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

/* ==========================================================================
   3. Section Heading — used as h2 class directly
   ========================================================================== */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ==========================================================================
   4. Pillar Cards — index.html
   ========================================================================== */
.pillars {
  padding: 5rem 0;
}

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

.pillar-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pillar-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--gold);
}

.pillar-card h3 {
  margin-bottom: 0.75rem;
}

.pillar-card p {
  color: var(--roast);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ==========================================================================
   5. Stats Bar — .stats-bar, .stats-grid, .stat
   ========================================================================== */
.stats-bar {
  background-color: var(--cream);
  padding: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-number {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--gold);
  display: block;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--roast);
  font-weight: 500;
  display: block;
}

/* ==========================================================================
   6. About Lab Section — index.html
   ========================================================================== */
.about-lab {
  padding: 5rem 0;
  background-color: var(--cream);
}

.about-lab .container {
  max-width: 800px;
  text-align: center;
}

.about-lab p {
  color: var(--roast);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.about-lab .btn-outline {
  margin-top: 1rem;
}

/* ==========================================================================
   7. About Page — .about-bio, .bio-grid, .about-vision, .about-timeline
   ========================================================================== */

/* Bio Section */
.about-bio {
  padding: 5rem 0;
}

.bio-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.bio-photo {
  display: flex;
  justify-content: center;
}

.photo-placeholder {
  width: 250px;
  height: 300px;
  background-color: var(--cream);
  border: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.photo-icon {
  font-size: 4rem;
}

.photo-placeholder p {
  font-weight: 600;
  color: var(--roast);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.bio-text h2 {
  margin-bottom: 0.5rem;
}

.bio-title {
  color: var(--gold);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.bio-text p {
  color: var(--roast);
  line-height: 1.7;
}

/* Vision Section */
.about-vision {
  padding: 5rem 0;
  background-color: var(--cream);
}

.about-vision .container {
  max-width: 800px;
}

.vision-quote {
  border-left: 4px solid var(--gold);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background-color: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.vision-quote p {
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--espresso);
  margin-bottom: 0;
}

/* Timeline Section */
.about-timeline {
  padding: 5rem 0;
}

.timeline {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--gold);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background-color: var(--gold);
  border-radius: 50%;
  transform: translateX(-4.5px);
}

.timeline-year {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.timeline-content p {
  color: var(--roast);
  margin-bottom: 0;
}

/* ==========================================================================
   8. Research Page — .research-intro, .research-cards, .research-card
   ========================================================================== */

/* Research Intro */
.research-intro {
  padding: 4rem 0 2rem;
}

.lead-text {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--roast);
}

/* Research Cards */
.research-cards {
  padding: 2rem 0 5rem;
}

.research-cards .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.research-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gold);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.research-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.research-card-body h3 {
  margin-bottom: 0.75rem;
}

.research-card-body p {
  color: var(--roast);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

/* Color variants */
.research-card--docking { border-left-color: #C4956A; }
.research-card--network { border-left-color: #8B5E3C; }
.research-card--maillard { border-left-color: #D4A574; }
.research-card--admet { border-left-color: #6B3A1F; }

.research-link {
  display: inline-block;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.research-link:hover {
  color: var(--roast);
}

/* Research CTA */
.research-cta {
  padding: 5rem 0;
  background-color: var(--cream);
  text-align: center;
}

.research-cta h2 {
  margin-bottom: 1rem;
}

.research-cta p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--roast);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Publications Section */
.publications {
  padding: 5rem 0;
  background-color: var(--white);
}

.publications .section-heading {
  text-align: center;
  margin-bottom: 0.5rem;
}

.publications-intro {
  text-align: center;
  color: var(--roast);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.pub-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--gold);
  transition: transform var(--transition), box-shadow var(--transition);
}

.pub-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pub-item:nth-child(2) { border-left-color: var(--roast); }
.pub-item:nth-child(3) { border-left-color: #D4A574; }
.pub-item:nth-child(4) { border-left-color: #6B3A1F; }
.pub-item:nth-child(5) { border-left-color: #2D6A4F; }

.pub-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 0.2rem 0.8rem;
  border-radius: 1rem;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.pub-badge--conference { background: #2D6A4F; }

.pub-title {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--espresso);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.pub-authors {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--roast);
  margin-bottom: 0.5rem;
}

.pub-meta {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 1rem;
}

.pub-abstract {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.pub-abstract summary {
  cursor: pointer;
  color: var(--roast);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: system-ui, sans-serif;
}

.pub-abstract summary:hover {
  color: var(--gold);
}

.pub-abstract p {
  margin-top: 0.75rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--cream);
}

.pub-keywords {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.pub-keyword {
  background: var(--cream);
  color: var(--roast);
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.72rem;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  border: 1px solid rgba(139, 94, 60, 0.15);
}

.pub-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pub-link {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.pub-link:hover {
  background: var(--gold);
  color: var(--white);
}

.pub-link--primary {
  background: var(--gold);
  color: var(--white);
}

.pub-link--primary:hover {
  background: var(--roast);
  border-color: var(--roast);
}

/* ==========================================================================
   9. Book Page — cover, USP, TOC, comparison, signup
   ========================================================================== */

/* Book Cover Section */
.book-cover-section {
  padding: 5rem 0;
  background-color: var(--cream);
}

.book-cover-mockup {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.book-spine {
  width: 30px;
  background: linear-gradient(180deg, var(--espresso) 0%, var(--roast) 100%);
  flex-shrink: 0;
}

.book-front {
  flex: 1;
  background: linear-gradient(145deg, var(--espresso), var(--roast));
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 500px;
}

.book-cover-label {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.book-cover-title {
  color: var(--cream) !important;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.book-cover-subtitle {
  color: rgba(245, 240, 235, 0.8);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.book-cover-author {
  color: var(--gold);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0;
}

/* USP Grid */
.book-usp {
  padding: 5rem 0;
}

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

.usp-item {
  text-align: center;
  padding: 1.5rem;
}

.usp-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

.usp-item p {
  color: var(--roast);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Table of Contents (book page — uses divs, not ol/ul) */
.book-toc {
  padding: 5rem 0;
  background-color: var(--cream);
}

.book-toc .toc-list {
  max-width: 600px;
  margin: 0 auto;
}

.toc-part {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(139, 94, 60, 0.15);
  padding-left: 1.5rem;
  position: relative;
}

.toc-part::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.6rem;
  width: 8px;
  height: 8px;
  background-color: var(--gold);
  border-radius: 50%;
}

.toc-part h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.toc-part p {
  color: var(--roast);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Comparison Table */
.book-comparison {
  padding: 5rem 0;
}

.comparison-intro {
  text-align: center;
  color: var(--roast);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(139, 94, 60, 0.15);
}

.comparison-table th {
  background-color: var(--espresso);
  color: var(--cream);
  font-weight: 600;
  font-size: 0.9rem;
}

.comparison-table tbody tr:hover {
  background-color: rgba(196, 149, 106, 0.05);
}

.comparison-highlight {
  background-color: rgba(196, 149, 106, 0.12) !important;
}

.comparison-highlight td {
  color: var(--espresso);
}

/* Signup Section */
.book-signup {
  padding: 5rem 0;
  background-color: var(--cream);
  text-align: center;
}

.book-signup p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--roast);
  font-size: 1.05rem;
  line-height: 1.7;
}

.signup-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 500px;
  margin: 0 auto 1rem;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 250px;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--espresso);
  background-color: var(--white);
  border: 2px solid rgba(139, 94, 60, 0.2);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.signup-form input[type="email"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.2);
}

.signup-note {
  font-size: 0.85rem;
  color: var(--roast);
  opacity: 0.7;
  margin-bottom: 0 !important;
}

/* Download Grid */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 700px;
  margin: 2rem auto 0;
}

.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.download-icon {
  font-size: 2.5rem;
}

.download-label {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--espresso);
}

.download-desc {
  font-size: 0.85rem;
  color: var(--roast);
  text-align: center;
  line-height: 1.5;
}

/* ==========================================================================
   10. Contact Page
   ========================================================================== */
.contact-section {
  padding: 5rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-form-wrapper h2 {
  margin-bottom: 1.5rem;
}

.form-note {
  background-color: var(--cream);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--roast);
  margin-bottom: 1.5rem;
}

/* Contact Form */
.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form .form-group label,
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--espresso);
}

.contact-form .form-group input,
.contact-form .form-group textarea,
.contact-form .form-group select,
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--espresso);
  background-color: var(--white);
  border: 2px solid rgba(139, 94, 60, 0.2);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.2);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(139, 94, 60, 0.45);
}

/* Error message for form validation */
.error-message {
  display: none;
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.input-error {
  border-color: #c0392b !important;
}

/* Contact Info */
.contact-info h2 {
  margin-bottom: 1.5rem;
}

.info-block {
  margin-bottom: 2rem;
}

.info-block h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--espresso);
}

.info-block p {
  color: var(--roast);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-links li {
  list-style: none;
}

.social-links a {
  color: var(--gold);
  font-weight: 500;
  font-size: 0.95rem;
}

.social-links a:hover {
  color: var(--roast);
}

/* ==========================================================================
   11. Footer — .site-footer, .footer-grid, .footer-col, .footer-bottom
   ========================================================================== */
.site-footer {
  background-color: var(--espresso);
  color: var(--cream);
  padding: 4rem 0 2rem;
}

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

.footer-col h4 {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-col p {
  color: rgba(245, 240, 235, 0.7);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col ul li {
  list-style: none;
}

.footer-col a {
  color: rgba(245, 240, 235, 0.7);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 240, 235, 0.1);
  font-size: 0.85rem;
  color: rgba(245, 240, 235, 0.5);
}

/* ==========================================================================
   12. Background Helpers
   ========================================================================== */
.bg-cream { background-color: var(--cream); }
.bg-espresso { background-color: var(--espresso); }
.bg-white { background-color: var(--white); }

/* ==========================================================================
   13. Responsive — Tablet (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  /* Navigation */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--espresso);
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  }

  .nav-links.active { display: flex; }

  .nav-toggle { display: flex; }

  .nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }

  .nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Hero */
  .hero { min-height: 70vh; }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Pillars */
  .pillar-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Bio grid */
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .bio-photo {
    justify-content: center;
  }

  /* Research cards */
  .research-cards .container {
    gap: 1.5rem;
  }

  /* Download grid */
  .download-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  /* Book cover */
  .book-cover-mockup {
    max-width: 320px;
  }

  .book-front {
    min-height: 400px;
    padding: 2rem 1.5rem;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Section spacing */
  .pillars,
  .about-bio,
  .about-vision,
  .about-timeline,
  .research-cards,
  .research-cta,
  .book-cover-section,
  .book-usp,
  .book-toc,
  .book-comparison,
  .book-signup,
  .contact-section,
  .about-lab,
  .section-padding { padding: 3.5rem 0; }

  .research-intro { padding: 3rem 0 1rem; }
}

/* ==========================================================================
   14. Responsive — Mobile (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  body { font-size: 15px; }

  .container { padding: 0 1rem; }

  .pillars,
  .about-bio,
  .about-vision,
  .about-timeline,
  .research-cards,
  .research-cta,
  .book-cover-section,
  .book-usp,
  .book-toc,
  .book-comparison,
  .book-signup,
  .contact-section,
  .about-lab,
  .section-padding { padding: 2.5rem 0; }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .stat-number { font-size: 2rem; }

  /* Hero */
  .hero { min-height: 60vh; }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
    max-width: 280px;
  }

  /* Buttons */
  .btn-primary,
  .btn-secondary,
  .btn-outline {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
  }

  /* USP grid */
  .usp-grid {
    grid-template-columns: 1fr;
  }

  /* Signup form */
  .signup-form {
    flex-direction: column;
    align-items: stretch;
  }

  .signup-form input[type="email"] {
    min-width: auto;
  }

  /* Comparison table */
  .comparison-table {
    font-size: 0.85rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.6rem 0.5rem;
  }

  /* Footer */
  .site-footer { padding: 3rem 0 1.5rem; }
}

/* ==========================================================================
   15. Print Styles
   ========================================================================== */
@media print {
  .navbar,
  .site-footer,
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .nav-toggle {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  .hero { min-height: auto; padding: 2rem 0; margin-top: 0; }
  .hero::before { display: none; }
  .hero-content h1 { color: #000; }
  .hero-content p { color: #333; }
}
