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

html {
  font-family: var(--font-ui);
  background-color: var(--bg-0);
  color: var(--tx-0);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-color: var(--bg-0);
  color: var(--tx-0);
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Noise overlay */
.noise-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-image: url("/assets/img/noise.svg");
  opacity: 0.035;
  pointer-events: none;
  z-index: 1;
}

/* Typography styles */
h1, h2, h3, h4, .display {
  color: var(--tx-0);
  font-weight: 400;
  line-height: 1.1;
}

.display {
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 104px);
  letter-spacing: -0.035em;
  line-height: 0.95;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.5vw, 64px);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

p {
  color: var(--tx-1);
}

small, .text-small {
  font-size: 13px;
  color: var(--tx-2);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.label-caps {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-2);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
  outline: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--tx-0);
  background-color: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  outline: none;
  transition: border-color var(--d-2) var(--ease-out), box-shadow var(--d-2) var(--ease-out);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-0);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--line-3);
}

::selection {
  background-color: var(--accent);
  color: var(--tx-inv);
}
