:root {
    --deep-ocean: #001a33;
    --electric-blue: #00d4ff;
    --white: #ffffff;
    --glass: rgba(0, 50, 100, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y Base */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    text-decoration: none !important; 
}

body {
    background-color: var(--deep-ocean);
    color: var(--white);
    font-family: 'Exo 2', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- ESTRUCTURA DE CAPAS --- */

/* CAPA 1: Fondo Dinámico */
#layer-1-bg {
    position: fixed; 
    inset: 0; 
    z-index: 1;
    background: linear-gradient(135deg, #001220 0%, #002d5c 50%, #001220 100%);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* CAPA 2: Elementos Fijos (Navegación / Selector de Idioma) */
#layer-2-fixed {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none; /* Permite interactuar con la capa 3 de abajo */
}

.nav-ui { 
    position: absolute; 
    top: 25px; 
    right: 25px; 
    pointer-events: auto; /* Reactiva interacción solo para el menú */
}

.lang-selector-custom {
    background: var(--glass);
    border: 1px solid var(--electric-blue);
    padding: 10px 15px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    background: #001a33;
    border: 1px solid var(--electric-blue);
    border-radius: 15px;
    list-style: none;
    width: 170px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.lang-dropdown.active { display: block !important; }
.lang-dropdown li { padding: 12px 15px; cursor: pointer; transition: var(--transition); }
.lang-dropdown li:hover { background: var(--electric-blue); color: #001a33; }

/* CAPA 3: Contenedor Scroleable Principal */
#layer-3-scroll {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: center;
}

.master-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

/*espacio cabecera*/
.main-engine { 
    width: 90%; 
    max-width: 850px; 
    padding: 10px 0; 
}

/* --- ESTILOS DE COMPONENTES --- */
.glass-fx {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Bloque Hero */
.hero-block { text-align: center; }

.turbine-wrap {
    position: relative;
    width: 180px; 
    height: 180px;
    margin: 0 auto 25px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar { 
    width: 140px; 
    height: 140px; 
    border-radius: 50%; 
    border: 4px solid var(--white); 
    object-fit: cover;
    z-index: 10;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.turbine-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 4px;
    background: conic-gradient(from 180deg, var(--electric-blue) 0%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateShield 4s linear infinite;
    opacity: 0.9;
}

.turbine-wrap::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    padding: 2px;
    background: conic-gradient(from 0deg, var(--white) 0%, transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateShield 2s linear infinite reverse;
    opacity: 0.6;
}

@keyframes rotateShield {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/*biografia*/
.glitch-name { font-family: 'Orbitron'; font-size: 2.5rem; letter-spacing: 2px; }
.slogan-vibe { color: var(--electric-blue); margin-top: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 1.3rem; }
.bio-box { margin-top: 20px; font-size: 1.1rem; opacity: 0.9; text-align: justify;margin: 20px auto 0;}

/* Slider Engine */
.slider-container { display: flex; align-items: center; gap: 20px; }
.slider-viewport { overflow: hidden; width: 100%; }
.slider-track { display: flex; transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); }
.slide { min-width: 100%; text-align: center; padding: 20px; }
.slide i { font-size: 4rem; color: var(--electric-blue); margin-bottom: 20px; text-shadow: 0 0 15px var(--electric-blue); }
.nav-btn { background: none; border: none; color: var(--electric-blue); font-size: 2.5rem; cursor: pointer; transition: 0.3s; }
.nav-btn:hover { transform: scale(1.2); }

/* Formulario */
.micro-form { display: flex; flex-direction: column; gap: 20px; }
.input-row { display: flex; gap: 20px; }
.micro-form input, .micro-form textarea {
    flex: 1;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    color: white;
    font-family: 'Exo 2';
    outline: none;
    transition: 0.3s;
}
.micro-form input:focus, .micro-form textarea:focus { border-color: var(--electric-blue); background: rgba(0,0,0,0.6); }

.submit-btn, .micro-form button {
    background: var(--electric-blue);
    color: var(--deep-ocean);
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 800;
    font-family: 'Orbitron';
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}
.micro-form button:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4); }

/* Footer */
.social-footer { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    text-align: center;
    padding: 40px 0;
    width: 100%;
}

.social-header { 
    font-family: 'Orbitron'; 
    margin-bottom: 25px; 
    font-size: 1.4rem;
    letter-spacing: 1px;
    width: 100%;
}

.social-grid { 
    display: flex; 
    justify-content: center; 
    gap: 35px; 
}

.social-grid a { 
    color: white; 
    font-size: 2rem; 
    transition: var(--transition);
}

.social-grid a:hover { 
    color: var(--electric-blue); 
    transform: translateY(-5px) scale(1.1); 
}

/* --- Título de Sección --- */
.section-label {
    text-align: center;
    font-family: 'Orbitron';
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    width: 100%;
}

/* --- Contenedor del Slider --- */
.slider-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 15px;
}

/* Corrección específica para el slider de habilidades */
.skills-engine .slider-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 40px !important;
}

.skills-engine .section-label {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 25px !important;
    display: block !important;
}

.skills-engine .slider-content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 15px !important;
}

.footer-signature {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    opacity: 0.6;
    font-size: 0.9rem;
    text-align: center;
}

/* --- NUEVA ESTRUCTURA HERO (OPERATIVA) --- */
.hero-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 40px;
}

