@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');

:root{
    --primary-color: rgb(250, 70, 5);
    --background-color: #d5d7fc;
    --button-border-color: #EFF0FF;
    --light-text-color: rgb(77, 77, 77);
    --very-light-text-color: #75787A;
    --transparent: rgba(0, 0, 0, 0);
    --box-shadow-bottom: 0 20px 40px -20px rgba(0, 0, 0, 0.507);
    --translucent-white: rgba(255, 255, 255, 0.4);
}

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

html {
    scroll-behavior: smooth;
}  

body {
    font-family:"Varela Round", serif;
    font-size: 16px;
    background-color: white;
    /* overflow-x: hidden; */
}

/* ------------------- Preloader ------------------- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
    font-size: 1.5rem;
}


/* -------------------Navbar------------------- */

#hamburger {
    display: none;
}

#mobile-menu {
    display: none;
}

nav > ul{
    display: inline-flex;
    align-items: center;
    /* justify-content: center; */
    font-size: 0.95rem;
    background-color: white;
    padding: 14px 5px;
    border-radius: 100px;
    margin-left: 50%;
    transform: translateX(-50%);
    box-shadow: 5px 5px 10px rgba(0,0,0,0.06);
}

nav > ul > li{
    cursor: pointer;
    list-style: none;
    transition: transform 0.3s ease-in-out ;
    a{
        text-decoration: none;
        color: rgb(77,77,77);
        padding: 9px 17px;
    }
}

nav ul li a.active {
    background-color: var(--primary-color);
    border-radius: 100px;
    transform: none !important;
    color: white;
    transition: background-color 0.5s ease-in-out;
}

nav ul li:hover {
    transform: translateY(-5px);
}

nav {
    z-index: 1001;
    position: fixed;
    top: 0px;
    padding-top: 30px;
    background-color: var(--transparent);
    /* backdrop-filter: blur(10px); */
    width: 100%;
}

/* -------------------Hero Section------------------- */

#myname{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: -1;
    overflow: hidden;
    display: flex; /* Ensure texts align horizontally */
    white-space: nowrap; /* Prevent text from wrapping to a second line */
}

#myname .scroll{
    font-family: "Public Sans", sans-serif;
    font-size: 240px;
    font-weight: 900;
    flex-shrink: 0; /* Prevent shrinking of elements */
    display: inline-block; /* Text needs to behave like a single block */
    white-space: nowrap; /* Ensure the text stays in one line */
    animation: scroll-left 35s linear infinite; /* Animate scrolling */
    margin-right: 90px; /* Add a gap between text repetitions */
}

@keyframes scroll-left {
    from {
      transform: translateX(0); /* Start completely to the right */
    }
    to {
      transform: translateX(-100%); /* Move completely to the left */
    }
  }

#shapes img{
    position: absolute;
}

#shapes .leftshapes img:nth-child(1){
    height: 270px;
    transform: translate(-50%,-50%);
    top: 58%;
    left: 27vw
}
#shapes .leftshapes img:nth-child(2){
    height: 270px;
    transform: translate(-50%,-50%);
    top: 76%;
    left: 22vw;
}
#shapes .leftshapes img:nth-child(3){
    height: 270px;
    transform: translate(-50%,-50%);
    top: 95%;
    left: 27vw;
}

#shapes .rightshapes img:nth-child(1){
    height: 270px;
    transform: translate(50%,-50%);
    top: 58%;
    right: 27vw;
}
#shapes .rightshapes img:nth-child(2){
    height: 270px;
    transform: translate(50%,-50%);
    top: 76%;
    right: 22vw;
}
#shapes .rightshapes img:nth-child(3){
    height: 270px;
    transform: translate(50%,-50%);
    top: 95%;
    right: 27vw;
}

#hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 40px 0 0 0;
    height: 100vh;
}

.profile{
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#hero .profile .intro {
    font-size: 3rem;
    font-weight: 300;
    opacity: 1;
}

#hero .profile .intro .intro-text{
    font-weight: 700 !important;
    font-family: "PT Serif", "PT Serif Placeholder", serif;
}

#hero .profile .intro .intro-text span{
    display: inline-block;
}

#hero .knowings-shown, #hero ul{
    font-size: 18px;
    color: var(--light-text-color);
    list-style: none;
}

