/* ========================================= */
/*          VARIABLES Y CONFIGURACIÓN        */
/* ========================================= */
:root {
    /* Paleta de Colores Moderna (Tema Electricidad/Industrial) */
    --primary-color: #D32F2F;
    /* Rojo Intenso */
    --secondary-color: #1A237E;
    /* Azul Profundo */
    --accent-color: #FFC107;
    /* Amarillo/Dorado Eléctrico */

    --text-dark: #1e293b;
    /* Texto oscuro para lectura */
    --text-light: #64748b;
    /* Texto secundario */
    --white: #ffffff;

    --bg-body: #f8fafc;
    /* Fondo gris muy suave */
    --bg-card: #ffffff;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-body);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========================================= */
/*               NAVEGACIÓN                  */
/* ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 35, 126, 0.95);
    /* Azul con transparencia */
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--accent-color);
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

/* Efecto de línea animada bajo los enlaces */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    /* Oculto en escritorio */
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================= */
/*              GUARDIÁN (BADGE)             */
/* ========================================= */
.guardian-badge {
    position: relative;
    /* Relativo al flujo para centrarlo */
    margin: 0 auto 20px auto;
    /* Centrado horizontal y margen inferior */
    top: auto;
    right: auto;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header ajuste */
header {
    position: relative;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    /* Apilar elementos verticalmente */
    justify-content: center;
}

/* Título */
header h1 {
    position: relative;
    z-index: 1;
}

.guardian-badge:hover {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
}

.guardian-badge img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    /* Verde online */
    border: 2px solid #1a237e;
    border-radius: 50%;
    box-shadow: 0 0 5px #4CAF50;
}

/* Estado offline para el punto */
body.offline .status-dot {
    background-color: #f44336;
    /* Rojo offline */
    box-shadow: 0 0 5px #f44336;
}

/* Estado ahorro de energía */
body.low-battery-mode .status-dot {
    background-color: #FFC107;
    /* Amarillo batería baja */
}

/* Responsive: Robot más pequeño en móvil */
@media (max-width: 768px) {
    .guardian-badge {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* ========================================= */
/*                 HEADER (HERO)             */
/* ========================================= */
/* Header Hero */
header {
    background-image: linear-gradient(rgba(26, 35, 126, 0.9), rgba(26, 35, 126, 0.8)), url('Imagenes/electricity-1962704_1280.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Efecto Parallax */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    position: relative;
    /* Contexto para el robot absolute */
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header h2 {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-color);
    margin-bottom: 30px;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-scroll {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--white);
    color: var(--white);
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-scroll:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ========================================= */
/*                SECCIONES                  */
/* ========================================= */
section {
    padding: 80px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.center-title-cont {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.2rem;
    color: var(--secondary-color);
    display: inline-block;
    position: relative;
    margin-bottom: 10px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-top: -30px;
    margin-bottom: 40px;
}

/* ========================================= */
/*                SOBRE MÍ                   */
/* ========================================= */
.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.about-content p {
    margin-bottom: 20px;
}

/* ========================================= */
/*              EXPERIENCIA (TIMELINE)       */
/* ========================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* Línea vertical */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    /* Ajuste para móvil por defecto */
    width: 2px;
    background: #e2e8f0;
}

.experience-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    margin-left: 50px;
    /* Espacio para la línea */
    position: relative;
    transition: var(--transition);
}

/* Punto en la línea de tiempo */
.experience-card::before {
    content: '';
    position: absolute;
    left: -56px;
    /* Ajustar posición del punto */
    top: 25px;
    width: 14px;
    height: 14px;
    background: var(--white);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-header h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.company {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin: 5px 0;
}

.date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 15px;
    font-style: italic;
}

.experience-card ul {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--text-dark);
}

.center-btn {
    text-align: center;
    margin-top: 40px;
}

.btn-primary {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* ========================================= */
/*           GALERÍA (ESTILO TRAE - ADAPTADO) */
/* ========================================= */
#galeria {
    /* Fondo Base Oscuro */
    background-color: #0b0f19;

    /* Patrón de Rejilla Tecnológica (Grid) */
    background-image:
        linear-gradient(rgba(26, 35, 126, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 35, 126, 0.15) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(26, 35, 126, 0.2), transparent 70%);

    background-size: 50px 50px, 50px 50px, 100% 100%;

    /* Sombra interna para suavizar los bordes (Vignette) */
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.8);

    color: var(--white);
    padding: 100px 0;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    position: relative;
}

.gallery-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Diseño Desktop: Dos columnas (Texto Izq - Carrusel Der) */
@media (min-width: 1024px) {
    .gallery-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
        gap: 60px;
    }

    .gallery-text-side {
        flex: 0 0 350px;
        position: sticky;
        top: 100px;
    }

    .gallery-container {
        flex: 1;
        width: 100%;
        overflow: visible;
    }
}

