* {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    color: white;
    background: #1f242d;
}

a {
    text-decoration: none;
}

li {
    list-style-type: none;
}

section,
footer,
nav {
    display: grid;
    grid-template-columns:
        1fr 90% 1fr;
}

section>*,
footer>*,
nav>* {
    grid-column: 2;
}

/* ------------------Navbar------------------------------ */
header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar {
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: min(90%, 1500px);
    top: 0;
    background-color: rgb(31, 36, 45, 0.8);
    z-index: 1000;
    height: 10vh;
}

.navbar span {
    font-size: clamp(1.5em, 4vw, 2em);
    font-weight: 600;
    width: 30%;
    color: rgb(130, 248, 13);
}


.list ul {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    list-style-type: none;
}

.list ul li a {
    color: white;
    font-size: 1.25em;
    text-decoration: none;
    transition: all 0.5s;
    padding: 0.25em;
    position: relative;
    margin: 0 1em;
}

.list a:hover,
.list a.active {
    color: chartreuse;
}

.list ul li a::after {
    content: "";
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 2px;
    background-color: chartreuse;
    transform: scaleX(0);
    transition: all 0.5s ease;
}

.list ul li a:hover::after,
.list ul li a.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background-color: transparent;
    border: none;
}

.menu-toggle span:nth-child(1) {
    width: 25px;
    height: 3px;
    background-color: chartreuse;
    border-radius: 2px;
}

.menu-toggle span:nth-child(2) {
    width: 12.5px;
    height: 3px;
    align-self: flex-end;
    background-color: chartreuse;
    border-radius: 2px;
    transition: all 0.5s ease;
}

