/* latin-ext */
@font-face {
    font-family: 'Plex Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(./fonts/plex-mono-latin-ext-bold.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Plex Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(./fonts/plex-mono-latin-bold.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(./fonts/plex-mono-latin-ext-regular.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(./fonts/plex-mono-latin-regular.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url(./fonts/jetbrains-mono-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url(./fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@keyframes blink {
    0% { opacity: 0; }
    49% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 1; }
}

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

html {
    --background-color: var(--theme-background-color);
    --background-image: var(--theme-background-image);
    --text: var(--theme-text-color);

    height: 100%;
    background-color: var(--background-color);
}

body {
    font-family: "Plex Mono", monospace;
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1.6;
    background-color: var(--background-color);
    background-image: var(--background-image);
    background-attachment: fixed;
    color: var(--text);
    display: grid;
    place-content: center;
    min-height: 100%;
    margin: 0;
    padding: 5rem 1rem 1rem 1rem;
}

::selection {
    color: var(--background-color);
    background-color: var(--text);
}

.logo {
    position: relative;
    display: inline-block;
    font-family: "Plex Mono", monospace;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.3ch;
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 3rem;
    border: 0.3ch solid var(--text);
    color: var(--text);
    background-color: transparent;
    padding: 0.3rem 0.8rem 0.3rem 1rem;
    line-height: 3ex;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;

    &:focus {
        outline-style: none;
    }

    span {
        display: inline-block;
        vertical-align: bottom;
        font-size: 1em;
        color: var(--text);
        animation: 1.5s linear infinite blink;
    }
}

main {
    width: 100%;
    max-width: 52ch;
    overflow: hidden;
}

p {
    margin-block: 1.8rem;
}

ul, ol {
    padding-left: 1.6rem;
}

ul li {
    list-style-type: square;
}

a {
    color: var(--text);
    text-decoration-color: var(--text);
    text-decoration-thickness: 0.2ex;
    text-underline-offset: 0.4ex;
    font-weight: 600;
}

h2, h3, h4, h5, h6 {
    margin-top: 4ex;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.3rem;
}

h5 {
    font-size: 1.2rem;
}

h6 {
    font-size: 1.1rem;
}

strong {
    font-weight: 800;
}

:focus {
    outline-offset: 0.15ex;
    outline-width: 0.3ex;
    outline-style: dashed;
    outline-color: var(--text);
}

footer {
    font-size: 1rem;
}

pre {
    border-width: 5px;
    border-style: solid;
    font-size: 1rem;
    padding: 1.5rem;
    overflow-x: auto;
    background-color: rgb(230, 234, 239);
}

pre code {
    background-color: rgb(230, 234, 239);
    color: var(--text);
    padding: 0;
}

p > code {
    text-wrap: wrap;
    display: inline-block;
    word-wrap: break-word;
    hyphens: none;
    overflow-wrap: break-word;
    overflow-x: auto;
    vertical-align: middle;
}

code {
    background-color: rgb(230, 234, 239);
    color: var(--text, white);
    padding: 0 0.2rem;
    font-size: 1rem;
}

code::selection {
    background-color: var(--background-color, gray);
    color: var(--text, white);
}

@media(prefers-color-scheme: dark) {
    html {
        --background-color: var(--dark-theme-background-color, var(--theme-background-color));
        --background-image: var(--dark-theme-background-theme, var(--theme-background-image));
        --text: var(--dark-theme-text-color, var(--theme-text-color));
    }

    pre,
    code,
    pre code {
        background-color: rgb(20, 20, 20);
    }
}

@media(prefers-reduced-motion) {
    .logo {
        animation: none;
    }
}