/* ==========================================================================
   ARTHUR BLANC — ARCHITECTURE & EPISTEMIC MONOGRAPH
   SPATIAL STYLESHEET: MOVEMENT I (TOYAMA ATRIUM) → MOVEMENT II (HALL OF MEMORIES)
   50% DESATURATED LIMINAL PALETTE & DUAL THEME ENGINE (DAYLIGHT / NOCTURNE)
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. ARCHITECTURAL TOKENS & SYSTEM VARIABLES (50% DESATURATED)
   -------------------------------------------------------------------------- */
:root {
  /* ========================================================================
     DAYLIGHT MODE (Default)
     Movement I: Luminous, warm tinted cedar & ash timber (Toyama Atrium)
     Movement II: Liminal, celestial crystalline dark void (Hall of Memories)
     ======================================================================== */
  --atrium-bg: #FAF8F5;
  --atrium-bg-alt: #F4EFE9;
  --atrium-text: #1E293B;
  --atrium-text-muted: #64748B;
  --atrium-timber: rgba(184, 122, 74, 0.20);        /* 20% visual weight cedar tint */
  --atrium-timber-deep: #CBA587;                    /* Soft ethereal cedar tint */
  --atrium-timber-light: #FAF5EE;                   /* Sunlit washi paper tint */
  --atrium-timber-dark: #8C6548;
  --atrium-line: rgba(184, 122, 74, 0.08);          /* 20% opacity hairline */
  --atrium-steel: #5F6C7D;
  --atrium-glass-border: rgba(184, 122, 74, 0.09);
  --atrium-glass-bg: rgba(255, 255, 255, 0.85);
  --atrium-light-amber: rgba(216, 158, 107, 0.06);

  /* Movement II: Hall of Memories (Crystalline Deep Void) */
  --void-bg: #07090E;
  --void-bg-alt: #0D111A;
  --void-text: #F1F5F9;
  --void-text-muted: #94A3B8;
  --void-cyan: #72D3FD;             /* Original vivid cyan with high-key tint */
  --void-cyan-glow: rgba(56, 189, 248, 0.30);
  --void-ice: #E0F2FE;
  --void-magenta: #D4A5FD;          /* Original vivid magenta with high-key tint */
  --void-line: rgba(56, 189, 248, 0.18);
  --void-glass-border: rgba(56, 189, 248, 0.25);
  --void-glass-bg: rgba(13, 17, 26, 0.75);
  --void-slash-color: rgba(255, 255, 255, 0.03);

  /* Typography Stacks */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Consolas", "Courier New", monospace;
  --font-serif: "Georgia", "Times New Roman", serif;

  /* Global Transitions */
  --ease-tectonic: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 600ms var(--ease-tectonic);
  --transition-fast: 200ms ease;
}

/* ==========================================================================
   NOCTURNE / DARK THEME INVERSION
   Movement I: Nocturnal smoked cedar, shadowed glass, dark ash background
   Movement II: THE INVERSE — Absolute Radiant Crystalline White Void
   ========================================================================== */
html[data-theme="dark"] {
  /* Movement I: Nocturnal Smoked Cedar Sanctuary */
  --atrium-bg: #121418;
  --atrium-bg-alt: #181B22;
  --atrium-text: #F1F5F9;
  --atrium-text-muted: #94A3B8;
  --atrium-timber: #B89274;         /* 20% opacity equivalent warm cedar glow */
  --atrium-timber-deep: #D4B69E;
  --atrium-timber-light: #22252E;
  --atrium-timber-dark: #E8D4C4;
  --atrium-line: rgba(255, 255, 255, 0.06);
  --atrium-steel: #94A3B8;
  --atrium-glass-border: rgba(255, 255, 255, 0.08);
  --atrium-glass-bg: rgba(20, 23, 30, 0.80);
  --atrium-light-amber: rgba(216, 158, 107, 0.04);

  /* Movement II: THE OPPOSITE — Radiant Crystalline White Void */
  --void-bg: #FAFBFC;
  --void-bg-alt: #FFFFFF;
  --void-text: #0F172A;             /* Deep obsidian / crystal midnight text */
  --void-text-muted: #475569;
  --void-cyan: #0284C7;             /* Deep sapphire electric cyan */
  --void-cyan-glow: rgba(2, 132, 199, 0.22);
  --void-ice: #0369A1;
  --void-magenta: #9333EA;          /* Crystalline violet */
  --void-line: rgba(2, 132, 199, 0.18);
  --void-glass-border: rgba(2, 132, 199, 0.25);
  --void-glass-bg: rgba(255, 255, 255, 0.90);
  --void-slash-color: rgba(0, 0, 0, 0.035);
}