#hero #knowings-outer{
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 100px;
    padding: 5px 15px;
}

#hero ul{
    display: none;
}

#profilepic{
    border-radius: 50px;
    transform-style: preserve-3d;
    transition: transform 0.5s; /* Smooth transition */
    transform: rotateY(20deg);
    position: relative;
}


#hero .pic-wrapper{
    perspective: 1000px;
    width: 300px;
    height: 320px;
    transform-style: preserve-3d; /* Preserve the 3D transformations for its direct children */
    transition: transform 0.5s; /* Smooth transition */
}

.profile-pic-container:hover #profilepic {
    transform: rotateY(160deg);
}

#profilepic .profilefront, #profilepic .profileback{
    position: absolute;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden; /* Hides the back face when not visible */
}

#profilepic .profilefront{
    border-radius: inherit;
    height: 320px;
    width: 300px;
    padding-top: 20px;
    background-color: var(--background-color);
    box-shadow: var(--box-shadow-bottom);
}

#profilepic .profileback{
    height: 320px;
    width: 300px;
    padding-top: 20px;
    transform: rotateY(180deg); /* Flips the back face */
    border-radius: inherit;
    box-shadow: var(--box-shadow-bottom);
    background-color: var(--translucent-white);
    backdrop-filter: blur(20px);
}

.profilefront img{
    width: 300px;
    height: 320px;
    position: absolute;
    border-radius: inherit;
    left: 0px;
    bottom: 0;
    top: 0px;
}

.profileback img{
    width: 90%;
    padding: 40px 30px;
    border-radius: inherit;
}

.profileback svg{
    position: absolute;
    left: 50%;
    transform: translate(-50%, 145%);
    width: 25%;
}

.no-of-achievements{
    color: var(--light-text-color);
    display: flex;
    justify-content: space-around;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.no-of-achievements .ach-icons{
    width: 20px;
}

/* --------------------- Icon Button ------------------- */

.icon-button{
    display: inline-flex;
    text-align: center;
    border-radius: 100px;
    font-weight: 800;
    font-size: 1.5em;
    color: black;
    border: 7px solid var(--button-border-color);
    align-items: center;
    text-decoration: none;
    height: 77px;
    /* width: calc(100% - 64px); */
    overflow: hidden;
}

.icon-button span{
    margin: 0 30px;
    white-space: nowrap;
}

.icon-button svg{
    width: 40px;
    height: 40px;
    color: white;
    transform: translateY(15%);
}

.icon-button div{
    padding: 5px;
    min-width: 64px;
    height:64px;
    background-color: black;
    border-radius: 50%;
}


/* ------------------- 3D Section ------------------- */

.threeDArea {
    height: 100vh;
    width: 10%;
    z-index: 1010;
}

#threeDPortfolio {
    z-index: 1010;
    height: calc(100vh);
    width: 100%;
    position: relative;
}

.skip-button {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1012;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: wheat;
    border: none;
    border-radius: 10px;
    padding: 7px;
    cursor: pointer;
    box-shadow: 0px 0 20px 0 rgba(255, 104, 3, 0.75);
    transition: 1s ease;

    div{
        opacity: 0;
        position: absolute;
    }

    svg {
        width: 20px;
        height: 20px;
    }
}

/* Base styles for the panel */
.panel {
    z-index: 1015;
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 70%;
    padding: 20px;
    backdrop-filter: blur(30px);
    box-shadow: -4px 0 3px rgba(141, 141, 141, 0.2);
    transform: translateX(100%);/* Hidden by default */
    transition: transform 1s ease; /* Smooth slide effect */

    #project-description {
        position: relative;

        strong {
            line-height: 2;
        }
        ul li {
            margin-left: 30px;
        }
        .images{
            width: 100%;
            display: flex;
            justify-content: space-between;
            margin: 20px auto;
            position: relative;
            perspective: 1000px; /* Enable 3D effect */
        }
        img {
            width: 32%;
            transform-style: preserve-3d;
        }
    }
}

.panel .content {
    height: calc(100% - 61px);
    overflow-y: scroll;
}

.panel .content::-webkit-scrollbar {
    width: 0px;
}

/* Show panel */
.panel.visible {
    transform: translateX(0);
}

