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

/* Tell the browser this is a dark site — it uses a near-black background even
   before CSS is parsed, eliminating the white flash during page navigation */
:root { color-scheme: dark; }

/* Cross-document view transitions (Chrome/Edge 111+).
   On supported browsers, page navigations crossfade instead of hard-cutting,
   which makes the persistent nav look truly persistent. */
@view-transition {
  navigation: auto;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* Match the body background so there's no flash even during the transition */
  background-color: #0f0c07;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle warm dot-grid background on all pages */
  background-image:
    radial-gradient(circle, rgba(205,65,43,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

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