@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(rgba(0,222,0,0.3), var(--main-color), rgba(0,222,0,0.3));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(transparent, var(--main-color), transparent);
}

:root {
    --bg-color: #090e13;
    --second-bg-color: #191c23;
    --first-text-color: #fff;
    --second-text-color: #a0a3a0;
    --main-color: #41f041;
    --btn-color: rgba(0,222,0,0.3);
    --btn2-color: #023e1d;
    --btn2-hover-color: #1dc10b;
    --tx-shadow: 2px 2px 10px #000;
}

html {
    font-size: 60%;
}

body {
    background-color: var(--bg-color);
    color: var(--first-text-color);
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
}

.heading {
    text-align: center;
    font-size: 4rem;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}


/* header section */
.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.sticky {
    border-bottom: .1rem solid var(--main-color);
}

.logo {
    font-size: 2.5rem;
    color: var(--main-color);
    font-weight: 600;
    cursor: default;
    opacity: 0;
    animation: fadeIn 5s ease forwards;
}

.navbar a {
    display: inline-block;
    font-size: 1.7rem;
    color: var(--first-text-color);
    margin-left: 4rem;
    opacity: 0;
    transition: .3s;
    animation: slideUp .5s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

@keyframes slideUp {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--first-text-color);
    display: none;
}

/* home section */

.home {
    background: linear-gradient(rgba(0, 0, 0, 0.705), rgba(0, 0, 0, 0.318)), url(./images/pic1.jpg);
    background-position: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 100px;
    position: relative;
    top: -40px;
}

.home-img {
    position: relative;
    top: 60px;
}

.home-img img {
    width: 30vw;
    /* animation: float 4s ease-in-out infinite, fadeIn 5s ease forwards; */
}

/* @keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(24px);
    }

    100% {
        transform: translateY(0);
    }
} */

.home-content h3 {
    font-size: 2.7rem;
    font-weight: 700;
    color: var(--second-text-color);
    opacity: 0;
    animation: fadeIn 5s ease forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.home-content h3 span {
    position: relative;
}

.home-content h3 span::before {
    content: '';
    position: absolute;
    left: 0;
    width: 270px;
    height: 33px;
    background-color: var(--bg-color);
    border-left: 2px solid var(--first-text-color);
    animation: typing 1.5s steps(18) infinite alternate;
}

@keyframes typing {
    100% {
        left: 100%;
        margin: 0 -35px 0 35px;
    }
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

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

.home-content h1 {
    font-size: 4.6rem;
    font-weight: 700;
    line-height: 1.3;
    opacity: 0;
    animation: slideRight 1.5s ease-out forwards;
    animation-delay: 1s;
}

@keyframes slideRight {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    75% {
        transform: translateX(-5px);
        opacity: 1;
    }

    50%, 100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.home-content p {
    font-size: 1.6rem;
    opacity: 0;
    animation: fadeIn 5s ease forwards;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    opacity: 0;
    animation: slideLeft .5s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

@keyframes slideLeft {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1.4rem 2.8rem;
    background: linear-gradient(to right, var(--btn-color), var(--main-color), var(--btn-color));
    border: none;
    border-radius: 4rem;
    font-size: 1.7rem;
    color: var(--first-text-color);
    letter-spacing: .1rem;
    font-weight: 300;
    transition: .5s ease;
    opacity: 0;
    animation: fadeIn 5s ease forwards;
}

.btn:hover {
    background-color: var(--btn-color);
    transform: scale(1.1);
}




/* skills section */
.skills-bg {
    background: var(--second-bg-color);
}

.skills {
    text-align: center;
    font-size: 2rem;
    background-image: linear-gradient(rgba(20, 19, 29, 0.838), rgba(20, 20, 32, 0.911)), url(./images/hello-world-html-code.png);
    background-position: center;
    padding-bottom: 100px;
}

.skills i {
    color: var(--main-color);
}

.skills-header h1 {
    padding-bottom: 20px;
}

.skills-col {
    margin-top: 50px;
    display: flex;
    gap: 40px;
}

.skills-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    background-color: rgb(58, 58, 59);
    padding: 10px 30px;
    border-radius: 7px;
}

.skills-content i {
    font-size: 25px;
}

.skills-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.skills-wrapper i {
    font-size: 40px;
}

.first {
    width: 50%;
}

.second {
    width: 50%;
}


/* portfolio section */

.portfolio {
    padding-bottom: 100px;
}

.portfolio h2 {
    margin-bottom: 4rem;
}
 
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 3rem;
}

.portfolio-container .portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
}

.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: 80%;
    background: #1c192a;
    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 h4 {
    font-size: 3rem;
}

.portfolio-layer p {
    font-size: 1.6rem;
    margin: .3rem 0 1rem;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 40px;
    background: var(--main-color);
    color: var(--first-text-color);
    font-size: 1.7rem;
    border: none;
    border-radius: 30px;
    transition: all .5s ease;
}


.portfolio-layer a:hover {
    background-color: var(--btn2-hover-color);
    transform: scale(1.1);
}





/* contact section */

.contact {
    background: var(--second-bg-color);
}

.contact h2 {
    margin-bottom: 3rem;
}

.contact h3 {
    font-size: 25px;
    text-align: center;
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact form .input-box input, 
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--first-text-color);
    background-color: var(--bg-color);
    border-radius: .8rem;
    margin: .9rem 0;
}

