@font-face {
    font-family: "Audiowide";
    src: url("/assets/fonts/Audiowide-Regular.ttf");
}

@keyframes jetpack-hover {
    from {
        transform: translateY(10%);
    }

    to {
        transform: translateY(-10%);
    }
}

:root {
    font-family: system-ui, 
                -apple-system, BlinkMacSystemFont, 
                'Segoe UI', 
                Roboto, 
                Oxygen, 
                Ubuntu, 
                Cantarell, 
                'Open Sans', 
                'Helvetica Neue', 
                sans-serif;
    
    /* Used to be --home-color, --catalog-color, --blog-color... */
    /* They got renamed to use generic names for futureproofing */
    /* and also because if we were to change nav buttons, we would need */
    /* to rename the variable names as well. Even variable names get bugs as well. */
    --nav-color-one: #f20d0d;
    --nav-color-two: #f2690dff;
    --nav-color-three: #f2f20dff;
    --nav-color-four: #69f20dff;
    --nav-color-five: #00d9ff;
    --nav-color-six: #6f85ff;
    --nav-color-seven: #b778ff;
    --nav-color-eight: #ff43ef;

    --button-color: #2370dcff;

    height: max-content;
    min-height: 100%;
}

body {
    background: linear-gradient(#8594e0ff, #293da1ff);
    margin: 0;
    padding-top: 90px;
}

#container {
    border: 5px solid;
    border-radius: 0px 0px 20px 20px;
    background-color: white;
    overflow: clip;
    max-width: 850px;
    margin: auto;
    margin-top: 200px;
    margin-bottom: 30px;
    box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.5);

    & > header {
        box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
        top: 205px;
        position: fixed;
        left: auto;
        transform: translateX(-5px);
        z-index: -1000;

        & #novem-bar {
            background-color: #000080ff;
            width: 850px;
            height: 90px;
            border: 5px solid black;
            border-radius: 20px 20px 0px 0px;

            & #flying-novem {
                padding: 10px;
                position: absolute;
                top: -220px;
    
                #logo-container {
                    width: 280px;
                    height: 300px;
                    overflow: hidden;
                    position: relative;
    
                    & img {
                        width: inherit;
                        animation: jetpack-hover 5s ease-in-out infinite alternate;
                    }
                }
    
                #logo {
                    color: white;
                    font-weight: bolder;
                    font-size: 73px;
                    text-decoration: none;
                    font-family: 'Audiowide', monospace;
                    position: absolute;
                    bottom: 23%;
                    left: 25%;
                    height: 73px;
                    width: 800px;
                    transition: color 0.2s;
    
                    /*
                    https://old.reddit.com/r/csshelp/comments/b3z3gp/how_to_i_make_text_with_black_outline/
                    This is just some hacky CSS stuff.
                    */
                    text-shadow: 0.05em 0 black, 0 0.05em black, -0.05em 0 black, 0 -0.05em black, -0.05em -0.05em black, -0.05em 0.05em black, 0.05em -0.05em black, 0.05em 0.05em black;
    
                    &:hover {
                        color: gold;
                    }
                }
            }
        }
    }

    & nav {
        position: sticky;
        top: 0px;
        box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.35);
        z-index: 1000;

        & #nav-list {
            display: flex;
            padding: 0;
            text-align: center;
            margin: 0;

            & .nav-item {
                list-style-type: none;
                background-color: gray;
                flex-grow: 1;
                flex-basis: 0;
                transition: background-color 0.2s;
                line-height: normal;

                a {
                    text-decoration: none;
                    color: black;
                    display: block;
                    padding-bottom: 10px;
                    padding-top: 10px;
                }
            }

            /* Oh dear, that's a lot of repeated code. */
            /* Not sure if I can do anything about it though. */
            /* Maybe it might be better to use SCSS */
            & .nav-item:nth-child(1) {
                background-color: var(--nav-color-one);

                &:hover {
                    background-color: hsl(from var(--nav-color-one) h s calc(l - 10));
                }
            }

            & .nav-item:nth-child(2) {
                background-color: var(--nav-color-two);

                &:hover {
                    background-color: hsl(from var(--nav-color-two) h s calc(l - 10));
                }
            }

            & .nav-item:nth-child(3) {
                background-color: var(--nav-color-three);

                &:hover {
                    background-color: hsl(from var(--nav-color-three) h s calc(l - 10));
                }
            }

            & .nav-item:nth-child(4) {
                background-color: var(--nav-color-four);

                &:hover {
                    background-color: hsl(from var(--nav-color-four) h s calc(l - 10));
                }
            }

            & .nav-item:nth-child(5) {
                background-color: var(--nav-color-five);

                &:hover {
                    background-color: hsl(from var(--nav-color-five) h s calc(l - 10));
                }
            }

            & .nav-item:nth-child(6) {
                background-color: var(--nav-color-six);

                &:hover {
                    background-color: hsl(from var(--nav-color-six) h s calc(l - 10));
                }
            }

            & .nav-item:nth-child(7) {
                background-color: var(--nav-color-seven);

                &:hover {
                    background-color: hsl(from var(--nav-color-seven) h s calc(l - 10));
                }
            }

            & .nav-item:nth-child(8) {
                background-color: var(--nav-color-eight);

                &:hover {
                    background-color: hsl(from var(--nav-color-eight) h s calc(l - 10));
                }
            }
        }
    }
}

main {
    padding: 10px;
}

footer {
    text-align: center;
    background-color: #e0e0e0;
    padding: 10px;
}

