@import url("https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css");
/* import del normalize por cdnjs */

/* ========================================
   VARIABLES Y RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --whatsapp-green: #25d366;
    --linkedin-blue: #0077b5;
    --text-dark: #1e293b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
}

body {
    font-family: "Poppins", sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

/* ========================================
   LOGO FOOTER
   ======================================== */
.site-footer {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
}

.site-logo {
    height: 40px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.site-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* ========================================
   LAYOUT PRINCIPAL - SPLIT SCREEN
   ======================================== */
.split-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ========================================
   PANEL IZQUIERDO - TECH/DARK
   ======================================== */
.panel-left {
    flex: 1;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.4s ease;
}

.panel-left:hover {
    flex: 1.05;
}

/* Fondo con código decorativo */
.code-bg {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: "Courier New", monospace;
    font-size: 12px;
    color: rgba(99, 102, 241, 0.3);
    line-height: 1.6;
    pointer-events: none;
    animation: fadeInCode 2s ease-out;
}

@keyframes fadeInCode {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   PANEL DERECHO - BUSINESS/LIGHT
   ======================================== */
.panel-right {
    flex: 1;
    background: var(--light-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.4s ease;
}

.panel-right:hover {
    flex: 1.05;
}

/* Blobs decorativos con gradiente */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
    top: -100px;
    right: -50px;
    animation: floatBlob 8s ease-in-out infinite;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    bottom: -80px;
    right: 50px;
    animation: floatBlob 10s ease-in-out infinite reverse;
}

@keyframes floatBlob {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

/* ========================================
   CONTENIDO DE PANELES
   ======================================== */
.panel-content {
    text-align: center;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
    transition: transform 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Iconos de panel */
.panel-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel-left .panel-icon {
    border: 2px solid var(--accent-blue);
    background: transparent;
}

.panel-right .panel-icon {
    border: 2px solid var(--accent-indigo);
    background: transparent;
}

.panel-left:hover .panel-icon,
.panel-right:hover .panel-icon {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.panel-icon svg {
    width: 36px;
    height: 36px;
}

.panel-left .panel-icon svg {
    stroke: var(--accent-blue);
}

.panel-right .panel-icon svg {
    stroke: var(--accent-indigo);
}

/* Títulos y descripciones */
.panel-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.panel-left .panel-title {
    color: var(--text-white);
}

.panel-right .panel-title {
    color: var(--text-dark);
}

.panel-description {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 280px;
}

.panel-left .panel-description {
    color: var(--text-light);
}

.panel-right .panel-description {
    color: #64748b;
}

/* ========================================
   AVATAR CENTRAL
   ======================================== */
.avatar-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulseAvatar 3s ease-in-out infinite;
}

@keyframes pulseAvatar {
    0%,
    100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 10px 50px rgba(99, 102, 241, 0.4);
    }
}

.avatar-wrapper:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.5);
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(180deg, #fef9e7 0%, #fef3c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: lowercase;
}

.avatar-link {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #1e293b;
    background: white;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.avatar-link::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 6px solid white;
}

.avatar-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ========================================
   MODAL DE CONTACTO
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal {
    background: white;
    border-radius: 24px;
    padding: 3rem 2.5rem 0;
    max-width: 420px;
    width: 90%;
    text-align: center;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    border-top: 4px solid var(--accent-indigo);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    background: linear-gradient(180deg, #fef9e7 0%, #fef3c7 100%);
    border: 4px solid var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
    overflow: hidden;
}

.modal-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-avatar span {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.modal-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ========================================
   BOTONES DE CONTACTO
   ======================================== */
.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    border: none;
}

.contact-btn:hover {
    transform: translateY(-2px);
}

.contact-btn svg {
    width: 24px;
    height: 24px;
}

/* WhatsApp */
.btn-whatsapp {
    background: var(--whatsapp-green);
    color: white;
}

.btn-whatsapp:hover {
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Llamar */
.btn-call {
    background: #f1f5f9;
    color: var(--text-dark);
    border: 1px solid #e2e8f0;
}

.btn-call:hover {
    background: #e2e8f0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.btn-call svg {
    stroke: var(--accent-indigo);
}

/* Fila inferior de botones */
.contact-row {
    display: flex;
    gap: 0.875rem;
}

.contact-row .contact-btn {
    flex: 1;
}

/* Email */
.btn-email {
    background: #f1f5f9;
    color: var(--text-dark);
    border: 1px solid #e2e8f0;
}

.btn-email:hover {
    background: #e2e8f0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.btn-email svg {
    fill: #ef4444;
}

/* LinkedIn */
.btn-linkedin {
    background: var(--linkedin-blue);
    color: white;
}

.btn-linkedin:hover {
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.4);
}

/* ========================================
   FOOTER DEL MODAL
   ======================================== */
.modal-footer {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f8fafc;
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    border-radius: 0 0 24px 24px;
}

.modal-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1rem;
    font-family: "Poppins", sans-serif;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-dark);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .site-footer {
        bottom: 1rem;
        right: 1rem;
    }
    
    .site-logo {
        display: none;
    }

    .split-container {
        flex-direction: column;
    }

    .panel-left,
    .panel-right {
        min-height: 50vh;
        padding: 1rem;
    }

    .panel-left {
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .panel-right {
        justify-content: flex-end;
        padding-bottom: 2rem;
    }

    .avatar-container {
        position: fixed;
    }

    .code-bg {
        font-size: 10px;
        left: 10px;
        top: 10px;
    }

    .panel-title {
        font-size: 1.5rem;
    }

    .panel-description {
        font-size: 0.9rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .modal {
        padding: 1.5rem 1rem 0;
        width: 95%;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .modal-footer {
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .contact-btn {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .contact-row {
        flex-direction: column;
    }
}
