/* ==========================================================================
   Variables de Entorno y Configuración Base
   ========================================================================== */
:root {
    --primary-color: #a855f7; /* Violeta principal */
    --primary-light: #e2cbf6; /* Tono lavanda suave solicitado */
    --primary-dark: #7c3aed;  /* Violeta profundo para contrastes */
    --text-dark: #1f2937;     /* Gris casi negro para textos legibles */
    --text-muted: #4b5563;    /* Gris medio */
    --bg-white: #ffffff;      /* Fondo base claro */
    --bg-light: #fafafa;      /* Variación de fondo claro */
    --font-sans: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

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

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

.subtitle {
    display: block;
    color: var(--primary-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 24px;
}

p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Componentes Botones
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.btn-secondary:hover {
    background-color: var(--text-dark);
    color: var(--bg-white);
    transform: translateY(-2px);
}

/* ==========================================================================
   Header y Navegación
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0,0,0,0.02);
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 110px;
    width: auto;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-dark);
}

.btn-nav {
    background-color: var(--primary-light);
    padding: 10px 20px;
    border-radius: 6px;
    color: var(--primary-dark);
    font-weight: 600;
}

.btn-nav:hover {
    background-color: var(--primary-dark);
    color: var(--bg-white);
}

/* ==========================================================================
   Hero Section (Con Degradados Violetas Lípidos)
   ========================================================================== */
.hero {
    padding: 180px 0 120px 0;
    background: radial-gradient(circle at 90% 10%, var(--primary-light) 0%, rgba(255,255,255,0) 45%),
                linear-gradient(135deg, #ffffff 0%, #fefeff 100%);
    text-align: center;
}

.hero-container {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--text-dark);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ==========================================================================
   Sección Sobre Mí
   ========================================================================== */
.sobre-mi {
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
}

/* ==========================================================================
   Sección Servicios (Tarjetas Estilizadas)
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.grid-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.card {
    background-color: var(--bg-white);
    padding: 40px 32px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(168, 85, 247, 0.08);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.06);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.card p {
    font-size: 1rem;
}

/* ==========================================================================
   Sección Proyectos
   ========================================================================== */
.grid-projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.project-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0,0,0,0.03);
}

.project-img-wrapper {
    width: 100%;
    aspect-ratio: 3 / 2;
    background-color: #f3f4f6;
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.03);
}

.project-info {
    padding: 32px;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

/* ==========================================================================
   Sección Próximamente
   ========================================================================== */
.proximamente {
    text-align: center;
}

.upcoming-list {
    list-style: none;
    display: inline-flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
    text-align: left;
}

.upcoming-list li {
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.upcoming-list i {
    color: var(--primary-color);
}

/* ==========================================================================
   Sección Contacto y Redes
   ========================================================================== */
.cta-box {
    margin: 40px 0;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.social-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-icon:hover {
    color: var(--bg-white);
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 40px 0;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Botón Flotante de WhatsApp (Obligatorio)
   ========================================================================== */
.whatsapp-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #25d366;
    color: var(--bg-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    z-index: 999;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-floating:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
}

/* ==========================================================================
   Efectos de Animación (Scroll / Entrada)
   ========================================================================== */
.animate-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* ==========================================================================
   Media Queries (Responsividad Completa)
   ========================================================================== */
@media (max-width: 992px) {
    .grid-services {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-projects {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.85rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-padding {
        padding: 70px 0;
    }

    /* Menú móvil tipo Hamburguesa */
    .nav-toggle {
        display: block;
        z-index: 1001;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-white);
        box-shadow: -4px 0 20px rgba(0,0,0,0.05);
        padding: 100px 32px;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
    }

    .nav.open {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        width: 100%;
    }

    .btn-nav {
        display: block;
        text-align: center;
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .grid-services {
        grid-template-columns: 1fr;
    }

    .whatsapp-floating {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
        font-size: 1.7rem;
    }
}