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

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

body {
    font-family: var(--font-family-base);
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
    font-weight: 600;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

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

::selection {
    background: var(--accent);
    color: var(--paper);
}

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

.section-dark :focus-visible {
    outline-color: var(--accent-on-dark);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    font-family: var(--font-family-mono);
    font-size: 13px;
    background: var(--accent);
    color: var(--paper);
    padding: 12px 20px;
}

.skip-link:focus {
    left: 0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
