:root {
    --background: #0C0C1D;
    --foreground: #7797B6;
    --green: #077A5F;
    --grey: #5D6D70;
    --highlight: #8FC53D;
    --blue: #7278BD;
    --border-radius: 0.5rem;
    interpolate-size: allow-keywords;
}


body {
    font-family: "DM Mono", monospace;
    font-weight: 400;
    font-style: normal;
    font-size: 1.2rem;
    color: var(--foreground);
    background-color: var(--background);
    margin: 0 30%;
}

h1 {
    color: var(--highlight);
    font-size: 4em;
    font-weight: normal;
}

h1, h2 {
    font-style: italic;
}

ul {
    list-style-type: none;
    padding: 0;
}

.fa-solid {
    vertical-align: middle;
    margin: .5rem;
}

hr {
    border: none;
    --color: var(--grey);
    background-color: var(--color);
    color: var(--color);
    height: .15rem;
    border-radius: var(--border-radius);
}

code {
    font-size: medium;
    border-radius: var(--border-radius);
}

.hidden {
    display: none;
}

header {
    display: flex;
    align-items: end;
    margin-top: 1rem;

    h1 {
        margin: 0;
        font-size: 5vw;
    }

    @media screen and (max-width: 1000px) {
        h1 {
            font-size: 3rem;
        }
    }

    img {
        width: 10vw;
        margin-right: 3rem;
    }
}

section {
    min-height: 50vh;
}

video {
    margin-bottom: 1rem;
}

.youtube, video {
    aspect-ratio: 16 / 9;
}

iframe, svg, video {
    width: 100%;
}

.highlight-border, .youtube, video {
    border: .2rem solid var(--highlight);
    border-radius: var(--border-radius);
    padding: .2rem;
}

a {
    color: var(--blue);
    fill: var(--blue);
    transition: all 0.3s ease;

    &:hover {
        color: var(--highlight);
        fill: var(--highlight);
        text-decoration: underline;
    }

    &:visited {
        color: var(--grey);
    }

    &:hover:visited {
        color: var(--highlight);
        fill: var(--highlight);
    }
}



.image-link {
    position: relative;
    display: block;
    height: fit-content;
    svg {
        opacity: 0%;
        transition: opacity 0.3s ease;
        position: absolute;
        width: 2rem;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    img {
        display: block;
        border-radius: calc(var(--border-radius) - .2rem * 2 );
        transition: all 0.3s ease;
    }

    &:hover {
        img {
            filter: brightness(50%) blur(1px);
        }

        svg {
            opacity: 100%;
        }
    }
}

ul.row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

nav {
    background-color: var(--background);

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    a {
        text-decoration: none;
        font-size: large;
        display: flex;
        
        &:visited {
            color: var(--blue);
        }

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

    img {
        width: 6rem;
        height: 6rem;
    }

    svg {
        width: 2rem;
        margin-right: .5rem;
    }

    ul {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    li {
        list-style-type: none;
    }

    details {
        display: flex;
        flex-direction: column;
        align-items: end;

        &::details-content {
            height: 0;
            overflow: hidden;
            transition: all 0.3s;
            transition-behavior: allow-discrete;
        }

        &:open {
            &::details-content {
                height: auto;
            }

            summary {
                fill: var(--highlight);
            }
        }

        summary {
            list-style: none;
            fill: var(--blue);
            svg {
                width: 3rem;
            }
            margin-bottom: calc(96px - 48px);
        }

        ul {
            flex-direction: column;
            align-items: end;

            & p {
                font-size: 1.5rem;
            }

            & svg {
                margin: 0 .5rem;
            }

        }

    }
}

#contact-list {
    span {
        width: 2rem;
        display: block;
        margin-right: 10px;
    }
    a {
        display: flex;
        flex-direction: row;
    }
}

#back-to-top {
    position: fixed;
    bottom: 4rem;
    right: 4rem;
    opacity: 0;
    text-decoration: none;
    cursor: pointer;
    border: .15rem solid var(--blue);
    border-radius: var(--border-radius);
    background-color: var(--background);
    width: 2rem;
    height: 2rem;
    padding: .3rem;
    z-index: 100;

    svg {
        width: 2rem;
    }


    &.visible {
        opacity: 100%;
    }

    &:hover {
        border-color: var(--highlight);
        background-color: var(--blue);
        transform: translateY(-0.3rem);
    }
}

.button-links {
    width: 100%;
    li {
        transition: margin-left 0.3s;
        --bg: var(--blue);
        background-color: var(--bg);
        border-radius: var(--border-radius);
        margin-bottom: 0.5rem;

        transition: all .3s;

        box-shadow: .2rem .2rem color-mix(var(--bg), black 50%);
        a {
            text-decoration: none;
            background-color: transparent;
            color: var(--background);
            width: 100%;
            height: 100%;
            padding: 2rem 1rem;
            display: flex;
            flex-direction: row;
            svg {
                width: 1.5rem;
                padding-right: 1rem;
                transition: .3s all;
                fill: var(--background);
            }

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


        &:hover {
            cursor: pointer;
            --bg: var(--highlight);

            svg {
                margin-left: 1rem;
            }
        }
    }
}

.play-something {
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    /* border: .2rem solid var(--blue); */
    /* border-radius: var(--border-radius); */
    padding: 4rem 1rem;
    min-height: 0;

    span {
        margin-top: 2rem;
        display: flex;
        align-items: center;
        justify-content: space-evenly;
    }

    /* .spectrum { */
    /*     max-height: 5rem; */
    /* } */

    button {
        background: none;
        color: inherit;
        border: none;
        padding: 0;
        font: inherit;
        cursor: pointer;
        outline: inherit;


        &.play-button {
            height: 5rem;
            position: relative;
            &.playing {
                >:nth-child(1) {
                    display: none;
                }

                >:nth-child(2) {
                    display: block;
                }

            }

            >:nth-child(2) {
                display: none;
            }

            svg {
                width: 5rem;
                fill: var(--blue);
                transition: all .3s;
            }

            &:hover {
                svg {
                    transform: scale(1.2);
                    fill: var(--highlight);
                }
            }

            .spectrum {
                position: absolute;
                top: -50%;
                left: -50%;
                width: 200%;
                height: 200%;
                /* transform: scale(1.8); */

                /* janky colour conversion */
                filter: brightness(0) saturate(100%) invert(65%) sepia(5%) saturate(4028%) hue-rotate(198deg) brightness(74%) contrast(99%);
            }

        }

        &.random-button {
            svg {
                transition: all .3s;
                width: 2rem;
                fill: var(--blue);
            }

            margin-right: 1rem;

            &:hover {
                svg {
                    transform: translateY(-.5rem) rotate(360deg) scale(1.2);
                    fill: var(--highlight);
                }
            }

        }
    }
}



@media screen and (max-width: 1000px) {
    .desktop {
        display: none;
    }

    body {
        margin: 10%;
        
    }

    h1 {
        font-size: 3rem;
    }
}

@media screen and (min-width: 1001px) {
    .mobile {
        display: none;
    }
}

