/*
Andrew Forster
Website V2
04/15/24
*/

:root {
    --angle: 0deg;
}

#silk-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    filter: blur(2px) brightness(90%);
    opacity: 0.3;
    pointer-events: none;
}

/* Globe of Skills */

#globe-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 0 0 40px;
    transition-duration: 0.5s;
}

#globe {
    max-width: 400px;
    width: calc(100% - 40px);
    height: 300px;
    cursor: grab;
    border-radius: 50%;
    margin: auto;
}

#globe canvas {
    border-radius: 50%;
}

#globe-info {
    width: 30%;
    margin-left: auto;
}

#globe-info img {
    width: 25px;
    height: 25px;
    margin-right: 10px;
    filter: drop-shadow(0px 0px 5px #efeeeebc);
}
#globe-info > div {
    display: flex;
    flex-direction: row;
    align-items: center;
}

@media (max-width: 800px) {

    #globe-container {
        flex-direction: column;
        padding: 0 0 0 0;
    }

    #globe-info {
        width: calc(100% - 40px);
        padding: 0;
        margin: 0;
        min-height: 155px;
    }
}

/* For Compressed Images */

.pre-render {
    opacity: 0;
    transition-duration: 2s;
}

.loaded>.pre-render {
    opacity: 1;
}

.img-container {
    position: relative;
}

.img-container::before {
    content: '';
    position: absolute;
    top: 0;
    background-size: cover;
    filter: blur(5px);
    opacity: 1;
    /* Ensure full opacity */
    z-index: -1;
}

.navimg-cont::before {
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    object-fit: cover;
    background-image: url('/Assets/Images/MeCompressed.jpg');
}

@media (max-width: 1170px) {
    .navimg-cont::before {
        width: 5rem;
        height: 5rem;
        margin: 0 2rem 0 1rem;
    }
}

.loaded::before {
    opacity: 0;
    transition: 2s;
}

/* ----- */
/* Cards */
/* ----- */
.cards {
    display: flex;
    /* justify-content: center; */
}

.card {
    flex: 50%;
    min-width: 230px;
    margin: 15px;
    box-shadow: 0px 0px 5px -1px var(--font-op);
    border-radius: 7px;
    padding: 20px;
    transition-duration: 0.5s;
    background: var(--c5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    position: relative;
}

.card:hover {
    box-shadow: 0px 0px 5px -1px #ccc8c8bc;
    scale: 1.02;
}

.card pixel-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}


@supports (background: paint(houdini)) {

    @property --angle {
        syntax: "<angle>";
        initial-value: 0deg;
        inherits: false;
    }

    @keyframes borderAnim {
        to {
            --angle: 360deg;
        }
    }


    @media (min-width: 800px) {
        .card:hover .anim {
            opacity: 1;
        }

        .card-g:hover .anim {
            opacity: 1;
        }
    }

    @media (max-width: 800px) {
        .card .anim.btn {
            opacity: 1;
        }

        .card-g .anim.btn {
            opacity: 1;
        }

    }

}

.card img {
    max-width: 100%;
    border-radius: 16px;

}

.card text {
    padding: 0 20px 20px;
    font-size: 10px;
}

.cards-g {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

}

.card-g {
    width: calc(100% - 3rem - 4rem);
    margin: 1.5rem;
    /* border: 3px solid var(--gray); */
    box-shadow: 0px 0px 4px -1px var(--font);
    border-radius: 3px;
    padding: 1rem 2rem;
    transition: 0.1s;
    background: transparent;
    position: relative;
}

.card-g > img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    transition: 0.1s;
}



@media (max-width: 800px) {
    .cards-g {
        grid-template-columns: repeat(1, 1fr);
    }

    .cards {
        flex-direction: column;
    }

    .card-g {
        width: calc(100% - 4rem - 3rem);

        /* margin-left: 0;
        margin-right: 0; */
    }

    .card {
        margin-left: 0;
        margin-right: 0;
    }
}












/* Page Animations */

.continueAnim {
    animation: fade 0.8s ease-in-out 0s forwards;
}

@keyframes fade {
    0% {
        opacity: 1;
        transform: translate(0px, 0px);

    }

    99% {
        opacity: 0;
        transform: translate(0px, -500px);
    }

    100% {
        opacity: 0;
        transform: translate(0px, 500px);
    }
}

@keyframes reverseFade {
    0% {
        opacity: 0;
        transform: translate(0px, 500px);

    }

    100% {
        opacity: 1;
        transform: translate(0px, 0px);
    }
}

.continue {
    animation: reverseFade 0.8s ease-in-out 0s forwards;
}

.active {
    opacity: 1;
    transition-duration: 0.7s;
}



/* --------- */
/* Alert CSS */
/* --------- */

.alert {
    position: fixed;
    top: -25%;
    height: 85px;
    z-index: 10;
    width: calc(80% - 4rem);
    margin: 0 0 0 20%;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
}

.alert .cont {
    margin: 0 auto 0 auto;
    padding: 1rem 0;
    width: 50%;
    display: flex;
    position: relative;
    background: var(--c4);
    border-radius: 90px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--font) 2px 2px 3px 1px;
}

.alert.active {
    animation: alert 7s cubic-bezier(.55, .085, .68, .53) 3s forwards;
}

.alert.perm {
    animation: perm 7s cubic-bezier(.55, .085, .68, .53) 3s forwards;
}

.alert .h8 {
    color: var(--font);
    text-align: center;
    margin: 0 0 1rem 0;
}

.alert button {
    color: var(--font);
    background: transparent;
    text-align: center;
    border-radius: 10px;
    padding: 0px 20px 0px 20px;
    margin: 0 auto 0 auto;
    transition-duration: 0.5s;
    border: 4px solid var(--error);
    font-size: 1.6rem;

}

.alert button:hover {
    background: var(--btn-confirm);
    transition-duration: 0.3s;
}

@keyframes alert {
    0% {
        top: -25%;
        opacity: 0;
        pointer-events: all;
    }

    9.5% {
        top: 8%;
        opacity: 1;
    }

    12% {
        top: 5%;
        opacity: 1;
    }

    95% {
        top: 5%;
        opacity: 1;
        pointer-events: all;

    }

    100% {
        top: -25%;
        opacity: 0;
        pointer-events: none;
    }
}

@keyframes perm {
    0% {
        top: -25%;
        opacity: 0;
        pointer-events: all;
    }

    9.5% {
        top: 8%;
        opacity: 1;
    }

    12% {
        top: 5%;
        opacity: 1;
    }

    95% {
        top: 5%;
    }

    100% {
        top: 5%;
        opacity: 1;
        pointer-events: all;

    }
}

@media (max-width: 1170px) {
    .alert {
        width: 100%;
        margin: 0 0 0 0;
    }
}

@media (max-width: 800px) {

    .alert .cont {
        width: 90%;
        height: 80px;
        padding: 0 0;
    }

    .alert button {
        font-size: 1.4rem;
        padding: 0px 10% 0px 10%;
    }
}