@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

:root {
    --blue: #1e90ff;
    --cool: #ed462b;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}
.inverter{
    /* filter: invert(5%) hue-rotate(180deg) */
}

html{
    font-size: 62.5%;
    overflow: hidden;
}
body{
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
}

/* header & nav */

header{
    margin-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}
.logo{
    font-size: 3.5rem;
    color: var(--cool);
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}
.logo:hover{
    transform: scale(1.1);
}
.nav-btn{
    display: none;
}
header input{
    display: none;
}
.open-sidebar-button, .close-sidebar-button{
    display: none;
  }
nav a{
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}
.links-container{
    height: 100%;
    width: 100%;
    /* adding this line made each link as a container of it self */
    display: flex; 
    align-items: center;
}
nav a:hover,
nav a.active{
    color: var(--cool);
    border-bottom: 3px solid var(--cool);
}

/* home & about */

section{
    min-height: 100vh;
    padding: 5rem 10%;
}
.home{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: black;
}
.home .home-content h1{
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}
span{
    color: var(--cool);
}
.home-content h3{
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.home-content p{
    font-size: 1.6rem;
    line-height: 2;
}
.home-img{
    border-radius: 50%;
}
.home-img img{
    position: relative;
    width: 32vw;
    border-radius: 50%;
    box-shadow: 0 0 25px solid var(--cool);
    cursor: pointer;
    transition: .3s linear;
}

.social-icons a{
    color: var(--cool);
    border: 0.2rem solid var(--cool);
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    font-size: 2.5rem;
    margin: 3rem 1.5rem 3rem 0;
    background-color: transparent;
    transition: 0.3s ease;
    color: var(--cool);
}
.home .home-content .center{
    position: relative;
    margin: 0 5rem;
}
.social-icons a:hover{
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    /* filter: drop-shadow(0 0 25px var(--cool));  failled*/
}
.btn{
    display: inline-block;
    padding: 1rem 3rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.7rem;
    color: var(--cool);
    letter-spacing: .3rem;
    border: 2px solid var(--cool);
    cursor: pointer;
}
.btn:hover{
    transition:  .3s ease-in-out;
    transform: scale(1.1);
    background-color: var(--cool);
    color: black;
    box-shadow: 0  0 25px var(--cool);
}
.btn:active{
    transform: scale(0.9);
}
.typing-text{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}
.typing-text span{
    position: relative;
    margin-left: 8px;
}
.typing-text span::before{
    content: "Software Developer";
    color: var(--cool);
    animation: words 20s infinite;
}
/* .typing-text span::after{
    content: '';
    background-color: black;
    position: absolute;
    height: 100%;
    width: calc(100% + 8px);
    border-left: 3px solid black;
    right: -8;
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
} */
.typing-text span::after {
    content: '';
    background-color: black;
    position: absolute;
    height: 100%;
    width: 100%; /* Start fully covering */
    border-left: 3px solid var(--cool); /* Cursor effect */
    right: 0; /* Aligning to right edge */
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite; /* Apply cursor and typing animations */
}


@keyframes cursor{
    to{
        border-left: 3px solid var(--cool);
    }
}
@keyframes words {
    0%, 20%{
        content: "Web Developer";
    }
    21%, 40%{
        content: "Developer";
    }
    41%, 60%{
        content: "Java Developer";
    }
    61%, 80%{
        content: "Engineer";
    }
    81%, 100%{
        content: "Hacker";
    }
}
@keyframes  typing{
    10%, 15%, 
    30%, 35%, 
    50%, 55%, 
    70%, 75%, 
    90%, 95%{
        width: 0;
    }
    5%, 20%, 
    25%, 40%, 
    45%, 60%, 
    65%, 80%, 85%{
        width: calc(100% + 8px);
    }
}

.heading{
    font-size: 4rem;
}

/* Servies section */
.sercives{
    background-color: #161616;
    display: none;
}
.services-container{
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    align-items: center;
    gap: 2.5rem;
}
.service-box{
    background-color: var(--cool);
    height: 300px;
    border-radius: 3rem;
    cursor: pointer;
    transition: .3s ease;
}
.service-box:hover{
    background: black;
    color: var(--cool);
    transform: scale(1.1);
    border: 1px solid var(--cool);
}
.service-box .services-inf{
    display: flex;
    flex-direction: column;
    text-align: left;
    max-height: 200px;
    justify-content: center;
    align-items: baseline;
    padding: 5rem;
}
.services-inf h4{
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.services-inf p{
    font-size: 1.6rem;
    font-weight: 400;
    max-height: 100px;
    margin: auto;
}

/* Skills */
.skills{
    background: black;
}
.skills .container{
    background-color: #e11e00bd;
    color: #161616;
    border-radius: 1rem;
    padding: 2rem;
    width: 70%;
    margin: 0 auto;
    margin-top: 2rem;
}
.skills .container .row{
    display: grid;
    grid-template-columns: repeat(5,1fr);
    flex-wrap: wrap;
    gap: 2rem;
}
.skills .container .bar{
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 1rem;
    text-align: center;
    background-color: #161616;
    transition: .3s ease;
    cursor: pointer;
}
.skills .container .bar:hover{
    box-shadow: 0 4px 10px var(--cool);
    transform: scale(1.07);
}
.skills .container .bar .info{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}
.skills .container .bar .info span{
    font-size: 1.8rem;
    font-weight: 500;
    margin-left: .5rem;
}

/* education */
.education{
    background-color: #161616;
}
.education .timeline{
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}
.education .timeline::after{
    content: '';
    position: absolute;
    width: 6px;
    background:#603c3c;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    z-index: -2px;
}
.education .container{
    padding: 10px 40px;
    position: relative;
    background-color: inherit ;
    width: 50%;
}
.education .container::after{
    content: '\f501';
    position: absolute;
    width: 25px;
    height: 25px;
    line-height: 25px;
    right: -17px;
    background-color: white;
    border: 4px solid var(--cool);
    top: 15px;
    border-radius: 50%;
    z-index: 100;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 600;
    font-family: 'Font Awesome\ 5 Free';
    color: #603c3c;
}
.education .left{
    left: 0%;
}
.education .left::before{
    content: '';
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid var(--cool);
    border-width: 10px 0 10px 0;
    border-color: transparent transparent transparent var(--cool);
}
.education .right{
    left: 50%;
}
.education .right::before{
    content: '';
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid var(--cool);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--cool) transparent transparent;
}
.education .right::after{
    left: -16px;
}
.education .content{
    background: var(--cool);
    position: relative;
    border-radius: 6px;
}
.education .content .tag{
    font-size: 1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.education .content .tag h2{
    font-size: 2rem;
    font-weight: 600;
    color: black;
}
.education .content .decs {
    margin-left: 1.5rem;
    padding-bottom: 1rem;
}
.education .content .decs p{
    font-size: 1.3rem;
    font-weight: 500;
}

/* Contact Me */

.contact h2{
    margin: 3rem 16rem;
    color: white;
}
.contact form{
    max-width: 70rem;
    margin: 1rem auto 1rem auto;
    text-align: center;
}
.contact form .input-box{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.contact form .input-box input,.contact form textarea{
    width: 100%;
    padding: 1.5rem;
    margin: 1rem 0;
    font-size: 1.6rem;
    color: var(--cool);
    background-color: #161616;
    border-radius: .8rem;
    border: 2px solid var(--cool);
    resize: none;
}
.contact form .btn{
    margin: 2rem 0;
}
.social-connect {
    text-align: center;
}
.social-connect h3{
    font-size: 3rem;
    margin: 4rem auto;
}
.social-connect .social-icons a::before{
    content: attr(data-social);
    font-size: 1.5rem;
    position: absolute;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    transform: translateY(-30px) rotate(25deg);
    opacity: 0;
    transition: 200ms cubic-bezier(.42,0,.44,1.68);
}   
.social-connect .social-icons a:hover{
    box-shadow: 0 0  20px rgba(255, 255, 255, 0.37);
}
.social-connect .social-icons a::after{
    content: '';
    position: absolute;
    height: 0;
    width: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--accent-color);
    transform: translateY(0) rotate(25deg);
    opacity: 0;
    transition: 200ms cubic-bezier(.42,0,.44,1.68);
}
.social-connect .social-icons a:hover::before{
    transform: translateY(-55px) rotate(0);
    opacity: 1;
  }
  .social-connect .social-icons a:hover::after{
    transform: translateY(-32px) rotate(0);
    opacity: 1;
  }

/* footer */

.footer{
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 20px 0;
    background-color: var(--cool);
}
.footer .social {
    text-align: center;
    padding-bottom: 25px;
}

.footer .social svg{
    width: 50px;
    height: 50px;
}

.footer ul{
    margin-top: 0;
    margin-bottom: -3rem;
    padding: 0;
    line-height: 1.8;
    text-align: center;
    font-size: 18px;
}
.footer ul li{
    display: inline-block;
    padding: 0 15px;
}
.footer ul li a{
    color: black;
    border-bottom: 3px solid transparent;
    transition: .3 ease;
}
.footer ul li a:hover{
    border-bottom: 3px solid black;
}
.footer .copyright{
    margin-top: 50px;
    text-align: center;
    font-size: 16px;
    color: black;
}


.center{
    display: flex;
    justify-content: center;
}



/* Media quireies */
@media(max-width:1000px){
    .nav-btn{
        display: inline-flex;
        font-size: 4rem;
    }
    .home{
        gap: 4rem;
        flex-direction: column;
        margin: 5rem 4rem;
    }
    .home-img img{
        width: 70vw;
        margin-top: 4rem;
    }
    .home .home-content h1{
        font-size: 4rem;
    }
    .home .home-content h3{
        font-size: 2.5rem;
    }
    .btn{
        padding: 1rem 2rem;
        margin: 0 15vw;
    }
    /* .center{
        display: flex;
        justify-content: center;

        moved it outside
    } */
    
}
@media(max-width:995px){

    .links-container{
        position: fixed;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        top: 0;
        right: -100%;
        width: 50vw;
        z-index: 10;
        border-left: 3px transparent var(--cool);
        border-bottom: 3px solid var(--cool);
        /* background-color: #161616; */
        /* glassssssssssssssssssss */
        box-shadow: inset 0 0 15px rgba(135, 135, 135, .1), 0 0 18px 3px rgba(0, 0, 0, .3);
        transition: 0.75s ease-out;
        border-bottom-left-radius: 2rem;
    }
    nav a{
        box-sizing: border-box;
        max-height: 50px;
        height: auto;
        display: flex;
        width: 100%;
        padding:20px;
      justify-content: flex-start;
        margin-left: -.1rem;
    }
    nav a:hover,
nav a.active{
    border-bottom-left-radius: 2rem;
    background-color: rgba(24, 19, 19, 0.612);
}
    nav a:hover{
        transform: scale(1.1) translate(20px);
    }
    .open-sidebar-button, .close-sidebar-button{
        display: block;
    }
    .open-sidebar-button svg:hover, .close-sidebar-button svg:hover{
        fill: var(--cool);
        color: var(--cool);
    }
    .close-sidebar-button{
        margin-top: 4rem;
        margin-left: 2rem;
        margin-bottom: -1rem;
    }
    #sidebar-active:checked ~ .links-container{
        right: 0;
      }
    #sidebar-active:checked ~ .open-sidebar-button{
        display: none;
      }

      #sidebar-active:checked ~ #overlay{
        height: 100%;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 9;
      }
}
@media(max-width:990px){
    section{
        padding: 10rem 3% 2rem;
    }
    .sercives{
        padding-bottom: 7rem;
    }
    .sercives h2{
        margin-bottom: 3rem ;
    }
    .services-container{
        display: grid;
        margin: 0 1.5rem;
        grid-template-columns: repeat(1,1fr);
        align-items: center;
        gap: 2.5rem;
    }
    .sercives .service-box{
        height: 320px;
    }
    .sercives .service-box .services-inf {
        padding: 2rem 3rem;
    }
    .sercives .service-box .services-inf p{
        font-size: 1.6rem;
    }
}
@media (max-width:850px){
    .skills .container .row{
        grid-template-columns: repeat(4,1fr);
    }
}
@media screen and (max-width:690px){
    .skills .container{
        margin: 5rem auto;
        border-radius: 1rem;
        
    }
    .skills .container .row{
        grid-template-columns: repeat(2,1fr);
        margin: 1rem;
        padding: 2rem 0.2rem 2rem .2rem;
        gap: 1rem;
    }
}
@media screen and (max-width:600px) {
    .home .home-content h3,.home .home-content h1{
        text-align: center;
    }
    .education .timeline{
        margin-top: 2rem;
    }
    .education .timeline::after{
        left: 31px;
    }
    .education .container{  
        width: 100%;
        padding-left: 8rem;
        padding-right: 2rem;
    }
    .education .container::before{
        left: 61px;
        border: medium solid var(--cool);
        border-width: 10px 10px 10px 0 ;
        border-color: transparent var(--cool) transparent transparent;
    }
    .education .container::after{
        font-size: 2.2rem;
    }
    .education .left::after{
        left: 15px;
    }
    .education .right{
        left: 0%;
    }
    .education .right::after{
        left: 15px;
    }
    .contact h2{
        display: inline;
        margin-left: 1rem;
    }
    .contact form{
        margin-left: 2rem;
        margin-right: 2rem;
    }
    .contact h2{
        display: block;
        margin: 0;
    }
    .skills h2,  .education h2, .contact  h2{
        text-align: center;
    }
}
@media(max-width: 400px){   
    .home-content{
        margin-right:0 ;
    }
    .home-content p{
        font-size: 1.5rem;
        max-width: 80%;
        height: auto;
        text-align: left;
        line-height: 1.6;
        margin: auto;
    }
    
    .skills .container{
        width: 90%;
       
    }
}