* {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    color: black;
    background: white;
}

.header {
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 10%;
    z-index: 100;
    transition: background-color 1s ease;
}

header.scrolled {
    background-color: #1d443f;

    /* Change to your desired color */
    a {
        color: white;
    }
}

.logo {
    position: relative;
    color: black;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    font-weight: 600;
    cursor: default;
    opacity: 0;
    animation: slideLeft 1s ease forwards;
}

.nav-bar a {
    display: inline-block;
    color: black;
    font-size: 1rem;
    font-weight: 600;
    margin-left: 35px;
    text-decoration: none;
    transition: .3s;
    opacity: 0;
    animation: slideTop .5s ease forwards;
    animation-delay: calc(.2s*var(--i));
    /*it will print one by one in .2seconds*/
}

.nav-bar a:hover {
    color: greenyellow;
}

#menu-icon {
    color: white;
    font-size: 2rem;
    border: 0;
    background-color: transparent;
    cursor: pointer;
    display: none;
}

.home {
    position: relative;
    width: 100%;
    justify-content: space-between;
    height: 100vh;
    background: url(../images/home_desktop.jpg);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 70px 20% 0;
}

.home-content {
    max-width: 650px;
    margin-left: -120px;

    h3 {
        font-size: 32px;
        font-weight: 700;
        opacity: 0;
        animation: slideBottom 1s ease forwards;
        animation-delay: .7s;
    }

    h1 {
        font-size: 56px;
        font-weight: 700;
        margin: -3px 0;
        opacity: 0;
        animation: slideLeft 1s ease forwards;
        animation-delay: 1s;
    }
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 30px;
    animation: slideTop 1s ease forwards;
    animation-delay: .7s;
}

.social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    background: transparent;
    /* border: 2px solid black;*/
    border-radius: 50%;
    font-size: 30px;
    color: black;
    text-decoration: none;
    margin: 10px 10px 10px 0;
    opacity: 0;
    animation: slideRight 1s ease forwards;
    animation-delay: calc(.2s*var(--i));
}

.social a:hover {
    color: greenyellow;
    box-shadow: 0 0 5px greenyellow, 0 0 25px greenyellow;
}

.btn-box1 {
    margin: 0 10px 10px 0;
    display: inline-block;
    justify-content: space-between;
    padding: 12px 28px;
    background: green;
    border-radius: 40px;
    font-size: 16px;
    color: black;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    transition: .5s;
    opacity: 0;
    animation: slideBottom 1s ease forwards;
    animation-delay: 2s;
}

.btn-box1:hover {
    background: greenyellow;
    color: black;
    box-shadow: 0 0 5px yellowgreen, 0 0 25px yellowgreen;
}

.btn-box2 {
    margin: 0 10px 10px 0;
    display: inline-block;
    justify-content: space-between;
    padding: 12px 28px;
    background: green;
    border-radius: 40px;
    font-size: 16px;
    color: black;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    transition: .5s;
    opacity: 0;
    animation: slideBottom 1s ease forwards;
    animation-delay: 2s;
}

.btn-box2:hover {
    background: greenyellow;
    color: black;
    box-shadow: 0 0 5px yellowgreen, 0 0 25px yellowgreen;
}

@keyframes slideLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0px);
        opacity: 1;
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0px);
        opacity: 1;
    }
}

@keyframes slideTop {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0px);
        opacity: 1;
    }
}

@keyframes slideBottom {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0px);
        opacity: 1;
    }
}

/* About */
.about {
    display: grid;
    width: 100%;
    height: 100vh;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 1.5rem;
}

