/* === RESET === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--line-normal);
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--duration), color var(--duration);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--line-tight);
  margin-bottom: var(--gap);
  color: var(--text);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
  margin-bottom: var(--gap);
  color: var(--text-muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--duration);
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-alt);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  color: var(--danger);
}

pre {
  background: var(--bg-dark);
  padding: var(--gap);
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: var(--gap);
  border: var(--border-width) solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

/* === BUTTONS & INPUTS BASE === */
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
  user-select: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* === LISTS === */
ul, ol {
  list-style-position: inside;
  margin-bottom: var(--gap);
}

/* === TABLES === */
table {
  border-collapse: collapse;
  width: 100%;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
