@font-face {
    font-display: swap;
    font-family: "Newsreader";
    font-style: normal;
    font-synthesis: none;
    font-weight: 200 800;
    src: url("/+static/fonts/Newsreader[opsz,wght].woff2")
        format("woff2-variations");
}

@font-face {
    font-display: swap;
    font-family: "Newsreader";
    font-style: italic;
    font-synthesis: none;
    font-weight: 200 800;
    src: url("/+static/fonts/Newsreader-Italic[opsz,wght].woff2")
        format("woff2-variations");
}

::selection {
    background: #ffffff;
    text-decoration: underline 1px;
    text-underline-offset: 2px;
}

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

body {
    background: #ffffff;
    color: #000000;
    font-family: Newsreader, serif;
    line-height: 1.5;
    margin: 2lh 1lh;
    min-height: calc(100dvh - 4lh);
    opacity: 0;
    overflow-wrap: anywhere;
    position: relative;
    text-align: justify;
    transition: opacity 200ms;
    word-break: break-word;
}

blockquote,
dd,
dt,
h1,
h2,
h3,
h4,
h5,
h6,
li,
p {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    margin: 0;
}

a {
    align-items: center;
    color: inherit;
    font-style: italic;
    text-decoration: none;
    transition: opacity 200ms;
}

a:hover {
    opacity: 0.75;
}

a > svg {
    display: inline-block;
    flex-shrink: 0;
    transform: translateY(0.2em);
    height: 1em;
    object-fit: cover;
    width: 1em;
}

footer {
    bottom: 0;
    display: flex;
    justify-content: space-between;
    position: absolute;
    width: 100%;
}

header p,
header h1 {
    display: inline;
}

h1 {
    font-weight: 550;
}

main {
    padding-bottom: 4lh;
}

section {
    margin-top: 1lh;
}

section > img {
    width: 100%;
}

body.writing {
    line-height: 1.75;
    margin-left: 1em;
    margin-right: 1em;
    user-select: none;
}

body.writing header {
    text-align: center;
}

body.writing header h1,
body.writing header p {
    display: block;
    text-align: center;
}

body.writing section {
    white-space: pre-wrap;
}

@media (min-width: 768px) {
    body,
    body.writing {
        margin-left: 25vw;
        margin-right: 25vw;
    }
}

@media (prefers-color-scheme: dark) {
    body, ::selection {
        background: #191919;
        color: #ffffff;
    }

    a > svg {
        filter: invert(1);
    }
}