/* Back button styles */
.back-btn {
    width: 100%;
    padding: 8px 16px;
    margin-top: 20px;
    background-color: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 25px;
}


/* ------------------- resume section ------------------- */


.shapes-of-resume img{
    position: absolute;
    width: 30%;
    z-index: -1;
    filter: blur(20px);
    transform: translateY(-50%);
}

.shapes-of-resume img:nth-child(1){
    left: 15%;
}

.shapes-of-resume img:nth-child(2){
    right: 15%;
}

#resume {
    position: relative;
    height: 100vh;
    text-align: center;
    align-items: center;
    display: flex;
    justify-content: center;
    p {
        font-size: 2.1rem;
        font-weight: 300;
        margin-bottom: 50px;
    }
}

/* ------------------- blog Section ------------------- */

#blog {
    margin-top: 100px;
    text-align: center;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 70px;

    h2 {
        font-size: 2.4rem;
        font-weight: 700;
    }

    .scroll-button {
        display: none;
    }
}

.blog-cards {
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: center;
    width: 85%;
}
    
.blog-card {
    width: 32%;
    aspect-ratio: 1/1;
    border-radius: 15px;
    position: relative;
    overflow: hidden;

    & .blog-card-image {
        width: 100%;
        aspect-ratio: 1/1;
        left: 0;
        top: 0;
        position: absolute;
        transition: all 0.5s ease-in-out;

        &:hover {
            transform: scale(1.1);
        }
    }

}

.category{
    position: absolute;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 100px;
    margin: 20px;
}

.blog-card-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: calc((100% - 40px));
    border-radius: 15px;
    padding: 15px;
    background-color: white;

    & > div {
        width : 100%;
        display: flex;
        gap: 20px;

        &:nth-child(1) {
            margin-bottom: 10px;
            color: var(--primary-color);
            
            div{
                display: flex;
                gap: 10px;
            }

            svg {
                width: 20px;
                height: 20px;
            }
        }

        &:nth-child(2) {
            font-size: 1.8rem;
            font-weight: 700;
            text-align: left;
        }
    }

}


/* ------------------- contact Section ------------------- */
#contact {
    background-color: var(--button-border-color);
    display: flex;
    flex-direction: row;
    gap: 50px;
    text-align: left;
    width: 100%;
    padding: 100px 120px;

    .div1 {
        font-size: 1rem;
        font-weight: 500;
        color: var(--primary-color);
    }

    .div2 {
        font-size: 2.4rem;
        font-weight: 700;
    }

    .div3 {
        font-size: 1.2rem;
        color: var(--light-text-color);
    }

    .divmain {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 50%;
        background-color: white;
        padding: 60px;
        border-radius: 30px;

        svg {
            width: 20px;
            height: 20px;
            position: absolute;
            right: 20px;
            top: 20px;
            color: #b4b2b2;
            z-index: 2;
        }
    }

    form {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;

        * {
            font-size: 1rem;
        }
        
        .cover {
            position: relative;
        }
    }

    input, textarea {
        width: 100%;
        padding: 20px 50px 20px 20px;
        border: 2px solid #d6d6d6;
        border-radius: 15px;
        outline: none;
        transition: 0.5s ease;
        color: #b4b2b2;

        &::placeholder {
            color: #b4b2b2;
        }

        &:focus {
            border: 2px solid var(--primary-color);
            transform: scale(1.02);
            color: var(--primary-color);
        }

        &:focus ~ svg {
            color: var(--primary-color);
        }
        &:focus::placeholder {
            color: var(--primary-color);
        }
    }

    textarea {
        resize: none;
    }

    .submit {
        background-color: var(--primary-color);
        color: white;
        font-weight: bold;
        cursor: pointer;
        transition: 0.3s ease-in-out;
        border: 2px solid var(--primary-color);
        border-radius: 15px;
        transition: 0.5s ease;
        width: 100%;
        padding: 20px 0;
        margin-top: 20px;

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

    .socials {
        display: flex;
        flex-direction: column;
        gap: 20px;
        justify-content: center;
        padding: 60px;
        position: relative;

        svg {
            width: 50px;
            height: 50px;
            color: var(--primary-color);
            transition: 0.5s ease-in-out;
        }

        a {
            text-decoration: none;
            color: var(--light-text-color);
            display: flex;
            align-items: center;
            gap: 10px;
            transition: 0.5s ease-in-out;
            padding: 10px;
            font-size: 1.4rem;
            border-radius: 15px;
        }

        a:hover {
            box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
            background-color: white;
        }
    }
}


