/* Publications Section */
.publications-section {
    padding: 6rem 2rem;
    background: var(--background-color);
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.publication-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.publication-card:hover {
    transform: translateY(-10px);
}

.publication-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.publication-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.publication-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: var(--text-color);
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.publication-link:hover {
    background: var(--secondary-color);
}
/* Ajustes Responsive */
@media (max-width: 768px) {
    /* Ajuste del texto principal */
    .glitch {
        font-size: 2rem; /* Reducido de 4rem */
    }

    .typing-text {
        font-size: 1rem; /* Reducido de 1.5rem */
    }

    /* Ajuste de la navegación */
    .nav-container {
        padding: 0.5rem;
    }

    nav ul {
        gap: 1rem;
    }

    /* Ajuste de secciones */
    .section-title {
        font-size: 1.8rem; /* Reducido de 2.5rem */
    }

    /* Ajuste de cards */
    .experience-card, 
    .achievement-card {
        padding: 1rem;
    }

    /* Ajuste de contenido de contacto */
    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-item {
        font-size: 0.9rem;
    }

    /* Ajuste de footer */
    .footer-quote {
        font-size: 1.2rem;
    }

    /* Ajuste del botón de WhatsApp */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 25px;
        right: 20px;
        bottom: 20px;
    }
}



/* Añade esto al principio del CSS */
@viewport {
    width: device-width;
    initial-scale: 1;
}
/* Robot Animation Styles - Enhanced Version */
.robot {
    position: fixed;
    bottom: 100px;
    right: -150px;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: bottom center;
}

.robot.visible {
    right: 30px;
    animation: hoverEffect 3s ease-in-out infinite;
}

.robot-body {
    width: 70px;
    height: 110px;
    position: relative;
    transition: transform 0.3s ease;
}

.robot-head {
    width: 45px;
    height: 45px;
    background: linear-gradient(145deg, var(--secondary-color), var(--primary-color));
    border-radius: 12px;
    position: relative;
    left: 12.5px;
    transform-origin: center bottom;
    animation: headMovement 4s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.robot-eye {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 15px;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.2);
}

.robot-eye::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    animation: eyeGlow 2s ease-in-out infinite;
}

.robot-eye.left {
    left: 8px;
    animation: blinkLeft 3s infinite;
}

.robot-eye.right {
    right: 8px;
    animation: blinkRight 3.5s infinite;
}

.robot-antenna {
    width: 4px;
    height: 15px;
    background: var(--accent-color);
    position: absolute;
    top: -12px;
    left: 20px;
    border-radius: 2px;
    transform-origin: bottom center;
    animation: antennaWiggle 3s ease-in-out infinite;
}

.robot-antenna::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    top: -4px;
    left: -2px;
    animation: antennaPulse 2s ease-in-out infinite;
}

.robot-torso {
    width: 55px;
    height: 35px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    position: relative;
    left: 7.5px;
    top: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.robot-arm {
    width: 10px;
    height: 30px;
    background: var(--secondary-color);
    position: absolute;
    top: 0;
    border-radius: 5px;
    transform-origin: top center;
}

.robot-arm.left {
    left: -8px;
    animation: leftArmWave 4s ease-in-out infinite;
}

.robot-arm.right {
    right: -8px;
    animation: rightArmWave 4s ease-in-out infinite;
}

.robot-base {
    width: 65px;
    height: 20px;
    background: linear-gradient(to right, var(--accent-color), var(--secondary-color));
    border-radius: 0 0 25px 25px;
    position: relative;
    top: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.robot-shadow {
    width: 60px;
    height: 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    position: absolute;
    bottom: -20px;
    left: 5px;
    filter: blur(4px);
    animation: shadowPulse 3s ease-in-out infinite;
}

/* Enhanced Animations */
@keyframes hoverEffect {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes headMovement {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

@keyframes blinkLeft {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

@keyframes blinkRight {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

@keyframes antennaPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

@keyframes antennaWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

@keyframes leftArmWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-25deg); }
    75% { transform: rotate(15deg); }
}

@keyframes rightArmWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(25deg); }
    75% { transform: rotate(-15deg); }
}

@keyframes shadowPulse {
    0%, 100% { transform: scaleX(1); opacity: 0.15; }
    50% { transform: scaleX(1.2); opacity: 0.08; }
}

@keyframes eyeGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(255, 255, 255, 0.8); }
}
.robot-eye::after {
    animation: eyeGlow 2s infinite;
}


/* Ajustes para pantallas pequeñas (tablets y teléfonos) */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .glitch {
        font-size: 2rem; /* Texto del encabezado más pequeño */
    }

    .hero-content {
        text-align: center;
        padding: 1rem;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
    }

    .experience-cards {
        grid-template-columns: 1fr; /* Una columna */
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* Una columna */
    }

    .robot {
        transform: scale(0.7); /* Reducir el tamaño del robot */
        bottom: 50px;
    }

    .robot.visible {
        right: 10px;
    }
}




/* Botón de menú hamburguesa */
.menu-toggle {
    display: none; /* Oculto por defecto */
}

/* Mostrar el botón solo en pantallas pequeñas */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
        cursor: pointer;
        color: var(--text-color);
        z-index: 1000;
    }

    /* Ocultar el menú inicialmente */
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--background-color);
        width: 100%;
        padding: 1rem 0;
        z-index: 999;
    }

    /* Mostrar el menú al activar */
    nav ul.active {
        display: flex;
    }
}











