/* ==========================================================================
   SYNAIKA ACADEMIC LAYOUT ARCHITECTURE
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--void);
  color: var(--parchment);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  position: relative;
  background: var(--void);
  min-height: 100vh;
}

#cartography-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85; /* Subtle background presence */
}

::selection {
  background: var(--gold-faint);
  color: var(--gold);
}

.container {
  width: 100%;
  max-width: 1140px; /* Slightly narrower for reading comfort */
  margin: 0 auto;
  padding: 0 2rem;
}

/* Sections */
section {
  position: relative;
  z-index: 10;
  padding: 7rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

section:last-of-type {
  border-bottom: none;
}

.chapter-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.chapter-label::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--gold-muted);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--parchment);
  margin-bottom: 1.25rem;
}

.section-desc {
  font-size: clamp(1.05rem, 1.4vw, 1.15rem);
  max-width: 680px;
  margin-bottom: 4rem;
  color: var(--parchment-muted);
  line-height: 1.7;
}

/* Navigation */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.25rem 2rem;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-glyph-img {
  width: 28px;
  height: 28px;
  opacity: 0.9;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--parchment);
  text-transform: uppercase;
}

.brand-title span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--parchment-muted);
  font-family: var(--font-sans);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--parchment);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--parchment);
  transition: all 0.3s ease;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  section { padding: 5rem 0; }
  
  nav#main-nav.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--void-deep);
    border-bottom: 1px solid var(--border-subtle);
    padding: 2rem;
  }
  
  nav#main-nav.open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }
}
