/* --- VARIABLES Y ESTILOS GENERALES --- */
:root {
    /* Nueva paleta con azules más claros */
    --primary-color: #5DADE2; /* Azul Cielo Vibrante */
    --secondary-color: #85C1E9; /* Azul Cielo Suave */
    --background-color: #17202A; /* Azul Carbón Oscuro */
    --light-background: #212F3D; /* Azul Carbón más claro */
    --text-color: #EAECEE; /* Texto casi blanco */
    --text-dark: #AAB7B8; /* Texto gris claro */
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.4s ease;
}

/* --- RESET Y BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    cursor: none;
}
a, button {
    cursor: none;
    text-decoration: none;
}
.section {
    padding: 100px 10%;
    max-width: 1400px;
    margin: 0 auto;
}
.btn {
    display: inline-block;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-speed);
}
.btn:hover {
    background-color: rgba(93, 173, 226, 0.1);
    transform: translateY(-3px);
}

/* --- CURSOR PERSONALIZADO --- */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
}
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    transition: transform 0.2s ease;
}
.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    transition: transform 0.2s ease-out, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}
.cursor-outline.hovered {
    transform: scale(1.5);
    opacity: 0.5;
}

/* --- BARRA DE PROGRESO --- */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    z-index: 1001;
    transition: width 0.1s linear;
}

/* --- HEADER Y NAVEGACIÓN MEJORADOS --- */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.header {
    background-color: rgba(23, 32, 42, 0.75);
    backdrop-filter: blur(12px);
    padding: 20px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--light-background);
    animation: slideDown 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    transition: var(--transition-speed);
}
.nav-logo:hover {
    color: var(--primary-color);
    transform: scale(1.05);
}
.nav-menu {
    list-style: none;
    display: flex;
    gap: 15px;
    align-items: center;
}
.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 50px;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: var(--text-color);
}
.nav-link.active {
    color: var(--background-color);
    font-weight: 600;
}
.nav-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 50px;
    z-index: -1;
    animation: pill-pop 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
@keyframes pill-pop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- SECCIÓN INICIO --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.hero-content {
    z-index: 1;
}
.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--text-color);
    margin-bottom: 20px;
}
.hero-content p {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 40px;
}
.scroll-down-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}
.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--text-dark);
    border-radius: 60px;
    position: relative;
}
.mouse::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--text-dark);
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    opacity: 1;
    animation: scroll-wheel 2s infinite;
}
@keyframes scroll-wheel {
    to {
        opacity: 0;
        top: 25px;
    }
}

/* --- SECCIÓN PROYECTOS --- */
.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 60px;
    color: var(--text-color);
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.project-card {
    background-color: var(--light-background);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    transition: var(--transition-speed);
}
.project-card:hover {
    transform: translateY(-10px);
}
.project-image {
    position: relative;
    overflow: hidden;
}
.project-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.project-card:hover .project-image img {
    transform: scale(1.1);
}
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(93, 173, 226, 0.3);
    opacity: 0;
    transition: var(--transition-speed);
}
.project-card:hover .project-overlay {
    opacity: 1;
}
.project-info {
    padding: 25px;
}
.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--text-color);
}
.project-info span {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* --- SECCIÓN CONTACTO --- */
.contact-subtitle { text-align: center; color: var(--text-dark); margin-top: -40px; margin-bottom: 40px; font-size: 1.1rem; }
.contact-form { width: 100%; max-width: 700px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 15px;
    background-color: var(--light-background);
    border: 1px solid #2C3E50; /* Borde actualizado */
    border-radius: 5px;
    color: var(--text-color);
    font-family: var(--font-family);
    transition: var(--transition-speed);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-color); }
.social-links { text-align: center; margin-top: 50px; }
.social-links a { color: var(--text-dark); font-size: 1.5rem; margin: 0 15px; display: inline-block; transition: var(--transition-speed); }
.social-links a:hover { color: var(--primary-color); transform: translateY(-5px); }

/* --- FOOTER --- */
.footer { text-align: center; padding: 25px; font-family: monospace; color: var(--text-dark); font-size: 0.9rem; }

