/* ==========================================================================
   Gizem ve Halo İnsanları - Modern Siber-Organik & Felsefi Tasarım Sistemi
   ========================================================================== */

:root {
  --bg-deep: #07090e;
  --bg-card: rgba(18, 22, 36, 0.85);
  --bg-card-hover: rgba(26, 32, 54, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.35);

  --accent-cyan: #00f0ff;
  --accent-cyan-dim: rgba(0, 240, 255, 0.15);
  --accent-amber: #ff9f43;
  --accent-amber-dim: rgba(255, 159, 67, 0.2);
  --accent-purple: #a855f7;
  --accent-coral: #ff6b6b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-serif: 'Cinzel', serif;
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-glow: 0 0 30px rgba(0, 240, 255, 0.12);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Atmosphere */
.bg-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 140px 180px, #00f0ff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 320px 420px, #ff9f43, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 700px 250px, #a855f7, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 950px 600px, #ffffff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 800px 800px;
  opacity: 0.35;
  z-index: -2;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  top: -10vw;
  left: 30vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, rgba(168, 85, 247, 0.04) 50%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 9, 14, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.2rem 2rem;
}

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.lang-switch {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.active {
  background: var(--accent-cyan);
  color: #07090e;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: #fff;
}

.brand-title span {
  color: var(--accent-amber);
  font-style: italic;
}

.brand-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* Top 9 Entities Navigation Strip (En Üst Menü) */
.top-entities-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  width: 100%;
}

.top-entities-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.top-entities-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.top-entities-list {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.top-entity-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.top-entity-btn:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.top-entity-btn.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #07090e;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.top-entity-btn.bridge {
  border-color: rgba(255, 184, 0, 0.4);
  color: #ffd875;
}

.top-entity-btn.bridge:hover {
  background: rgba(255, 184, 0, 0.18);
  border-color: var(--accent-amber);
  color: #fff;
}

.top-entity-btn.bridge.active {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #07090e;
  box-shadow: 0 0 12px rgba(255, 159, 67, 0.6);
}

.top-entity-btn.locked {
  opacity: 0.7;
  border-style: dashed;
}

.top-entity-btn.locked:hover {
  opacity: 1;
}

.top-entity-btn.locked.active {
  opacity: 1;
  border-style: solid;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .top-entities-list {
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0099ff 100%);
  color: #07090e;
  border: none;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
  font-family: var(--font-sans);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sans);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Section Shared Headers */
main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3rem auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
  background: linear-gradient(180deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ==========================================================================
   Hero / Interactive Matrix Section
   ========================================================================== */
.matrix-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}

.sketch-board-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.sketch-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.8rem;
}

.view-switch-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.view-tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.view-tab-btn:hover {
  color: #fff;
}

.view-tab-btn.active {
  background: rgba(0, 240, 255, 0.18);
  color: var(--accent-cyan);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.status-indicator {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulseAnim 2s infinite ease-in-out;
}

@keyframes pulseAnim {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
}

.sketch-board {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(13, 22, 38, 0.7) 0%, rgba(7, 9, 14, 0.95) 100%);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  overflow: hidden;
}

/* Original Photo Container & Hotspots */
.original-photo-container {
  position: relative;
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: default;
  user-select: none;
}

.original-photo-img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.05) brightness(0.95);
  pointer-events: none;
  user-select: none;
}

.photo-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 9, 14, 0.9) 100%);
  padding: 1.2rem 1rem 0.6rem 1rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-align: center;
  pointer-events: none;
}

/* Interactive Hotspot pins over the handwritten photo */
.photo-hotspot {
  position: absolute;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: manipulation;
  pointer-events: auto;
}

.photo-hotspot:hover, .photo-hotspot.active {
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 40;
}

.hotspot-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.35);
  animation: pulseHotspot 2s infinite ease-out;
  pointer-events: none;
}

@keyframes pulseHotspot {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.hotspot-tag {
  position: relative;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #07090e;
  color: var(--accent-cyan);
  border: 2px solid var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  pointer-events: none;
}

.photo-hotspot.active .hotspot-tag {
  background: var(--accent-cyan);
  color: #07090e;
  box-shadow: 0 0 16px var(--accent-cyan);
}

/* Bridge Hotspot (Nodes 4 & 7) */
.bridge-hotspot .hotspot-pulse {
  background: rgba(255, 159, 67, 0.4);
  pointer-events: none;
}

.bridge-hotspot .hotspot-tag {
  color: var(--accent-amber);
  border-color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(255, 159, 67, 0.6);
  pointer-events: none;
}

.bridge-hotspot.active .hotspot-tag {
  background: var(--accent-amber);
  color: #07090e;
  box-shadow: 0 0 18px var(--accent-amber);
}

.hotspot-label {
  display: none !important;
  position: absolute;
  left: 38px;
  background: rgba(18, 22, 36, 0.95);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 159, 67, 0.4);
  white-space: nowrap;
  pointer-events: none;
}

/* Vector SVG Container */
.vector-svg-container {
  width: 100%;
  display: flex;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.hidden {
  display: none !important;
}

#haloBodySvg {
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.08));
}

