*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --color-background: #0b0b0c;
    --color-highlight: #e8e8e8;
    --color-hover: white;
    --color-text: #9c9c9c;
    --color-border: #1d1d1f;
    --fonts-sans: geograph, futura, "Avenir Next", "Helvetica Neue", helvetica, arial, system-ui, ui-sans-serif, sans-serif;
    --fonts-monospace: "Soehne Mono", "SF Mono", ui-monospace, menlo, monospace;

    color-scheme: dark;
    border-top: none;
    line-height: 1.5em;
    font-family: var(--fonts-sans);
    font-size: 16px;
    color: var(--color-text);
}

body {
    background-color: var(--color-background);
    margin: 0 auto;
    max-width: 75%;
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    text-rendering: optimizelegibility;
    text-wrap: balance;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);

    & > * {
        margin: 1%;
    }

    & a {
        color: var(--color-text);

        &:focus-visible {
            outline-style: auto;
            outline-color: var(--color-hover);
        }

        &:hover {
            color: var(--color-hover);
            opacity: 1;
            text-decoration: underline;
            text-decoration-color: var(--color-hover);
            text-shadow:
                -0.25px 0 0 var(--color-hover),
                0.25px 0 0 var(--color-hover);
        }
    }
}

figure {
    padding-top: 1em;

    & img {
        max-width: 100%;
        height: auto;
        width: 240px;
        object-fit: cover;
        border-radius: 50%;
        aspect-ratio: 1;
    }
}

header {
    & h1 {
        line-height: 1.3em;
        text-transform: uppercase;
        margin-bottom: 0;
        font-weight: normal;
        letter-spacing: 0.25em;
        color: var(--color-highlight);
    }

    & p {
        font-weight: lighter;
        font-variant: small-caps;
        margin-top: 0;
        font-family: var(--fonts-monospace);
        letter-spacing: 0.1em;
    }
}

main {
    border-top: 1px solid var(--color-border);
    margin-inline: -20px;
    padding-inline: 20px;

    & h2 {
        line-height: 1.3em;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        margin-bottom: 0;
        font-weight: lighter;
        color: var(--color-highlight);
    }

    & h2 + p {
        margin-top: 0;
    }

    & a {
        color: var(--color-highlight);
    }
}

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    margin: 1em;
    padding: 1em;
    justify-content: center;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-inline: -20px;
    padding-inline: 20px;

    & a {
        color: inherit;
    }

    & svg {
        width: 1.5em;
        height: 1.5em;
        vertical-align: middle;
        fill: currentcolor;
    }
}

footer {
    display: flex;
    width: 100%;
    margin-top: auto;
    font-family: var(--fonts-monospace);
    text-transform: uppercase;
    letter-spacing: 0.1em;

    & a {
        text-decoration: none;

        &:hover {
            text-decoration: none;
        }
    }

    & p:first-child {
        text-align: left;
    }

    & p:last-child {
        text-align: right;
        font-size: xx-small;
        margin-top: auto;

        & a:not(:hover) {
            opacity: 0.1;
        }
    }

    & > * {
        flex: 1 1 auto;
        width: 100%;
        margin-bottom: 0;
    }
}

@media screen and (height >=400px) {
    body {
        max-width: 600px;
    }
}

@supports (text-wrap: pretty) {
    body {
        text-wrap: pretty;
    }
}