/* --------------------------------------------------------------------------
   02. RESET & FOUNDATIONS
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--atrium-bg);
  color: var(--atrium-text);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

body[data-realm="void"] {
  background-color: var(--void-bg);
  color: var(--void-text);
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--atrium-timber);
  outline-offset: 3px;
}
body[data-realm="void"] :focus-visible {
  outline: 2px solid var(--void-cyan);
}

/* --------------------------------------------------------------------------
   03. THE DIMENSIONAL REMOTE (Floating Precision Instrument)
   -------------------------------------------------------------------------- */
.dimensional-remote {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 260px;
  perspective: 1000px;
  transition: transform 380ms var(--ease-tectonic), right 380ms var(--ease-tectonic);
}

/* Collapsed into edge caliper */
.dimensional-remote.is-collapsed {
  right: 0;
  transform: translateY(-50%) translateX(calc(100% - 38px));
}

.dimensional-remote.is-collapsed .remote-chassis {
  opacity: 0.12;
  pointer-events: none;
}

.dimensional-remote.is-collapsed:hover .remote-chassis {
  opacity: 0.96;
  pointer-events: auto;
}

.remote-chassis {
  background: rgba(20, 23, 30, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.15rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(0, 0, 0, 0.25);
  color: #F8FAFC;
  font-family: var(--font-mono);
  transition: transform var(--transition-fast), border-color var(--transition-slow), opacity var(--transition-fast);
}

.remote-chassis:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

/* Minimize button inside chassis */
.remote-dock-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94A3B8;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition: all var(--transition-fast);
}

.remote-dock-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

/* Floating Edge Tab visible when docked */
.remote-dock-tab {
  display: none;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 95px;
  background: rgba(18, 21, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-right: none;
  border-radius: 8px 0 0 8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: -4px 10px 24px rgba(0, 0, 0, 0.45);
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
  z-index: 10;
}

.remote-dock-tab:hover {
  background: rgba(26, 31, 42, 0.98);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) translateX(-4px);
}

.dimensional-remote.is-collapsed .remote-dock-tab {
  display: flex;
}

.dock-tab-dim {
  font-size: 0.78rem;
  font-weight: 700;
  color: #E2E8F0;
}

.dock-tab-icon {
  font-size: 0.75rem;
  color: var(--void-cyan);
}

.remote-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
}

.remote-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.remote-status-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--atrium-timber-deep);
  box-shadow: 0 0 8px var(--atrium-timber-deep);
  transition: background var(--transition-slow), box-shadow var(--transition-slow);
}

body[data-realm="void"] .remote-status-led {
  background: var(--void-cyan);
  box-shadow: 0 0 10px var(--void-cyan);
}

/* Theme Toggle Inside Remote */
.theme-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px;
  gap: 2px;
}

.theme-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-btn:hover {
  color: #FFFFFF;
}

.theme-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.remote-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: #8E98A5;
  text-transform: uppercase;
}

.remote-coord {
  font-size: 0.76rem;
  color: #F1F5F9;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.remote-dial {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dim-btn {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  color: #CBD5E1;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.dim-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.dim-btn.active {
  background: rgba(158, 137, 120, 0.25);
  border-color: var(--atrium-timber);
  color: #FFFFFF;
  box-shadow: inset 0 0 10px rgba(158, 137, 120, 0.2);
}

body[data-realm="void"] .dim-btn.active {
  background: rgba(122, 170, 196, 0.2);
  border-color: var(--void-cyan);
  box-shadow: inset 0 0 12px rgba(122, 170, 196, 0.2);
}