.about-img {
    position: relative;
    width: 25rem;
    height: 25rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-img img {
    width: 90%;
    border-radius: 50%;
    border: 2px solid greenyellow;
    margin-left: 86px;
}

.about-img .circle-spin {
    position: absolute;
    top: 50%;
    left: 60%;
    transform: translate(-50%, -50%)rotate(0);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border-top: .2rem solid white;
    border-bottom: .2rem solid white;
    border-left: .2rem solid greenyellow;
    border-right: .2rem solid greenyellow;
    animation: aboutSpinner 8s linear infinite;
}

.about-text {
    margin-top: 20px;
    margin-left: -120px;

    h2 {
        font-size: 60px;
    }

    h4 {
        font-size: 29px;
        font-weight: 600;
        color: black;
        line-height: 1.7;
        margin: 15px 0 30px;
    }

    p {
        color: black;
        font-size: 20px;
        line-height: 1.4;
        margin-bottom: 4rem;
    }
}

.about_btn_box {
    margin: 0 10px 10px 0;
    display: inline-block;
    justify-content: space-between;
    padding: 12px 28px;
    background: green;
    border-radius: 40px;
    font-size: 16px;
    color: black;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    transition: .5s;
}

.about_btn_box:hover {
    background: greenyellow;
    color: black;
    box-shadow: 0 0 5px yellowgreen, 0 0 25px yellowgreen;
}

@keyframes aboutSpinner {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.about-text.scrolled {
    h2 {
        opacity: 0;
        animation: slideRight 1s ease forwards;
        animation-delay: .3s;
    }

    h4 {
        opacity: 0;
        animation: slideLeft 1s ease forwards;
        animation-delay: .4s;
    }

    p {
        opacity: 0;
        animation: slideBottom 1s ease forwards;
        animation-delay: .7s;
    }

    .about_btn_box {
        opacity: 0;
        animation: slideBottom 1s ease forwards;
        animation-delay: .9s;
    }
}

/* my skiils*/

.skills_section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.skills__container {
    margin: auto;
    margin-top: 2.5rem;
    display: grid;
    padding: 1.25rem;
    row-gap: 2rem;
    text-align: center;
}

.skills__container h2 {
    font-size: 50px;
}

.skills__subtitle {
    font-size: 30px;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 7px;
    text-decoration-thickness: 5px;
    margin-bottom: 20px;
}

.skills_list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.skills__names img {
    width: 28px;
}

.skills__text {
    margin-bottom: 1.5rem;
}

.skills__data {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-weight: 500;
    padding: .5rem 1rem;
    margin: 20px;
    border-radius: .5rem;
    box-shadow: 0px 4px 25px rgb(173, 255, 47);
    transition: .5s;
}

.skills__data:hover {
    transform: scale(1.2);
}

.skills__icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.skills__names {
    display: flex;
    align-items: center;
}

.skills__names #java {
    font-size: 28px;
}

.skills__names #sql {
    font-size: 28px;
}

.skills__names #python {
    font-size: 28px;
}

.skills__names #name_sql {
    width: 77px;
}

.skills__names #name_c {
    width: 56px;
}

.skills__names #name_java {
    width: 77px;
}

.skills__names #plc {
    width: 47px;
}

.skills__names #hmi {
    width: 30px;
}

.skills__names #scada {
    width: 47px;
}

/*Project Section*/
.projects {
    background-color: white;
    padding-top: 5rem;
    padding-bottom: 3rem;
}

.projects h2 {
    font-size: 50px;
}

.project-pic {
    width: 65%;
    height: 60%;
}

.projects-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.projects-title {
    text-align: center;
    margin-bottom: 1rem;
}

.project-container {
    text-align: center;
    width: 21.875rem;
    padding: 1rem;
}

.project-container p {
    padding: 0.4rem;
}

.project-title {
    margin-bottom: 0.5rem;
}

.project-details {
    margin-bottom: 0.5rem;
}

.project-card {
    background-color: #fff;
    border-radius: 11px;
    box-shadow: 0 3px 10px #8b8eaf;
    padding: 20px;
    margin: 10px;
    transition: .5s;
}

.project-link {
    margin: 0 10px 10px 0;
    display: inline-block;
    justify-content: space-between;
    padding: 12px 28px;
    background: green;
    border-radius: 40px;
    font-size: 16px;
    color: black;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    transition: .5s;
}

.project-link:hover {
    background: greenyellow;
    color: black;
    box-shadow: 0 0 5px yellowgreen, 0 0 25px yellowgreen;
}