.gallery-text-side h2 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--accent-color);
    /* Dorado */
}

.gallery-text-side p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.scroll-indicator {
    color: var(--accent-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0 40px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.gallery-container::-webkit-scrollbar {
    display: none;
}

.gallery-container:active {
    cursor: grabbing;
}

.gallery-track {
    display: flex;
    gap: 30px;
    width: max-content;
}

.gallery-item {
    width: 400px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    opacity: 1;
}

/* Contenedor de imagen */
.gallery-image-wrapper {
    width: 100%;
    height: 240px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 193, 7, 0.3);
    /* Borde sutil dorado */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Info de la tarjeta */
.gallery-info {
    padding: 0 5px;
}

.gallery-info h3 {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 8px;
    font-weight: 600;
}

.gallery-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Ocultar overlay antiguo */
.overlay {
    display: none;
}

/* Ajustes Responsive */
@media (max-width: 768px) {
    .gallery-text-side h2 {
        font-size: 2.2rem;
    }

    .gallery-item {
        width: 280px;
    }

    .gallery-image-wrapper {
        height: 180px;
    }
}

/* ========================================= */
/*              FORMACIÓN (GRID)             */
/* ========================================= */
#formacion {
    background-color: #f8fafc;
    /* Color original suave para alternar */
    /* Si se quiere oscuro como la galería, descomentar: */
    /* background-color: var(--secondary-color); */
}

/* Estilo específico para integrar con la galería oscura si se desea continuidad */
#formacion.dark-mode {
    background-color: var(--secondary-color);
    color: var(--white);
}

#formacion .section-title {
    /* Ajuste para cuando el fondo es oscuro o para combinar mejor */
    color: var(--secondary-color);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    position: relative;
    /* Contexto para el timeline si es necesario */
}

.education-grid .experience-card {
    margin-left: 0;
    border-left: none;
    border-top: 4px solid var(--primary-color);
    /* Cambio de accent-color (amarillo) a primary-color (rojo) */
    background: var(--white);
    /* Mantiene tarjetas blancas */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    /* Asegura contexto para ::before */
    overflow: visible;
    /* IMPORTANTE: Permite que el punto se vea fuera de la tarjeta */
}

/* PUNTOS ROJOS EN FORMACIÓN ACADÉMICA (Restaurado) */
.education-grid .experience-card::before {
    content: '';
    display: block;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: var(--white);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    z-index: 2;
}

/* Estilos para tarjetas clickeables (Restaurado) */
.experience-card[onclick] {
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

/* ========================================= */
/*       MODOS INTELIGENTES (GUARDIÁN)       */
/* ========================================= */

/* Modo Ahorro de Energía (Low Battery) */
body.low-battery-mode * {
    transition: none !important;
    /* Desactiva transiciones suaves */
    animation: none !important;
    /* Desactiva animaciones continuas */
    box-shadow: none !important;
    /* Quita sombras complejas */
    text-shadow: none !important;
}

body.low-battery-mode {
    background-image: none !important;
    /* Quita gradientes pesados */
    background-color: #0b0f19;
    /* Fondo plano */
}

/* Modo Centinela (Inactividad) */
body.sentinel-mode::after {
    content: '⚡ AHORRO DE ENERGÍA ACTIVADO';
    /* Texto actualizado */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    white-space: pre;
    font-family: 'Poppins', sans-serif;
    animation: pulse-sentinel 2s infinite;
}

@keyframes pulse-sentinel {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

.experience-card[onclick]:hover {
    border-color: var(--primary-color);
    background-color: #fff8f8;
    /* Fondo ligeramente rosado al pasar el mouse */
    transform: translateY(-8px);
}

/* Texto "Ver Certificado" al hacer hover O cuando se activa por scroll */
.experience-card[onclick]:hover::after,
.experience-card[onclick].active-hint::after {
    content: 'Ver Certificado';
    /* Restaurado */
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;

    top: 0;
    left: auto;
    right: 0;
    transform: translateY(-100%);

    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px 4px 0 0;
    opacity: 1;
    white-space: nowrap;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    /* Permitir clicks en el ::after */
    pointer-events: auto;
    cursor: pointer;
    z-index: 5;
}

/* Estado normal del ::after */
.experience-card[onclick]::after {
    content: '';
    opacity: 0;
    position: absolute;
    top: 10px;
    /* Punto de partida para animación */
    right: 0;
    transition: all 0.3s ease;
}

/* Si la sección es oscura, ajustar el título */
#formacion.dark-style {
    background-color: var(--secondary-color);
    padding-top: 50px;
    padding-bottom: 80px;
}

#formacion.dark-style .section-title {
    color: var(--accent-color) !important;
}

