/* =============================================================================
   RESET
   ============================================================================= */

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

/* =============================================================================
   DESIGN TOKENS
   ============================================================================= */

:root {
  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --line-height-base: 1.6;
  --line-height-tight: 1.25;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  /* Color */
  --color-background: #ffffff;
  --color-surface: #f8f8f8;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-accent: #0055cc;
  --color-accent-hover: #0044aa;
  --color-border: #e0e0e0;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Layout */
  --max-width-content: 72rem;
  --nav-height: 3.5rem;
}

/* =============================================================================
   BASE
   ============================================================================= */

html {
  font-size: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
}

a:hover {
  color: var(--color-accent-hover);
}

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

/* =============================================================================
   LAYOUT
   ============================================================================= */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-height);
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

main {
  max-width: var(--max-width-content);
  margin-inline: auto;
  padding: var(--space-8) var(--space-4);
}

/* =============================================================================
   NAVIGATION
   ============================================================================= */

nav[aria-label="Main navigation"] {
  max-width: var(--max-width-content);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding-inline: var(--space-4);
}

nav[aria-label="Main navigation"] ul {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

nav[aria-label="Main navigation"] a {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  color: var(--color-text);
}

nav[aria-label="Main navigation"] a:hover {
  color: var(--color-accent);
}

nav[aria-label="Main navigation"] a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 640px) {
  nav[aria-label="Main navigation"] ul {
    gap: var(--space-4);
  }

  main {
    padding: var(--space-6) var(--space-4);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* =============================================================================
   PROSE (privacy page)
   ============================================================================= */

.prose {
  max-width: 40rem;
  margin-inline: auto;
  padding: var(--space-8) var(--space-4);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #444;
}

.prose h1 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  color: #111;
  margin-bottom: 2rem;
}

.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prose a {
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #111;
}

.prose a:hover {
  opacity: 0.45;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 0.8125rem;
  color: #888;
  border-top: 1px solid #e8e8e8;
}

footer a {
  color: #888;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
}

footer a:hover {
  color: #111;
  border-bottom-color: #111;
}