.dim-btn-infinity.active {
  border-color: var(--void-cyan) !important;
  background: rgba(122, 170, 196, 0.25) !important;
}

.dim-num {
  grid-row: 1 / span 2;
  font-size: 0.95rem;
  font-weight: 700;
  color: #E2E8F0;
  letter-spacing: -0.02em;
}

.dim-btn.active .dim-num {
  color: var(--atrium-timber-deep);
}
body[data-realm="void"] .dim-btn.active .dim-num {
  color: var(--void-cyan);
}

.dim-title {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
}

.dim-sub {
  font-size: 0.62rem;
  color: #8E98A5;
  line-height: 1.2;
}

.remote-footer {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cadence-meter {
  display: flex;
  flex-direction: column;
}

.cadence-label {
  font-size: 0.58rem;
  color: #647082;
  letter-spacing: 0.1em;
}

.cadence-value {
  font-size: 0.66rem;
  color: #F8FAFC;
  font-weight: 600;
}

.cadence-pulse {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 14px;
}

.cadence-pulse span {
  width: 2px;
  background: var(--atrium-timber);
  animation: pulseBar 1.2s infinite ease-in-out;
}
.cadence-pulse span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.cadence-pulse span:nth-child(2) { height: 12px; animation-delay: 0.3s; }
.cadence-pulse span:nth-child(3) { height: 16px; animation-delay: 0.2s; }
.cadence-pulse span:nth-child(4) { height: 8px; animation-delay: 0.4s; }
.cadence-pulse span:nth-child(5) { height: 14px; animation-delay: 0.15s; }

body[data-realm="void"] .cadence-pulse span {
  background: var(--void-cyan);
}

@keyframes pulseBar {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   04. SITE HEADER & BRANDING
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 90;
  background: rgba(246, 245, 242, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--atrium-line);
  padding: 0.85rem 2rem;
  transition: all var(--transition-slow);
}

html[data-theme="dark"] .site-header {
  background: rgba(18, 20, 24, 0.88);
}

body[data-realm="void"] .site-header {
  background: rgba(8, 10, 14, 0.88);
  border-bottom-color: var(--void-line);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.monogram-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--atrium-timber-dark);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  background: var(--atrium-timber-light);
  color: var(--atrium-timber-dark);
  transition: all var(--transition-slow);
}

body[data-realm="void"] .monogram-box {
  border-color: var(--void-cyan);
  background: rgba(122, 170, 196, 0.15);
  color: var(--void-ice);
  box-shadow: 0 0 10px rgba(122, 170, 196, 0.25);
}

.wordmark-text {
  display: flex;
  flex-direction: column;
}

.wordmark-text strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: inherit;
}

