/* Reset and baseline styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-family-primary), sans-serif;
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
}

body {
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
  height: 100%;
  width: 100%;
  position: relative;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  font-size: 0.875em;
  margin: 0 auto;
  background: var(--color-bg);
}

p {
  font-size: 0.875em;
  margin: 0 auto 1em auto;
}

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

a:hover {
  text-decoration: underline;
}

/* Lists */
ul, li {
  text-decoration: none;
  list-style-type: none;
  margin: 0 auto;
  padding: 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
