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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(34, 211, 238, 0.1), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.14);
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Programmatic focus on the main region (after navigation) shouldn't draw a ring. */
main:focus { outline: none; }

[hidden] { display: none !important; }

.muted { color: var(--muted); }

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

.noscript {
  padding: 1rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
