* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "poppins", sans-serif;
}
:root{
    background-color: black;
    --text-color: white;
    --main-color: rgb(202, 69, 69);
}
html{   
    font-size: 62.5%;
    overflow-x: hidden;
}
body{
    background: var(--bg-color);
    color: var(--text-color);
}
.header{
    position: fixed;
    top: -1%;
    left: 0;
    right: 5%;
    width: 100%;
    padding: 3rem 9%;
    background: rgba(0, 0, 0, 0.589);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}
.logo{
    font-size: 3rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}
.logo:hover{
    transform: scale(1.1);
}
.navbar a{
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease-in-out;
    border-bottom: 3px solid transparent;
}
.navbar a.active::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: .2rem;
    background: var(--white-color);
}
.navbar a:hover,
.navbar a.active{
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}
#menu-icon{
    font-size: 3rem;
    color: var(--main-color);
    display: none;
}

section{
    min-height: flex;
    padding: 10rem 9% 10rem;
}
.home{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
}
span{
    color: var(--main-color);
}
.logo span{
    color: var(--main-color);
}
.home-content h1{
    font-size: 8rem;
    font-weight: 700;
    line-height: 1.3;
}
.home-img{
    border-radius: 80%;
}
.home-img img{
    position: relative;
    border-radius: 80%;
    width: 32vw;
    box-shadow: 0 0 20px var(--main-color);
    cursor: pointer;transition: 0.4s ease-in-out;
}
.home-img img:hover{
    box-shadow: 0 0 50px var(--main-color);
}
.home-content p{
    font-size: 1.8rem;
    font-weight: 500;
}
.social-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    font-size: 2rem;
    border-radius: 50%;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease-in-out;
}
.social-icons a:hover{
    color: white;
    transform: scale(1.3) translateY(-5px);
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
}
.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--bg-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.2s ease-in-out;
    cursor: pointer;
}
.btn:hover{
    transform: scale(1.00);
    background: var(--main-color);
    color: var(--text-color);
    border: 2px solid var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
}
.text-animation{
    font-size: 38px;
    font-weight: 580;
    max-width: 250;
    margin: 10px 0;
}
.text-animation span{
    position: relative;
}
.text-animation span::before{
    content: "Web Developer";
    color: var(--main-color);
    animation: words 20s infinite;
}
.text-animation span::after{
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--bg-color);
    right: -3px;
    animation: cursor 0.8s infinite alternate, typing 20s steps(17) infinite;
}
@keyframes cursor{
    to{
        border-left: 2px solid var(--main-color);
    }
}


@keyframes words{
    0%,
    20%{
        content: "Web Developer";
    }
    21%,
    40%{
        content: "Graphics Designer";
    }
    41%,
    60%{
        content: "Web Designer";
    }
    61%,
    80%{
        content: "Frontend Developer";
    }
    81%, 100%{
        content: "Student";
    }
}
@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);
    }
}
.header{
    text-align: center;
    font-size: 8rem;
}
.services{
    background-color: rgb(111, 111, 122);
}
.services h2{
    margin-bottom: 8rem;
}
.services-container{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
}
.services-container .services-box{
    flex: 1 1 40rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: black;
    padding: 3rem 2rem 3rem;
    height: 450px;
    border: 3px solid var(--main-color);
    border-radius: 2rem;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    font-family: script MT Bold Regular;
}
.services-container .services-box:hover{
    transform: scale(1.02);
    background-color: white;
    color: black;
}
.services-box i{
    font-size: 7rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}
.services-box h3{
    font-size: 2.6rem;
}
.services-box p{
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
    font-weight: 500;
}
.services-box .btn{
    background-color: transparent;
}
.services-box .btn:hover{
    color: var(--main-color);
    background-color: black;
}
.portfolio {
    padding-bottom: 10rem;
    background-color: var(--bg-color);
}

.portfolio h2 {
    margin-bottom: 4rem;
    color: var(--white-color);
}

.portfolio .portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2.5rem;
} 

.portfolio-container .portfolio-box {
    position: relative;
    display: flex;
    border-radius: 2rem;
    box-shadow: 0 0 1rem rgba(0, 0, 0, .1);
    overflow: hidden;
}

.portfolio-box img {
    width: 100%;
    transition: .5s ease ;
}

.portfolio-box:hover img {
    transform: scale(1.1);
}
.portfolio-box .portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, .1), var(--main-color));
    color: var(--white-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    opacity: 0;
    transition: .5s ease;
}

.portfolio-box:hover .portfolio-layer {
    opacity: 1;
}
.portfolio-layer h4 {
    font-size: 3rem;
}

.portfolio-layer p {
    font-size: 1.3rem;
    margin: .3rem 0 1rem;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: var(--white-color);
    border-radius: 50%;
}

.portfolio-layer a i {
    font-size: 2rem;
    color: #333;

}
.timeline-section{
    background-color: var(--bg-color);
    padding: 100px 13px;
}
.timeline-section h2{
    margin-bottom: 5rem;
}
.timeline-items{
    max-width: 1000px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
}
.timeline-items::before{
    content: '';
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: var(--main-color);
    left: calc(50% - 1%);
}
.timeline-item{
    margin-bottom: 40px;
    width: 100%;
    position: relative;
}
.timeline-item:last-child{
    margin-bottom: 0;
}
.timeline-item:nth-child(odd){
    padding-right: calc(50% + 30px);
    text-align: right;
}
.timeline-item:nth-child(even){
    padding-left: calc(50% + 30px);
}
.timeline-dot{
    height: 20px;
    width: 20px;
    background-color: var(--main-color);
    box-shadow: 0 0 22px var(--main-color);
    position: absolute;
    left: calc(50% - 8px);
    border-radius: 50%;
    top: 100px;
}
.timeline-date{
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin: 6px 0 15px;
}
.timeline-content{
    background-color: var(--second-bg-color);
    border: 2px solid var(--main-color);
    box-shadow: 0 0 10px var(--main-color);
    padding: 10px;
    border-radius: 1rem;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}
