:root{
    --rgb-color:255, 255, 255;
    --cool-blue:53, 136, 179;
}
.cantarell-regular {
    font-family: "Cantarell", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.cantarell-bold {
    font-family: "Cantarell", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.cantarell-regular-italic {
    font-family: "Cantarell", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.cantarell-bold-italic {
    font-family: "Cantarell", sans-serif;
    font-weight: 700;
    font-style: italic;
}

*,html{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    background: #0a0f15;
}

nav{
    background: linear-gradient(270deg, #0f2f4e 25%, #3588b3) ;
    background-size: 200% 100%;
    display: flex;
    justify-content: space-between;
    position: sticky;
    padding: 1rem 2rem;
    animation: navbar-glow 6s ease infinite;
}

nav ul{
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin-left: auto;
}

nav ul li a{
    text-decoration: none;
    font-family: "Cantarell", sans-serif;
    font-size: 1.2rem;
    color: white;
    font-weight: 500;
    padding: 8px 0;
    transition: all;
    transition-duration: 500ms;
    border-bottom: 1px solid rgba(42, 158, 218, 0);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 255, 255, 0.6), 0 0 36px rgba(255, 255, 255, 0.4);
}

nav ul li a:hover{
    color: #44b4ef;
    border-bottom: 2px solid #44b4ef;
    text-shadow: 0 0 16px rgba(68, 180, 239, 1), 0 0 32px rgba(68, 180, 239, 0.9), 0 0 48px rgba(68, 180, 239, 0.7);
}

p{
    color: white;
}

h1{
    color: white;
    margin-top: auto;
    display:flex;
    justify-content: center;
    align-items: center;
    padding: 5rem 10rem;
    font-family: "Exo", sans-serif;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 255, 255, 0.6), 0 0 36px rgba(255, 255, 255, 0.4);
    font-size: 5rem;
    animation: glow-flicker-animation 3s ease-in-out infinite;
}
h2{
    color: #3588b3;
    margin-top: auto;
    display:flex;
    justify-content: center;
    align-items: center;
    font-family: "Exo", sans-serif;
    font-weight: 600;
    font-size: 3rem;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 255, 255, 0.6), 0 0 36px rgba(255, 255, 255, 0.4);
    animation: glow-flicker-animation 3s ease-in-out infinite;
    --rgb-color: var(--cool-blue);
}
.white-text{
    color: white;
    margin-top: auto;
    display:flex;
    justify-content: center;
    align-items: center;
    font-family: "Exo", sans-serif;
    font-weight: 600;
    font-size: 3rem;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 255, 255, 0.6), 0 0 36px rgba(255, 255, 255, 0.4);
    animation: glow-flicker-animation 3s ease-in-out infinite;
}
h4{
    color: white;
    margin-top: auto;
    display:flex;
    justify-content: center;
    align-items: center;
    font-family: "Exo", sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 255, 255, 0.6), 0 0 36px rgba(255, 255, 255, 0.4);
    animation: glow-flicker-animation 3s ease-in-out infinite;
    padding: 1rem;
    z-index: 0;
}

@keyframes navbar-glow{
    0%{
        background-position: 0 0;
    }
    50%{
        background-position: 100% 0;
    }
    100%{
        background-position: 0 0;
    }
}
@keyframes glow-flicker-animation {
    0% {
        text-shadow: 0 0 12px rgba(var(--rgb-color),0.8), 0 0 24px rgba(var(--rgb-color), 0.6), 0 0 36px rgba(var(--rgb-color), 0.4);
    }
    20% {
        text-shadow: 0 0 20px rgba(var(--rgb-color), 1), 0 0 30px rgba(var(--rgb-color), 0.9), 0 0 50px rgba(var(--rgb-color), 0.7);
    }
    40% {
        text-shadow: 0 0 10px rgba(var(--rgb-color), 0.6), 0 0 20px rgba(var(--rgb-color), 0.4), 0 0 30px rgba(var(--rgb-color), 0.3);
    }
    60% {
        text-shadow: 0 0 15px rgba(var(--rgb-color), 0.8), 0 0 25px rgba(var(--rgb-color), 0.6), 0 0 40px rgba(var(--rgb-color), 0.5);
    }
    80% {
        text-shadow: 0 0 5px rgba(var(--rgb-color), 0.5), 0 0 15px rgba(var(--rgb-color), 0.3), 0 0 20px rgba(var(--rgb-color), 0.2);
    }
    100% {
        text-shadow: 0 0 12px rgba(var(--rgb-color), 0.8), 0 0 24px rgba(var(--rgb-color), 0.6), 0 0 36px rgba(var(--rgb-color), 0.4);
    }
}

/* 3D CSS PART*/
.container {
    margin-top: auto;
    width: 100%;
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
    perspective-origin: top right;
    z-index: -1000;
    position: relative;
}

.cube {
    display: flex;
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    animation: cubeRotate 10s linear infinite;
}

