/* Variables y Reset se mantienen igual */
:root {
    --primary-color: #eaeaea; /* Texto principal claro para los títulos y logo */
    --accent-color: #00d2ff; /* Tu cyan vibrante */
    --text-color: #b0b0b0; /* Texto gris para los párrafos */
    --bg-color: #1a1a2e; /* Fondo oscuro general de la web */
    --dark: #16213e; /* Fondo oscuro para el menú y las tarjetas */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
body { background: var(--bg-color); color: var(--text-color); line-height: 1.6; }
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* === NAVEGACIÓN === */
.navbar {
    background: var(--dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 1.5rem; font-weight: bold; text-decoration: none; color: var(--primary-color); }
.logo strong { color: var(--accent-color); }
.nav-links { list-style: none; display: flex; gap: 20px; }
.nav-links a { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent-color); }
/* ocultar por defecto el menu para movil pero dejarlo ya preparado*/
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}
.menu-toggle i {
    width: 28px;
    height: 28px;
}

/* === HERO SECTION (Página de inicio) === */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 0;
    gap: 40px;
}
.hero-content { flex: 1; }
.hero h1 { font-size: 3.5rem; color: var(--primary-color); line-height: 1.2; margin-bottom: 10px; }
.hero .highlight { color: var(--accent-color); }
.hero h2 { font-size: 1.8rem; color: var(--text-color); margin-bottom: 20px; font-weight: 500; }
.hero-text { font-size: 1.1rem; margin-bottom: 30px; color: var(--text-color); max-width: 500px; }

/* Botones */
.hero-buttons { display: flex; gap: 15px; }
.btn { padding: 12px 25px; border-radius: 8px; text-decoration: none; font-weight: bold; transition: all 0.3s; }
.btn-primary { background: var(--accent-color); color: var(--primary-color); box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4); }
.btn-primary:hover { background: var(--accent-color); transform: translateY(-2px); }
.btn-secondary { background: var(--dark); color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-secondary:hover { border-color: var(--primary-color); }

/* Imagen perfil */
.profile-img-large {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid var(--dark);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* === QUICK SUMMARY CARDS === */
.quick-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 60px;
}
.summary-card {
    background: var(--dark);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border-top: 4px solid var(--accent-color);
    transition: transform 0.3s;
}
.summary-card:hover { transform: translateY(-5px); }
.summary-card h3 { margin-bottom: 15px; color: var(--primary-color); }

/* === CABECERAS DE PÁGINA (Para Proyectos y Trayectoria) === */
.page-header {
    text-align: center;
    padding: 60px 20px 40px;
}
.page-header h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.page-header .highlight {
    color: var(--accent-color);
}
.page-header p {
    font-size: 1.2rem;
    color: var(--text-color);
}

/* === VISTA PROYECTOS === */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-bottom: 60px;
}
.project-card {
    background: var(--dark);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-left: 4px solid var(--accent-color);
}
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}
.project-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}
.project-badge {
    background: rgba(0, 210, 255, 0.1);
    color: var(--accent-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid var(--accent-color);
}
.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.project-tags span {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}
.project-features {
    list-style: none;
    margin-bottom: 25px;
}
.project-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.project-features i {
    width: 18px;
    color: var(--text-color);
    flex-shrink: 0;
    margin-top: 3px;
}

/* === VISTA TRAYECTORIA (Línea de tiempo / Columnas) === */
.trayectoria-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
}
.trayectoria-column h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 1px solid var(--dark);
    padding-bottom: 10px;
}
.timeline-item {
    background: var(--dark);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.timeline-date {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.timeline-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 2px;
}
.timeline-item h4 {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 1rem;
}
.timeline-item ul {
    padding-left: 20px;
    color: var(--text-color);
}
.timeline-item ul li {
    margin-bottom: 8px;
}

/* RESPONSIVE PARA LAS VISTAS NUEVAS */
@media (max-width: 768px) {
    .trayectoria-grid {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
        gap: 20px;
    }
}

/* === FOOTER === */
footer { text-align: center; padding: 40px 20px; color: #64748b; font-size: 0.9rem; }

/* RESPONSIVE MÓVIL GENERAL */
@media (max-width: 768px) {
    /* Mostrar botón hamburguesa */
    .menu-toggle { display: block; }
    
    /* Adaptar el contenedor del menú para que los enlaces bajen */
    .nav-container { position: relative; }
    
    /* Ocultar los enlaces por defecto y prepararlos para el despliegue */
    .nav-links { 
        flex-direction: column; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--dark); 
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        max-height: 0; /* Menú cerrado */
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        gap: 0;
    }
    
    /* Clase que añade JS al hacer click */
    .nav-links.active {
        max-height: 300px; /* Desplegado */
    }
    
    /* Espaciado de los enlaces en el móvil */
    .nav-links li { text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }
    .nav-links a { display: block; padding: 15px 0; }

    /* Resto de la página (Hero y Trayectoria) */
    .hero { flex-direction: column-reverse; text-align: center; padding: 40px 0; }
    .hero-text { margin: 0 auto 30px auto; }
    .hero-buttons { justify-content: center; }
    .profile-img-large { width: 250px; height: 250px; }
    
    .trayectoria-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* === ANIMACIONES ENTRE PAGINAS === */
@view-transition {
  navigation: auto;
}

::view-transition-group(root) {
  animation-duration: 1s;
  animation-timing-function: ease;
}

::view-transition-old(root) {
  animation-name: slide-out;
  z-index: 1;
}

::view-transition-new(root) {
  animation-name: slide-in;
  z-index: 2;
}

@keyframes slide-out {
  to {
    opacity: 0.5; /* Se oscurece la página vieja */
    transform: scale(0.95);
  }
}

@keyframes slide-in {
  from {
    transform: translateY(100vh); /* Sube desde fuera de la pantalla por abajo */
  }
}