.timeline-content:hover{
    transform: scale(1.05);
    box-shadow: 0 0 25px solid var(--main-color);
}
.timeline-content h3{
    font-size: 15px;
    color: var(--main-color);
    margin: 0 25px;
    text-transform: capitalize;
    font-weight: 800;
}
.timeline-content p{
    color: white;
    opacity: 0.8;
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
}
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background: var(--bg-color);
    margin-top: -100px;
    margin-left: -50px;
}

.about-img img {
    width: 45vw;
    border-radius: 80%;
    position: relative;
    margin-left: -160px;
    margin-top: -50px;
}

.heading {
    font-size: 4.5rem;
    text-align: center;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
    color: white;
}

.about-content h3 {
    font-size: 2rem;
    color: white;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
    color: white;
}
h1{
    font-size: 5rem;
    text-align: center;
    margin-bottom: 40px;
}
.skill h2{
    font-size: 2.3rem;
    text-align: center;
    margin-bottom: 40px;
    text-decoration: underline;
}
.skill-bar{
    width: 80%;
    max-width: 600px;
    margin: 0 auto;
}
.skill{
    margin-bottom: 20px;
}
.html{
    font-size: 16px;
    margin-bottom: 5px;
    height: 15px;
}
 .skill-level{
    height: 15px;
    width: 20px;
    background-color: var(--main-color);
    position: relative;
    overflow: hidden;
    border-radius: 40px;
    margin: 20px 0;
    margin-bottom: 5px;
    animation: animate 1s 1s cubic-bezier(1,0,0,5,1) forwards;
    transform-origin: left;
}
.skill-level::before{
    content: '';
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    transition: 2s ease-in-out;
}
.skill-level[style]::before{
    width: 20%;
}
.bar i{
    font-size: 20px;
}
.javascript{
    font-size: 16px;
    margin-bottom: 5px;
    height: 15px;
}
.css{
    font-size: 16px;
    margin-bottom: 5px;
    height: 15px;
}
.input {
    visibility: hidden;
  }
  
  .label {
    position: absolute;
    width: 80px;
    height: 40px;
    background-color: lightgray;
    border-radius: 20px;
    cursor: pointer;
  }
  
  .circle {
    width: 34px;
    background-color: white;
    height: 34px;
    border-radius: 50%;
    top: 3px;
    position: absolute;
    left: 3px;
    animation: toggleOff 0.4s linear forwards;
  }
  
  .input:checked + .label {
    background-color: white;
  }
  
  .input:checked + .label .circle {
    animation: toggleOn 0.4s linear forwards;
    background-color: black;
  }
  
  @keyframes toggleOn {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(40px);
    }
  }
  
  @keyframes toggleOff {
    0% {
      transform: translateX(40px);
    }
    100% {
      transform: translateX(0);
    }
  }

  .contact {
    background: var(--bg-color);
}
.contact h2 {
    margin-bottom: 3rem;
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.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.6rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
    box-shadow: 0 .1rem .5rem var(--shadow-color);
    border: 2px solid var(--main-color);
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}
  
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 7%;
    background: var(--main-color);
}

.footer-text p {
    font-size: 1.6rem;
    color: var(--white-color);
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background:var(--white-color);
    border-radius: .8rem;
    border: .2rem solid var(--main-color);
    outline: .2rem solid transparent; 
    transition: .5s ease;
}


.footer-iconTop a:hover {
    outline-color: var(--white-color);
}
.footer-iconTop a i {
    font-size: 2.4rem;
    color: #f5eaea;
}
.footer-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: 0.2rem solid black;
    font-size: 2rem;
    border-radius: 50%;
    color: white;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease-in-out;
}
.footer-icons a:hover{
    color: white;
    transform: scale(1.3) translateY(-5px);
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
}
 /* Responsive styles */
@media (max-width: 1200px) {
    html{
        font-size: 55%;
    }

    .project-container{
        padding-bottom: 7rem;
        grid-template-columns: repeat(1, 1fr);
        margin: 0.5rem;
    }
}

@media (max-width: 1000px) {
    header {
        padding: 2rem 3%;
    }
    section{
        padding: 10rem 3% 2rem;
    }
    .services{
        padding-bottom: 7rem;
    }
    .footer{
        padding: 2rem 3%;
    }
    }
    @media (max-width: 995px) {
        #menu-icon{
            display: block;
        }
        .navbar{
            position: absolute;
            top: 100%;
            right: 0;
            width: 50%;
            border-left: 3px solid var(--main-color);
            border-bottom: 3px solid var(--main-color);
            border-top-left-radius: 2rem;
            padding: 1rem 3%;
            background: black;
            display: none;
        }
        .navbar.active{
            display: block;
        }
        .navbar a{
            display: block;
            font-size: 2rem;
            margin: 3rem 0;
        }
        .home{
            flex-direction: column;
            margin: 5rem 4rem;
        }
        .home-content h3{
            font-size: 5rem;
        }
        .home-img img{
            width: 70vw;
            margin-top: 4rem;
        }
        .timeline-items::before{
            left: 7px;
        }
        .timeline-item:nth-child(odd){
            padding-right: 0;
            text-align: center;
        }
        .timeline-item:nth-child(odd),
        .timeline-item:nth-child(even){
            padding-left: 37px;
        }
        .timeline-dot{
            left: 0;
        }

    } 