:root {
    /* horizontal margin is 1em on each side */
    --max-vw: 100vw - 2em;
    /* tell elements that they should be rendering in dark mode
     * namely, this fixes the dropdown selects being ugly on Safari
     */
    color-scheme: dark;
}

/* Main document formatting */
html {
    margin: 0 1em;
}
body {
    background-color: var(--background-0);
    color: var(--text-0);
    font-family: "Open Sans", "Noto Sans", sans-serif;
    max-width: fit-content;
    margin: 1em auto;

    display: flex;
    flex-direction: column;
    gap: 0.5em;
}
a {
    color: var(--link-0);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
/* for links that are triggered with JS */
input[type="submit"]:hover,
a:not([href]):hover {
    cursor: pointer;
}

/* Top formatting */
.top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    column-gap: 1em;
    /* horizontal margin is 1em on each side */
    min-width: min(360px, var(--max-vw));
}
.top > .navbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 1em;
    /* for some reason it looks misaligned vertically without this */
    margin: auto 0;
}
.navbar-item.navbar-active {
    color: var(--text-0);
}
.top > header {
    font-weight: bold;
    font-size: 1.5em;
}
.top > header a {
    color: var(--text-0);
}

/* Footer formatting */
footer {
    text-align: right;
    font-size: 0.75em;
}
footer p {
    margin: 0;
}

/* Main content formatting */
main {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}
