/* Google Font CDN Link*/
@import url(https://fonts.googleapis.com/css2?family=Poppins%3Awght%40100%3B200%3B300%3B400%3B500%3B600&display=swap%27%29%3B);

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    scroll-behavior: smooth;
}

body{
    width: 100%;
    height: auto;
    background-color: black;
    overflow-x: hidden;
}


/* Custom Scroll Bar CSS*/
::-webkit-scrollbar{
    width: 10px;
}

::-webkit-scrollbar-track{
    background-color: #f1f1f1;
}

::-webkit-scrollbar-thumb{
    background-color: #b74b3b;
    border-radius: 12px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover{
    background-color: #b74b3b;
}

/* navbar styling*/
.nav{
    width: 100%;
    height: 10vh;
}

.nav-container{
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 1000; /* Ensure it stays on top of other elements */
    background: rgba(0, 0, 0, 0.9); /* Dark background with slight transparency */
    border-bottom: #b74b3b 1px solid;
}

.logo{
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.logo span{
    color: #b74b3b;
    text-shadow: 0 0 10px #b74b3b;
}


/* Problem Two navigation bar */
.hamburg,
.cancel{
    cursor:pointer;
    position: fixed;
    right: 15px;
    top: 15px;
    color: white;
    opacity: 0;
    pointer-events: none;
    font-size: clamp(2.5rem, 0.5rem + 5vw, 3rem);
}

.nav-container .links{
    display:flex;
}


.nav-container .links a{
    position: relative;
    font-size: 1.2rem;
    color: white;
    margin: 0 20px;
    text-decoration: none;
    font-weight: 550;
    transition: 0.3s linear;
}

.nav-container .links a::before{
    position: absolute;
    content: "";
    bottom: -3px;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: #b74b3b;
    transition: 0.2s linear;
}

.nav-container .links a:hover::before{
    width: 100%;
}

.nav-container .links a:hover{
    color: #b74b3b;
}

.dropdown {
    z-index: 1100;
    position: fixed;
    top: 0;
    transform: translateY(-500px);
    width: 100%;
    height: auto;
    backdrop-filter: blur(4px)brightness(40%);
    box-shadow: 0 0 20px black;
    transition: 0.2s linear;
}

.dropdown .links a{
    display: flex;
    color: white;
    text-decoration: none;
    justify-content: center;
    padding: 15px 0;
    align-items: center;
    transition: 0.2s linear;
}

 .dropdown .links a:hover{
    background-color: #b74b3b;
 }

 .dropdown.active {
    transform: translateY(0);
}

 section{
    width: 100%;
    min-height: 90vh;
 }

 section .main-container{
    display: flex;
    justify-content: space-between;
    padding-left: 100px;
    align-items: center;
    margin-top: 4%;
 }


/* Container Size Of Blender Model */
.main-container #container3D {
    width: 50%;
    height: 60vh;
    position: relative; /* Required for absolute positioning inside */
    display: flex;
    align-items: center;
    justify-content: center;
    border: #b74b3b 1px solid;
    overflow: hidden;
    background-color: rgb(39, 38, 38);
}

/* Ensure Canvas Stays Inside */
.main-container #container3D canvas {
    width: 50%;
}

/* ✅ Loading Screen Inside container3D */
#loadingScreen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 300px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    color: white;
    z-index: 10;
}

/* ✅ Loading Bar */
#loadingBarContainer {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

#loadingBar {
    width: 0%;
    height: 100%;
    background: #af3434;
    transition: width 0.3s linear; /* Ensures smooth progress */
    display: block; /* Ensures visibility */
}

/* ✅ Loading Text */
#loadingText {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}


