@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins',sans-serif;
    max-width: 100%;
}
:root{
    --bg-color:#000000;
    --second-bg-color:#141414;
    --text-color:#fff;
    --main-color:rgb(211, 110, 255);

}
html{
    font-size: 62.5%;
    overflow-x: hidden;
}
body{
    background-color: var(--bg-color);
    color: var(--text-color);
}
section{
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}
.header-right {
    display: flex;
    align-items: center;
}

.header .sticky{
    border-bottom: .1rem solid rgba(0,0,0,0,2);
}
.header a{
    font-size: 3.7rem;
}
.logo{
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
}
.navbar a{
    font-size: 2.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    transition: 0.3s; ;
}
.navbar a:hover,a.active{
    color: var(--main-color);
}
#menu-icon{
    font-size: 3.5rem;
    color: var(--text-color);
    display: none;

}
.home{
    display: flex;
    justify-content:space-between;
    align-items: center;
    /* flex-wrap: wrap; Add this line */
    width: 100%;
    gap:2rem;
    overflow: hidden;
}
.home-content h3{
    font-size: 3.2rem;
    font-weight: 700;
}
.home-content h3 :nth-of-type(2){
margin-bottom: 3rem;
}

span{
    color: var(--main-color);
}

.home-content h1{
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content {
    flex: 1;
    max-width: 50%;
}

.home-img {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 50%;
}
.home-img img{
    width: 40vw;
    max-width: 500px;
    height: auto;
    animation: floatImage 3s ease-in-out infinite;
}

@keyframes floatImage {
    0%{
        transform: translateY(0);
    }
    50%{
        transform: translateY(-2.4rem);
    }
    100%{
        transform: translateY(0);
    }

}
.home-content p{
    font-size: 2.5rem;
}
.social-media a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 6rem;
    height:6rem;
    background:transparent ;
    border: .2rem solid var(--main-color);
    border-radius:30% ;
    font-size: 5rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.5s ease;
}
.social-media a:hover{
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 2rem var(--text-color);
}

.btn{
    display: inline-block;
    padding: 1rem 3rem;
    background-image: linear-gradient(to bottom right,#0ef,rgb(211, 110, 255));
    border-radius: 4rem;
    box-shadow: 0 0 2rem var(--text-color);
    font-size: 2rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: 0.3s ease;
}
.btn:hover{
    box-shadow: none;
}

.about{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    background: var(--second-bg-color);
    overflow: hidden;
    width: 100%;

}

.about-img {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 50%;
}

.about-content {
    flex: 1;
    max-width: 50%;
}
.about-img img{
    width: 40vw;
    max-width: 500px;
    height: auto;
}
.heading{
    text-align: center;
    font-size: 5rem;
}
.about-content h2{
    text-align: left;
    line-height: 1.2;
}
.about-content p{
    font-size: 2rem;
}
.lang-logo{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
}
.lang-logo img{
    width: 8rem;
}
.python :hover{
    filter: drop-shadow(0px 0px 20px rgb(255, 231, 16)); 

}
.htmlo :hover{
    filter: drop-shadow(0px 0px 20px rgb(255, 95, 9)); 

}
.css :hover{
    filter: drop-shadow(0px 0px 20px rgb(43, 86, 255)); 

}
.git:hover{
    filter: drop-shadow(0px 0px 20px red); 

}
.github:hover{
    filter: drop-shadow(0px 0px 20px rgb(255, 255, 255)); 

}
.services h2{
    margin-bottom: 5rem;

}
.services-container{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.services-container .services-box{
    flex: 1 1 30rem;
    background: var(--second-bg-color);
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: .5s ease;
}
.services-container .services-box:hover{
    border-color: var(--main-color);
    transform: scale(1.02);
}
.services-box{
    font-size: 7rem;
    color: var(--main-color);   
}
.services-box h3{
    color: var(--text-color);
    font-size: 4rem;
}
.services-box p{
    font-size: 1.8rem;
    margin: 2rem 0 3rem;
    color: var(--text-color);
}

.portfolio{
    background: var(--second-bg-color);
}
.portfolio h2{
    margin-bottom: 5rem;
}
.portfolio-container{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
    align-items: center;
    padding-bottom: 7rem;
    width: 100%; /* Add this line */
    overflow: hidden;
}
.portfolio-container .portfolio-box{
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 2rem var(--bg-color);
    display: flex;
    overflow: hidden;
}
.portfolio-box img{
    width: 100%;
    transition: .5s ease;
}
.portfolio-box:hover img{
    transform: scale(1.1);
    filter: blur(10px)
}

.portfolio-box .portfolio-layer{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--main-color), transparent);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%) ;
    transition: .5s ease;
}
.portfolio-box:hover .portfolio-layer{
    transform: translateY(0);
}


.portfolio-layer h3{
    font-size: 5.5rem;
}
.portfolio-layer p{
    font-size: 2.8rem;
    margin: .3rem 0 1rem;
}
.portfolio-layer a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 6rem;
    height: 6rem;
    background: var(--text-color);
    border-radius: 40%;

}
.portfolio-layer a i{
    font-size: 4rem;
    color: var(--bg-color);
}

.contact h2{
    margin-bottom: 3.5rem;
}
.contact form{
    max-width: 70vw;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 2rem;
}
.contact form .input-box{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;

}
.contact form .input-box input, .contact form textarea{
    width: 100%;
    padding: 1.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
}
.contact form .input-box input{
    width: 49.5%;
}
.contact form textarea{
    resize: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.contact form .btn{
    margin-top: 2rem;
    cursor: pointer;
}

.footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--second-bg-color);
}
.footer-text p{
    font-size: 1.6rem;

}
.footer-iconTop a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}
.footer-iconTop a:hover{
    box-shadow: 0 0 2rem var(--text-color);
}
.footer-iconTop a i{
    font-size: 2.3rem;
    color: var(--bg-color);
}


