:root {
    --_color-1: hsl(150 30% 05%);
    --_color-2: hsl(150 30% 20%);
    --_color-3: hsl(150 30% 30%);
    --_color-4: hsl(150 30% 45%);
    --_color-5: hsl(150 30% 50%);
    --_color-6: hsl(150 30% 55%);
    --_color-7: hsl(150 30% 70%);
    --_color-8: hsl(150 30% 80%);
    --_color-9: hsl(150 30% 95%);
    --font-title: "Inter Display", "Arial", sans-serif;
    --font-body: "TeX Gyre Schola", "Georgia", serif;
}

:root {
    color-scheme: light;
    --color-text: var(--_color-1);
    --color-base: var(--_color-9);
    --color-step-1: var(--_color-8);
    --color-step-2: var(--_color-7);
    --color-step-3: var(--_color-6);
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --color-text: var(--_color-9);
        --color-base: var(--_color-1);
        --color-step-1: var(--_color-2);
        --color-step-2: var(--_color-3);
        --color-step-3: var(--_color-4);
    }
}

:root:has(#theme-light:checked) {
    color-scheme: light;
    --color-text: var(--_color-1);
    --color-base: var(--_color-9);
    --color-step-1: var(--_color-8);
    --color-step-2: var(--_color-7);
    --color-step-3: var(--_color-6);
}

:root:has(#theme-dark:checked) {
    color-scheme: dark;
    --color-text: var(--_color-9);
    --color-base: var(--_color-1);
    --color-step-1: var(--_color-2);
    --color-step-2: var(--_color-3);
    --color-step-3: var(--_color-4);
}

body {
    max-width: 50rem;
    margin: 0 auto;
    padding: 1.5rem;
    color: var(--color-text);
    background-color: var(--color-base);
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.5;
    hyphens: auto;
    overflow-wrap: anywhere;
}

h1 {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 900;
    hyphens: none;
    text-wrap: balance;
}

h2 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    hyphens: none;
    text-wrap: balance;
}

h3 {
    font-weight: bold;
    hyphens: none;
    text-wrap: balance;
}

p {
    margin-bottom: 0.5rem;
}

em {
    font-style: italic;
}

a {
    color: inherit;
    text-decoration: underline dotted;
}

code {
    font-family: "Source Code Pro";
}

small {
    font-variant: all-small-caps oldstyle-nums;
}

.nav-skip {
    position: absolute;
    padding: 1rem;
    opacity: 0;
    color: var(--color-base);
    background-color: var(--color-text);
    font-family: var(--font-title);
    pointer-events: none;
    text-decoration: none;
}

.nav-skip:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

.main-menu {
    display: flex;
    margin-bottom: 1rem;
    font-family: var(--font-title);
    font-weight: 500;
    hyphens: none;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.menu-toggle {
    all: unset;
    cursor: pointer;
}

.menu-link {
    text-decoration: none;
}

.menu-toggle,
.menu-link {
    display: flex;
    min-height: 2rem;
    padding: 0 1rem;
    border-radius: 1000vmax;
    background-color: var(--color-step-1);
    justify-content: center;
    align-items: center;
}

.menu-item > .menu-link[aria-current="page"],
.menu-item > .menu-toggle[aria-expanded="true"] {
    background-color: var(--color-step-3);
}

.menu-icon {
    height: 1.5rem;
    width: 1.5rem;
    fill: var(--color-text);
}

.theme-switcher {
    display: flex;
    height: 2rem;
    background-color: var(--color-step-1);
    border-radius: 1000vmax;
}

.theme-switcher > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-switcher > label {
    display: flex;
    width: 2rem;
    border-radius: 1000vmax;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.theme-switcher > input:checked + label {
    background-color: var(--color-step-3);
}

:focus-visible,
.theme-switcher > input:focus-visible + label {
    outline: 0.4rem solid var(--color-text);
    outline-offset: 0.1rem;
}

[hidden] {
    display: none;
}

@media (hover: hover) {
    .hoverable:hover {
        background-color: var(--color-step-2);
    }
}

@media print {
    nav {
        display: none;
    }
}