.project-card:hover {
    transform: scale(1.05);
}

/* ====Contact==== */

.contact h2 {
    font-size: 50px;
    font-weight: 600;
    text-align: center;
}

.contact_heading span {
    color: greenyellow;
}

.container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

#subject {
    height: 100px;
}

input,
textarea {
    font-size: 0.875rem;
    padding: 15px 50px;
    border-radius: 5px;
    border: 2px solid;
    box-sizing: border-box;
    margin-top: 6px;
    margin-bottom: 16px;
}

input:valid {
    outline: black;
}

textarea:valid {
    outline: black;
}

input:invalid {
    outline: red;
}

input:invalid:hover {
    border: 3px solid red;
}

input:hover {
    border: 3px solid greenyellow;
}

textarea:hover {
    border: 3px solid greenyellow;
}

input[type=submit] {
    width: 100%;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    background: green;
    margin: 0 10px 10px 0;
    padding: 12px 20px;
    border-radius: 40px;
    cursor: pointer;
}

input[type=submit]:hover {
    background-color: greenyellow;
    box-shadow: 0 0 5px greenyellow, 0 0 25px greenyellow;
}

/* ===== FOOTER =====*/
footer {
    background-color: #1d443f;
    color: white;
    padding: 1.25rem;
    text-align: center;
    margin: 2rem 0 0;
}

footer p {
    font-size: 20px;
    font-weight: bold;
}

.footer__icon {
    font-size: 1.5rem;
    color: #fff;
    margin: 0 2rem;
    transition: color .3s;
}

.footer__icon:hover {
    color: greenyellow;
}

.footer__copy {
    font-size: .75rem;
}

.footer__social {
    margin-top: 10px;
}

@media screen and (500px <=width<=1100px) {
    .header {
        max-width: 100%;
        background: #1d443f;
        padding: 20px 10%;

        a {
            color: #fff;
        }
    }

    .logo {
        font-size: 23px;
    }

    #menu-icon {
        display: block;
    }

    .nav-bar {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        padding: 1rem 4%;
        background: greenyellow;
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        z-index: -1;
        transition: .25s ease;
        transition-delay: .25s;
    }

    .nav-bar.active {
        left: 0;
        transition-delay: 0s;
    }

    .nav-bar .active-nav {
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: #1d443f;
        border-top: .1rem solid rgba(0, 0, 0, .2);
        z-index: -1;
        transition: .25s ease;
        transition-delay: 0s;
    }

    .nav-bar.active .active-nav {
        left: 0;
        transition-delay: .25s;
    }

    .nav-bar a {
        display: block;
        font-size: .938rem;
        font-weight: 600;
        margin: 3rem 0;
        transform: translateX(-20rem);
        transition: .25s ease;
        transition-delay: 0s;
    }

    .nav-bar.active a {
        transform: translateX(0);
        transition-delay: .25s;
    }

    .home-content {
        margin-left: -90px;
    }

    .home-content h3 {
        font-size: 25px;
        font-weight: 600;
    }

    .home-content h1 {
        font-size: 40px;
        font-weight: 600;
    }

    .home-content p {
        color: black;
        font-size: 18px;
        font-weight: 600;
    }

    .home-content .btn-box1 {
        margin-top: 20px;
    }

    .about-text.scrolled h2 {
        opacity: 1;
        animation: unset;
        animation-delay: unset;
    }

    .about {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 2rem;
        background: #fff;
        margin-top: 150px;
        margin-bottom: 3rem;
    }

    .about-img {
        position: relative;
        width: 25rem;
        height: 25rem;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .about-img img {
        margin: 0;
        width: 90%;
        border-radius: 50%;
        border: .2rem solid greenyellow;
    }

    .about-img .circle-spin {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%)rotate(0);
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border-top: .2rem solid white;
        border-bottom: .2rem solid white;
        border-left: .2rem solid greenyellow;
        border-right: .2rem solid greenyellow;
        animation: aboutSpinner 8s linear infinite;
    }

    .about-text {
        margin: 0;
        text-align: center;
    }

    .about-text p {
        font-size: 15px;
        margin-bottom: 2rem;
    }

    .project-container {
        width: 20.875rem;
    }
}

