/* RESET Y CONFIGURACION BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden;
    cursor: none;
    height: 100vh;
}

/* CURSOR PERSONALIZADO */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 26px;
    background: #000000;
    border: 1px solid #ffffff;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    transition: transform 0.15s ease;
    will-change: transform;
}

.cursor::before {
    content: '</>';
}

.cursor.hover {
    transform: scale(1.2);
    background: #333333;
    border-color: #4a90e2;
}

/* NEURAL NETWORK */
.neural-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.neural-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #4a90e2;
    border-radius: 50%;
    box-shadow: 0 0 10px #4a90e2;
    animation: pulse 2s ease-in-out infinite;
}

.neural-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4a90e2, transparent);
    transform-origin: left;
    animation: connectionPulse 3s ease-in-out infinite;
}

.floating-code {
    position: absolute;
    color: #4a90e2;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 5px #4a90e2;
    opacity: 0.7;
    animation: floatCode 8s linear infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 10px #4a90e2;
    }
    50% { 
        transform: scale(1.5);
        box-shadow: 0 0 20px #4a90e2;
    }
}

@keyframes connectionPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes floatCode {
    0% {
        transform: translateX(-100px) translateY(0px);
        opacity: 0;
    }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(-50px);
        opacity: 0;
    }
}

/* CONTENEDOR PRINCIPAL */
.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.container::-webkit-scrollbar {
    display: none;
}

/* HEADER */
.header {
    text-align: center;
    padding: 40px 0;
    position: relative;
}

/* LANGUAGE TOGGLE */
.language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid #4a90e2;
    border-radius: 25px;
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a90e2;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-toggle:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #4a90e2;
    margin: 0 auto 20px;
    display: block;
    object-fit: cover;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.3);
}

.profile-photo:hover {
    transform: scale(1.1);
    border-color: #5ba0f2;
    box-shadow: 0 0 50px rgba(74, 144, 226, 0.5);
}

.name {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ffffff, #4a90e2, #7db3f0);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 4s ease infinite;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes textGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.title {
    font-size: 1.5rem;
    color: #4a90e2;
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
    font-family: 'Courier New', monospace;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* GRID PRINCIPAL */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 20px;
}

/* COLUMNA IZQUIERDA */
.left-column {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    height: fit-content;
    align-self: start;
}

.left-column:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.2);
}

/* COLUMNA DERECHA */
.right-column {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.right-column:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.15);
}

/* SECCIONES */
.section {
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

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

.section:nth-child(1) { animation-delay: 0.2s; }
.section:nth-child(2) { animation-delay: 0.4s; }
.section:nth-child(3) { animation-delay: 0.6s; }
.section:nth-child(4) { animation-delay: 0.8s; }

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: #4a90e2;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #4a90e2, #7db3f0);
    transition: width 0.3s ease;
}

.section-title:hover::before {
    width: 100%;
}

.section-title:hover {
    transform: translateX(10px);
    color: #5ba0f2;
}

/* INFORMACIÓN PERSONAL */
.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.info-item:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateX(10px);
}

.info-item i {
    color: #4a90e2;
    width: 20px;
    margin-right: 15px;
    font-size: 1.1rem;
}

/* TECNOLOGÍAS */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.tech-item {
    background: linear-gradient(45deg, rgba(74, 144, 226, 0.1), rgba(125, 179, 240, 0.1));
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: none;
    font-family: 'Courier New', monospace;
}

.tech-item:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, rgba(74, 144, 226, 0.2), rgba(125, 179, 240, 0.2));
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

.tech-item i {
    font-size: 2rem;
    color: #4a90e2;
    margin-bottom: 10px;
    display: block;
    transition: all 0.3s ease;
}

.tech-item:hover i {
    color: #5ba0f2;
    transform: scale(1.2);
}

/* EXPERIENCIA */
.experience-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid #4a90e2;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.experience-item:hover::before {
    left: 100%;
}

.experience-item:hover {
    transform: translateX(10px);
    border-left-color: #5ba0f2;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.2);
}

.company {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    color: #4a90e2;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.experience-item:hover .company {
    color: #5ba0f2;
}

.position {
    font-size: 1.1rem;
    color: #b8b8b8;
    margin-bottom: 15px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.description {
    line-height: 1.6;
    color: #cccccc;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

.project-link {
    display: inline-block;
    background: linear-gradient(45deg, #4a90e2, #357abd);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-right: 10px;
    font-family: 'Courier New', monospace;
}

.project-link:hover {
    background: linear-gradient(45deg, #5ba0f2, #4a90e2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

/* EFECTOS HOVER GLOBALES */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .title {
        font-size: 1.2rem;
        white-space: normal !important;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .typewriter {
        white-space: normal !important;
        width: 100% !important;
        max-width: 100% !important;
        animation: none !important;
        border-right: none !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        text-align: center;
    }
    
    .container {
        padding: 10px;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .header {
        padding: 20px 0;
    }
    
    .education-info {
        font-size: 0.9rem;
        margin-top: 10px;
    }
    
    body {
        cursor: auto !important;
    }
    
    .cursor {
        display: none !important;
    }
}

/* ANIMACIONES ADICIONALES */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid #4a90e2;
    white-space: nowrap;
    animation: typewriter 3s steps(30, end), blink-caret 0.75s step-end 6 3s, remove-caret 0s 7.5s forwards;
    width: fit-content;
    margin: 0 auto;
    text-align: center;
    max-width: 100%;
}

@keyframes typewriter {
    from { 
        width: 0;
    }
    to { 
        width: 32ch;
    }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #4a90e2; }
}

@keyframes remove-caret {
    to { border-right: none; }
}

.education-info {
    font-size: 1rem;
    color: #b8b8b8;
    margin-top: 15px;
    text-align: center;
    line-height: 1.4;
    font-family: 'Courier New', monospace;
}

.education-info small {
    color: #888888;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}