/* --- ANIMACIONES DE REVELADO --- */
.reveal-up, .reveal-left, .reveal-right, .reveal-zoom {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal-up { transform: translateY(50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal-zoom { transform: scale(0.9); }
.reveal-up.visible, .reveal-left.visible, .reveal-right.visible, .reveal-zoom.visible {
    opacity: 1;
    transform: none;
}
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* --- RESPONSIVE DESIGN (con menú hamburguesa) --- */
.hamburger { display: none; cursor: pointer; z-index: 100; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: var(--text-color); }
@media (max-width: 768px) {
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .nav-menu {
        position: fixed; left: 100%; top: 0;
        flex-direction: column; justify-content: center;
        background-color: var(--background-color);
        width: 100%; height: 100vh;
        text-align: center; transition: 0.5s cubic-bezier(0.5, 0, 0, 1);
        gap: 0;
    }
    .nav-menu.active { left: 0; }
    .nav-item { padding: 25px 0; width: 100%; }
    .nav-link { font-size: 1.5rem; }
    .nav-link.active::before { background-color: transparent; } /* Quitamos píldora en móvil */
    .nav-link.active { color: var(--primary-color); } /* Mantenemos color activo en móvil */
    .section { padding: 80px 5%; }
    body { cursor: auto; }
    .cursor-dot, .cursor-outline { display: none; }
}

/* --- ESTILOS ADICIONALES PARA LA NUEVA SECCIÓN DE INICIO --- */

/* Reajuste de la sección hero para el nuevo contenido */
.hero-about {
    min-height: 100vh;
    display: flex;
    align-items: center; /* Centrado vertical */
    position: relative;
    overflow: hidden;
    padding-top: 100px; /* Espacio para la cabecera */
    padding-bottom: 50px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Columna izquierda más pequeña */
    align-items: flex-start;
    gap: 50px;
    width: 100%;
    z-index: 1;
}

.about-left h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--text-color);
    margin-bottom: 20px;
}

.about-left .subtitle {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.about-left .current-status {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    line-height: 1.7;
}

.about-left .passion {
    font-style: italic;
    color: var(--text-dark);
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
}

.about-right .skills-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 25px;
}

.skills-section {
    background-color: rgba(33, 47, 61, 0.5); /* Fondo semitransparente */
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.skill-category {
    margin-bottom: 20px;
}

.skill-category h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.skill-category h3 i {
    color: var(--primary-color);
    margin-right: 12px;
    font-size: 1.2rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: var(--light-background);
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    transform: translateY(-3px);
    font-weight: 600;
}

/* Estilo especial para las habilidades que estás aprendiendo */
.skill-tag.learning {
    background-color: rgba(93, 173, 226, 0.15);
    color: var(--primary-color);
    border: 1px dashed rgba(93, 173, 226, 0.4);
}

/* --- Ajustes responsivos para la nueva sección --- */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr; /* Apila las columnas */
        gap: 60px;
    }
}
@media (max-width: 768px) {
    .hero-about {
        padding-top: 120px; /* Más espacio en móvil */
        align-items: flex-start;
    }
    
    .about-left h1 {
        font-size: 2.2rem;
    }
}

/* --- ESTILOS PARA LA SECCIÓN EXPERIENCIA Y FORMACIÓN --- */

#experiencia-formacion .section-title {
    margin-top: 80px; /* Espacio entre cada sub-sección */
    margin-bottom: 40px;
}

/* Estilos de la Línea de Tiempo (Formación) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background-color: var(--light-background);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -11px;
    background-color: var(--primary-color);
    border: 4px solid var(--background-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -9px;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--light-background);
    position: relative;
    border-radius: 8px;
}
.timeline-content h3 {
    color: var(--text-color);
    margin-bottom: 5px;
}
.timeline-content .timeline-location {
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.timeline-content .timeline-date {
    font-family: monospace;
    font-weight: bold;
    color: var(--primary-color);
}

/* Estilos de las Tarjetas de Prácticas */
.experience-cards {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 800px;
    margin: 0 auto;
}

.experience-card {
    background: var(--light-background);
    border-radius: 8px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 25px;
    transition: all 0.3s ease;
}
.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.experience-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.experience-details h3 {
    color: var(--text-color);
}
.experience-details .experience-date {
    color: var(--primary-color);
    font-family: monospace;
    margin: 5px 0;
}
.experience-details .experience-description {
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* Estilos de la Cuadrícula de Certificados */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.cert-card {
    background: var(--light-background);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}
.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.cert-badge {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
}
.cert-card h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 5px;
}
.cert-card .cert-year {
    color: var(--primary-color);
    font-family: monospace;
}