.wordmark-text small {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--atrium-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body[data-realm="void"] .wordmark-text small {
  color: var(--void-text-muted);
}

.header-metadata {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.meta-tag {
  color: var(--atrium-text-muted);
}
body[data-realm="void"] .meta-tag {
  color: var(--void-text-muted);
}

.meta-realm-indicator {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  background: var(--atrium-timber-light);
  color: var(--atrium-timber-dark);
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all var(--transition-slow);
}

html[data-theme="dark"] .meta-realm-indicator {
  background: #252830;
  color: #D8CCC4;
}

body[data-realm="void"] .meta-realm-indicator {
  background: rgba(122, 170, 196, 0.18);
  color: var(--void-cyan);
  box-shadow: 0 0 8px rgba(122, 170, 196, 0.2);
}

/* --------------------------------------------------------------------------
   05. MOVEMENT I: THE TOYAMA ATRIUM (Luminous & Tectonic)
   -------------------------------------------------------------------------- */
.realm-atrium {
  position: relative;
  background: var(--atrium-bg);
  color: var(--atrium-text);
  padding-top: 5rem;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* Kuma Diagonal Cedar Louvers Field (Desaturated 50%) */
.atrium-louver-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.louver-diagonal-primary {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 140%;
  height: 140%;
  background: repeating-linear-gradient(
    32deg,
    transparent,
    transparent 54px,
    rgba(184, 122, 74, 0.015) 54px,
    rgba(184, 122, 74, 0.015) 58px,
    rgba(140, 83, 43, 0.02) 58px,
    rgba(140, 83, 43, 0.02) 61px
  );
}

.louver-diagonal-counter {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 140%;
  height: 140%;
  background: repeating-linear-gradient(
    -24deg,
    transparent,
    transparent 108px,
    rgba(184, 122, 74, 0.01) 108px,
    rgba(184, 122, 74, 0.01) 112px
  );
}

.atrium-light-wash {
  position: absolute;
  top: 0;
  left: 15%;
  width: 70%;
  height: 100%;
  background: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
}

html[data-theme="dark"] .atrium-light-wash {
  background: radial-gradient(circle at 50% 10%, rgba(194, 177, 162, 0.04) 0%, transparent 70%);
}

.atrium-section {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5.5rem 2rem;
}

/* Threshold Hero (Refined, Spacious & Elegant) */
.threshold-hero {
  padding-top: 10rem;
  padding-bottom: 7rem;
  border-bottom: 1px solid var(--atrium-line);
}

.hero-subheading {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  color: var(--atrium-text-muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
}

.hero-thesis {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--atrium-text);
  margin-bottom: 1.75rem;
  max-width: 920px;
}

.hero-manifesto {
  max-width: 760px;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.75;
  color: var(--atrium-text-muted);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.threshold-quick-actions {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 4px;
  transition: all var(--transition-fast);
  cursor: pointer;
  letter-spacing: 0.03em;
}

.action-primary {
  background: #252A33;
  color: #FFFFFF;
  border: 1px solid #1E293B;
}
.action-primary:hover {
  background: #0F172A;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .action-primary {
  background: #E2E8F0;
  color: #0F172A; /* Crisp Black/Gray text for high contrast */
  border-color: #FFFFFF;
  font-weight: 700;
}
html[data-theme="dark"] .action-primary:hover {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

.action-liminal {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.action-liminal:hover {
  background: #F8FAFC;
  border-color: rgba(0, 0, 0, 0.3);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

html[data-theme="dark"] .action-liminal {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #FFFFFF;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   06. HORIZONTAL SWIPE TRACKS & PROJECT PLATES (1D to 4D)
   -------------------------------------------------------------------------- */
.dimension-block {
  border-bottom: 1px solid var(--atrium-line);
}

.dimension-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.dimension-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  background: var(--atrium-timber-light);
  border: 2px solid var(--atrium-timber-deep);
  border-radius: 8px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.index-num {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--atrium-timber-dark);
}

.index-scale {
  font-size: 0.62rem;
  color: var(--atrium-timber-deep);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.dimension-title-group {
  display: flex;
  flex-direction: column;
}

.dimension-title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--atrium-text);
  line-height: 1.2;
}

.dimension-thesis {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--atrium-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* Track Navigation Header */
.track-navigation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0 0.5rem;
  font-family: var(--font-mono);
}

.track-counter {
  font-size: 0.85rem;
  color: var(--atrium-text-muted);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.plate-current {
  color: var(--atrium-text);
  font-weight: 700;
}

.track-hint {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  background: var(--atrium-timber-light);
  border-radius: 3px;
  color: var(--atrium-timber-dark);
}

html[data-theme="dark"] .track-hint {
  background: #252830;
  color: #D8CCC4;
}

.void-nav-bar .track-hint {
  background: rgba(122, 170, 196, 0.15);
  color: var(--void-cyan);
}

.track-controls {
  display: flex;
  gap: 0.5rem;
}

.track-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--atrium-glass-bg);
  border: 1px solid var(--atrium-glass-border);
  border-radius: 6px;
  color: var(--atrium-text);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.track-btn:hover:not(:disabled) {
  background: var(--atrium-timber-deep);
  color: #FFFFFF;
  border-color: var(--atrium-timber-dark);
  transform: translateY(-1px);
}

.track-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

body[data-realm="void"] .track-btn {
  background: var(--void-glass-bg);
  border-color: var(--void-glass-border);
  color: var(--void-text);
}
body[data-realm="void"] .track-btn:hover:not(:disabled) {
  background: var(--void-cyan);
  color: #080A0E;
  border-color: var(--void-cyan);
}

/* Horizontal Scroll Track */
.plates-scroll-track {
  display: flex;
  gap: 2.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.25rem 2rem 0.25rem;
  outline: none;
}

.plates-scroll-track::-webkit-scrollbar {
  height: 5px;
}
.plates-scroll-track::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}
.plates-scroll-track::-webkit-scrollbar-thumb {
  background: var(--atrium-timber);
  border-radius: 4px;
}
body[data-realm="void"] .plates-scroll-track::-webkit-scrollbar-thumb {
  background: var(--void-cyan);
}

/* Project Plate Card */
.project-plate {
  flex: 0 0 min(960px, 86vw);
  scroll-snap-align: start;
  background: var(--atrium-glass-bg);
  border: 1px solid var(--atrium-glass-border);
  border-radius: 8px;
  padding: 2.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

html[data-theme="dark"] .project-plate {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.project-plate:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.plate-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.plate-frame {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(119, 99, 85, 0.15);
  border-radius: 6px;
  padding: 1rem;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.02);
}

html[data-theme="dark"] .plate-frame {
  background: rgba(15, 18, 24, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}

.tectonic-drawing {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.03));
}

.plate-visual-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(20, 23, 30, 0.85);
  color: #F8FAFC;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.08em;
}

.plate-meta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.plate-title-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.plate-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--atrium-timber-deep);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.plate-name {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--atrium-text);
  line-height: 1.25;
}

.plate-description {
  font-size: 0.96rem;
  color: var(--atrium-text-muted);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.plate-parameters {
  border-top: 1px solid var(--atrium-line);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.param-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  gap: 1rem;
}

.param-key {
  font-family: var(--font-mono);
  color: var(--atrium-text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.param-val {
  color: var(--atrium-text);
  font-weight: 500;
  text-align: right;
}

/* --------------------------------------------------------------------------
   07. THE SPATIAL CHASM (Dissolution Threshold)
   -------------------------------------------------------------------------- */
.spatial-chasm {
  position: relative;
  height: 280px;
  background: linear-gradient(180deg, var(--atrium-bg) 0%, #151821 55%, var(--void-bg) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--atrium-line);
  border-bottom: 1px solid var(--void-line);
  transition: all var(--transition-slow);
}

html[data-theme="dark"] .spatial-chasm {
  background: linear-gradient(180deg, #121418 0%, #4A5568 50%, #FAFBFC 100%);
}

.chasm-knife-edge {
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--atrium-timber) 30%, var(--void-cyan) 70%, transparent 100%);
  transform: rotate(-3.5deg);
  box-shadow: 0 0 14px var(--void-cyan-glow);
}

html[data-theme="dark"] .chasm-knife-edge {
  background: linear-gradient(90deg, transparent 0%, #E0AC82 30%, #0284C7 70%, transparent 100%);
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.45);
}

.chasm-notice {
  position: relative;
  z-index: 5;
  text-align: center;
  font-family: var(--font-mono);
  color: #FFFFFF;
  padding: 1.5rem 2.5rem;
  background: rgba(8, 10, 14, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(122, 170, 196, 0.28);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: all var(--transition-slow);
}

html[data-theme="dark"] .chasm-notice {
  background: rgba(255, 255, 255, 0.92);
  color: #0F172A;
  border: 1px solid rgba(2, 132, 199, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.chasm-label {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--void-cyan);
  display: block;
  margin-bottom: 0.4rem;
}

.chasm-text {
  font-size: 0.95rem;
  color: var(--void-ice);
  margin-bottom: 0.5rem;
}

html[data-theme="dark"] .chasm-text {
  color: #334155;
}

.chasm-arrow {
  display: inline-block;
  font-size: 1.2rem;
  color: var(--void-cyan);
  animation: bounceDown 1.6s infinite ease-in-out;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* --------------------------------------------------------------------------
   08. MOVEMENT II: THE HALL OF MEMORIES (The Liminal Void — ∞D)
   -------------------------------------------------------------------------- */
.realm-void {
  position: relative;
  background: var(--void-bg);
  color: var(--void-text);
  padding: 6rem 2rem 10rem 2rem;
  overflow: hidden;
}

/* Void Geometric Environment (Libeskind Cuts + Hadid Vectors) */
.void-geometric-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.void-crystal-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, rgba(122, 170, 196, 0.06) 0%, transparent 65%),
              repeating-linear-gradient(
                45deg,
                transparent,
                transparent 120px,
                rgba(122, 170, 196, 0.015) 120px,
                rgba(122, 170, 196, 0.015) 121px
              );
}

.libeskind-slash-primary {
  position: absolute;
  top: 10%;
  left: -20%;
  width: 140%;
  height: 350px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0%, transparent 70%);
  transform: rotate(-18deg);
  border-bottom: 1px solid rgba(122, 170, 196, 0.12);
}

.libeskind-slash-secondary {
  position: absolute;
  top: 55%;
  right: -20%;
  width: 130%;
  height: 280px;
  background: linear-gradient(-45deg, rgba(158, 139, 174, 0.015) 0%, transparent 60%);
  transform: rotate(14deg);
  border-top: 1px solid rgba(158, 139, 174, 0.1);
}

.void-section {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.void-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.void-emblem {
  font-size: 3.5rem;
  color: var(--void-cyan);
  text-shadow: 0 0 16px rgba(122, 170, 196, 0.45);
  font-weight: 300;
  line-height: 1;
}

.void-title-group {
  display: flex;
  flex-direction: column;
}

.void-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--void-cyan);
  margin-bottom: 0.3rem;
}

.void-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--void-text);
  line-height: 1.15;
}

.void-subtitle {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--void-text-muted);
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}

.void-intro {
  max-width: 860px;
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--void-text-muted);
  margin-bottom: 3.5rem;
}

