:root {
  --gold: #C9A84C;
  --bg-deep: #050505;
  --text-primary: #f5f0e8;
  --text-muted: rgba(245, 240, 232, 0.7);
  
  --font-serif-heading: 'Lora', serif;
  --font-serif-body: 'Spectral', serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --overlay-dark: rgba(5, 5, 5, 0.75);
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-serif-body);
  font-size: 1.15rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4 {
  font-family: var(--font-serif-heading);
  font-weight: 400;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0,0,0,0.8);
}

h1 { font-size: clamp(3rem, 7vw, 6rem); margin-bottom: 2rem; }
h2 { font-size: clamp(2rem, 5vw, 4rem); }

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover { color: var(--gold); }

/* Navigation Overlay */
nav {
  position: absolute;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 5%;
  z-index: 100;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
}
nav .brand {
  font-family: var(--font-serif-heading);
  font-size: 1.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
nav ul {
  display: flex;
  gap: 3rem;
  list-style: none;
}
nav ul a { color: var(--text-primary); text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
nav ul a:hover, nav ul a.active { color: var(--gold); }

/* Cinematic Full-Bleed Sections */
.cinematic-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10vh 5%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax Effect */
}

/* Base Gradient Overlay for Readability */
.cinematic-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--overlay-dark);
  background: linear-gradient(to bottom, rgba(5,5,5,0.4) 0%, rgba(5,5,5,0.8) 40%, rgba(5,5,5,0.95) 100%);
  z-index: 1;
}

.content-layer {
  position: relative;
  z-index: 2;
  max-width: 1000px;
}

/* Feature Grid inside Cinematic Layer */
.cinematic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  text-align: left;
  margin-top: 6rem;
}
.grid-card {
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 3rem;
  transition: transform 0.4s ease, background 0.4s ease;
}
.grid-card:hover {
  transform: translateY(-5px);
  background: rgba(10, 10, 10, 0.7);
  border-color: var(--gold);
}

/* Container for Standard Content (Library/Manifesto) */
.glass-container {
  max-width: 1200px;
  margin: 15vh auto 5vh;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 5%;
  position: relative;
  z-index: 2;
  min-height: 80vh;
}

/* Series Item (Cinematic Row) */
.series-row {
  display: flex;
  margin-bottom: 6rem;
  gap: 4rem;
  align-items: center;
}
.series-row:nth-child(even) { flex-direction: row-reverse; }
.series-hero {
  flex: 1;
  position: relative;
  height: 60vh;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}
.series-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 10s ease;
}
.series-row:hover .series-hero img {
  transform: scale(1.05);
}
.series-details {
  flex: 1;
  text-align: left;
}
.series-details h3 { font-size: 3rem; margin-bottom: 1.5rem; }
.series-details p { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 2rem; }
.series-meta { font-family: var(--font-mono); color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.85rem; }

/* Manifesto Layout Layered */
.manifesto-layout {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 4rem;
}
aside {
  position: sticky;
  top: 5rem;
  height: max-content;
}
#toc { display: flex; flex-direction: column; gap: 1rem; }
#toc a { font-family: var(--font-sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
#toc a.active { color: var(--gold); }
#toc a::before { content: '— '; opacity: 0; transition: opacity 0.3s; }
#toc a.active::before { opacity: 1; color: var(--gold); }

main article { margin-bottom: 12rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 6rem; }
main article:last-child { border-bottom: none; }
main article h2 { font-size: 3rem; margin-bottom: 3rem; }
main article p { margin-bottom: 1.5rem; max-width: 750px; font-size: 1.25rem; }

/* Footer */
footer {
  text-align: center;
  padding: 6rem 0;
  position: relative;
  z-index: 2;
  background: var(--bg-deep);
  border-top: 1px solid rgba(255,255,255,0.05);
}

@media (max-width: 900px) {
  nav { padding: 1rem; flex-direction: column; gap: 1rem; }
  .series-row, .series-row:nth-child(even) { flex-direction: column; }
  .series-hero { height: 40vh; width: 100%; }
  .manifesto-layout { grid-template-columns: 1fr; }
  aside { position: static; margin-bottom: 4rem; }
  #toc { flex-direction: row; flex-wrap: wrap; }
}
