@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --main-color: #00eeff;
    --text-color: #ffffff;
    --bg-color-01: #1f242d;
    --bg-color-02: #323946;
    --color-00: #0000001a;
    --color-01: #999999;
    --color-02: #009539;
    --color-03: #7950f2;
    --color-04: #c00000;
    --color-05: #232323;
}

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

html {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color-01);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Base Sections */
section {
    padding: 6rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Typography Enhancements */
h1 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    line-height: 1.6;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: justify;
}

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

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 1.5rem;
    background-color: rgba(31, 36, 45, 0.95);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
    transition: all 0.3s ease;
}

.logo-highlight {
    color: var(--main-color);
    font-weight: 800;
}

.logo:hover {
    color: var(--main-color);
    transform: scale(1.05);
}

.nav {
    display: none; /* Hidden on mobile */
}

/* Hamburger Menu */
.menu-hamburguer {
    display: block;
    cursor: pointer;
    z-index: 1001;
}

.bar1, .bar2, .bar3 {
    width: 2rem;
    height: 0.25rem;
    background-color: var(--text-color);
    margin: 0.4rem 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.change .bar1 {
    transform: translate(0, 0.65rem) rotate(-45deg);
}
.change .bar2 {
    opacity: 0;
}
.change .bar3 {
    transform: translate(0, -0.65rem) rotate(45deg);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(31, 36, 45, 0.9);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-responsive {
    position: fixed;
    top: 0;
    left: -100%;
    width: 250px;
    height: 100vh;
    background: var(--bg-color-02);
    display: flex;
    flex-direction: column;
    padding-top: 5rem;
    gap: 1.5rem;
    z-index: 999;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
}

.nav-responsive.open {
    left: 0;
}

.nav-responsive a {
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-responsive a:hover {
    color: var(--main-color);
    background: rgba(0, 238, 255, 0.1);
    border-left-color: var(--main-color);
    padding-left: 2.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--main-color);
    border-radius: 12px;
    color: var(--bg-color-01);
    font-weight: 600;
    letter-spacing: 0.05rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    border: 2px solid var(--main-color);
}

.btn:hover {
    background-color: transparent;
    color: var(--main-color);
    box-shadow: 0 0 15px var(--main-color);
    transform: translateY(-3px);
}

/* Social Media (Home) */
.social-media {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

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

.social-media a:hover {
    background-color: var(--main-color);
    color: var(--bg-color-01);
    box-shadow: 0 0 10px var(--main-color);
    transform: translateY(-3px);
}

/* Home & About Common Layout */
.home, .about {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    align-items: center;
    text-align: center;
}

.home-content, .about-content {
    width: 100%;
}

.home-img, .about-img {
    width: 100%;
    max-width: 270px;
    margin: 0 auto;
    margin-bottom: 2rem;
    position: relative;
}

.home-img img, .about-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 238, 255, 0.3);
    transition: all 0.3s ease;
}

.home:hover .home-img img, .about:hover .about-img img {
    box-shadow: 0 15px 50px rgba(0, 238, 255, 0.6);
    transform: scale(1.05) translateY(-5px);
}

.about:hover .about-content h1 {
    color: var(--main-color);
    transform: translateX(15px);
}

.about {
    background-color: var(--bg-color-02);
}

.service {
    background-color: var(--bg-color-02);
}

/* Services */
.services-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--bg-color-01);
    border-radius: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    padding: 1rem;
}

.services-box {
    background-color: transparent;
    padding: 2.5rem 1rem;
    text-align: center;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.services-box:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.services-box i {
    font-size: 4rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.services-box:hover i {
    transform: scale(1.1);
}

.escritorio img {
    width: 100%;
    height: auto;
    max-width: 180px;
    border-radius: 1.2rem;
    object-fit: cover;
}

/* Portfolio */
.portfolio {
    background-color: var(--bg-color-01);
}

.portfolio-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    width: 100%;
    justify-items: center;
}

.portfolio-box {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 320px;
    border-radius: 12px;
    background-color: #1e2430;
    padding: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
}

.portfolio-box img { 
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.5s ease;
}

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

.portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 238, 255, 0.95), rgba(0, 238, 255, 0.3));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.portfolio-box:hover .portfolio-layer {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 1.4rem;
    color: var(--bg-color-01);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.7);
}

.portfolio-layer p {
    color: var(--bg-color-01);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 500;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--bg-color-01);
    border-radius: 50%;
    color: var(--main-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.portfolio-layer a:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--bg-color-01);
}

/* Contact Section */
.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.social-media-a {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.social-media-a a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border: 3px solid var(--main-color);
    border-radius: 50%;
    font-size: 1.8rem;
    color: var(--main-color);
    background-color: transparent;
    transition: all 0.3s ease;
}

.social-media-a a:hover {
    background-color: var(--main-color);
    color: var(--bg-color-01);
    box-shadow: 0 0 20px var(--main-color);
    transform: translateY(-5px);
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    padding: 3rem 1.5rem;
    background-color: var(--bg-color-02);
    font-size: 1rem;
    color: var(--color-01);
}

footer p {
    text-align: center;
    margin: 0;
}

/* Scroll Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1) !important;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Media Queries (Mobile-First Upgrades) --- */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    header {
        flex-direction: column;
        justify-content: center;
        gap: 15px;
    }
    .logo {
        font-size: 2.2rem;
    }
    /* .social-media stays centered as per mobile default */
    .contact h2 {
        font-size: 2.5rem;
    }
    section {
        padding: 8rem 5rem 4rem;
    }

    .menu-hamburguer {
        display: none;
    }

    .nav {
        display: flex;
        gap: 2rem;
    }

    .nav a {
        font-size: 1.1rem;
        color: var(--text-color);
        transition: all 0.3s ease;
        position: relative;
    }

    .nav a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -5px;
        left: 0;
        background-color: var(--main-color);
        transition: all 0.3s ease;
    }

    .nav a:hover {
        color: var(--main-color);
    }

    .nav a:hover::after {
        width: 100%;
    }

    .home {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .about {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }
    
    .home-content {
        width: 100%;
        max-width: 800px;
        margin-top: 3rem;
    }

    .about-content {
        width: 55%;
    }



    .home-img {
        width: 100%;
        max-width: 450px;
        margin-bottom: 3rem;
    }

    .about-img {
        width: 40%;
        max-width: 350px;
    }

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

    .services-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        background-color: transparent;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        gap: 2rem;
    }

    .services-box {
        background-color: var(--bg-color-01);
        padding: 2.5rem 1.5rem;
        border-radius: 1.2rem;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }

    .services-box:not(:last-child) {
        border-bottom: 2px solid transparent;
    }

    .services-box:hover {
        border-color: var(--main-color);
        transform: translateY(-10px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    .escritorio img {
        max-width: 100%;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    section {
        padding: 8rem 8rem 5rem;
    }

    h1 {
        font-size: 3.5rem;
    }

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

    .services-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .home-img, .about-img {
        max-width: 450px;
    }
}