@media screen and (100px <=width <=499px) {
    .header {
        width: 100%;
        background: #1d443f;
        padding: 20px 10%;

        a {
            color: #fff;
        }
    }

    .logo {
        font-size: 20px;
    }

    #menu-icon {
        display: block;
    }

    .home {
        width: 100%;
        background: url("../images/home_mobile.jpg");
        background-size: cover;
        background-position: center;
        padding: 125px 2% 0;
    }

    .home-content {
        margin-left: 0px;
        max-width: none;

        h3 {
            font-size: 15px;
        }

        h1 {
            font-size: 20px;
        }
    }

    .home-content h3:nth-of-type(2) {
        margin-bottom: 0px;
    }

    .home-content .btn-box1 {
        letter-spacing: 0px;
    }

    .home-content .btn-box2 {
        padding: 12px 22px;
        letter-spacing: 0px;
    }

    .nav-bar {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        padding: 1rem 4%;
        background: greenyellow;
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        z-index: -1;
        transition: .25s ease;
        transition-delay: .25s;
    }

    .nav-bar.active {
        left: 0;
        transition-delay: 0s;
    }

    .nav-bar .active-nav {
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: #1d443f;
        border-top: .1rem solid rgba(0, 0, 0, .2);
        z-index: -1;
        transition: .25s ease;
        transition-delay: 0s;
    }

    .nav-bar.active .active-nav {
        left: 0;
        transition-delay: .25s;
    }

    .nav-bar a {
        display: block;
        font-size: .938rem;
        font-weight: 600;
        margin: 3rem 0;
        transform: translateX(-20rem);
        transition: .25s ease;
        transition-delay: 0s;
    }

    .nav-bar.active a {
        transform: translateX(0);
        transition-delay: .25s;
    }

    .home-content {
        margin-left: 0;
    }

    .home-content h3 {
        font-size: 20px;
    }

    .home-content h1 {
        font-size: 35px;
    }

    .home-content p {
        font-size: 15px;
    }

    .about {
        display: unset;
        margin: 0px;
    }

    .social a {
        font-size: 25px;
    }

    .btn-box1,
    .btn-box2 {
        font-size: 14px;
    }

    .about-img {
        margin-top: 30px;
        width: 100%;
        height: auto;
        border-radius: 0%;
    }

    .about-img img {
        margin-left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 200px;
        border: none;
        border-radius: 0.5rem;
        box-shadow: 0px 4px 25px rgba(14, 36, 49, 0.792);
    }

    .about-img .circle-spin {
        position: unset;
        top: 0%;
        left: 0%;
        width: 0%;
        height: 0%;
        transform: none;
        border-radius: 0%;
        border: none;
        animation: none;
    }

    .about-text {
        display: block;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 0;
        text-align: center;
        margin-top: 20px;
    }

    .about-text h2 {
        font-size: 30px;
    }

    .about-text h4 {
        font-size: 15px;
        margin: 10px 0 20px;
    }

    .about-text p {
        font-size: 13px;
        margin-bottom: 1rem;
    }

    .about-text.scrolled {
        h2 {
            opacity: 1;
            animation: unset;
            animation-delay: unset;
        }
    }

    .skills_section {
        padding-top: 1rem;
        margin-left: 0;
    }

    .skills__container {
        margin-left: 0;

        h2 {
            font-size: 30px;
        }
    }

    .skills__subtitle {
        font-size: 20px;
    }

    .skills__data {
        flex: 1 1 0px;
    }

    .projects {
        padding-top: 0;
    }

    .projects h2 {
        font-size: 30px;
    }

    .projects-container {
        flex-direction: column;
    }

    .contact h2 {
        font-size: 30px;
    }
}

@media screen and (500px <=width <=700px) {
    .projects-container {
        flex-direction: column;
    }
}

.scroll-up {
    position: fixed;
    right: 0.5%;
    bottom: 3%;
    cursor: pointer;
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
    color: green;
}
