/* ================================================================
   RESET + BASE
   ================================================================ */

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

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

body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: var(--text-md);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-7);
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    padding: var(--space-6) 0 var(--space-8);
}

img, svg {
    display: block;
    max-width: 100%;
}

ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

p { overflow-wrap: anywhere; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.12s;
}

a:hover { color: #7ecde6; }

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

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

@media (max-width: 768px) {
    main {
        width: min(calc(100% - 32px), var(--max-width));
        padding: var(--space-5) 0 var(--space-6);
        gap: var(--space-6);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