.side {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.9;
    border: 2px solid #7fb0cf;
}

.front, .back, .left, .right, .top, .bottom {
    background-color: #2c5673;
    animation: cubeGlow 6s ease infinite;
    transition: box-shadow 0.5s ease;
}

.front {
    transform: translateZ(150px);
}
.back {
    transform: translateZ(-150px);
}

.left {
    transform: rotateY(90deg) translateZ(150px);
}
.right {
    transform: rotateY(-90deg) translateZ(150px);
}

.top {
    transform: rotateX(90deg) translateZ(150px);
}
.bottom {
    transform: rotateX(-90deg) translateZ(150px);
}
@keyframes cubeRotate {
    from { transform: rotateY(0deg) rotateX(720deg) rotateZ(0deg); }
    to { transform: rotateY(360deg) rotateX(0deg) rotateZ(360deg); }
}

@keyframes cubeGlow {
    0% {
        box-shadow: 0 0 20px 5px rgba(53, 136, 179, 0.8), inset 0 0 15px 5px rgba(53, 136, 179, 0.8);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 50px 20px rgba(53, 136, 179, 1), inset 0 0 30px 10px rgba(53, 136, 179, 1);
        filter: brightness(1.5);
    }
    100% {
        box-shadow: 0 0 20px 5px rgba(53, 136, 179, 0.8), inset 0 0 15px 5px rgba(53, 136, 179, 0.8);
        filter: brightness(1);
    }
}
.skill-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px;
    gap: 20px;
    align-items: center;
    height: 100%;
}
.projects-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.skill-container h4{
    margin-top: 10px;
    margin-bottom: 10px;
}
.skill-item-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 250px;
    height: 250px;
    animation: randomRotation 5s infinite ease-in-out;
}
.skill-item-container:hover {
    animation: none;
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    transition: transform 0.3s ease;
}
.skill-item-container img {
    width: 150px;
    height: auto;
    transition: transform 0.3s ease,box-shadow 0.3s ease;
}

.skill-item-container:hover img {
    transform: scale(1.1);
}


.skill-item-container p {
    margin-top: 30px;
    color:rgba(255,255,255,0);
    font-family: "Cantarell", sans-serif;
    text-align: center;
    font-size: 1.5rem;
    transition: all;
    transition-duration: 1s;
}
.skill-item-container:hover p {
    color: #44b4ef;
    border-bottom: 2px solid #44b4ef;
    text-shadow: 0 0 16px rgba(68, 180, 239, 1), 0 0 32px rgba(68, 180, 239, 0.9), 0 0 48px rgba(68, 180, 239, 0.7);
}

.black-img{
    filter: invert(1) brightness(2);
}
.self-img-wrapper{
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}
.self-img-wrapper img{
    max-width: 100%;
    height: auto;
    animation: randomRotation 5s infinite ease-in-out;
}
.self-img-wrapper:hover img{
    animation: none;
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    transition: transform 0.3s ease;
}
.content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 100%;
}


.text-container {
    padding: 20px;
    max-width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.text-container p{
    color: white;
    margin-top: auto;
    display:flex;
    justify-content: center;
    align-items: center;
    font-family: "Exo", sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 255, 255, 0.6), 0 0 36px rgba(255, 255, 255, 0.4);
}
.white-text {
    color: #fff;
}
@keyframes randomRotation {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% {
        transform: rotateX(15deg) rotateY(-10deg) rotateZ(5deg);
    }
    50% {
        transform: rotateX(-10deg) rotateY(20deg) rotateZ(-15deg);
    }
    75% {
        transform: rotateX(10deg) rotateY(-15deg) rotateZ(10deg);
    }
    100% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
}

@media (max-width: 768px) {
    .skill-item-container {
        justify-content: space-around;
    }

    .skill-item-container img {
        width: 100px;
    }
    .skill-item-container p {
        font-size: 1.2rem;
    }
    nav ul {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 0.5rem;
        list-style: none;
    }

    nav ul li a {
        font-size: 1.5rem;
    }

    nav {
        padding: 1rem 2rem;
    }

    .self-img-wrapper {
        width: 80%;
    }

    .content-container {
        flex-direction: row;
        justify-content: space-around;
    }

    .text-container {
        padding: 15px; 
    }
}

@media (max-width: 480px) {
    .skill-item-container img {
        width: 80px;
    }
    nav ul {
        gap: 0.2rem;
        list-style: none;
        flex-direction: row;
        justify-content: center;
    }
    .skill-item-container p {
        font-size: 0.9rem;
    }
    nav ul li a {
        font-size: 1.5rem;
    }
    nav {
        padding: 1rem 2rem;
    }
    .self-img-wrapper {
        width: 100%;
    }

    .self-img-wrapper img {
        animation: none;
    }

    .content-container {
        flex-direction: column;
    }

    .text-container {
        padding: 10px;
    }
}
