/**
 * Base Styles
 * Foundational styling and resets
 */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  margin: 0;
  margin-bottom: var(--space-6);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--weight-black);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-8);
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-6);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

p {
  margin: 0;
}

a {
  color: var(--color-accent-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-accent-primary);
}

code, pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* Lists */
ul, ol {
  list-style: none;
}

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

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

/* Focus States */
*:focus {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Selection */
::selection {
  background-color: var(--color-accent-primary);
  color: var(--color-bg-primary);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-border-hover);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-active);
}

/* Responsive Typography */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: var(--text-4xl);
  }
  
  h2 {
    font-size: var(--text-3xl);
  }
}
