:root {
  /* Editorial Brutalist / Museum-Archive Palette */
  --paper: #f5f4ef;
  --ink: #0f0f0e;
  --ink-muted: #62615d;
  --ink-soft: #44433f;
  --card-white: #ffffff;
  --card-cream: #f9f6f1;
  --card-dark: #151515;
  --red: #ef5d44;
  --yellow: #fcdd71;
  --blue: #9fd5f7;
  --emerald: #0f9f6e;

  --line: rgba(15, 15, 14, 0.1);
  --line-strong: rgba(15, 15, 14, 0.22);

  /* Semantic Aliases used across components & JS inline styles */
  --bg-primary: var(--paper);
  --bg-secondary: #eceae2;
  --bg-card: var(--card-white);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.96);
  --bg-modal: #ffffff;

  --border-subtle: var(--line);
  --border-card: rgba(15, 15, 14, 0.13);
  --border-accent: var(--ink);

  --primary: var(--ink);
  --primary-fg: #ffffff;
  --accent-blue: #1d4ed8;
  --accent-emerald: #0f9f6e;

  --text-main: var(--ink);
  --text-muted: var(--ink-muted);
  --text-dim: #7b7974;
  --text-highlight: #1f1f1d;

  /* Typography */
  --display: 'Archivo', 'Arial Black', Impact, system-ui, sans-serif;
  --font-heading: var(--display);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Inline SVG Subtle Grain Overlay (for solid color tiles) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");

  /* Shadows & Radii */
  --shadow-nav: 0 0 0 1px rgba(15, 15, 14, 0.08), 0 16px 36px -24px rgba(15, 15, 14, 0.3);
  --shadow-sm: 0 2px 8px rgba(15, 15, 14, 0.06);
  --shadow-md: 0 10px 28px -12px rgba(15, 15, 14, 0.16);
  --shadow-lg: 0 24px 56px -18px rgba(15, 15, 14, 0.28);

  --r: 22px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --container-max: 1320px;
}

/* Optional Dark Archive Mode via Theme Toggle */
html.dark-archive {
  --paper: #111110;
  --ink: #f5f4ef;
  --ink-muted: #a6a49d;
  --ink-soft: #cfcdc4;
  --card-white: #191917;
  --card-cream: #1f1f1c;
  --line: rgba(245, 244, 239, 0.12);
  --line-strong: rgba(245, 244, 239, 0.24);

  --bg-primary: #111110;
  --bg-secondary: #181816;
  --bg-card: #191917;
  --bg-card-hover: #20201d;
  --bg-glass: rgba(22, 22, 20, 0.96);
  --bg-modal: #181816;
  --border-subtle: rgba(245, 244, 239, 0.12);
  --border-card: rgba(245, 244, 239, 0.16);
  --border-accent: #fcdd71;
  --primary: #fcdd71;
  --primary-fg: #0f0f0e;
  --accent-blue: #9fd5f7;
  --text-main: #f5f4ef;
  --text-muted: #a6a49d;
  --text-dim: #7d7b74;
  --text-highlight: #f5f4ef;
  color-scheme: dark;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 156px;
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
  padding-right: 40px;
}

.section {
  padding-top: 84px;
  padding-bottom: 84px;
  position: relative;
  border-top: 1px solid var(--line);
}

/* Editorial Brutalist Section Headers */
.section-header-editorial {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 42px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--card-cream);
  border: 1px solid var(--border-card);
  margin-bottom: 14px;
}

.section-eyebrow-bar {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.section-eyebrow-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-main);
}

.section-title-serif {
  font-family: var(--font-heading);
  font-size: clamp(2.15rem, 4.4vw, 3.25rem);
  font-weight: 900;
  font-stretch: 90%;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.96;
  color: var(--text-main);
  margin-bottom: 14px;
}

.section-accent-line {
  width: 68px;
  height: 4px;
  border-radius: 9999px;
  background: var(--ink);
}

/* Card Surface Utility */
.glass-card {
  border-radius: var(--r);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.glow-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.glow-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 3px;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