/* -------------- Styles for small screens -------------- */
@media (max-width: 768px) {
    nav {
        display: none;
    }

    #hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 15px;
        right: 15px;
        cursor: pointer;
        background: white;
        box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
        padding: 5px 10px;
        border-radius: 50px;
        height: 45px;
        border: none;
        z-index: 1001;
        transform: none !important;
    }
    .hamburger span {
        display: block;
        position: relative;
        width: 25px;
        height: 3px;
        background-color: #333;
        transition: 0.3s;
    }
    #mobile-menu {
        z-index: 1011;
        display: block;
        position: fixed;
        top: 0;
        left: 100%;
        width: 100vw;
        height: 100vh;
        background: #fff;
        transition: 0.3s ease-in-out;
        padding: 20px;

        svg {
            width: 35px;
            height: 35px;
            color: var(--primary-color);
        }

        .close {
            display: block;
            opacity: 0;
            position: absolute;
            width: 35px;
            height: 35px;
            top: 110px;
            left: calc(100% - 55px);
            padding: 5px;
            cursor: pointer;
            background: none;
            border: none;
            z-index: 1001;

            span {
                display: block;
                position: absolute;
                width: 25px;
                height: 3px;
                background-color: #333;
                transition: 0.3s;
            }

            span:nth-child(1){
                transform: rotate(45deg);
            }

            span:nth-child(2){
                transform: rotate(-45deg);
            }
        }

        ul {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            list-style-type: none;
            margin-top: 100px;

            li {
                opacity: 0;
                transform: translateY(100%);

                a {
                    font-weight: 900 !important;
                    font-size: 1.5rem !important;
                    font-family: Arial, Helvetica, sans-serif !important;
                    display: block;
                    padding: 10px 0;
                    text-decoration: none;
                    color: #333;
                }
            }

            li:nth-child(6){
                display: flex;
                flex-direction: row;
                gap: 20px;
                position: absolute;
                top: calc(100vh - 300px);
            }
        }

        &.opened {
            top: 0;
            left: 0;
            li a {
                font-weight: 900 !important;
                font-size: 1.7rem !important;
                font-family: "PT Serif", "PT Serif Placeholder", serif !important;
                display: block;
                padding: 10px 0;
                text-decoration: none;
                color: #333;
            }
        }
    }

    #shapes .leftshapes img:nth-child(1){
        height: 120px;
        top: 36vh;
        left: 80vw;
    }
    #shapes .leftshapes img:nth-child(2){
        height: 120px;
        top: 33vh;
        left: 50vw;
    }
    #shapes .leftshapes img:nth-child(3){
        height: 120px;
        top: 36vh;
        left: 20vw;
    }
    
    #shapes .rightshapes img:nth-child(1){
        display: none;
    }
    #shapes .rightshapes img:nth-child(2){
        display: none;
    }
    #shapes .rightshapes img:nth-child(3){
        display: none;
    }

    #hero .profile .intro {
        font-size: 2.4rem;
    }

    
    #hero {
        height: 90vh;

        #myname {
            display: none;
        }
        
        .pic-wrapper {
            margin-left: 50%;
            transform: translateX(-50%) !important;
            width: clamp(50px, 60vw, 250px);
            height: calc(clamp(50px, 60vw, 250px) + 20px);
            /* perspective: 0; */
        }
        
        .profilefront {
            height: calc(clamp(50px, 60vw, 250px) + 20px);
            width: clamp(50px, 60vw, 250px);

            img {
                width: clamp(50px, 60vw, 250px);
                height: calc(clamp(50px, 60vw, 250px) + 20px);
            }
        }

        .profileback {
            width: clamp(50px, 60vw, 250px);
            height: calc(clamp(50px, 60vw, 250px) + 20px);
        }

        .no-of-achievements {
            margin-top: 0px;
        }
    }   

    .icon-button {
        background-color: white;
    }

    .panel {
        width: 100%;
        
        #project-description .images{
            display: flex;
            flex-direction: column !important;
            gap: 20px;

            img {
                width: 80%;
                margin: auto;
            }

        }

        h1, h2 {
            margin-top: 30px !important;
        }
    }

    #resume {
        padding: 20px;

    }

    .shapes-of-resume img {
        width: 70%;

        &:nth-child(1){
            top: 30vh;
        }
        &:nth-child(2){
            top: 70vh;
        }
    }

    #blog {
        height: auto;
        margin-bottom: 30vh;

        .scroll-button {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin: -40px 0 0 0;

            svg {
                width: 60px;
                height: 60px;
                transition: 0.3s ease-in-out;

                &:nth-child(1){
                    transform: rotate(180deg);
                }
            }
        }
    }
    
    .blog-cards {
        display: flex;
        gap: 50px;
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;

        
        &::-webkit-scrollbar {
            display: none;
        }
    }

    .blog-card {
        background-color: var(--primary-color);
        min-width: 100%;
        aspect-ratio: auto;
        border-radius: 25px;
        scroll-snap-align: start;

        & .blog-card-image {
            width: 100%;
            aspect-ratio: 1/1;
            position: relative;
            transition: all 0.5s ease-in-out;
    
            &:hover {
                transform: scale(1.1);
            }
        }
    }

    .category{
        top: 0;
        left: 0;
    }

    .blog-card-content {
        position: relative;
    }

    #contact {
        flex-direction: column;
        width: 100%;
        padding: 100px 20px 50px;

        .divmain {
            width: 100%;
            padding: 40px 30px;
        }

        form {
            *{
                font-size: 1.2rem !important;
            }
        }

        .submit {
            font-size: 1.2rem;
        }

        .socials {
            padding: 0px;
            margin: 10px;
            flex-direction: row;
            justify-content: space-between;

            a {
                box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
                background-color: white;
                width: auto;
                
                span {
                    display: none;
                }
            }
        }
    }


}