/* Floating Epistemic Codices in Horizontal Track */
.codex-scroll-track {
  gap: 2.5rem;
}

.epistemic-codex {
  flex: 0 0 min(880px, 86vw);
  scroll-snap-align: start;
  position: relative;
  background: var(--void-glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--void-glass-border);
  border-radius: 10px;
  padding: 2.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.epistemic-codex:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.8),
              0 0 24px rgba(56, 189, 248, 0.2);
}

html[data-theme="dark"] .epistemic-codex {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(2, 132, 199, 0.18);
}

html[data-theme="dark"] .epistemic-codex:hover {
  border-color: #0284C7;
  box-shadow: 0 26px 65px rgba(2, 132, 199, 0.18), 0 0 24px rgba(2, 132, 199, 0.25);
}

.codex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-bottom: 1px solid var(--void-line);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.codex-id {
  color: var(--void-cyan);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.codex-scale {
  color: var(--void-text-muted);
  letter-spacing: 0.06em;
}

.codex-title {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 700;
  color: var(--void-text);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.codex-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--void-text);
  opacity: 0.92;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.codex-body strong {
  color: var(--void-text);
  font-weight: 700;
}

.codex-diagram {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}

html[data-theme="dark"] .codex-diagram {
  background: rgba(2, 132, 199, 0.04);
  border: 1px solid rgba(2, 132, 199, 0.16);
}

.codex-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--void-line);
  padding-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #94A3B8;
  letter-spacing: 0.06em;
}