.identity-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.glass-fx.bio-block {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 35px;
}

.identity-header .turbine-wrap,
.identity-header .glitch-name,
.identity-header .slogan-vibe {
    margin-bottom: 20x;
    position: relative;
}

.bio-block .section-label {
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 25px;
    display: block;
    width: 100%;
}

.bio-content {
    text-align: justify;
    line-height: 1.8;
}

.bio-block {
    padding-top: 10px !important;
}

.bio-block .section-label {
    margin-top: 0px !important;
    margin-bottom: 20px !important;
}

.identity-box {
    position: relative;
    padding: 20px 40px;
    margin: 20px auto;
    border-radius: 20px;
    background: rgba(0, 50, 100, 0.2);
    backdrop-filter: blur(5px);
    border: 2px solid transparent;
    background-clip: padding-box;
    display: inline-block;
    margin-bottom: 5px;
}

.identity-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(90deg, var(--electric-blue), #00ffcc, var(--electric-blue));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: electricBorder 3s linear infinite;
}

@keyframes electricBorder {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* --- CABECERA HORIZONTAL --- */
.sticky-nav {
    position: relative;
    z-index: 2000;
    width: 100%;
    max-width: 850px;
    margin: 1px auto 55px auto;
    background: rgba(0, 26, 51, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    padding: 1px 30px;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.sticky-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px; /* Reducido de 30px a 15px para dar aire a los laterales */
    justify-content: space-evenly; /* Distribuye el espacio de forma más inteligente */
    width: 100%;
}

.sticky-nav a {
    color: var(--white);
    text-decoration: none !important;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem; /* Bajamos un poco el tamaño para ganar espacio */
    text-transform: uppercase;
    transition: var(--transition);
    display: flex;         /* Convierte el enlace en un contenedor flexible */
    align-items: center;   /* Centra verticalmente texto e icono */
    white-space: nowrap;   /* PROHÍBE que el texto o el icono bajen */
    gap: 8px;              /* Espacio fijo entre texto e icono */
}

.sticky-nav a:hover {
    color: var(--electric-blue);
}

.sticky-nav li a i {
    margin-left: 0;        /* Quitamos el margin-left que tenías antes */
    font-size: 0.85rem;
    opacity: 0.8;
    flex-shrink: 0;        /* Impide que el icono se aplaste si hay poco espacio */
}

.hamburger {
    display: none;
    color: var(--electric-blue);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 10px;
    transition: var(--transition);
}

.manifesto-box {
    margin-top: 8px;
    padding: 15px 35px;
    border-left: 3px solid var(--electric-blue);
    background: rgba(0, 212, 255, 0.05);
    max-width: 780px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 35px;
}

.manifesto-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--white);
    font-style: italic;
    letter-spacing: 1px;
    opacity: 0.9;
    text-align: justify;
    text-justify: inter-word;
}

