:root {
  color-scheme: light dark;
  --bg-light: #fafafa;
  --bg-dark: #050505;
  --text-light: #0f172a;
  --text-dark: #f1f5f9;
  --line-light: rgba(15, 23, 42, 0.06);
  --line-dark: rgba(148, 163, 184, 0.08);
  --font-display: "Space Grotesk", Inter, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --brand: #ff6900;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  overflow-x: hidden;
  margin: 0;
  background-color: var(--bg-light);
  color: var(--text-light);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.01em;
}

.dark body,
html.dark body {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

body::before,
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
}

body::before {
  z-index: -2;
  background-image:
    linear-gradient(var(--line-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 42%, transparent 100%);
  opacity: 0.55;
}

.dark body::before {
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
}

body::after {
  z-index: -1;
  background: linear-gradient(to bottom, rgba(250, 250, 250, 0.72), rgba(250, 250, 250, 0.94));
}

.dark body::after {
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.2), rgba(5, 5, 5, 0.72));
}

h1,
h2,
h3 {
  letter-spacing: -0.04em;
  font-family: var(--font-display);
}

a,
button {
  transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

@media (max-width: 768px) {
  body::before {
    background-size: 28px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
