html {
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg-body);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 140% 160% at 50% -30%, rgba(203, 166, 247, 0.04), transparent),
    radial-gradient(ellipse 120% 120% at 0% 100%, rgba(137, 180, 250, 0.03), transparent),
    radial-gradient(ellipse 100% 100% at 100% 0%, rgba(148, 226, 213, 0.02), transparent),
    var(--bg-body);
  background-attachment: fixed;
  background-size: cover;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(203, 166, 247, 0.015) 2px,
      rgba(203, 166, 247, 0.015) 4px
    );
  mix-blend-mode: overlay;
  opacity: 0.4;
}

h1, h2, h3, h4 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.25;
  color: var(--subtext1);
}

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

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

a:hover {
  color: var(--sky);
  text-shadow: var(--glow-lavender);
}

p { margin-bottom: var(--space-4); }

code, pre {
  font-family: var(--font-mono);
  background: var(--bg-input);
  border-radius: var(--radius-md);
}

code {
  padding: 0.15em 0.4em;
  font-size: 0.9em;
  border: 1px solid var(--border);
}

pre {
  padding: var(--space-4);
  overflow-x: auto;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 30px rgba(137, 180, 250, 0.03);
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--base), 0 0 0 4px var(--blue), var(--glow-blue);
  border-radius: var(--radius-sm);
}

::-focus-visible {
  box-shadow: 0 0 0 2px var(--base), 0 0 0 4px var(--blue), var(--glow-blue-strong);
}