/* ============================================================
   GLOBAL RESET, BASE, & FLEXIBLE LAYOUT
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #1a1a1a;
  color: #1e1e2a;
  line-height: 1.6;
  scroll-behavior: smooth;
  max-width: 100%;
  margin: 0;
  /* Matches index.html padding precisely to ensure aligned side distances */
  padding: 2rem max(20px, 5%); 
}

/* BACKGROUND VIDEO LAYER (FIXED, FULL SCREEN) */
#video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

#intro-video {
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  background-color: #000;
}

/* STRUCTURAL CONTENT CONTAINERS (MATCHES INDEX LAYOUT PROPORTIONS) */
.container, main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

/* CENTRAL HUB LAYOUT & HEADINGS */
main h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #f8fafc;
  text-align: center;
}

.chapter-list {
  list-style: none;
  padding: 0;
  width: 100%;
}

.chapter-item {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #475569;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  transition: transform 0.2s;
  width: 100%;
}

.chapter-item:hover {
  transform: scale(1.01);
}

.chapter-item a {
  text-decoration: none;
  color: #f0b86e;
  font-weight: 600;
  font-size: 1.2rem;
}

.chapter-desc {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* BUTTON COMPONENTS */
.menu-return-btn {
  display: inline-block;
  text-decoration: none;
  background: rgba(240, 184, 110, 0.15);
  border: 1px solid #f0b86e;
  color: #f0b86e;
  padding: 0.6rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease-in-out;
}

.menu-return-btn:hover {
  background: rgba(240, 184, 110, 0.3);
  transform: translateY(-1px);
}

/* NAVIGATION HEADER */
.top-header {
  position: relative;
  background: rgba(255, 255, 255, 0.73);
  backdrop-filter: blur(4px);
  border-radius: 3rem;
  padding: 1rem 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(235, 233, 228, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

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

.nav-links a {
  text-decoration: none;
  color: #4a3f2e;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #b2773c;
}

.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #e2d9cd;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  transition: transform 0.2s;
}

.theme-toggle-btn:hover {
  transform: scale(1.05);
}

/* MONOGRAPH FRAMEWORK LAYOUT */
.chapter-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(2px);
  border-radius: 2rem;
  padding: 3rem;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(235, 233, 228, 0.8);
  margin-bottom: 2rem;
  width: 100%;
}

.chapter-meta {
  font-size: 0.85rem;
  font-weight: 700;
  color: #a8713a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

h1.chapter-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e1e2a;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: 1.2rem;
  font-weight: 500;
  color: #7b6b54;
  border-left: 3px solid #c9ad7a;
  padding-left: 1rem;
  margin-bottom: 2.5rem;
}

/* EXEGESIS PROSE TYPOGRAPHY */
.prose-section {
  font-size: 1.05rem;
  color: #2e2d2c;
  margin-bottom: 2rem;
}

.prose-section p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

h2.section-heading {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: #1e1e2a;
  border-bottom: 1px solid #e4dbcf;
  padding-bottom: 0.4rem;
}

.prose-section ul, 
.prose-section ol {
  margin: 1rem 0 1rem 2rem;
}

.prose-section li {
  margin-bottom: 0.5rem;
}

/* MATHEMATICAL BREAKOUT BLOCKS */
.math-container {
  background: rgba(250, 247, 242, 0.85);
  border: 1px solid #e7dfd2;
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  width: 100%;
}

.math-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #7b6b54;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.canonical-box {
  border-left: 4px solid #c6a15b;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

/* METRIC CONVERSION GRID COMPONENT */
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
  width: 100%;
}

.metric-card {
  background: rgba(254, 252, 247, 0.95);
  border: 1px solid #eee7df;
  border-radius: 1rem;
  padding: 1.5rem;
}

.metric-card h3 {
  font-size: 1.1rem;
  color: #a8713a;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.metric-card p {
  font-size: 0.95rem;
  color: #2e2d2c;
  text-align: left !important;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }
}

/* EPISTEMIC ALERT/NOTE BOX */
.epistemic-note {
  background: rgba(255, 246, 234, 0.95);
  padding: 1.2rem 1.5rem;
  border-radius: 1rem;
  margin: 2rem 0;
  font-size: 0.95rem;
  border-left: 4px solid #c6a15b;
  width: 100%;
}

/* TABLE STYLES */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  overflow: hidden;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e7dfd2;
}