.menu-toggle span:nth-child(3) {
    width: 25px;
    height: 3px;
    background-color: chartreuse;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(2) {
    width: 25px;
}

/* ------------------------Home----------------------------------------- */
.Home {
    height: 100vh;
    place-content: center;
    margin-bottom: 1em;
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.Home-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    place-items: center;
    margin-bottom: 2em;
    z-index: 1;
}

.introduction {
    width: 100%;
    animation: sideUp 1s ease 0.9s backwards;
}

.introduction h1 {
    font-size: clamp(3em, 4vw, 4em);
    background: linear-gradient(to right, white, chartreuse, #30353f);
    background-clip: text;
    color: transparent;
    animation: sideUp 1s ease 1s backwards;
    font-display: swap;
}

.animated-text {
    font-size: clamp(1em, 4vw, 1.85em);
    font-weight: 600;
    animation: sideUp 1s ease 1.1s backwards;
}

.animated-text span {
    position: relative;
}

.animated-text span::before {
    content: "Front-End Developer";
    color: chartreuse;
    animation: words 20s infinite;
}

.animated-text span::after {
    content: "";
    position: absolute;
    width: calc(100% + 8px);
    height: clamp(1.2em, 1vw, 2em);
    border-left: 2px solid chartreuse;
    background: #1f242d;
    top: 2.7px;
    right: -8px;
    animation: cursor .8s infinite, typing 20s steps(16) infinite;
}

@keyframes cursor {
    to {
        border-left: 2px solid #1f242d;
    }
}

@keyframes words {

    0%,
    33.33% {
        content: "Front-End Developer";
    }

    33.34%,
    66.66% {
        content: "React.js";
    }

    66.67%,
    100% {
        content: "Software-Engineer";
    }
}

@keyframes typing {

    8%,
    33.33%,
    43%,
    66.66%,
    75%,
    100% {
        width: calc(100% + 8px);
    }

    15%,
    27%,
    50%,
    61.5%,
    80%,
    94% {
        width: 0;
    }
}

.Home-content p {
    font-size: 22px;
    margin: 1em 0px;
    margin-bottom: 25px;
    color: rgb(161, 160, 160);
}

.social-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
}

.btn {
    border: 2px solid chartreuse;
    border-radius: 20px;
    color: black;
    padding: 10px;
    transition: 0.5s;
    margin-right: 7px;
    cursor: pointer;
    font-size: 1.1em;
}

.btn-primary {
    background-color: chartreuse;
    box-shadow: 0 0 25px chartreuse;
    margin-bottom: 1em;
}

.btn-primary:hover {
    background-color: chartreuse;
    color: black;
    border: 2px solid chartreuse;
    box-shadow: 0 0 25px chartreuse;
    transform: translateY(-5px);
}

.btn-secoundry {
    color: white;
}

.btn-secoundry:hover {
    background-color: chartreuse;
    color: black;
    box-shadow: 0 0 25px chartreuse;
    transform: translateY(-5px);
}

.links a svg {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 0.5em 1em 0;
    place-content: center;
    text-align: center;
    font-size: 2em;
    font-weight: 700;
    transition: 0.5s;
    border: 3px solid chartreuse;
    color: chartreuse;
    animation: sideUp 1s ease var(--delay) backwards;
}

.links a:nth-child(1) svg {
    --delay: 1.2s;
}

.links a:nth-child(2) svg {
    --delay: 1.3s;
}

.links a:nth-child(3) svg {
    --delay: 1.4s;
}

.links a svg:hover {
    background: chartreuse;
    box-shadow: 0 0 25px chartreuse;
    color: white;
    transform: translateY(-5px);
}

.photo1 {
    animation: sideUp 1s ease 0.5s backwards;
}

.photo1 img {
    box-shadow: 0 0 25px chartreuse;
    transition: all 0.5s ease;
    object-fit: cover;
    object-position: 90% 10%;
}

.photo1 img:hover {
    box-shadow: 0 0 25px chartreuse,
        0 0 50px chartreuse;
}

@keyframes sideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------About------------------------------------------ */
.about {
    margin-bottom: 1em;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.animate-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

.container-title {
    font-size: 2em;
    text-align: center;
    position: relative;
}

.container-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    background-color: chartreuse;
    width: 80px;
    height: 5px;
    border-radius: 10px;
    transform: translateX(-50%);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    place-items: center;
    gap: 2em;
    margin: 2em 0;
}

.Technical-Skills {
    width: 70%;
}

.Technical-Skills h3 {
    text-align: center;
    font-size: 2em;
    font-weight: 600;
    color: chartreuse;
    padding: 1em 0;
}

.icon svg {
    width: 50px;
    height: 50px;
    color: white;
    text-align: center;
    border-radius: 10px;
    animation: rotate 0.5s linear infinite;
    transform-origin: center;
}

@keyframes rotate {
    0% {
        transform: rotate(-15deg);
    }

    50% {
        transform: rotate(15deg);
    }

    100% {
        transform: rotate(-15deg);
    }
}

.discription h4 {
    font-size: 1.5em;
    font-weight: 600;
    color: chartreuse;
}

.about-text {
    width: 90%;
}

.about-text h3 {
    font-size: 2em;
    font-weight: 600;
    color: chartreuse;
    padding: 1em 0;
}

.about-text .animate-child {
    animation: sideUp 1.5s ease 0.7s backwards;
}

.about-text p {
    font-size: 1.2em;
    line-height: 2;

}

.about-text .animate-child {
    animation: sideUp 1.5s ease 0.8s backwards;
}

/* ------------Projectcs------------------------------- */
.content-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    place-items: center;
    gap: 2em;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
    margin-bottom: 2em;
}

.content-projects.animate-child {
    animation: sideUp 1s ease 0.9s backwards;
}

.feuture {
    margin-top: 1em;
}

.feuture ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
    padding: 0;
}

.feuture ul li {
    color: chartreuse;
    background-color: #1f242d;
    font-size: clamp(1em, 2vw, 1.25em);
    font-weight: 600;
    padding: 0.25em 0.5em;
    border-radius: 20px;
}

.card {
    background-color: #30353f;
    transition: all 0.5s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1em;
    margin-top: 1em;
}

.card:hover {
    box-shadow: 0 6px 10px chartreuse;
    transform: translateY(-5px);
}

.card:hover img {
    transform: scale(1.05);
}

.card-title {
    color: chartreuse;
    font-weight: 600;
    font-size: 1.5em;
}

.card-img-top {
    border-radius: 12px 12px 0 0;
    object-fit: cover;
    object-position: center;
    transition: all 0.5s ease;
}

.card.animate-child {
    animation: sideUp 2s ease var(--delay) backwards;
}

