/* Base Typography & Element Styles */

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

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

@media (min-width: 768px) {
    h1 { font-size: var(--text-6xl); }
    h2 { font-size: var(--text-5xl); }
    h3 { font-size: var(--text-4xl); }
}

@media (min-width: 1024px) {
    h1 { font-size: var(--text-7xl); }
}

/* Body text */
p {
    color: var(--text-secondary);
    max-width: 65ch;
}

p + p {
    margin-top: var(--space-4);
}

/* Links */
a {
    transition: color var(--transition-fast);
}

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

/* Monospace / data readout */
.mono {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

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

/* Scrollbar (Webkit) */
::-webkit-scrollbar {
    width: 6px;
}

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

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

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

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

/* Horizontal rule */
hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: var(--space-12) 0;
}

/* Strong / emphasis */
strong, b { font-weight: 600; }

em, i { font-style: italic; }

/* Small text */
small {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* Code inline */
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-tertiary);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