th {
  background: rgba(168, 113, 58, 0.15);
  color: #a8713a;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

/* CONTACT & FOOTER */
.contact-mini {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.85rem;
  color: #e0e0e0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  padding: 0.8rem 1.5rem;
  border-radius: 2rem;
  width: fit-content;
  margin: 2rem auto 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-mini a {
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 500;
}

.contact-mini a:hover {
  color: #f0b86e;
  text-decoration: underline;
}

footer {
  text-align: center;
  color: #ffffff;
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* ============================================================
   DARK MODE OVERRIDES
   ============================================================ */
[data-theme="dark"] body {
  background: transparent;
}

[data-theme="dark"] .chapter-item {
  background: rgba(15, 23, 42, 0.8);
  border-color: #334155;
}

[data-theme="dark"] .chapter-item a {
  color: #f0b86e;
}

[data-theme="dark"] .chapter-desc {
  color: #94a3b8;
}

[data-theme="dark"] main h1 {
  color: #e0f0ff;
}

[data-theme="dark"] .top-header,
[data-theme="dark"] .chapter-card {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: #475569 !important;
  color: #e5e7eb;
}

[data-theme="dark"] h1.chapter-title,
[data-theme="dark"] h2.section-heading {
  color: #f8fafc;
}

[data-theme="dark"] h2.section-heading {
  border-bottom-color: #334155;
}

[data-theme="dark"] .hero-tagline {
  color: #cbd5e1;
  border-left-color: #f0b86e;
}

[data-theme="dark"] .prose-section {
  color: #d1d5db;
}

[data-theme="dark"] .math-container {
  background: rgba(15, 23, 42, 0.6);
  border-color: #334155;
}

[data-theme="dark"] .math-label {
  color: #94a3b8;
}

[data-theme="dark"] .canonical-box {
  background: rgba(30, 41, 59, 0.95);
  border-left-color: #f0b86e;
}

[data-theme="dark"] .epistemic-note {
  background: rgba(30, 42, 58, 0.95);
  color: #e2e8f0;
  border-left-color: #f0b86e;
}

[data-theme="dark"] .top-header .nav-links a {
  color: #cbd5e1;
}

[data-theme="dark"] .top-header .nav-links a:hover {
  color: #f0b86e;
}

[data-theme="dark"] .theme-toggle-btn {
  background: rgba(21, 27, 43, 0.9);
  border-color: #475569;
  color: #cbd5e1;
}

[data-theme="dark"] .contact-mini {
  background: rgba(0, 0, 0, 0.8);
  border-color: #475569;
}

[data-theme="dark"] .metric-card {
  background: rgba(15, 23, 42, 0.5);
  border-color: #334155;
}

[data-theme="dark"] .metric-card h3 {
  color: #f0b86e;
}

[data-theme="dark"] .metric-card p {
  color: #cbd5e1;
}

[data-theme="dark"] table {
  background: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] th, 
[data-theme="dark"] td {
  border-bottom-color: #334155;
  color: #cbd5e1;
}

[data-theme="dark"] th {
  background: rgba(240, 184, 110, 0.15);
  color: #f0b86e;
}


/* ============================== */
/* Domain Hub Navigation          */
/* ============================== */
.hub-nav-container {
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(226, 217, 206, 0.3);
}

.hub-nav-container .back-link {
  background: rgba(240, 235, 226, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: #5b4b34;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}

.hub-nav-container .back-link:hover {
  background: rgba(226, 213, 194, 0.9);
  color: #3e3220;
}

/* ============================== */
/* Section Divider (domain hubs)  */
/* ============================== */
.section-divider {
  text-align: center;
  margin: 2.5rem 0 1.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(240, 184, 110, 0.15);
  border-left: 4px solid #f0b86e;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: #f0b86e;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-divider .status {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 400;
  text-transform: none;
}

[data-theme="dark"] .section-divider {
  background: rgba(240, 184, 110, 0.08);
  border-left-color: #f0b86e;
}

/* ============================== */
/* Chapter List (domain hubs)     */
/* 2026-04-07                     */
/* ============================== */
.chapter-list {
  list-style: none;
  padding: 0;
  width: 100%;
}

.chapter-item {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #475569;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  transition: transform 0.2s;
  width: 100%;
  list-style: none;
}

.chapter-item:hover {
  transform: scale(1.01);
}

.chapter-item a {
  text-decoration: none;
  color: #f0b86e;
  font-weight: 600;
  font-size: 1.2rem;
}

.chapter-desc {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

[data-theme="dark"] .chapter-item {
  background: rgba(15, 23, 42, 0.8);
  border-color: #334155;
}

[data-theme="dark"] .chapter-item a {
  color: #f0b86e;
}

[data-theme="dark"] .chapter-desc {
  color: #94a3b8;
}

/* ============================== */
/* Central Hub Grid & Cards       */
/* ============================== */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.hub-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(240, 184, 110, 0.3);
  border-radius: 1rem;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 180px;
}

.hub-card:hover {
  border-color: #f0b86e;
  transform: translateY(-4px);
}

.hub-card .title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f0b86e;
  margin-bottom: 0.5rem;
}

.hub-card .desc {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
  flex: 1;
}

.hub-card .chapters {
  font-size: 1.1rem;
  color: #ffffff;
  margin-top: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(240, 184, 110, 0.15);
}

[data-theme="dark"] .hub-card {
  background: rgba(15, 23, 42, 0.8);
}

/* ============================== */
/* Teaser Box (Central Hub only)  */
/* ============================== */
.teaser-box {
  text-align: center;
  margin: 3rem auto 2rem;
  padding: 1.5rem 2rem;
  max-width: 700px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid #f0b86e;
  border-radius: 1rem;
  backdrop-filter: blur(4px);
}

.teaser-box p {
  margin: 0.25rem 0;
  font-family: 'Inter', system-ui, sans-serif;
}

.teaser-box .title {
  color: #f0b86e;
  font-weight: 600;
  font-size: 1.1rem;
}

.teaser-box .desc {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.teaser-box .footer-text {
  color: #94a3b8;
  font-size: 0.85rem;
}