.card:nth-child(1) {
    --delay: 0.7s;
}

.card:nth-child(2) {
    --delay: 0.9s;
}

.card:nth-child(3) {
    --delay: 1.1s;
}

.card:nth-child(4) {
    --delay: 1.3s;
}

.card:nth-child(5) {
    --delay: 1.5s;
}

.card:nth-child(6) {
    --delay: 1.7s;
}

.card:nth-child(7) {
    --delay: 1.9s;
}

.card:nth-child(8) {
    --delay: 2.1s;
}

/* -----------Skills------------------- */
.Front-end h3 {
    font-size: 1.5em;
    font-weight: 800;
    background: linear-gradient(to right, #a8ff00, #d4ff6b);
    background-clip: text;
    color: transparent;
    background-size: cover;
    background-repeat: no-repeat;
    margin-bottom: 1em;
}

.Front-end span:nth-child(1) {
    font-size: 1.25em;
    font-weight: 600;
    color: chartreuse;
    display: block;
    margin-bottom: 0.5em;
}

.Front-end span:nth-child(2) {
    font-size: 1.25em;
    font-weight: 600;
    color: wheat;
    display: block;
    margin-bottom: 0.5em;
}

.Front-end .progress {
    background-color: #1f242d;

}

.Front-end .progress-bar {
    background-color: chartreuse;
    border-radius: 10px;
    ;
}

/* ----------Contact----------- */
.content-contact {
    display: grid;
    gap: 2em;
}

.left-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    place-items: center;
    gap: 1em;
}

.left {
    background-color: #1f242d;
    display: flex;
    padding: 1em;
}
.text1 .text{
    color: rgb(184, 183, 183);
    font-size: 1.25em;
    transition: all 0.5s ease;
}
.text1 .text:hover {
    color: white;
}
.form {
    display: flex;
    justify-content: center;
    align-items: center;
}

.form input,
.form textarea {
    border: 2px solid chartreuse;
    color: white;
    padding: 0.75em;
    transition: all 0.5s ease;
    width: 100%;
}

.form input:focus,
.form textarea:focus {
    outline: none;
    border-color: chartreuse;
    box-shadow: 0 0 10px chartreuse;
}

.icons {
    font-size: 2em;
    padding: 1.25em;
}

.text1 h3 {
    margin-top: 1.25em;
    color: chartreuse;
    font-size: 1.5em;
    font-weight: bold;
}

/* ---------footer---------- */
footer {
    background-color: #30353f;
    text-align: center;
    padding: 2em 0;
    margin-top: 2em;
}

footer p {
    padding: 1em 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: rgb(224, 224, 224);
    font-size: 1.25em;
}

.footer-text {
    text-align: center;
}

/* responsive */
@media (max-width:1200px) {
    .navbar {
        height: auto;
    }

    .Home {
        height: auto;
    }

    .about {
        height: auto;
    }

    .Projects {
        height: auto;
    }

    .Skills {
        height: auto;
        margin-bottom: 2em;
    }

    .Contact {
        height: auto;
        margin-bottom: 1.5em;
    }

    footer {
        height: auto;
    }
}

@media (max-width:825px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1em;
    }

    .menu-toggle {
        display: flex;
    }

    .list {
        opacity: 0;
        position: absolute;
        top: 100%;
        right: 0;
        width: 40vw;
        height: 0;
        flex-direction: column;
        overflow: hidden;
        border-radius: 10px;
        transition: height 0.5s ease, opacity 0.5s ease;
    }

    .list.active {
        opacity: 1;
        height: auto;
        background-color: #30353f;
    }

    .list ul {
        padding: 0.25em 0;
        flex-direction: column;
    }

    .list li {
        padding: 0.5em 0;
        text-align: center;
    }

    .Home-content {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .photo1 {
        order: -1;
    }

    .introduction {
        margin-bottom: 2em;
    }

    .line {
        height: 100%;
    }

    .social-links {
        justify-content: center;
    }

    .about-content {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }

    .about-content .about-text {
        text-align: center;
    }

    .about-technical {
        display: flex;
        flex-direction: column;

    }

    .left {
        width: 100%;
    }

    .form {
        width: 100% !important;
    }

    .form form {
        width: 100% !important;
    }

}