/* ==========================================================================
   Base — modern reset + element defaults
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--sp-4));
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, var(--bg-glow-red), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, var(--bg-glow-green), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, var(--bg-glow-blue), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
  transition:
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}

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

img {
  font-style: italic;
  background-color: var(--color-surface-2);
  shape-margin: 1rem;
}

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

button {
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: 0.01em;
  color: var(--color-text);
  text-wrap: balance;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p {
  text-wrap: pretty;
}

p + p {
  margin-top: var(--sp-3);
}

strong {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}

code,
pre,
kbd {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--color-border);
  margin: var(--sp-8) 0;
}

::selection {
  background: var(--color-green);
  color: var(--color-on-accent);
}

/* Focus ring (accessibility) */
:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-green);
  color: var(--color-on-accent);
  padding: var(--sp-2) var(--sp-4);
  font-weight: var(--fw-bold);
  z-index: var(--z-modal);
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: 0;
}

/* Scrollbar styling (webkit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-dim);
}