.credit{
    position: absolute;
    color: white;
    left: 1rem;
    top: 4rem;
}

 .main-container .content{
    margin: center;
    color: white;
    width: 40%;
 }

 .content h1{
    font-size: clamp(1rem, 1rem + 5vw, 1.8rem);
 }

 .content h1 span{
    color: #b74b3b;
    text-shadow: 0 0 10px #b74b3b;
 }

 .content .typewriter{
    font-size: clamp(1rem, 1rem + 5vw, 2.5rem);
    font-weight: 600;
 }

 .typewriter-text{
    color: #b74b3b;
    text-shadow: 0 0 10px #b74b3b;
 }

 .typewriter-text span{
    position: relative;
 }

 .typewriter-text span::before{
    content: "Web Development"; /* Default text */
    color: #b74b3b;
    display: inline-block;
    min-width: max-content; /* Makes sure content expands properly */
    animation: words 20s steps(1) infinite;
 }

 .typewriter-text span::after{
    content: "";
    background-color: black;
    position: absolute;
    width: auto;
    height: 100%;
    border-left: 3px solid #b74b3b;
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(15,end) infinite;
 }

 @keyframes cursor{
    to{
        border-left: 3px solid #b74b3b;
    }
 }

 @keyframes words{
    0%,
    20%{
        content: "Web Development";
    }
    21%,
    40%{
        content: "Software Development";
    }
    41%,
    60%{
        content: "Game Development";
    }
    61%,
    80%{
        content: "Models Development";
    }
    81%,
    100%{
        content: "Or Any Relevant Position";
    }
 }

 @keyframes typing{
    10%,
    15%,
    30%,
    35%,
    50%,
    55%,
    55%,
    70%,
    75%,
    90%,
    95%{
        width: 0;
    }
    5%,
    20%,
    25%,
    40%,
    45%,
    60%,
    65%,
    80%,
    85%{
        width: calc(100% + 8px);
    }
 }

 .content p{
    font-size: clamp(0.4rem, 0.2rem + 9vw, 1rem);
    margin: 10px;
 }

 .social-links i{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    background-color: transparent;
    border: 0.2rem solid #b74b3b;
    border-radius: 50%;
    color: #b74b3b;
    margin: 5px 15px;
    font-size: 1.5rem;
    transition: 0.2s linear;
 }

 .social-links i:hover{
    scale: 1.3;
    color: black;
    background-color: #b74b3b;
 }

 .content button{
    width: 50%;
    height: 6vh;
    margin: 30px;
    background-color: #b74b3b;
    color: white;
    border: none;
    outline: none;
    font-size: 120%;
    font-weight: 700;
    border-radius: 5px;
    transition: 0.2s linear;
 }

 .content button:hover{
    scale: 1.1;
    color: #b74b3b;
    border: 2px solid #b74b3b;
    background-color: transparent;
    font-weight: 700;
    box-shadow: 0 0 40px #b74b3b;
 }

/* End of Home and Navigation Bar */


 /* About Section Styling Those Elements Where We Have  Apply Same 
    CSS I'm Selecting Directly 'Section Tag' and 'Class' */ 
section .content{
    width: 80%;
    margin:0px auto;
    font-family: 'Poppins' sans-serif;
    height: auto; /* Remove unnecessary height */
    padding: 20px; /* Keep padding minimal */
}

.about .about-details{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

section .title{
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

section .title span{
    color: white;
    font-size: 30px;
    font-weight: 600;
    position: relative;
    padding-bottom: 8px;
}

section .title span::before,
section .title span::after{
    content: '';
    position: absolute;
    height: 3px;
    width: 100%;
    background-color: #b74b3b;
    left: 0;
    bottom: 0;
}

section .title span::after{
    bottom: -7px;
    width: 70%;
    left: 50%;
    transform: translateX(-50%);
}

.about .about-details .left{
    width: 45%;
}

.about .left{
    width: 45%;
    margin: 0px auto;
    display: flex;
    justify-content: center;
    width: 100%;
}

.about .left img{
    height: 400px;
    width: 400px;
    object-fit: cover;
    border-radius: 12px;
}

/* About Right Side Part */
.about .right{
    width: 55%;
}

.about .right p{
    text-align: justify;
    color: white;
}

.about-details .right{
    width: 55%;
}

section .topic{
    color: white;
    font-size: 25px;
    font-weight: 500;
    margin-bottom: 10px;
}

.about-details .right p{
    text-align: justify;
    color: white;
}

section .button{
    margin: 16px 0;
}

section .button button{
    outline: none;
    height: auto;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 25px;
    font-weight: 400;
    background-color: #b74b3b;
    color: #fff;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.4s ease;
}

section .button button:hover{
    border-color: #b74b3b;
    background-color: #fff;
    color: #b74b3b;
}

.skills{
    background-color: black;
}

.skills .content{
    padding: 40px 0;
}

.skills .skills-details{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skills-details .text{
    width: 50%;
}

.skills-details .topic{
    margin: 0px auto;
    display: flex;
    justify-content: center;
    width: 100%;
}

.skills-details .emphasis{
    margin: center;
    color: white;
    width:fit-content;
}

.skills-details .emphasis span{
    color: #b74b3b;
    text-shadow: 0 0 1px #b74b3b;
    font-size: clamp(1rem, 1rem + 5vw, 1.3rem);
}

.skills .skills-details .experience{
    display: flex;
    align-items: center;
    margin: 0 10px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.skills-details .experience .num{
    color: white;
    font-size: 40px;
    border: #b74b3b 1px solid;
}

.skills-details .experience .exp{
    color: white;
    margin-left: 20px;
    font-weight: 500;
    margin: 0 6px;
}

.skills-details .boxes{
    width: 45%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.skills-details .box{
    width: calc(100% / 2 - 20px);
    margin: 20px 0;
}

.skills-details .boxes .topic{
    font-size: 20px;
    color: #b74b3b;
}

.skills-details .boxes .per{
    font-size: 60px;
    color: #b74b3b;
}

#projects .boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the entire row */
}

#projects .boxes .box {
    display: flex;
    align-items: center; /* Align image & content vertically */
    justify-content: center; /* Keep content centered */
    flex-direction: row; /* Arrange image & content side by side */
    width: 100%; /* Adjust columns for My_Projects */
    height: 50vh;
    text-align: center;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.12);
    color: white;
    border: #b74b3b 1px solid;
    gap: 10px; /* Space between image & content */
}

/* Image takes 50% of the box */
#projects .boxes .box img {
    width: 50%;
    height: 100%;
    object-fit: cover; /* Ensures the image fills the box */
    border-radius: 10px;
}

/* Content takes 50% of the box */
#projects .boxes .box .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Center text & icon */
    width: 50%;
    height: 100%;
    padding: 20px;
}

