/* Base reset & typography */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-secondary); }
a:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: var(--space-md); color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.25rem; margin-bottom: var(--space-md); color: var(--text-secondary); }
li { margin-bottom: var(--space-xs); }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--math-bg);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  background: var(--code-bg);
  color: var(--code-text);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-md) 0;
  border: 1px solid var(--border-color);
}

pre code { background: none; padding: 0; color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-2xl);
}

.section-header .eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 1.0625rem;
  margin-top: var(--space-md);
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

main { padding-top: var(--nav-height); min-height: calc(100vh - 200px); }

.page-hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  background: var(--bg-hero);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero-overlay);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.home-hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-primary); }
.breadcrumb span[aria-current] { color: var(--text-secondary); }
