@import url('normalize.css');

@font-face {
    font-family: "johnfont";
    src:
        url(/assets/ui/font/johnfont-v06.woff2) format('woff2'),
        url(/assets/ui/font/johnfont-v06.woff) format('woff');
    font-weight: normal;
    font-style: normal;
    font-variant-ligatures: discretionary-ligatures contextual;
    size-adjust: 145%;
}

@font-face {
    font-family: 'title';
    src:
        url(/assets/ui/font/min-title.woff2) format('woff2');
        /* url(/assets/ui/font/min-title.woff2) format('woff2'), */
        /* url(/assets/ui/font/min-title.woff) format('woff'); */
    font-weight: lighter;
    font-style: normal;
    font-display: swap;
    font-variant-ligatures: discretionary-ligatures contextual;
    size-adjust: 120%;
    word-spacing: 3px;
}

/* @font-face {
    font-family: 'johnfont-candidate';
    src:
        url(/assets/ui/font/johnfont-candidate.woff2) format('woff2');
    font-weight: normal;
    font-style: normal;
    font-variant-ligatures: discretionary-ligatures contextual;
    size-adjust: 145%;
} */

:root {
    --white-color: hsl(0, 0%, 100%);
    --black-color: hsl(0, 0%, 0%);
    --gray-color: hsl(0, 0%, 40%);
    --link-color: hsl(180, 100%, 50%);
    --hover-color: hsl(60, 100%, 50%);
    --visited-color: hsl(300, 100%, 50%);
    --foreground-color: var(--white-color);
    --background-color: var(--black-color);
    --margin-width: 1rem;
    --double-margin-width: calc(var(--margin-width) * 2)
}

@media (prefers-color-scheme: light) {
    :root {
        --foreground-color: var(--black-color);
        --background-color: var(--white-color);
        --background-image-url: url(/assets/ui/bg/perlin_inv.jpg);
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --foreground-color: var(--white-color);
        --background-color: var(--black-color);
    }
}

html {
    scrollbar-gutter: stable;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
    color: var(--foreground-color);
    font-size: 18px;
    font-family: "johnfont", system-ui, sans-serif;
    min-height: 96vh;
    width: min(960px, 90vw);
    margin: 0 auto;
    word-spacing: 5px;
    letter-spacing: normal;
    line-height: 1.75;

    & ::selection {
        background-color: yellow;
        color: var(--black-color);
    }
}

header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;

    & #logo {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: fit-content;
        font-family: "title", "johnfont", system-ui, sans-serif;
        font-weight: normal;
        text-decoration: underline;
        text-decoration-skip-ink: auto;
        flex: 1;
        font-size: 1.2em;

        & a:link, & a:visited {
            color: var(--foreground-color);
            width: 100%;
            height: 100%;

            &:hover {
                color: var(--visited-color);
                background-color: unset;
            }
        }
    }

    & nav#social {
        display: flex;
        justify-content: end;
        height: 100%;
        z-index: 1000;

        & a {
            display: flex;
            flex-direction: column;
            align-items: center;
            max-width: 100px;
            height: 100%;
            color: var(--foreground-color);
            font-size: 75%;

            & span {
                max-width: 100%;
                padding: 1.5rem;
                aspect-ratio: 1 / 1;

                & > img {
                    width: 100%;
                    aspect-ratio: 1 / 1;
                    margin-inline: auto;
                }
            }
        }
    }
}

main {
    flex: 1;

    & img {
        width: 50%;
    }
}

footer {
    flex: 0;

    & a:link, & a:visited {
        color: var(--foreground-color)
    }
}

li::marker {
    content: '- ';
}

h1 {
    /* font-size: 1.5em; */
}

img, svg {
    max-width: 100%;
    height: auto;
    line-height: 1;
}

input, textarea {
    color: var(--black-color);
    background-color: var(--white-color);

    &[readonly] {
        color: var(--gray-color);
    }
}

a, a:link {
    color: var(--link-color);
    height: 100%;

    &:has(img) {
        line-height: 1;
    }
}

a:visited {
    color: var(--visited-color);
}

a:hover {
    color: var(--hover-color);
}