/* -------------- Styles for medium screens -------------- */
@media (min-width: 769px) and (max-width: 1200px) {
    #shapes .leftshapes img:nth-child(1){
        height: 220px;
        top: 50vh;
        left: 20vw;
    }
    #shapes .leftshapes img:nth-child(2){
        height: 220px;
        top: 65vh;
        left: 15vw;
    }
    #shapes .leftshapes img:nth-child(3){
        height: 220px;
        top: 80vh;
        left: 20vw;
    }
    #shapes .rightshapes img:nth-child(1){
        height: 220px;
        top: 50vh;
        right: 20vw;
    }
    #shapes .rightshapes img:nth-child(2){
        height: 220px;
        top: 65vh;
        right: 15vw;
    }
    #shapes .rightshapes img:nth-child(3){
        height: 220px;
        top: 80vh;
        right: 20vw;
    }

    #blog {
        height: auto;
        margin-bottom: 30vh;

        .scroll-button {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin: -40px 0 0 0;

            svg {
                width: 60px;
                height: 60px;
                transition: 0.3s ease-in-out;

                &:nth-child(1){
                    transform: rotate(180deg);
                }
            }
        }
    }

    .blog-cards {
        display: flex;
        gap: 50px;
        scroll-snap-type: x mandatory;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;

        &::-webkit-scrollbar {
            display: none;
        }
    }

    .blog-card {
        background-color: var(--primary-color);
        min-width: 70%;
        margin: 0 15%;
        aspect-ratio: auto;
        border-radius: 25px;
        scroll-snap-align: center;

        & .blog-card-image {
            width: 100%;
            aspect-ratio: 1/1;
            position: relative;
            transition: all 0.5s ease-in-out;
    
            &:hover {
                transform: scale(1.1);
            }
        }
    }

    .category{
        top: 0;
        left: 0;
    }

    .blog-card-content {
        position: relative;
    }

    #contact {
        flex-direction: column;
        width:100%;
        padding: 100px 20px;

        .divmain {
            width: 80%;
            margin: 0 auto;
            padding: 40px 30px;
        }

        form {
            *{
                font-size: 1.2rem !important;
            }
        }

        .submit {
            font-size: 1.2rem;
        }

        .socials {
            margin: 10px;
            flex-direction: row;
            gap: 50px;
            margin: 0 auto;

            a {
                box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
                background-color: white;
                width: auto;

                span {
                    display: none;
                }
            }
        }
    }
}