/* --- Ajustes Responsivos para la nueva sección --- */
@media (max-width: 768px) {
    .timeline::before {
        left: 10px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 10px;
    }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-item::after {
        left: 1px;
    }
    .experience-card {
        flex-direction: column;
        text-align: center;
    }
}

/* --- ESTILOS ADICIONALES PARA LA REORGANIZACIÓN Y EFECTOS --- */

/* Contenedor del Avatar */
.avatar-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    margin: 0 auto 30px auto; /* Centrado y con margen inferior */
    overflow: hidden;
    box-shadow: 0 0 20px rgba(93, 173, 226, 0.3);
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra el círculo sin deformarse */
}

/* Reajuste de la columna izquierda para centrar el contenido */
.about-left {
    text-align: center;
}

/* Estilos para la animación de letras */
#animated-headline {
    font-weight: 700; /* Le damos más peso */
    /* El overflow es opcional, pero ayuda en algunas animaciones */
}

#animated-headline .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) scale(0.8) rotateZ(-10deg);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

#animated-headline .letter.visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotateZ(0deg);
}

/* --- ESTILOS PARA EL FONDO ANIMADO DE PÁGINA --- */

#particles-background {
    position: fixed; /* Se queda fijo y no se mueve con el scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Lo ponemos al fondo de las capas */
}

/* CORRECCIÓN DE CAPAS: El contenido principal se queda en la capa 1 */
main, .footer {
    position: relative;
    z-index: 1;
}

/* Y nos aseguramos de que el header esté en una capa superior (1000) */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* El resto de tus estilos de .header ya están definidos, 
       esto solo asegura que el z-index sea el correcto aquí */
}

/* Hacemos el fondo de la sección transparente para que se vea la animación */
#proyectos.section {
    background-color: transparent;
}

/* --- ESTILOS PARA LA NUEVA PÁGINA DE CONTACTO --- */

.contact-section-redesigned {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px - 77px); /* Resta la altura del header y footer */
    padding: 40px 5%;
}

#contact-wrapper {
    width: 100%;
    max-width: 600px;
    background-color: rgba(33, 47, 61, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    border: 1px solid rgba(93, 173, 226, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#contact-form-container .section-title,
#contact-form-container .contact-subtitle {
    text-align: center;
}

/* Estilo para las etiquetas flotantes */
.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-input {
    width: 100%;
    padding: 12px 0;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--text-dark);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-label {
    position: absolute;
    top: 12px;
    left: 0;
    color: var(--text-dark);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-bottom-color: var(--primary-color);
}

/* La magia de la etiqueta flotante */
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -16px;
    left: 0;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Botón de envío rediseñado */
.contact-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Mensaje de éxito */
#success-message {
    text-align: center;
    color: var(--text-color);
}

#success-message h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.success-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: pop-in 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes pop-in {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.hidden {
    display: none;
}

#confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}


/* --- ESTILOS PARA ICONOS SOCIALES EN EL FOOTER --- */

.footer-social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px; /* Espacio entre el icono y el texto de copyright */
    gap: 25px;
}

.footer-social-icons a {
    color: var(--text-dark); /* Color grisáceo por defecto */
    font-size: 1.6rem; /* Tamaño del icono */
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social-icons a:hover {
    color: var(--primary-color); /* Cambia al color azul principal al pasar el ratón */
    transform: translateY(-5px); /* Se eleva ligeramente */
}

/* --- ESTILOS PARA LA SECCIÓN DE IDIOMAS --- */

.language-item {
    margin-bottom: 20px;
}

.language-item:last-child {
    margin-bottom: 0;
}

.language-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.language-info span:first-child {
    font-weight: 600;
    color: var(--text-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--light-background);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    
    /* Estado inicial para la animación */
    width: 0%; 
    transition: width 2s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: 0.5s; /* Pequeño retraso para que la animación empiece después de aparecer */
}

/* Cuando la sección se hace visible, las barras se llenan */
.reveal-up.visible .progress-bar-fill.native {
    width: 100%;
}

.reveal-up.visible .progress-bar-fill.b1 {
    width: 70%; /* Representación visual para un nivel B1 */
}


