/* ==========================================================================
   TheShadowLab — shared site stylesheet
   Loaded on every page. Contains only chrome that is identical site-wide:
   reset, color theme (dark/light), theme toggle button, top-bar/breadcrumb,
   footer, and the fadeUp entrance animation. Page-specific layout (hero
   sections, card grids, etc.) stays in each page's own <style> block.
   ========================================================================== */

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  transition: background 0.25s, color 0.25s;
}

/* ===== THEME VARIABLES ===== */
:root {
  --bg: #080a0f;
  --surface: #0e1117;
  --border: #1e2535;
  --gold: #c9a84c;
  --gold-dim: #7a6030;
  --text: #d8dce8;
  --text-dim: #8a95a8;
  --white: #eef0f5;
  --toggle-bg: #0e1117;
  --toggle-border: #1e2535;
  --toggle-icon: #c9a84c;
}
body.light-mode {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --border: #d8d4c8;
  --gold: #8a6820;
  --gold-dim: #b08840;
  --text: #2a2820;
  --text-dim: #5a5648;
  --white: #1a1810;
  --toggle-bg: #ffffff;
  --toggle-border: #d8d4c8;
  --toggle-icon: #8a6820;
}

/* ===== THEME TOGGLE BUTTON ===== */
#theme-toggle {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 1000;
  background: var(--toggle-bg);
  border: 1px solid var(--toggle-border);
  color: var(--toggle-icon);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
#theme-toggle:hover { border-color: var(--gold); }

/* ===== TOP BAR / BREADCRUMB ===== */
.top-bar {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.back-link {
  color: var(--gold-dim);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.back-link:hover { color: var(--gold); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current {
  color: var(--text-dim);
  font-size: 0.92rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.92rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ===== SHARED ANIMATION ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