#formacion.dark-style .section-title::after {
    background: var(--white) !important;
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 10px;
}

/* ========================================= */
/*              HABILIDADES (GRID)           */
/* ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.skill-item {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.skill-item i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.skill-item:hover {
    transform: translateY(-5px);
    background: var(--secondary-color);
    color: var(--white);
}

.skill-item:hover i {
    color: var(--accent-color);
}

/* ========================================= */
/*              CONTACTO (NUEVO)             */
/* ========================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    /* 2 columnas: info y formulario */
    gap: 30px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    /* Para que los bordes redondeados funcionen */
}

/* Caja de información (Izquierda) */
.contact-info-box {
    background: var(--secondary-color);
    color: var(--white);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-info-box h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    width: 30px;
    /* Ancho fijo para alineación */
    text-align: center;
}

.info-item h4 {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 2px;
}

.info-item p {
    font-size: 1rem;
    font-weight: 500;
}

/* Caja de Formulario (Derecha) */
.contact-form-box {
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    resize: none;
    /* Desactivar redimensionamiento */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-submit:hover {
    background: #b71c1c;
    /* Rojo más oscuro */
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================= */
/*                 FOOTER                    */
/* ========================================= */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 80px 20px 0;
    position: relative;
    margin-top: 0;
    /* Eliminado el margen superior para unir con la galería */
}

.footer-main {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* Estilos para textos en fondo oscuro */
.white-title {
    color: var(--accent-color) !important;
    /* Cambio a Dorado para mejor visibilidad y estilo */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.white-title::after {
    background: var(--white) !important;
    /* Subrayado blanco para contrastar con el dorado */
}

.white-text {
    color: rgba(255, 255, 255, 0.95) !important;
    /* Casi blanco puro para máxima legibilidad */
    font-weight: 500;
}

/* Copyright Bar */
.footer-copyright {
    background: rgba(0, 0, 0, 0.3);
    /* Un poco más oscuro para separar */
    padding: 25px;
    text-align: center;
    font-size: 1rem;
    /* Un poco más grande */
    color: var(--white);
    /* Blanco total */
    font-weight: 500;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
    /* Un toque de elegancia */
}

/* Redes Sociales en Footer */
.social-links-footer {
    display: none;
    /* Ocultar completamente */
}

/* ========================================= */
/*              ANIMACIONES                  */
/* ========================================= */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================= */
/*              RESPONSIVE MEJORADO          */
/* ========================================= */
@media (max-width: 768px) {

    /* Header Hero */
    header {
        height: auto;
        min-height: 100vh;
        padding: 100px 20px 50px;
        /* Más espacio arriba para el navbar fijo */
    }

    header h1 {
        font-size: 2.2rem;
    }

    header h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    /* Navegación */
    .nav-toggle {
        display: block;
        z-index: 1100;
        /* Sobre el menú */
    }

    .nav-menu {
        position: fixed;
        top: 0;
        /* Ocupar toda la pantalla */
        right: -100%;
        height: 100vh;
        width: 100%;
        /* Pantalla completa */
        flex-direction: column;
        justify-content: center;
        background: rgba(26, 35, 126, 0.98);
        /* Azul casi opaco */
        backdrop-filter: blur(10px);
        text-align: center;
        transition: 0.3s ease-in-out;
        box-shadow: none;
        gap: 25px;
        padding: 0;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
        /* Texto más grande para tocar fácil */
    }

    /* Secciones Generales */
    section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Galería Responsive (Estilo Trae adaptado a móvil) */
    .gallery-content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .gallery-text-side {
        position: static;
        /* Ya no sticky en móvil */
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .gallery-text-side h2 {
        font-size: 2.5rem;
    }

    .scroll-indicator {
        justify-content: center;
        margin-bottom: 20px;
    }

    .gallery-container {
        padding: 10px 0 30px 0;
        /* Scroll snap para mejor experiencia táctil */
        scroll-snap-type: x mandatory;
    }

    .gallery-item {
        width: 85vw;
        /* Casi todo el ancho de la pantalla */
        max-width: 350px;
        /* Pero no gigante */
        scroll-snap-align: center;
        /* Centrar al soltar */
    }

    .gallery-image-wrapper {
        height: 200px;
    }

    /* Experiencia Timeline */
    .timeline::before {
        left: 10px;
    }

    .experience-card {
        margin-left: 30px;
        padding: 20px 15px;
    }

    .experience-card::before {
        left: -38px;
        top: 25px;
        width: 12px;
        height: 12px;
        border-width: 2px;
    }

    /* Formación Grid */
    .education-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* Contacto */
    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info-box,
    .contact-form-box {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
    }

    /* Ajuste fino para móviles muy pequeños */
    .gallery-text-side h2 {
        font-size: 2rem;
    }
}