/* SVG Elements Styling */
.grid-sheet {
  transition: all 0.3s ease;
}

.sketch-txt {
  font-family: 'Caveat', cursive, var(--font-sans);
  fill: #e2e8f0;
  user-select: none;
}

.title-txt {
  font-size: 26px;
  font-weight: 700;
  fill: var(--accent-cyan);
  letter-spacing: 1px;
}

.note-txt {
  font-size: 15px;
  fill: rgba(255, 255, 255, 0.75);
}

.question-txt {
  font-size: 20px;
  font-weight: 600;
  fill: var(--accent-amber);
}

.stomach-txt {
  font-size: 14px;
  font-weight: 600;
  fill: var(--accent-amber);
}

.bottom-txt {
  font-size: 14px;
  font-weight: 600;
  fill: var(--accent-coral);
}

/* Triangles */
.halo-triangle {
  fill: rgba(0, 240, 255, 0.04);
  stroke: var(--accent-cyan);
  stroke-width: 2.2;
  stroke-linejoin: round;
  transition: all 0.4s ease;
}

.halo-triangle:hover {
  fill: rgba(0, 240, 255, 0.1);
  stroke-width: 3;
}

.tri-1 {
  stroke: #38bdf8;
}

.tri-2 {
  stroke: #ff9f43;
}

.tri-3 {
  stroke: #f43f5e;
}

.split-line {
  stroke: rgba(244, 63, 94, 0.5);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.main-spine {
  stroke-width: 2;
  stroke-dasharray: none;
}

/* Node Elements */
.node-group {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.node-group:hover, .node-group.active {
  transform: scale(1.35) !important;
}

.node-touch-area {
  fill: transparent;
}

.node-circle {
  fill: #07090e;
  stroke: var(--accent-cyan);
  stroke-width: 2.5;
  transition: all 0.3s ease;
}

.node-highlight {
  stroke: var(--accent-amber);
  fill: rgba(255, 159, 67, 0.2);
}

.bridge-ring {
  fill: none;
  stroke: var(--accent-amber);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
  animation: rotateRing 12s linear infinite;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.node-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.bridge-label {
  fill: var(--accent-amber);
}

.node-group.active .node-circle {
  fill: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan);
}

.node-group.active .node-label {
  fill: #07090e;
}

/* Sketch Footer Legend */
.sketch-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-circle.cyan {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.legend-circle.amber {
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

.legend-grid {
  width: 12px;
  height: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Node Detail Card (Sidebar)
   ========================================================================== */
/* 9 Characters Switcher Bar (3 Triangles x 3 Rows) */
.char-selector-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.char-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.6rem 0.3rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  white-space: nowrap;
}

.char-tab-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-2px);
}

.char-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.22) 0%, rgba(0, 163, 255, 0.16) 100%);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
}

.char-tab-btn.bridge-tab {
  border-color: rgba(255, 184, 0, 0.35);
  color: #ffd875;
}

.char-tab-btn.bridge-tab:hover {
  background: rgba(255, 184, 0, 0.15);
  border-color: var(--accent-amber);
  color: #fff;
}

.char-tab-btn.bridge-tab.active {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.28) 0%, rgba(255, 94, 0, 0.22) 100%);
  border-color: var(--accent-amber);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 184, 0, 0.4);
}

.char-tab-btn.locked-tab {
  opacity: 0.68;
  border-style: dashed;
}

.char-tab-btn.locked-tab:hover {
  opacity: 1;
}

.char-tab-btn.locked-tab.active {
  opacity: 1;
  border-style: solid;
}

.codex-card-locked {
  opacity: 0.75;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.18);
}

.codex-card-locked:hover {
  opacity: 1;
  border-color: var(--accent-cyan);
}

.codex-locked-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #a0aec0;
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 7px;
  border-radius: 4px;
}

.codex-sealed-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.5;
}

/* Sealed Mystery Box for Nodes 5-9 in Node Card */
.card-locked-box {
  background: rgba(8, 11, 20, 0.7);
  border: 1px dashed rgba(255, 184, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.2rem;
  margin: 1.2rem 0;
  text-align: center;
}

.mystery-lock-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.mystery-lock-icon {
  font-size: 1.3rem;
}

.mystery-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-amber);
  letter-spacing: 1.2px;
}

.mystery-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.mystery-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
}

@media (max-width: 600px) {
  .char-selector-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
  }
  .char-tab-btn {
    font-size: 0.7rem;
    padding: 0.5rem 0.2rem;
  }
}

.node-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 6rem;
  animation: cardPulse 0.4s ease;
}

