

/* ---------- 1. CSS Custom Properties ---------- */
:root {
  /* Color palette — light theme */
  --bg: #ffffff;
  --text: #111827; /* slate‑900 */
  --primary: #0d6efd; /* indigo‑600 (brand) */
  --accent: #f97316; /* orange‑500 */

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-fluid: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);

  /* Sizing */
  --site-max-width: 72rem; /* 1152px */

  /* Motion */
  --ease-1: 0.2s ease-in-out;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a; /* slate‑900 */
    --text: #f8fafc; /* slate‑50 */
    --primary: #60a5fa; /* blue‑400 */
    --accent: #fb923c; /* orange‑400 */
  }
}

/* Manual override when user toggles theme */
[data-theme="dark"] {
  --bg: #0f172a;
  --text: #f8fafc;
  --primary: #60a5fa;
  --accent: #fb923c;
}

/* ---------- 2. Reset / Normalize ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: var(--fs-fluid);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color var(--ease-1), color var(--ease-1);
}

h1, h2, h3, h4, h5, h6,
p, ul, ol, figure, blockquote,
dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

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

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

/* ---------- 3. Accessibility Helpers ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Base Layout ---------- */
.container {
  width: min(100% - 2rem, var(--site-max-width));
  margin-inline: auto;
}

/* ---------- 5. Interactive Elements ---------- */
button {
  font-family: inherit;
  font-size: 1rem;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* Hamburger base — bars animated via components.css */
.hamburger {
  display: grid;
  gap: 0.25rem;
}
.hamburger .bar {
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  transition: transform var(--ease-1), opacity var(--ease-1);
}

/* Utility to visually hide but keep available for screen readers */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
