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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}
a:hover { opacity: 0.8; }

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-primary);
}

h1 { font-size: var(--font-size-hero); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: var(--font-size-3xl); letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: var(--font-size-xl); letter-spacing: -0.01em; }
h4 { font-size: var(--font-size-lg); }

p { color: var(--text-secondary); line-height: 1.7; }

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

code {
  background: var(--bg-code-block);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  font-size: var(--font-size-sm);
  line-height: 1.6;
}
pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

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

::selection {
  background: var(--accent-dim);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