.axiom-tag {
  color: var(--void-cyan);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   09. SITE COLOPHON & FOOTER
   -------------------------------------------------------------------------- */
.site-colophon {
  background: #040508;
  border-top: 1px solid var(--void-line);
  color: #94A3B8;
  padding: 4rem 2rem 3rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  position: relative;
  z-index: 10;
  transition: all var(--transition-slow);
}

html[data-theme="dark"] .site-colophon {
  background: #F1F5F9;
  border-top: 1px solid rgba(2, 132, 199, 0.2);
  color: #475569;
}
html[data-theme="dark"] .colophon-text strong {
  color: #0F172A;
}
html[data-theme="dark"] .colophon-text small {
  color: #64748B;
}
html[data-theme="dark"] .colophon-monogram {
  border-color: #0284C7;
  color: #0284C7;
}
html[data-theme="dark"] .colophon-links {
  border-top-color: rgba(0, 0, 0, 0.08);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
html[data-theme="dark"] .colophon-links a {
  color: #0284C7;
}
html[data-theme="dark"] .colophon-legal small {
  color: #64748B;
}

/* Nocturne White Void Header Adjustments */
html[data-theme="dark"] body[data-realm="void"] .site-header {
  background: rgba(250, 251, 252, 0.92);
  border-bottom-color: rgba(2, 132, 199, 0.2);
}
html[data-theme="dark"] body[data-realm="void"] .wordmark-text strong {
  color: #0F172A;
}
html[data-theme="dark"] body[data-realm="void"] .wordmark-text small {
  color: #64748B;
}
html[data-theme="dark"] body[data-realm="void"] .monogram-box {
  border-color: #0284C7;
  background: rgba(2, 132, 199, 0.1);
  color: #0284C7;
}
html[data-theme="dark"] body[data-realm="void"] .meta-realm-indicator {
  background: rgba(2, 132, 199, 0.12);
  color: #0284C7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.2);
}
html[data-theme="dark"] body[data-realm="void"] .meta-tag {
  color: #64748B;
}

/* Nocturne White Void Geometric Field */
html[data-theme="dark"] .void-crystal-grid {
  background: radial-gradient(circle at 50% 30%, rgba(2, 132, 199, 0.05) 0%, transparent 65%),
              repeating-linear-gradient(
                45deg,
                transparent,
                transparent 120px,
                rgba(2, 132, 199, 0.02) 120px,
                rgba(2, 132, 199, 0.02) 121px
              );
}
html[data-theme="dark"] .libeskind-slash-primary {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.04) 0%, transparent 70%);
  border-bottom: 1px solid rgba(2, 132, 199, 0.15);
}
html[data-theme="dark"] .libeskind-slash-secondary {
  background: linear-gradient(-45deg, rgba(147, 51, 234, 0.03) 0%, transparent 60%);
  border-top: 1px solid rgba(147, 51, 234, 0.12);
}