.field .item {
    border: 1px solid var(--main-color);
}
.field.error .item {
    border-color: #d93025;
}

.contact form .input-box {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.input-box .input-field {
    width: 100%;

}

.contact form textarea {
    resize: none;
}

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

.field .error-txt {
    font-size: 14.5px;
    color: #d93025;
    text-align: left;
    margin: -5px 0 10px;
    display: none;
}

.field.error .error-txt {
    display: block;
}











/* footer section */

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}


/* Breakpoints */
 @media (max-width: 1200px) {
    html {
        font-size: 55%;
    }

    section {
        min-height: 70vh;
        padding: 10rem 9% 2rem;
    }
 }

 @media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .skills {
        padding-bottom: 30px;
    }

    .portfolio {
        padding-bottom: 7rem;
    }

    .contact {
        min-height: auto;
    }

    .footer {
        padding: 2rem 3%;
    }
 }

 @media (max-width: 768px) {
    
    #menu-icon {
        display: block;
    }

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

    .navbar.active {
        display: block;
    }

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

    .home {
        flex-direction: column;
        margin-top: 30px;
        padding-bottom: 0;
    }

    .home-img {
        position: relative;
        top: 15px;
    }

    .home-content h3 {
        font-size: 2.5rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }

    .portfolio h2 {
        margin-bottom: 3rem;
    }

    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }
 }

 @media (max-width: 617px) {

    html {
        font-size: 40%;
    }

    .home-img {
        position: relative;
        top: -20px;
    }

    .home {
        margin-top: 50px;
    }

    .skills-col {
        display: block;
        text-align: center;
        padding: 0 20px;
    }

    .first {
        width: 100%;
    }

    .second {
        width: 100%;
    }

    .portfolio-container {
        grid-template-columns: 1fr;
    }

    .home-content h3 span::before {
        content: '';
        width: 170px;
        height: 22px;
    }

 }

 @media (max-width: 505px) {
    .contact form .contact-wrapper {
        width: 100%;
    }

    .contact form .input-box {
        display: block;
    }
 }

 @media (max-width: 382px) {
    .home-img img {
        width: 90vw;
    }

    .home-content h3 span::before {
        content: '';
        width: 143px;
        height: 18px;
    }

    .footer {
        flex-direction: column-reverse;
        margin-top: 2rem;
        margin-bottom: 10px;
        justify-content: center;
        align-items: center;
    }
    .footer-iconTop a {
        margin-bottom: 20px;
    }
 }
 @media (max-width: 432px) {

    .home-content h3 span::before {
        display: none;
        animation: none;
    }
 }


