html {
    margin: 0;
    padding: 0;
    height: 100%;
    position: relative;
    overflow: hidden;
    touch-action: none;
    -ms-touch-action: none;
}

body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    position: relative;
    overflow: hidden;
    touch-action: none;
    -ms-touch-action: none;

    background-color: var(--root-back);
    color: var(--root-text);

    transition: .4s;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    & canvas {
        mask-image: linear-gradient(to bottom, var(--root-back), transparent);

        position: fixed;
        top: 0;
        left: 0;

        width: 100%;
        height: 100%;

        z-index: 1000;
        pointer-events: none;

        transition: .2s;
        opacity: 1;

        /* filter: blur(3px); */
    }

    /* &::before {
        content: '';
        width: 100vw;
        height: 100vh;

        pointer-events: none;

        position: fixed;
        top: 0;
        left: 0;
        z-index: 10000;

        transition: .3s;

        will-change: transform;
        opacity: 1;

        transition-delay: .5s;
        background-color: black;
    } */

    &.loaded {

        .head {
            opacity: 1;
            filter: blur(0);
            transition-delay: .5s;
        }

        .homePages,
        .tab-buttons {
            opacity: 1;
            filter: blur(0);
            transition-delay: 1.5s;
        }

        &::before {
            opacity: 0;

            transition-delay: 0;
        }
    }

    &:not(:has(.tab-buttons)) {
        .homePages {
            opacity: 0;
        }
    }

    &:not(:has([data-barba='container'].loaded)) {
        header {
            opacity: 0;
            top: -25px;
        }
    }

    &:has(main:not([data-barba-namespace="home"])) {
        header {
            &::after {
                opacity: 1;
                top: 0px;
            }

            .home {
                opacity: 1;
                pointer-events: all;
                margin-left: 20px;
            }
        }
    }

    &:has(main:not([data-barba-namespace="futur3sn0w"])) {
        .back-btn {
            width: 0;
            height: 0;
            padding: 0;
            margin: 0;

            opacity: 0;
            pointer-events: none;
        }
    }

    &:has(main[data-barba-namespace="music"]),
    &:has(main[data-barba-namespace="futur3sn0w"]) {
        .home {
            border-radius: 50px;
        }
    }

    &:has(main[data-barba-namespace="music"]) {
        canvas {
            display: none;
        }
    }

}

header {
    width: 100vw;
    height: 90px;

    position: fixed;
    top: 0;
    left: 0;
    z-index: 100000000000;
    transition: .2s;

    border-radius: 0 0 15px 15px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    &::after {
        content: '';
        position: absolute;
        top: -20px;
        left: 0;
        z-index: -1;

        transition: .2s;
        opacity: 0;

        background-color: var(--root-back-alpha);
        backdrop-filter: blur(5px);

        width: 100%;
        height: 100%;
    }

    .subhead {
        font-size: 32px;

        background: linear-gradient(to right,
                var(--root-back-b) 0%,
                var(--root-back-b) 40%,
                var(--root-back) 50%,
                var(--root-back-b) 60%,
                var(--root-back-b) 100%);
        background-size: 200% auto;
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: slidetounlock 5s infinite linear;
        will-change: background-position;

        font-weight: 900;
        letter-spacing: 17px;

        position: absolute;

        display: flex;
        align-items: center;
        justify-content: center;

        width: max-content;
        max-width: 100%;
        text-wrap: wrap;
        text-align: center;

        transition: .4s;
        text-transform: uppercase;
    }

    .home {
        margin-right: auto;
        margin-left: -15px;

        width: 45px;
        height: 45px;

        opacity: 0;
        pointer-events: none;

        &:hover {
            background-color: rgb(195, 226, 241);
            border-radius: 30px !important;
        }
    }

    .back-btn {
        width: 50px;
        height: 50px;
        border-radius: 100px;
        min-width: unset;

        margin-left: 15px;
        margin-right: -15px;

        opacity: 1;
        pointer-events: all;

        &:hover {
            background-color: var(--btn-highlight);

            & i {
                color: white;
            }
        }

        & i {
            position: relative;
            z-index: 10;

            transition: .15s;
        }

        &.hide {
            width: 0;
            height: 0;
            padding: 0;
            margin: 0;

            opacity: 0;
            pointer-events: none;
        }
    }
}

[data-barba='container'] {
    display: flex;

    width: 100%;
    height: calc(100% - 90px);

    position: fixed;
    overflow: hidden;
    bottom: 0;

    transition: .4s !important;

    &:not(.loaded) {
        filter: blur(20px);
        transform: scale(.9);
        opacity: 0 !important;
    }

    &.loaded {
        opacity: 1 !important;
        filter: blur(0);
    }
}