/* Robot Animations */
@keyframes floatAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes headTilt {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes blinkLeft {
    0%, 96%, 100% { transform: scaleY(1); }
    98% { transform: scaleY(0.1); }
}

@keyframes blinkRight {
    0%, 96%, 100% { transform: scaleY(1); }
    98% { transform: scaleY(0.1); }
}

@keyframes antennaGlow {
    0%, 100% { background: var(--accent-color); }
    50% { background: #ff4d8f; box-shadow: 0 0 10px #ff4d8f; }
}

@keyframes leftArmWave {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-15deg); }
}

@keyframes rightArmWave {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(15deg); }
}

@keyframes shadowPulse {
    0%, 100% { transform: scaleX(1); opacity: 0.2; }
    50% { transform: scaleX(1.1); opacity: 0.1; }
}

/* Mostrar el robot cuando se hace scroll */
.robot.visible {
    right: 20px;
}

/* Media Query para dispositivos móviles */
@media (max-width: 768px) {
    .robot {
        transform: scale(0.7);
        bottom: 70px;
    }
    
    .robot.visible {
        right: 10px;
    }
}





/* Rocket Animation */
.rocket-container {
    position: fixed;
    top: 50%;
    left: -100px;
    transform: translateY(-50%);
    z-index: 1000;
    animation: flyAcross 15s linear infinite;
}

.rocket {
    position: relative;
    width: 80px;
    height: 120px;
}

.rocket-body {
    position: relative;
    width: 40px;
    height: 80px;
    left: 20px;
    animation: rocketShake 0.2s ease-in-out infinite;
}

.body {
    background: var(--secondary-color);
    height: 100%;
    border-radius: 50% 50% 20% 20%;
    position: relative;
}

.window {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 25px;
    left: 10px;
    border: 3px solid var(--primary-color);
}

.fin {
    position: absolute;
    height: 30px;
    width: 20px;
    background: var(--accent-color);
}

.fin-left {
    left: -20px;
    bottom: 0;
    transform: skew(30deg, 0);
}

.fin-right {
    right: -20px;
    bottom: 0;
    transform: skew(-30deg, 0);
}

.exhaust-flame {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 40px;
    background: linear-gradient(to bottom, #ff7b00, #ff0000);
    border-radius: 0 0 20px 20px;
    animation: flameFlicker 0.2s ease-in-out infinite;
}

.exhaust-fumes span {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 0);
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.exhaust-fumes span:nth-child(1) {
    animation: fumeAnimation 1s infinite;
}

.exhaust-fumes span:nth-child(2) {
    animation: fumeAnimation 1s infinite 0.4s;
}

.exhaust-fumes span:nth-child(3) {
    animation: fumeAnimation 1s infinite 0.6s;
}

@keyframes flyAcross {
    0% {
        left: -100px;
        transform: translateY(-50%) rotate(0deg);
    }
    20% {
        transform: translateY(-60%) rotate(-5deg);
    }
    40% {
        transform: translateY(-40%) rotate(5deg);
    }
    60% {
        transform: translateY(-60%) rotate(-5deg);
    }
    80% {
        transform: translateY(-40%) rotate(5deg);
    }
    100% {
        left: calc(100% + 100px);
        transform: translateY(-50%) rotate(0deg);
    }
}

@keyframes rocketShake {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px); }
}

@keyframes flameFlicker {
    0%, 100% { height: 40px; opacity: 0.9; }
    50% { height: 35px; opacity: 0.8; }
}

@keyframes fumeAnimation {
    0% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -20px) scale(2);
        opacity: 0;
    }
}

/* Media Query para dispositivos móviles */
@media (max-width: 768px) {
    .rocket-container {
        transform: scale(0.7) translateY(-50%);
    }
}

.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 15px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-to-top:hover {
    background: var(--accent-color);
}


@media (max-width: 768px) {
    .scroll-to-top {
        padding: 8px 12px;
        bottom: 15px;
        right: 15px;
    }
}





#habilidades {
    position: relative; 
    z-index: 1;
    padding: 4rem 2rem; /* Aumenta el espacio interno */
}

#sobre-mi {
    position: relative;
    height: 100vh; /* O ajusta la altura según sea necesario */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center; /* Centra el texto dentro del contenedor */
}

.skills-sphere {
    width: 110%;
    height: 600px;
    position: relative;
    margin: 2rem auto;
    perspective: 1000px;
  
    display: flex; /* Asegurar que los elementos se alineen correctamente */
    justify-content: center; /* Centrar los elementos */
}


.skills-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

.skill-item {
    position: absolute;
    color: #7c3aed;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
    white-space: nowrap;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1); /* Esta línea establece el fondo */
    backdrop-filter: blur(4px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
    100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
}

.skill-item:hover {
    color: #fff;
    background: linear-gradient(45deg, #7c3aed, #9f7aea);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    transform: scale(1.15) translateZ(20px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 4px 12px rgba(124, 58, 237, 0.2),
        0 0 20px rgba(124, 58, 237, 0.4);
}

.skill-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #7c3aed, #9f7aea);
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-item:hover::before {
    opacity: 1;
}

.skill-item[data-level="experto"] { border-color: #10B981; }
.skill-item[data-level="intermedio"] { border-color: #3B82F6; }
.skill-item[data-level="principiante"] { border-color: #6366F1; }

.controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.control-btn {
    padding: 8px 16px;
    background: linear-gradient(45deg, #7c3aed, #9f7aea);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.skill-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.animated-title {
    background: var(--primary-color);
    text-align: center;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, transform 0.3s ease;
    
    /* Animación de aparición */
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeIn 0.8s ease-out forwards;
}

/* Cambio de color y efecto de elevación al pasar el mouse */
.animated-title:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* Definición de la animación */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* carusel */
