:root {
    color-scheme: light dark;
}

html {
    scroll-behavior: smooth;
}

body {
    --color: black;
    --color-inverted: white;
    background-color: var(--color-inverted);

    display: flex;
    flex-direction: column;
    margin: 0.3em;

    align-items: center;
}

img {
    font-family: monospace;
    color: grey;
    text-align: left;
}

.logo {
    height: 55vh;
    display: flex;
}

.logo > img {
    width: 11em;
    max-width: 50vw;
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

main {
    max-width: 730px;
    padding: 0 1em;
    flex: 1;
    line-height: 1.1;
}

main > div.index {
    width: 15em;
    padding-top: 3em;
    padding-left: 4em;
}

main ul {
    padding-left: 1.1em;
}

p + ul {
    margin-top: -0.9em;
}

details {
    padding-left: 1em;
    user-select: none;
}

details > summary {
    cursor: pointer;
    margin-left: -1em;
    padding-bottom: 0;
    font-weight: bold;
    transition: margin 0.01s linear;
}

details[open] > summary {
    margin-bottom: 0.5em;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.handle {
    font-family: monospace;
}

.handle::before {
    content: "@";
    opacity: 0.8;
    font-style: normal;
    display: inline-block;
}

:is(h1, h2) > a {
    color: unset;
    outline: none;
    cursor: alias;
    margin-left: -0.8em;
    padding-right: 0.3em;
}

:is(h1, h2) > a:hover {
    text-decoration: none;
}

:is(h1, h2) > a::before {
    content: "§";
    opacity: 0;
    transition: opacity 0.01s;
}

:is(h1, h2):hover > a::before,
:is(h1, h2):focus > a::before {
    opacity: 0.3;
}

:is(h1, h2) > a:hover::before {
    opacity: 0.4;
}

:is(h1, h2) > a:focus::before,
:is(h1, h2) > a:active::before {
    opacity: 0.5;
}

:target {
    animation: highlight 3s ease;
}

@keyframes highlight {
    0% {
        color: gold;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        --color: white;
        --color-inverted: #0d1117;
    }

    a {
        color: deepskyblue;
    }
}