.container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;

    overflow: hidden;

    & .head {
        color: transparent;
        text-shadow:
            -5px -5px 10px var(--root-back-alpha),
            10px 10px 10px rgba(0, 0, 0, 0.2);

        background: linear-gradient(to bottom right, var(--root-back-b), var(--root-back-contrast));

        background-clip: text;
        -webkit-background-clip: text;

        display: flex;
        align-items: flex-end;
        justify-content: center;
        flex-shrink: 0;
        height: 20vh;

        opacity: 0;
        filter: blur(10px);
        transition-delay: 0;
        transition: .4s;

        position: relative;
        z-index: 1000;

        font-size: 130px;
        font-weight: 900;
        will-change: transform;
    }

    & .tab-buttons {
        display: flex;
        gap: 5px;
        flex-shrink: 0;

        background-color: var(--root-back-contrast);
        /* box-shadow: 0 10px 20px #00000015; */
        --radius: 24px;
        border-radius: 24px 24px 0 0;

        width: fit-content;
        height: 50px;
        padding: 5px;

        position: sticky;
        top: 10px;
        margin: 0 auto;
        z-index: 100;

        opacity: 0;
        filter: blur(10px);
        transition-delay: 0;
        transition: .4s;

        &::before,
        &::after {
            content: '';

            width: var(--radius);
            height: 40px;

            position: absolute;
            bottom: 0;

            transition: .25s;
        }

        &::before {
            left: calc((var(--radius) - 1px) * -1);
            border-radius: 0 0 var(--radius) 0;

            box-shadow: 3px 9px 0 1px var(--root-back-contrast);
        }

        &::after {
            right: calc((var(--radius) - 1px) * -1);

            border-radius: 0 0 0 var(--radius);
            box-shadow: -3px 9px 0 1px var(--root-back-contrast);
        }

        &:not(:has(.tab-btn:hover)) .pill-highlight {
            opacity: 0;
            width: 0px;
            transform: translateX(50px);
        }

        & .pill-highlight {
            position: absolute;
            top: 5px;
            left: 0;
            width: 100px;
            height: 40px;
            background-color: var(--root-back-b);
            border-radius: 50px;
            opacity: 1;
            pointer-events: none;
            transition: .4s;
            z-index: 1;
        }

        & .tab-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;

            background-color: transparent;

            width: 100px;
            height: 100%;

            border-radius: 25px;
            font-size: 20px;
            font-weight: bold;

            padding: 5px 10px;

            position: relative;
            overflow: hidden;
            z-index: 2;

            transition: .2s;

            &:hover,
            &.selected {
                p {
                    font-weight: bold;
                }
            }

            & p {
                transition: .2s;
                position: relative;
                z-index: 10;
                font-weight: normal;

                display: flex;
                align-items: center;
                gap: 10px;
            }

            &::before {
                content: '';

                width: 100%;
                height: 100%;

                background: linear-gradient(to bottom, #3FC6FF, #4291C5);
                border: none !important;

                position: absolute;
                left: 0;
                z-index: 0;

                transition: .15s;
                opacity: 0;
            }

            &:not(.selected) {
                box-shadow: none;

                &::after {
                    opacity: 0;
                }
            }

            &.selected {
                background-color: var(--root-back);

                &::after,
                & p {
                    color: white !important;
                }

                &::before {
                    opacity: 1;
                    box-shadow: inset 0 5px 15px #00000011;
                }
            }
        }
    }

    &:has(.tab-btn[for="socials"].selected) {
        .subTiles {
            opacity: 1;

            pointer-events: all;
            /* transform: translateX(0); */
        }

        .outLinks {
            opacity: 0;
            margin-left: -100%;

            pointer-events: none;
            /* transform: translateX(-50px); */
        }
    }

    &:has(.tab-btn[for="sites"].selected) {
        .outLinks {
            opacity: 1;

            pointer-events: all;
            /* transform: translateX(0); */
        }

        .subTiles {
            opacity: 0;

            pointer-events: none;
            /* transform: translateX(50px); */
        }
    }

    & .homePages {
        display: flex;
        align-items: center;
        justify-content: flex-start;

        overflow: hidden;
        height: fit-content;
        max-height: 100%;
        width: 546px;
        min-width: 300px;

        margin-top: -20px;

        background-color: var(--root-back-contrast);
        border-radius: 26px;

        opacity: 0;
        filter: blur(10px);
        transition-delay: 0;
        transition: .4s;
    }

    & .outLinks {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        flex-wrap: wrap;
        gap: 45px 20px;

        width: 100%;
        height: fit-content;
        max-height: 100%;
        padding-top: 30px;
        padding-bottom: 45px;

        perspective: 1000px;

        overflow-y: scroll;

        flex-shrink: 0;

        position: relative;
        z-index: 1100;

        opacity: 1;
        transition: .4s;
    }
}