@keyframes cardPulse {
  from { opacity: 0.7; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.card-node-number {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  margin-bottom: 0.3rem;
  color: #ffffff;
}

.card-bodypart {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  margin-bottom: 1.6rem;
  font-weight: 500;
}

.card-section {
  margin-bottom: 1.4rem;
}

.card-section h4 {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}

.card-section p {
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.55;
}

.card-quote-box {
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid var(--accent-amber);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.6rem 0;
  position: relative;
}

.quote-mark {
  position: absolute;
  top: -12px;
  left: 8px;
  font-size: 3rem;
  color: rgba(255, 159, 67, 0.2);
  font-family: serif;
  line-height: 1;
}

.card-quote-box p {
  font-style: italic;
  font-size: 0.95rem;
  color: #cbd5e1;
  position: relative;
  z-index: 1;
}

.card-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.8rem;
}

.card-actions .btn-primary {
  flex: 1;
}

/* ==========================================================================
   Episodes Section & Publishing Schedule
   ========================================================================== */
.episodes-section {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-subtle);
}

.schedule-badge-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.badge-pill {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  color: var(--accent-cyan);
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.8rem;
  margin-top: 2.5rem;
}

.episode-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.episode-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.episode-card.published {
  border-left: 4px solid var(--accent-cyan);
}

.episode-card.upcoming {
  opacity: 0.75;
  border-left: 4px solid var(--text-muted);
}

.ep-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.ep-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

.ep-status-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.ep-status-tag.published {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.ep-status-tag.upcoming {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.ep-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
  color: #fff;
}

.ep-summary {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.4rem;
  flex-grow: 1;
}

.ep-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.ep-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ep-nodes {
  display: flex;
  gap: 4px;
}

.ep-node-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
  border-radius: 4px;
}

/* ==========================================================================
   Codex / Encyclopedia Section
   ========================================================================== */
.codex-section {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-subtle);
}

.host-spotlight {
  margin-bottom: 3rem;
}

.host-card {
  background: linear-gradient(135deg, rgba(18, 22, 36, 0.9) 0%, rgba(13, 28, 50, 0.9) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.1);
}

.host-header {
  margin-bottom: 1rem;
}

.host-role {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-amber);
  letter-spacing: 2px;
}

.host-card h3 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: #fff;
  margin-top: 0.2rem;
}

.host-desc {
  font-size: 1.1rem;
  color: #e2e8f0;
  max-width: 900px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.host-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-val {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.codex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.6rem;
}

.codex-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.codex-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}

.codex-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.codex-halo-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.codex-bridge-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  padding: 2px 8px;
  border-radius: 12px;
}

.codex-card h4 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.codex-bodypart {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.codex-consumes {
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.codex-quote {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--accent-amber);
  border-left: 2px solid var(--accent-amber);
  padding-left: 10px;
}

/* ==========================================================================
   Reading Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 5, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none !important;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: all;
}

.reader-modal {
  background: #0f131f;
  border: 1px solid var(--border-glow);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .reader-modal {
  transform: scale(1);
}

.reader-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2.5rem 1.5rem 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.reader-ep-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 0.3rem;
}

.reader-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.reader-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  transition: color 0.2s ease;
}

.close-modal-btn:hover {
  color: #fff;
}

.reader-body {
  padding: 2.5rem;
  overflow-y: auto;
  flex-grow: 1;
}

.reader-content {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #e2e8f0;
}

.reader-content p {
  margin-bottom: 1.5rem;
}

.reader-content p:first-child::first-letter {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  float: left;
  line-height: 1;
  padding-right: 12px;
  color: var(--accent-cyan);
}

.reader-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.5rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 9, 14, 0.6);
}

.reader-progress {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem;
  text-align: center;
  background: rgba(7, 9, 14, 0.9);
}

.footer-copy {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.footer-copy strong {
  color: #fff;
}

.footer-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .matrix-layout {
    grid-template-columns: 1fr;
  }

  .node-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .reader-modal {
    max-height: 95vh;
  }

  .reader-header, .reader-body, .reader-footer {
    padding: 1.5rem;
  }
}


/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Chapter Jump Bar */
.chapter-jump-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.jump-pill {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: all 0.25s ease;
}

.jump-pill:hover {
  background: var(--accent-cyan);
  color: #07090e;
  box-shadow: 0 0 12px var(--accent-cyan);
  transform: translateY(-2px);
}

/* Chapter Article Stream */
.episodes-stream {
  max-width: 860px;
  margin: 3rem auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.chapter-article {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.8rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  scroll-margin-top: 5rem;
  transition: border-color 0.3s ease;
}

.chapter-article:hover {
  border-color: var(--border-glow);
}

.chapter-header-box {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.chapter-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chapter-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.chapter-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.chapter-heading {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 0.6rem;
}

.chapter-lead {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.chapter-nodes-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nodes-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.node-badge-sm {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-amber);
  background: var(--accent-amber-dim);
  padding: 2px 8px;
  border-radius: 4px;
}

.chapter-prose {
  font-size: 1.15rem;
  line-height: 1.95;
  color: #e2e8f0;
}

.chapter-prose p {
  margin-bottom: 1.6rem;
}

.chapter-prose p:first-child::first-letter {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  float: left;
  line-height: 0.9;
  padding-right: 12px;
  color: var(--accent-cyan);
}

.chapter-footer-nav {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.back-to-top-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-to-top-link:hover {
  color: var(--accent-cyan);
}
