/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    list-style: none;
    scroll-behavior: smooth;
}

:root {
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --text-color: #fff;
    --main-color: #0ef;
    --hero-bg: url('../img/Background-dark.png');
}

html {
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

section {

    padding: 10rem 9% 2rem;

}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem 10%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header.sticky {
    border-bottom: .1rem solid rgba(0, 0, 0, .2);
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
}

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

.theme-toggle {
    font-size: 1.6rem;
    color: var(--text-color);
    cursor: pointer;
    margin-left: 2rem;
    transition: 0.3s ease;
}

.theme-toggle:hover {
    color: var(--main-color);
}


.navbar-list {
    display: flex;
    gap: 2rem;
}

.navbar-link {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;

}

.navbar-link::after {
    content: '';
    width: 0%;
    height: 2px;
    background: var(--main-color);
    position: absolute;
    bottom: 0px;
    left: 0;
    transition: width 0.5s ease;
}

.navbar-link.active {
    color: var(--main-color);
}

.navbar-link:hover::after {
    width: 100%;
}

#menu-icon {
    display: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Home */
.home {
    min-height: 100vh;
    padding-top: 10rem;

    display: flex;
    justify-content: center;
    align-items: center;


}

.home-img img {
    width: 33vw;
    filter:
        drop-shadow(0 15px 30px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 40px rgba(0, 238, 255, 0.3));
}

.home-content {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem 4rem;
    border-radius: 2rem;

    border: 1px solid rgba(255, 255, 255, 0.15);

    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);

}


.home-content h3 {
    font-size: 2.2rem;
    font-weight: 700;

}

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

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

.home-content h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p {
    font-size: 1.1rem;
}

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

.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: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1rem;
    color: var(--second-bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn:hover {
    box-shadow: none;
    transform: translateY(-2px);
}

/* About */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: var(--second-bg-color);
}

.about-img img {
    width: 30vw;
    filter:
        drop-shadow(0 15px 30px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 40px rgba(0, 238, 255, 0.3));
}

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

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content p {
    margin: 2rem 0 3rem;
    font-size: 1.1rem;
    line-height: 1.5;
}

.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.about-skills i {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.about-skills i:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

/* Projects */
.projects {
    background: var(--bg-color);
}

.projects h2 {
    margin-bottom: 4rem;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2.5rem;
}

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

.projects-box img {
    width: 100%;
    object-fit: cover;
    transition: .5s ease;
}

.projects-box:hover img {
    transform: scale(1.1);
}

.projects-box .projects-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, .1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    transition: .5s ease;
}

.projects-box:hover .projects-layer {
    transform: translateY(0);
}

.projects-layer h4 {
    font-size: 2.5rem;
}

.projects-layer p {
    font-size: .9rem;
    margin: .2rem 0 1rem;
}

.projects-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.8rem;
    height: 2.8rem;
    background: var(--text-color);
    border-radius: 50%;
    color: var(--second-bg-color);
    font-size: 1.4rem;
    transition: .3s ease;
}

.projects-layer a:hover {
    background: var(--second-bg-color);
    color: var(--main-color);
}


.projects-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

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

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

.contact-grup {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;

    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.contact-img img {
    width: 100%;
    max-width: 420px;
    display: block;
    margin: 0 auto;
    border-radius: 16px;
}

.form-contact {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(5px);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.campo-form {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-color);
    outline: none;
}

.campo-form:focus {
    border-color: var(--main-color);
}

.grup-form {
    margin-bottom: 1.5rem;
}

.btn-form {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: 8px;
    background: var(--main-color);
    color: var(--second-bg-color);
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .3s ease;
}

.btn-form:hover {
    background: var(--second-bg-color);
    color: var(--main-color);
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: .9rem 9%;
    background: var(--bg-color);
}

.footer-text p {
    font-size: 1rem;

}

.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 {
    color: var(--second-bg-color);
    font-size: 1.2rem;
}

/* Media Queries */

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

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

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

    .projects {
        padding-bottom: 7rem;
    }

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

@media (max-width: 768px) {

    #menu-icon {
        display: block;
        font-size: 3rem;
        cursor: pointer;
    }

    .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;
        opacity: 0.9;
        animation: fadeDown .3s ease;
    }

    @keyframes fadeDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

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

    .navbar-list {
        flex-direction: column;
        gap: 0;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 1.5rem 0;
        text-align: center;
    }

    .home {
        flex-direction: column;
    }

    .home-img img {
        width: 60vw;
    }

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

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

    .about {
        flex-direction: column-reverse;
    }

    .about-img img {
        width: 60vw;
    }

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

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


}

@media (max-width: 617px) {

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

@media (max-width: 450px) {

    html {
        font-size: 50%;
    }
}

@media (max-width: 365px) {

    .home-img img {
        width: 80vw;
    }

    .about-img img {
        width: 80vw;
    }

}