/* BREAKPOINTS */
@media (max-width:1200px){
    html{
        font-size: 55%;
    }
}
@media (max-width:991px){
    .header{
        padding: 2rem 3%;
    }
    section{
        padding: 10rem 3% 2rem;
    }

    .services{
        padding-bottom:7rem ;
    }

    .portfolio{
        padding-bottom: 7rem;
    }
    .about {
        gap: 3rem;
        padding: 8rem 3% 2rem;
    }
    
    .lang-logo {
        padding: 2rem;
        gap: 2rem;
    }
    .contact{
        min-height: auto;
    }
    .footer{
        padding: 2rem 3%;
    }
}

@media (max-width:768px){
    .theme-toggle {
        margin-right: 15px; /* Adjust for smaller screens */
    }
    #menu-icon{
        display: block;
        margin-right: 10px;
    }

    .navbar{
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0,0,0,0,2) ;
        box-shadow: 0 .5rem 2rem rgba(0,0,0,0,2);
        display: none;
    }

    .navbar.active{
        display: block;
    }
    .navbar a{
        display: block;
        font-size: 2rem;
        margin: 3rem 0;

    }
    .home{
        flex-direction: column;
    }
    .home-content h3{
        font-size: 2.6rem;
    }
    .home-content h1{
        font-size: 4rem;
    } 
    .home-content, .home-img{
        max-width: 100%;
    }
    .home-img img {
        width: 70vw;
        margin-top: 2rem;
    }

    .about {
        flex-direction: column-reverse;
        /* gap: 2rem;
        text-align: center; */
    }
    .about-content, .about-img {
        max-width: 100%;
    }
    
    .about-img img {
        width: 70vw;
        margin-top: 3rem;
        margin-bottom: 3rem;
    }
    
    .about-content h2 {
        text-align: center;
        font-size: 4rem;
    }
    
    .lang-logo {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        justify-items: center;
    }
    
    .lang-logo img {
        width: 7rem;
    }
    .services h2{
        margin-bottom: 3rem;

    }
    .portfolio h2{
        margin-bottom: 3rem;
    }
    .portfolio-container{
        grid-template-columns: repeat(1,1fr);
    }

}

@media(max-width:450px){
    .theme-toggle {
        margin-right: 10px;
        font-size: 2rem;
    }
    .theme-toggle i {
        font-size: 2.5rem; /* Slightly smaller icons on very small screens */
    }

    html{
        font-size: 50%;
    }
     .contact form .input-box input{
        width: 100%;
     }
     .about {
        padding: 8rem 4% 2rem;
        gap: 1.5rem;
    }
    
    .about-content h2 {
        font-size: 3.5rem;
        margin-bottom: 2.5rem;
    }
    
    .about-content p {
        font-size: 1.7rem;
        text-align: center;
    }
    
    .about-img img {
        width: 85vw;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    
    .lang-logo {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-top: 2rem;
        padding: 0;
    }
    
    .lang-logo img {
        width: 5.5rem;
    }
    
}
@media(max-width:365px){
    .home-img img{
        width:90vw
    }
    .about {
        padding: 7rem 2% 1rem;
    }
    
    .about-img img {
        width: 90vw;
    }
    
    .about-content h2 {
        font-size: 3rem;
    }
    
    .about-content p {
        font-size: 1.6rem;
    }
    
    .lang-logo {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .lang-logo img {
        width: 4.5rem;
    }
    
    /* Fix for the language logo hover effects on small screens */
    .python:hover, .htmlo:hover, .css:hover, .git:hover, .github:hover {
        filter: drop-shadow(0px 0px 10px var(--main-color));
    }
    .footer{
        flex-direction: column-reverse;
    }
    .footer p{
        text-align: center;
        margin-top: 2rem;
    }
}

/* Add to your style.css file */

/* Theme toggle styles */
.theme-toggle {
    position: absolute;
    right: 20px; /* Adjust position */
    top: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-right: 20px;
}

.theme-toggle i {
    font-size: 3rem;
    color: var(--text-color);
    transition: 0.3s;
    position: absolute;
    
}

#light-icon {
    opacity: 0;
    transform: scale(0.8);
    color: yellow;
    text-shadow: 0 0 15px black;
}

#dark-icon {
    opacity: 1;
    transform: scale(1);
    color: var(--main-color);
}

/* Light mode color variables */
.light-mode {
    --bg-color: #ffeed2;
    --second-bg-color: #dbbd80;
    --text-color: #000000;
    --main-color: rgb(255, 75, 75);
}

/* Light mode specific adjustments */
.light-mode .header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.light-mode .services-container .services-box {
    border: .2rem solid rgba(0, 0, 0, 0.3);
}

.light-mode .portfolio-layer a {
    background: var(--bg-color);
}

.light-mode .portfolio-layer a i {
    color: var(--text-color);
}
.light-mode .portfolio-layer:hover h3,p{
    color: #fff;
    text-shadow: 0 0 10px black;
}
.light-mode .social-media a:hover {
    color: var(--text-color);
}

/* For button contrast in light mode */
.light-mode .btn {
    color: var(--text-color);
    background-image: linear-gradient(to bottom right,rgb(255, 72, 72),rgb(255, 249, 81))
}

/* Icon visibility in active mode */
.light-mode #light-icon {
    opacity: 1;
    transform: scale(1);
}

.light-mode #dark-icon {
    opacity: 0;
    transform: scale(0.8);
}