/* --- VARIABLES DE DISEÑO (Paleta e Identidad) --- */
:root {
    /* --- COLORES DOMINANTES (Elegancia y Contraste) --- */
    --bg-dark-primary: #0a0d25;   /* Azul marino ultra oscuro (Fondo principal del Hero) */
    --bg-dark-secondary: #12163b; /* Azul noche institucional (Soportes y tarjetas oscuras) */
    
    /* --- COLORES DE ACENTO (Inspirados en el Logo) --- */
    --accent-cyan: #d4af37;       /* Dorado Champagne (Reemplaza al amarillo para dar elegancia en luces y enlaces) */
    --accent-red: #9e1b1b;        /* Rojo Borgoña quemado (Manejo sutil del rojo institucional para detalles) */
    
    /* --- TEXTO Y LECTURA (UI Limpia) --- */
    --text-dark: #1e293b;         /* Gris pizarra oscuro para lectura cómoda en zonas claras */
    --text-muted: #64748b;        /* Gris medio para fechas o textos secundarios */
    --text-light: #f1f5f9;        /* Blanco hueso para contrastar sobre los fondos azules */
    
    /* --- FONDOS DE LA WEB --- */
    --bg-light: #f8fafc;          /* Fondo general de la página (Limpio y descansado) */
    --card-bg: #ffffff;           /* Blanco puro para las tarjetas de la trayectoria */
    
    /* --- INTERACCIÓN --- */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- REGLAS GENERALES RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- HEADER / NAVEGACIÓN --- */
.main-header {
    background-color: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header .logo {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: var(--accent-cyan);
}

.main-header nav a {
    color: #e2e8f0;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.main-header nav a:hover, .main-header nav a.active {
    color: var(--accent-cyan);
}

/* --- PORTADA / HERO (Animada) --- */
.hero-container {
    position: relative;
    background: linear-gradient(135deg, var(--bg-dark-primary) 0%, var(--bg-dark-secondary) 100%);
    color: white;
    padding: 6rem 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    min-height: 70vh;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
    z-index: 2;
}

/* Foto y Contenedor 3D */
.profile-pic-container {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px);
    transition: transform 0.15s ease-out;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--bg-dark-secondary);
    position: relative;
    z-index: 2;
}

.profile-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border-radius: 50%;
    border: 3px solid var(--accent-cyan);
    animation: pulseGlow 3s infinite ease-in-out;
    z-index: 1;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.04); opacity: 0.9; box-shadow: 0 0 20px var(--accent-cyan); }
}

/* Info del Perfil */
.profile-info h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.profile-info h2 {
    color: var(--accent-cyan);
    font-size: 1.4rem;
    font-weight: 400;
    margin-top: 0.5rem;
    letter-spacing: 2px;
}

.profile-tagline {
    color: #94a3b8;
    margin-top: 0.5rem;
    font-style: italic;
}

.contact-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.contact-item i { color: var(--accent-cyan); }

/* Animaciones de entrada */
.animate-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards ease-out;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

/* --- CUERPO PRINCIPAL (Layout Grid) --- */
.main-container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3.5rem;
}

/* Columnas */
.content-column { display: flex; flex-direction: column; }
.section-title {
    font-size: 1.5rem;
    color: var(--bg-dark-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.section-title i { color: var(--bg-dark-secondary); }
.section-spacer { margin-top: 3.5rem; }
.section-spacer-sm { margin-top: 1.5rem; }

/* Tarjetas de Línea de Tiempo (UX de lectura estructurada) */
.timeline {
    border-left: 3px solid #e2e8f0;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-group h5 {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.timeline-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    position: relative;
    transition: var(--transition-smooth);
}

.timeline-card::before {
    content: '';
    position: absolute;
    left: -1.95rem;
    top: 2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-dark-secondary);
    border: 3px solid var(--bg-light);
}

.timeline-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.card-header h4, .academic h4 {
    font-size: 1.1rem;
    color: var(--bg-dark-primary);
    font-weight: 600;
}

.badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.date {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.institution {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* --- BARRA LATERAL (COMPETENCIAS) --- */
.sticky-sidebar {
    position: sticky;
    top: 6rem;
}

.sidebar-widget {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--bg-dark-primary);
}

.skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.skills-list li span {
    font-size: 0.95rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.4rem;
}

.skill-bar {
    background: #f1f5f9;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
}

.skill-bar .fill {
    background: linear-gradient(90deg, var(--bg-dark-secondary), var(--bg-dark-primary));
    height: 100%;
    border-radius: 999px;
}

/* --- FOOTER --- */
.main-footer {
    background: var(--bg-dark-primary);
    color: #94a3b8;
    text-align: center;
    padding: 2.5rem;
    font-size: 0.9rem;
    margin-top: 6rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 968px) {
    .hero-content { flex-direction: column; text-align: center; gap: 2rem; }
    .contact-strip { justify-content: center; }
    .main-container { grid-template-columns: 1fr; gap: 3rem; }
    .profile-info h1 { font-size: 2.5rem; }
}