/* Style the icon */
#projects .boxes .box .icon {
    height: 50px;
    width: 50px;
    background: #b74b3b;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
    transition: all 0.4s ease;
}

/* Reverse layout: Image on Right, Content on Left */
#projects .boxes .boxreverse {
    flex-direction: row-reverse !important;
}

section.Contact#contact {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content */
    justify-content: center; /* Align content properly */
    height: auto; /* Remove unnecessary height */
    padding: 20px; /* Keep padding minimal */
}

#contact .content{
    margin: 0 auto;
    padding: 30px 0;
}

#contact .text{
    width: 80%;
    text-align: center;
    margin: auto;
    color: white;
}


/* Footer Section Start */
footer{
    background: #b74b3b;
    padding: 15px 0;
    text-align: center;
    font-family: 'Poppins' sans-serif;
}

.footer .text span{
    font-size: 17px;
    font-weight: 400;
    color: #fff;
}

.footer .text span a{
    font-weight: 500;
    color: #fff;
}

.footer .text span a:hover{
    text-decoration: underline;
}

.scroll-button a{
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: #fff;
    background: #b74b3b;
    padding: 7px 12px;
    font-size: 18px;
    border-radius: 6px;
    box-shadow: rgba(0, 0, 0, 0.15);
    display: none;
}

@media (max-width: 1000px){
    .credit{
        color: #fff;
        border: #af3434 1px solid;
    }
    
    .about .about-details{
        justify-content: center;
        flex-direction: column;
    }

    .about .about-details .left{
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .about-details .right{
        width: 90%;
        margin: 40px 0;
    }

    #projects .boxes .box{
        margin: 20px 0;
        width: calc(100% / 1 - 20px);
    }

    section .main-container{
        margin-top: 10%;
     }
}

@media(max-width: 900px){
    .about .left img{
        height: 350px;
        width: 350px;
    }
}

@media (max-width: 968px){
    nav .logo{
        position: absolute;
        top: 16px;
        left: 15px;
        font-size: 1.5rem;
    }

    section .main-container{
        padding-left: 0px;
        display: flex;
        flex-direction: column;
    }
    
    .nav-container .links{
        display: none;
    }

    .hamburg,
    .cancel{
        opacity: 1;
        pointer-events: visible;
    }
    

    .main-container .content{
        margin-top: 20px;
        width: 80%;
    }

    .social-links i{
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }

    .main-container #container3D{
        z-index: 1;
        width: 50%;
        height: 60vh;
    }

    .skills .skills-details{
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .skills-details .text{
        width: 100%;
        margin-bottom: 50px;
    }

    .skills-details .boxes{
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .servicees .boxes .box{
        margin: 20px 0;
        width: 100%;
    }

    .contact .text{
        width: 100%;
    }
}

@media (max-width: 500px){
    .main-container #container3D{
        width: 50%;
        height: 30hv;
        margin-bottom: 0px;
    }

    .main-container .button{
        margin-top: 15px;
    }

    .skills-details .boxes .per{
        font-size: 50px;
        color: #b74b3b;
    }

    section .main-container{
        margin-top: 20%;
     }
}