.outlink {
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 10px #00000015;
    background-color: var(--root-back-contrast);
    /* overflow: hidden; */

    height: 150px;
    width: 150px;
    font-size: 17px;
    flex-shrink: 0;

    border: 1px solid var(--root-border);

    border-radius: 20px;

    transition: .3s;

    user-select: none;
    cursor: pointer;

    position: relative;
    z-index: 20;

    &.disabled {
        opacity: .5;
        pointer-events: none;
    }

    &.wide {
        width: 310px;
    }

    /* &:nth-of-type(2) {
        margin-left: -160px;
    } */

    &:hover {
        box-shadow: 0 10px 15px #00000033;

        &>p {
            font-weight: bold;
        }

        &::after {
            opacity: .66;
        }
    }

    &::after {
        content: '';
        width: 100%;
        height: 100%;

        position: absolute;
        z-index: 5;

        opacity: 0.0;
        transition: .2s;
        border-radius: 19px;
        mix-blend-mode: screen;
        background: radial-gradient(circle farthest-corner at center top, white, transparent);
    }

    &>i {
        position: absolute;
        opacity: 1;
        z-index: 5;

        font-size: 17px;

        transition: .5s;

        padding-bottom: 105px;
        padding-left: 105px;

        color: var(--root-text);
    }

    &.wide>i {
        padding-left: 260px;
    }

    &>p {
        position: absolute;
        bottom: -35px;
        z-index: 9;

        font-size: 13.5px;

        transition: .2s;

        color: var(--root-text);

        background-color: var(--root-back-alpha);
        padding: 3px 7px;
        border-radius: 50px;
    }

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;

        position: relative;
        z-index: 4;

        transition: .25s;
        appearance: none;
        border-radius: 19px;

        &.tempHide {
            opacity: 0;
        }

        &[src=""] {
            display: none;
        }
    }

    &.about-me {
        img {
            object-position: center -15px;
            object-fit: cover;
        }

        &>i {
            color: white;
        }
    }

    &.visit-fs {
        &>i {
            color: black;
        }
    }

    &.my-music {
        padding: 10px;
        gap: 10px;

        &:hover {
            &::before {
                opacity: .25;
            }
        }

        &:has(.tempHide) {
            .infoLabels {
                opacity: 0;
            }
        }

        .infoLabels {
            display: flex;
            flex-direction: column;
            gap: 3px;

            margin-top: auto;
            margin-right: auto;
            margin-bottom: 5px;

            opacity: 1;

            transition: .2s;

            & .type {
                text-transform: uppercase;
                font-weight: bold;
                letter-spacing: 3px;
                font-size: 10px;
                opacity: .3;
            }

            & .title {
                font-size: 17px;
                font-weight: bold;
            }

            & .date {
                font-size: 13px;
                opacity: .4;
            }
        }

        &::before {
            content: '';
            width: 100%;
            height: 100%;
            border-radius: 19px;

            position: absolute;

            transition: .2s;

            background-color: var(--dominant-color);
            opacity: .15;
            filter: saturate(4);
        }

        img {
            object-fit: cover;
            border-radius: 10px;

            width: auto;
        }
    }
}

main[data-barba-namespace="404"] {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 50px;

    overflow: hidden;

    & .head {
        color: transparent;
        text-shadow:
            -5px -5px 10px var(--root-back-alpha),
            10px 10px 10px rgba(0, 0, 0, 0.2);

        background: linear-gradient(to bottom right, var(--root-back-b), var(--root-back-contrast));

        background-clip: text;
        -webkit-background-clip: text;

        transition: .4s;

        margin-top: -90px;
        position: relative;
        z-index: 1000;

        font-size: 130px;
        font-weight: 900;
        will-change: transform;
    }
}

button {
    appearance: none;
    border: none;
    outline: none;
}

/* button, */
.button {
    appearance: none;
    border: none;
    outline: none;

    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 10px #00000015;
    background-color: var(--root-back);
    overflow: hidden;

    min-width: 90px;
    min-height: 35px;
    font-size: 14px;
    flex-shrink: 0;

    border-radius: 12px;
    color: var(--root-text);

    transition: .3s ease;

    user-select: none;
    cursor: pointer;

    position: relative;
    z-index: 20;

    &:hover {
        box-shadow: 0 10px 15px #00000033;
        /* background-color: rgb(207, 241, 195); */
        border-radius: 100px;

        font-weight: 600;
        opacity: 1;
        color: black !important;

        &::after {
            opacity: .15;
        }
    }

    &::after {
        content: '';
        width: 100%;
        height: 100%;

        position: absolute;
        z-index: 0;

        opacity: .05;
        transition: .2s;
        background: linear-gradient(to bottom, transparent, var(--root-text));
    }

    &::before {
        content: '';
        width: 100%;
        height: 100%;

        position: absolute;
        z-index: 0;

        opacity: .1;

        box-sizing: border-box;
        border: 1px solid var(--root-text);
        border-radius: inherit;
    }
}

@keyframes slidetounlock {
    0% {
        opacity: 0;
        filter: blur(10px);
        background-position: 100% 0;
    }

    20% {
        opacity: 1;
        filter: blur(0);
    }

    80% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        opacity: 0;
        filter: blur(10px);
        background-position: -100% 0;
    }
}

@media screen and (max-width: 950px) {
    .outlink {
        width: 310px !important;

        img {
            object-fit: cover !important;
            object-position: center !important;
        }
    }
}