/* Responsividad General y Menú Hamburguesa */
@media (max-width: 768px) { 
    .input-row { flex-direction: column; } 
    .glitch-name { font-size: 1.8rem; }
    .turbine-wrap { width: 150px; height: 150px; }
    .avatar { width: 120px; height: 120px; }
    
    /* Adaptación del Nav para Móviles */
    .sticky-nav {
        justify-content: flex-start; /* Hamburguesa alineada a la izquierda */
        padding: 5px 20px;
        border-radius: 25px;
    }
    
    .hamburger {
        display: block;
    }
    
    .sticky-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 110%;
        left: 0;
        width: 100%;
        background: rgba(0, 26, 51, 0.95);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(0, 212, 255, 0.3);
        border-radius: 20px;
        padding: 20px 0;
        gap: 20px;
        text-align: center;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    }
    
    .sticky-nav ul.active {
        display: flex;
    }
} /* <--- OJO, aquí cierra el @media correctamente, tu versión original tenía una llave extra al final del archivo */

/* Efecto de Máquina de escribir SIN FONDO */
.manifesto-box {
    background: transparent !important; /* Elimina cualquier fondo del contenedor padre */
    border: none !important;            /* Elimina bordes del contenedor */
    box-shadow: none !important;        /* Elimina sombras */
    backdrop-filter: none !important;   /* Elimina el efecto de desenfoque/vidrio */
    padding: 10px 0;                    /* Ajusta el espacio si es necesario */
}

.manifesto-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--white);
    font-style: italic;
    letter-spacing: 1px;
    opacity: 0.9;
    text-align: justify;
    text-justify: inter-word;
    
    /* El cursor y la animación */
    display: inline-block;
    border-right: 2px solid var(--electric-blue);
    white-space: pre-wrap;
    overflow: hidden;
    background: transparent; /* Asegura que el texto no tenga fondo propio */
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--electric-blue) }
}

/* --- WORK IN ACTION SLIDER (ESTILO LOGROS) --- */
.work-engine {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0 50px 0;
    width: 100%;
}

/* FORZAMOS A QUITAR EL CAJÓN DEL GLASS-FX EN ESTA SECCIÓN */
section#work-in-action.glass-fx {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.work-slider-container {
    position: relative;
    width: 100%;
    height: 400px; /* Igual que en Achievements */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px; /* Clave para el 3D */
    overflow: visible; /* Clave para que el efecto no se corte */
    margin-top: 10px;
}

.work-track {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.work-slide {
    position: absolute;
    width: 260px;
    height: auto;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    background: transparent;
    border: none;
}

.work-slide img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--electric-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

/* Estados 3D idénticos a los logros */
.work-slide.active {
    opacity: 1;
    transform: translateZ(100px) scale(1.1);
    z-index: 10;
    pointer-events: auto;
}

.work-slide.active img {
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.4);
}

.work-slide.prev {
    opacity: 0.5;
    transform: translateX(-250px) scale(0.8) rotateY(25deg);
    z-index: 5;
    filter: blur(2px);
}

.work-slide.next {
    opacity: 0.5;
    transform: translateX(250px) scale(0.8) rotateY(-25deg);
    z-index: 5;
    filter: blur(2px);
}

/* Navegación Centrada debajo */
.work-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    margin-top: 25px; /* Separación de las imágenes */
}

.nav-btn {
    background: var(--glass);
    border: 1px solid var(--electric-blue);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 20;
}

.nav-btn:hover {
    background: var(--electric-blue);
    color: var(--deep-ocean);
    box-shadow: 0 0 20px var(--electric-blue);
    transform: scale(1.1);
}

/* Corrección para que se vea bien en móviles */
@media (max-width: 768px) {
    .work-slide { width: 280px; }
    .work-slide.prev { transform: translateX(-120px) scale(0.7); filter: blur(1px); }
    .work-slide.next { transform: translateX(120px) scale(0.7); filter: blur(1px); }
}

/* Punto Verde "Live" */
.live-dot {
    height: 10px;
    width: 10px;
    background-color: #2ecc71; /* Verde neón */
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 0 8px #2ecc71;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}