.card {
    /* background-color: #28abd7ff; */
    background: linear-gradient(rgb(77, 210, 255), #37a3c7);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0px 10px 5px rgba(0, 0, 0, 0.3);
    margin-top: 30px;
    margin-bottom: 30px;

    &.grey {
        background: linear-gradient(#f5f5f5, #e6e6e6);
    }

    &.warn {
        background: linear-gradient(#ffe600, #ffa600);
    }

    &.rss-color {
        background: linear-gradient(#ffa256, #ff5100);
    }
}

#introduction {
    display: flex;

    @media (max-width: 680px) {
        flex-direction: column-reverse;
    }

    width: 100%;

    & img {
        margin-right: 32px;

        @media (max-width: 680px) {
            margin: auto;
        }

        position: relative;
        top: 10px;
    }
}

#intro-text {
    width: 100%;
    @media (max-width: 680px) {
        text-align: center;
    }
    font-size: 18px;

    & div#intro-name {
        font-size: 32px;
        font-weight: bolder;
    }

    & ul {
        padding-left: 10px;
    }

    & ul li {
        list-style-type: "- ";
        line-height: 40px;
    }

    & #platforms div {
        display: inline-flex;

        & #other-platforms {
            margin-top: auto;
            margin-bottom: auto;
        }

        & .anchor-button {
            margin-right: 10px;
            font-size: initial;
        }
    }

    & #platforms span {
        margin-bottom: 10px;
        display: block;
    }
}

.anchor-button {
    background-color: var(--button-color);
    color: white;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0px 5px 3px rgba(0, 0, 0, 0.5);

    & a {
        color: white;
        text-decoration: none;
        padding: 10px;
        display: block;
        font-weight: bold;
    }

    &:hover {
        background-color: hsl(from var(--button-color) h s calc(l - 10));
        box-shadow: none;
        transform: translateY(3px);
        cursor: pointer;
    }

    &.invert {
        background-color: white;

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

button.anchor-button {
    padding: 10px;
    border: none;
}

.carousel {
    display: grid;
    margin-bottom: 25px;
    grid-template-columns: 1fr 1fr 1fr;

    & .item {
        width: 230px;
        min-height: 170px;
        overflow: hidden;
        text-decoration: none;
        color: black;
        text-align: left;
        transition: all 0.2s;
        margin: auto;

        & img {
            width: 100%;
            height: 128px;
        }

        & .title {
            font-size: 25px;
        }

        & * {
            margin-bottom: 5px;
        }

        &:hover {
            box-shadow: none;
            transform: translateY(10px);
        }
    }

}

.highlight-aqua {
    background-color: aqua;
    border-radius: 3px;
    padding: 2px;
    display: inline-block;
}

.see-more {
    display: block;
    width: 160px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    margin-bottom: 10px;
}

.warning-text {
    color: red;
}

ul {
    list-style-type: "-  ";

    & li {
        line-height: 30px;
    }
}

#blog-list {
    max-width: 500px;
    text-align: center;
    margin: auto;

    & .item {
        margin-bottom: 50px;
        display: block;
        text-decoration: none;
        color: black;
        transition: all 0.2s;

        & .title {
            font-size: 30px;
        }

        /* & .excerpt {
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        } */

        &:hover {
            box-shadow: none;
            transform: translateY(10px);
        }
    }
}

.center {
    text-align: center;
}

.pagination {
    margin: auto;
    width: fit-content;

    & ul {
        width: 400px;
        padding-left: 0;
        text-align: center;

        & li {
            list-style-type: none;
            
            & a {
                padding: 10px;
                min-width: 20px;
            }

            &.active {
                background-color: green;
            }

            &.back {
                margin-right: 10px;
                background-color: hsl(from var(--button-color) h s calc(l + 20));
                
                &:hover {
                    background-color: hsl(from var(--button-color) h s calc(l - 20));
                }
            }

            &.next {
                margin-left: 10px;
                background-color: hsl(from var(--button-color) h s calc(l + 20));

                &:hover {
                    background-color: hsl(from var(--button-color) h s calc(l - 20));
                }
            }
        }
    }
}

article {
    & > header {
        text-align: center;
    }

    & > main {
        text-align: justify;
        font-size: 20px;
        line-height: 35px;
        color: rgb(29, 29, 29);

        & small {
            color: rgb(70, 70, 70);
        }

        & code {
            background-color: rgb(56, 113, 128);
            border-radius: 3px;
            padding: 2px;
            font-size: 17px;
            color: white;
        }
    }

    & blockquote {
        background-color: #b0e4eb;
        padding: 10px;
        border-left: 5px solid #44aab8;
        font-size: 18px;
    }
}

#wip-icon {
    font-size: 100px;
}

.large {
    font-size: 30px;
}

#dismissible {
    background: linear-gradient(rgb(77, 210, 255), #37a3c7);
    display: grid;
    grid-template-columns: 1fr 32px;

    & #dismiss {
        background-color: #ffffff;
        border: none;
        height: 32px;
        padding: 10px;
        border-radius: 5px;
        margin: auto;

        &:hover {
            background-color: #dfdfdf;
            cursor: pointer;
        }
    }
}

.cw-blur {
    filter: blur(5px);
}

#content-warning {
    position: absolute;
    z-index: 1000;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 500px;
}

#article-container {
    position: relative;
}

a {
    color: rgb(0, 0, 177);
}

.mastodon-embed {
    margin: auto !important;
}

del {
    color: grey;
}

.icons {
    width: 16px;
    margin-right: 5px;
}