.colophon-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.colophon-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.colophon-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--void-cyan);
  color: var(--void-cyan);
  font-weight: 700;
}

.colophon-text strong {
  color: #F8FAFC;
  display: block;
}

.colophon-text small {
  color: #647082;
  font-size: 0.75rem;
}

.colophon-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
}

.colophon-links a {
  color: var(--void-cyan);
  text-decoration: underline;
}

.colophon-legal small {
  color: #475569;
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE BREAKPOINTS & MOBILE ADAPTATION
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .dimensional-remote {
    position: fixed;
    right: 1rem;
    width: 220px;
  }
}

@media (max-width: 900px) {
  .plate-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .project-plate {
    flex: 0 0 90vw;
    padding: 1.5rem;
  }

  .epistemic-codex {
    flex: 0 0 90vw;
    padding: 1.5rem;
  }

  .dimensional-remote {
    position: fixed;
    top: auto;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    transform: none;
    transition: transform 380ms var(--ease-tectonic);
  }

  .dimensional-remote.is-collapsed {
    transform: translateY(calc(100% - 46px));
    right: 1rem;
    left: 1rem;
  }

  .dimensional-remote.is-collapsed .remote-dock-tab {
    display: none;
  }

  .dimensional-remote.is-collapsed .remote-chassis {
    opacity: 0.95;
    pointer-events: auto;
  }

  .remote-dial {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .dim-btn {
    min-width: 135px;
  }

  .remote-footer {
    display: none;
  }

  .site-header {
    padding: 0.75rem 1rem;
  }

  .header-metadata {
    display: none;
  }

  .dimension-header {
    flex-direction: column;
    gap: 1rem;
  }

  .codex-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   11. REDUCED MOTION SUPPORT
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
