:root {
  /* --- COLOUR SYSTEM — EXACTLY YOURS --- */
  --bg: #1a1428;               /* Deep plum purple base */
  --bg-obsidian: #0e0b16;      /* Darker obsidian shade */
  --fg: #f0f0f5;               /* Clean light text */
  --muted: #948fb0;            /* Muted purple‑grey */
  
  --accent-synthesis: #7c5cff; /* Purple = Synthesis */
  --accent-knowledge: #35d6ff;/* Cyan = Knowledge */
  --accent-value: #d4af37;     /* Gold = Value */
  --accent-clarity: #ffffff;   /* White/Silver = Clarity */

  --surface: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
  --transition: 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, sans-serif;
}

body {
  background: 
    radial-gradient(circle at top left, rgba(124,92,255,0.08), transparent 45%),
    radial-gradient(circle at top right, rgba(53,214,255,0.05), transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-obsidian) 100%);
  color: var(--fg);
  min-height: 100vh;
  overflow-x: hidden;
  padding: 40px 20px;
  line-height: 1.8; /* FIX: restores proper line height on all pages */
}

/* --- LAYOUT --- */
.container {
  display: flex;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.side-menu {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 40px;
  height: fit-content;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  backdrop-filter: blur(10px);
}

.side-menu h4 {
  color: var(--accent-synthesis);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
}

.side-menu a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.3rem;
  transition: var(--transition);
}

.side-menu a:hover {
  background: rgba(124,92,255,0.08);
  color: var(--accent-synthesis);
}

.side-menu .divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.center {
  text-align: center;
}

/* --- LOGO & TYPOGRAPHY --- */
.logo {
  width: 160px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(124, 92, 255, 0.4));
  animation: float 6s ease-in-out infinite;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.08em;
  margin-bottom: 15px;
  color: var(--accent-clarity);
}

.tagline {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 35px;
}

/* --- BUTTONS — COLOUR MATCHING RULES --- */
.buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.btn {
  padding: 12px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
  transition: var(--transition);
  background: var(--surface);
}

/* Standard buttons = Purple hover */
.btn:hover {
  border-color: var(--accent-synthesis);
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.25);
  transform: translateY(-2px);
}

/* Library button = Cyan/Green highlight ALWAYS (as you asked) */
.btn-knowledge {
  border-color: rgba(53,214,255,0.35);
  background: rgba(53,214,255,0.08);
  color: var(--accent-knowledge);
}
.btn-knowledge:hover {
  border-color: var(--accent-knowledge);
  box-shadow: 0 0 20px rgba(53,214,255,0.2);
  color: #ffffff;
}

.btn-small {
  font-size: 0.85rem;
  padding: 8px 14px;
  color: var(--accent-synthesis);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.btn-small:hover {
  border-bottom: 1px solid var(--accent-synthesis);
}

/* --- ✅ CONTENT BLOCKS — STANDARD FOR ALL PAGES --- */
/* This is the box style you wanted — ALL pages now use this */
.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 2rem;
  text-align: left;
  line-height: 1.8;
  position: relative;
  overflow: hidden;
}

/* LEFT GLOW / ACCENT BORDERS — PER COLOUR PURPOSE */
/* Synthesis = Purple */
.accent-synthesis {
  border-left: 3px solid var(--accent-synthesis);
  box-shadow: inset 8px 0 12px -8px rgba(124, 92, 255, 0.2);
}
.accent-synthesis:hover {
  border-left-color: var(--accent-synthesis);
  box-shadow: inset 8px 0 16px -6px rgba(124, 92, 255, 0.35);
  background: rgba(124, 92, 255, 0.04);
}

/* Knowledge = Cyan */
.accent-knowledge {
  border-left: 3px solid var(--accent-knowledge);
  box-shadow: inset 8px 0 12px -8px rgba(53, 214, 255, 0.2);
}
.accent-knowledge:hover {
  border-left-color: var(--accent-knowledge);
  box-shadow: inset 8px 0 16px -6px rgba(53, 214, 255, 0.35);
  background: rgba(53, 214, 255, 0.04);
}

/* Value = Gold */
.accent-value {
  border-left: 3px solid var(--accent-value);
  box-shadow: inset 8px 0 12px -8px rgba(212, 175, 55, 0.2);
}
.accent-value:hover {
  border-left-color: var(--accent-value);
  box-shadow: inset 8px 0 16px -6px rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.04);
}

/* ✅ Clarity = White/Silver (fixed for Reference Layer) */
.accent-clarity {
  border-left: 3px solid var(--accent-clarity);
  box-shadow: inset 8px 0 12px -8px rgba(255, 255, 255, 0.25);
}
.accent-clarity:hover {
  border-left-color: var(--accent-clarity);
  box-shadow: inset 8px 0 16px -6px rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

/* Text styles inside blocks */
.content-block h2 {
  color: var(--accent-clarity);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.content-block h3 {
  color: #ffffff;
  margin: 1.5rem 0 0.8rem;
  font-size: 1.1rem;
}
.content-block p,
.content-block li {
  color: #c9c6d8;
  margin-bottom: 0.8rem;
}
.content-block ul {
  padding-left: 1.2rem;
}

/* --- GRID LINKS — HOVER MATCHES COLOUR --- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.item-link {
  color: var(--fg);
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  transition: var(--transition);
  font-size: 0.9rem;
}
/* Default link hover = Cyan (Knowledge) */
.item-link:hover {
  color: var(--accent-knowledge);
  background: rgba(53,214,255,0.06);
  padding-left: 1rem;
}
/* If inside synthesis block = Purple hover */
.accent-synthesis .item-link:hover {
  color: var(--accent-synthesis);
  background: rgba(124,92,255,0.06);
}
/* If inside value block = Gold hover */
.accent-value .item-link:hover {
  color: var(--accent-value);
  background: rgba(212,175,55,0.06);
}
/* If inside clarity block = White/Silver hover */
.accent-clarity .item-link:hover {
  color: var(--accent-clarity);
  background: rgba(255,255,255,0.06);
}

/* --- UPDATES LIST --- */
.update-item {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.update-item .date {
  color: var(--accent-synthesis);
  font-weight: 500;
  white-space: nowrap;
}

/* --- GLOW EFFECT --- */
.glow {
  position: fixed;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124,92,255,0.15), transparent 60%);
  top: -200px;
  left: -200px;
  filter: blur(50px);
  animation: pulse 10s infinite alternate;
  pointer-events: none;
}

/* --- FOOTER --- */
footer {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* --- ANIMATIONS --- */
@keyframes float {
  0%,100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.1); }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .side-menu {
    width: 100%;
    position: static;
    margin-bottom: 2rem;
  }
  .link-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   ARCHITECTURE SIDEBAR
   ========================= */

.arch-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  padding: 20px;
  background: rgba(26, 20, 40, 0.92);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 1000;
}

.arch-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-synthesis);
  opacity: 0.8;
  margin-bottom: 10px;
}

.arch-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arch-link {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  transition: 0.2s ease;
}

.arch-link:hover {
  background: rgba(124,92,255,0.08);
  color: var(--accent-synthesis);
}

.arch-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.arch-sidebar-footer {
  margin-top: auto;
  font-size: 11px;
  opacity: 0.5;
  color: var(--muted);
}
