/* Shared site styles: theme variables, reset, theme toggle, bottom nav, scrollbar.
   Page-specific styles live inline in each page's <style> block. */

:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-text: #1a1a1a;
  --color-text-secondary: #555555;
  --color-text-tertiary: #888888;
  --color-border: #d4d4d4;
  --color-border-light: #e5e5e5;
  --color-nav-bg: #eaeaea;
  --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --color-bg: #1c1c1e;
  --color-surface: #2c2c2e;
  --color-text: #e5e5e5;
  --color-text-secondary: #a3a3a3;
  --color-text-tertiary: #737373;
  --color-border: #333333;
  --color-border-light: #262626;
  --color-nav-bg: #1c1c1e;
}

* { box-sizing: border-box; }

/* Dark-mode toggle */
.theme-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  width: 56px;
  height: 28px;
  background: var(--color-border);
  border-radius: 14px;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.3s ease;
}

.theme-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: var(--color-bg);
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .theme-switch-knob { transform: translateX(28px); }

.theme-switch-knob svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-text-secondary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Bottom navigation pill (pages that fix it in place add positioning inline) */
.bottom-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--color-nav-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.bottom-nav a {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.bottom-nav a:hover { background: var(--color-surface); }
.bottom-nav a.active { background: var(--color-surface); color: var(--color-text); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
