:root {
    --bg: white;
    --fg: hsl(0, 0%, 12%);
    --link: hsl(215, 100%, 45%);
    --secondary-bg: hsl(0, 0%, 95%);
    --border: hsla(0, 0%, 12%, 15%);
    --emphasis: hsl(10, 100%, 48%);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: hsl(215, 15%, 8%);
        --fg: hsl(0, 0%, 95%);
        --link: hsl(215, 100%, 65%);
        --secondary-bg: hsl(215, 15%, 15%);
        --border: hsla(0, 0%, 95%, 15%);
        --emphasis: hsl(5, 100%, 60%);
    }

    * {
        /* Scrollbars and other native UI */
        color-scheme: dark;
    }
}

@font-face {
    font-family: 'Source Code Pro';
    src: url('/SourceCodePro-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
}

html {
    /* Prevent font scaling in landscape while allowing user zoom */
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Source Code Pro', monospace;
    letter-spacing: -0.02em;
    line-height: 140%;
    display: flex;
    margin: 0;
    justify-content: center;
}

a,
a:visited {
    text-decoration: none;
    color: var(--emphasis);
}

a:hover {
    text-decoration: underline;
}

pre {
    border: 1px solid var(--border);
    background: var(--secondary-bg);
    border-radius: 0.7em;
    padding: 0.7em 1em;
}

.hidden {
    display: none;
}

.container {
    max-width: calc(70vw + 100px);
}

h1 {
    font-size: 20vw;
}

h2 {
    font-size: 10vw;
}

h3 {
    font-size: 5vw;
}

h4 {
    font-size: 2.5vw;
}

h1,
h2,
h3,
h4 {
    line-height: 100%;
    margin: 0.2em 0;
}

emphasis {
    color: var(--emphasis);
}