* {
    box-sizing: border-box;
}

/* Dark theme */
:root {
    --surface-0: black;
    --on-surface-0: #cccccc;
    --on-surface-0-alt: #bfbfbf;
    --surface-1: #121212;
    --surface-1-border: #242424;
    --surface-2: #242424; /* Textarea mostly */
    --surface-2-border: #363636; /* Textarea mostly */

    --link-color: orange;
    --button-bkg: crimson;
}
/* Light theme */
:root.light-theme {
    --surface-0: white;
    --on-surface-0: black;
    --on-surface-0-alt: #242424;
    --surface-1: #f2f2f2;
    --surface-1-border: #cecece;
    --surface-2: #dfdfdf; /* Textarea mostly */
    --surface-2-border: #cccccc; /* Textarea mostly */

    --button-bkg: hsl(348, 100%, 65%);
}

:root {
    font-family: var(--sans-serif-font);
    font-weight: 400;
    color: var(--on-surface-0);

    --serif-font: "Petrona", serif;
    --sans-serif-font: "Nunito", sans-serif;
    --monospace-font: "Noto Sans Mono", monospace;
    --article-width: 1280px;
    --section-width: 960px;
}

/* Mobile - 1.25x default font size */

:root {
    font-size: 1.25em;
}

/* Desktop - 1.5x default font size */

@media (min-width: 1024px) {
    :root {
        font-size: 1.5em;
    }
}

body {
    position: relative;
    margin: 0;
    padding: 1em;
    background-color: var(--surface-0);
}

/* Setting the theme class will take too long, hardcode this directly */
@media (prefers-color-scheme: dark) {
    body {
        background-color: black;
    }
}
@media (prefers-color-scheme: light) {
    body {
        background-color: white;
    }
}

header {
    text-align: center;
}

article {
    max-width: var(--article-width);
    margin: 3em auto;
}

section,
footer {
    max-width: var(--section-width);
    margin: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--serif-font);
    text-transform: capitalize;
}

section .section-banner {
    max-width: 100%;
    max-height: 5em;
}

section > p {
    text-align: center;
    text-wrap: balance;
    color: var(--on-surface-0-alt);
    margin: 1.33em 0;
}

textarea {
    font-family: var(--monospace-font);
}

button {
    color: black;
    font: inherit;
    padding: 0.5em;
    border-radius: 0.5em;
    background-color: var(--button-bkg);
    border: 2px solid var(--surface-2-border);
    font-weight: 900;
    cursor: pointer;
}

a {
    font-weight: 700;
    color: var(--link-color);
    text-underline-offset: 0.2em;
}

footer {
    border-top: 2px solid var(--surface-1-border);
}

b {
    font-weight: 700;
}

/* Introductory article */

.introduction-article p {
    color: var(--on-surface-0);
}

/* The fancy orb stuff */

.fancy-orb-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.2;
}

/* Mobile - Use linear gradients for the background */

.fancy-orb-background {
    background-image: linear-gradient(
        to bottom,
        transparent,
        crimson,
        transparent,
        palegreen,
        transparent,
        cornflowerblue,
        transparent
    );
}

.orb {
    display: none;
}

/* Desktop - Use fancy orbs */

@media (min-width: 1024px) {
    .fancy-orb-background {
        background-image: none;
    }

    .orb {
        display: block;
        position: absolute;
        transform: translate(-50%, -50%);
        height: 33%;
        aspect-ratio: 1 / 1;
        border-radius: 100%;
        background-color: var(--orb-color, crimson);

        filter: blur(20em);
    }

    .orb-red {
        top: calc(33% / 2);
        left: 10%;
        --orb-x: 10em;
        --orb-color: crimson;
    }

    .orb-green {
        top: calc(33% + calc(33% / 2));
        left: 90%;
        --orb-color: palegreen;
    }

    .orb-blue {
        top: calc(66% + calc(33% / 2));
        left: 10%;
        --orb-color: cornflowerblue;
    }
}
