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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--header-height);
}

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

h1 { font-size: var(--text-4xl); margin-bottom: var(--space-lg); }
h2 { font-size: var(--text-3xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--text-2xl); margin-bottom: var(--space-md); }
h4 { font-size: var(--text-xl); margin-bottom: var(--space-sm); }
h5 { font-size: var(--text-lg); margin-bottom: var(--space-sm); }
h6 { font-size: var(--text-base); margin-bottom: var(--space-sm); }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

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

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

strong { font-weight: var(--weight-semibold); }

ul, ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-xs);
  color: var(--color-text-secondary);
}

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

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2xl) 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-border-light);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.font-medium { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold { font-weight: var(--weight-bold); }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mt-5 { margin-top: var(--space-2xl); }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-2xl); }

/* Section heading utilities */
.section-heading {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  text-align: center;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.section-subheading {
  text-align: center;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-lg);
  border: none;
}

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

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