/* ==========================================
   CONTACTO.CSS — Portafolio CJ_CORE — Cristia Gimenez
   ========================================== */


        :root {
            --primary-cyan: #00f0ff;
            --surface-dark: #0a0b10;
        }
        body {
            background-color: var(--surface-dark);
            font-family: 'Space Grotesk', sans-serif;
            margin: 0;
            overflow: hidden;
        }
        /* Permitir scroll en mobile/tablet */
        @media (max-width: 1024px) {
            body { overflow: auto !important; overflow-x: hidden !important; }
            html { overflow-x: hidden !important; }
        }
        
        /* Tech Nebula Background */
        .tech-nebula-bg {
            position: fixed;
            inset: 0;
            z-index: -1;
            background: 
                radial-gradient(circle at 15% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(0, 79, 84, 0.12) 0%, transparent 50%),
                linear-gradient(160deg, #050608 0%, #0d0e13 100%);
            overflow: hidden;
        }
        
        .data-stream-line {
            position: absolute;
            background: linear-gradient(to bottom, transparent, var(--primary-cyan), transparent);
            width: 1px;
            opacity: 0.15;
            animation: move-stream 10s linear infinite;
        }
        @keyframes move-stream {
            0% { transform: translateY(-100%) rotate(15deg); }
            100% { transform: translateY(200%) rotate(15deg); }
        }

        .data-particle {
            position: absolute;
            width: 2px;
            height: 2px;
            background: var(--primary-cyan);
            border-radius: 50%;
            opacity: 0.2;
            pointer-events: none;
            animation: drift-particle 20s linear infinite;
        }
        @keyframes drift-particle {
            0% { transform: translate(0, 100vh); opacity: 0; }
            10% { opacity: 0.5; }
            90% { opacity: 0.5; }
            100% { transform: translate(100px, -10vh); opacity: 0; }
        }

        #sidebar {
            width: 70px;
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 60;
        }
        #sidebar:hover { width: 240px; }

        .tactical-node-frame {
            position: relative;
            width: 80px;
            height: 80px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(0, 240, 255, 0.2);
            border-radius: 50%;
            transition: all 0.3s ease;
            background: rgba(0, 240, 255, 0.02);
        }
        .tactical-node-frame::after {
            content: '';
            position: absolute;
            inset: -8px;
            border: 2px solid transparent;
            border-top-color: var(--primary-cyan);
            border-radius: 50%;
            animation: spin 3s linear infinite;
            opacity: 0;
        }
        .group\/btn:hover .tactical-node-frame::after { opacity: 0.6; }
        @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

        .waveform-container {
            display: flex;
            align-items: flex-end;
            gap: 2px;
            height: 32px;
        }
        .wave-bar {
            width: 2px;
            background: var(--primary-cyan);
            animation: wave 1.2s ease-in-out infinite;
        }
        @keyframes wave {
            0%, 100% { height: 30%; opacity: 0.4; }
            50% { height: 100%; opacity: 1; }
        }

        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
        @keyframes slide-encrypt {
            0% { left: -33%; }
            100% { left: 100%; }
        }
        
        #main-scroll-container {
            height: 100vh;
            overflow-y: auto;
            scroll-behavior: smooth;
        }

        #encryption-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 200;
            backdrop-filter: blur(24px);
            background: rgba(0, 0, 0, 0.98);
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }
        #encryption-overlay.active { display: flex; }

        #purge-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 210;
            background: #0A0B10;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        #purge-overlay.active { display: flex; }

        .terminal-block {
            clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
        }

        #terminal-overlay {
            display: none;
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 320px;
            height: 224px;
            background: rgba(10, 11, 16, 0.95);
            border: 1px solid var(--primary-cyan);
            z-index: 150;
            font-family: monospace;
            font-size: 10px;
            padding: 10px;
            color: var(--primary-cyan);
            box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
        }
        #terminal-overlay.active { display: flex; flex-direction: column; }

        /* --- Sidebar móvil: se abre con click/touch --- */
        @media (hover: none) {
            #sidebar { width: 50px; }
            #sidebar.open { width: 240px; }
            #sidebar.open .opacity-0 { opacity: 1; }
            #sidebar-overlay {
                display: none;
                position: fixed;
                inset: 0;
                z-index: 49;
                background: rgba(0,0,0,0.5);
            }
            #sidebar-overlay.active { display: block; }
        }

        /* --- Sidebar: click para abrir/cerrar --- */
        #sidebar {
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        #sidebar.locked {
            width: 240px !important;
        }
        #sidebar.locked .opacity-0 {
            opacity: 1 !important;
        }
        #sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 49;
            background: rgba(0,0,0,0.3);
            cursor: pointer;
        }
        #sidebar-overlay.active {
            display: block;
        }
    
/* ==========================================
   RESPONSIVE — Contacto
   Tablet: 768px-1366px | Móvil: <768px
   ========================================== */

/* Tablet/Laptop (hasta 1366px) */


@media (max-width: 768px) {
    #main-scroll-container {
        position: relative !important;
        height: auto !important;
        min-height: calc(100vh - 3.5rem) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-left: 0 !important;
        padding-top: 3.5rem !important;
        margin-top: 0 !important;
    }
    #main-scroll-container main {
        overflow: visible !important;
        height: auto !important;
        padding-left: 60px !important;
    }
}

/* ==========================================
   FIX MÓVIL/TABLET — Contacto (idéntico a Proyectos)
   ========================================== */

/* Tablet/Móvil (≤1024px): sidebar overlay, scroll natural */
@media (max-width: 1024px) {
    #sidebar {
        z-index: 60 !important;
        width: 70px !important;
    }
    #sidebar:hover { width: 70px; }
    #sidebar.locked,
    #sidebar.open {
        width: 240px !important;
    }
    #sidebar.locked .opacity-0,
    #sidebar.open .opacity-0 {
        opacity: 1 !important;
    }

    #main-scroll-container {
        position: relative !important;
        height: auto !important;
        min-height: calc(100vh - 3.5rem) !important;
        overflow: visible !important;
        padding-left: 70px !important;
        padding-top: 3.5rem !important;
        margin-top: 0 !important;
    }
    #main-scroll-container main {
        overflow: visible !important;
        height: auto !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* Móvil (≤768px) */
@media (max-width: 768px) {
    nav .hidden.md\:flex { display: none !important; }

    /* Compactar nodos de contacto */
    #main-scroll-container .tactical-node-frame {
        width: 64px !important;
        height: 64px !important;
    }
    /* Formulario en bloque */
    #main-scroll-container form .md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    /* Header transmisión: stack */
    #main-scroll-container .md\:flex-row { flex-direction: column !important; align-items: flex-start !important; }
    /* Botón a ancho completo */
    #submit-btn {
        width: 100% !important;
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    /* Tamaños de texto */
    #main-scroll-container h2.font-headline-md { font-size: 1.25rem !important; letter-spacing: 0.2em !important; }
    /* Terminal y footer mas compactos */
    #main-scroll-container .terminal-block { padding: 1rem !important; }
}

/* Móvil pequeño (≤480px) */
@media (max-width: 480px) {
    #main-scroll-container { padding-left: 60px !important; }
    #main-scroll-container main { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
    #main-scroll-container .tactical-node-frame {
        width: 56px !important;
        height: 56px !important;
    }
    #main-scroll-container .text-4xl { font-size: 1.75rem !important; }
}
