:root {
    /* Paleta Original pero refinada */
    --primary-bg: #383838;    /* Gris Oscuro */
    --accent-bg: #B5D5D6;     /* Azul Turquesa Claro */
    --accent-dark: #8daeb0;   /* Azul Turquesa Oscuro para hover/bordes */
    --text-dark: #2b2b2b;
    --text-light: #f5f5f5;
    --white: #ffffff;
    --bg-page: #f9fafb;
    
    /* Variables de diseño */
    --nav-height: 80px;
    --max-width: 1000px;
    --border-radius: 16px;
    --transition-speed: 0.6s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden; /* Evita scroll horizontal accidental */
}

.seo-fallback {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- 1. GLASS NAVBAR --- */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px); /* Efecto vidrio */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-container {
    width: 90%;
    max-width: var(--max-width);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-bg);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s;
}

/* Efecto subrayado animado del menú */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-bg);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active-link::after {
    width: 100%;
}

.btn-contact {
    padding: 8px 20px;
    background-color: var(--primary-bg);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: transform 0.2s, background 0.2s;
}
.btn-contact:hover {
    background-color: #000;
    transform: translateY(-2px);
}

/* --- 2. ANIMACIONES BIDIRECCIONALES (SCROLL) --- */
/* Estado Base (Invisible) */
.scroll-trigger {
    opacity: 0;
    transform: translateY(50px) scale(0.95); /* Baja y encoge un poco */
    transition: opacity var(--transition-speed) ease-out, 
                transform var(--transition-speed) ease-out;
    will-change: opacity, transform;
}

/* Estado Visible (Activo) */
.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- 3. LAYOUT & SECTIONS --- */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px 80px 20px;
}

.section-block {
    margin-bottom: 100px; /* Espacio generoso entre secciones */
    padding-top: var(--nav-height); /* Offset para el ancla del menú */
    margin-top: -var(--nav-height); 
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-bg);
    margin-bottom: 10px;
}

.separator {
    width: 60px;
    height: 4px;
    background-color: var(--accent-bg);
    margin: 0 auto;
    border-radius: 2px;
}

/* HERO SECTION */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    background: linear-gradient(to bottom, #f0f4f4 0%, var(--white) 100%);
}

.hero-container {
    max-width: var(--max-width);
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text { flex: 1; }
.hero-visual { flex: 1; display: flex; justify-content: center; }

.greeting {
    display: block;
    font-size: 1.1rem;
    color: var(--accent-dark);
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    line-height: 1.1;
    color: var(--primary-bg);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 25px;
    font-weight: 400;
}

.summary {
    color: #555;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-social {
    color: var(--primary-bg);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid var(--accent-bg);
    padding-bottom: 2px;
    transition: 0.2s;
}
.btn-social:hover { border-color: var(--primary-bg); }

.image-wrapper img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; /* Forma orgánica "blob" */
    box-shadow: 20px 20px 0px var(--accent-bg);
    transition: 0.5s ease-in-out;
}
.image-wrapper img:hover {
    border-radius: 50%;
    transform: scale(1.02);
}

/* CARDS DE EXPERIENCIA */
.timeline-container {
    border-left: 2px solid var(--accent-bg);
    padding-left: 30px;
}

.timeline-card {
    position: relative;
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s;
}

.timeline-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.08); }

.timeline-card::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 35px;
    width: 12px;
    height: 12px;
    background: var(--primary-bg);
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: 0 0 0 2px var(--accent-bg);
}

.card-date {
    display: inline-block;
    background: var(--accent-bg);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c4a4c;
}

.card-content h3 { font-size: 1.3rem; margin-bottom: 5px; }
.card-content h4 { color: #666; margin-bottom: 15px; font-weight: 400; }
.card-content ul { padding-left: 20px; color: #555; }

/* EDUCACIÓN (GRID) */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.education-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    border-top: 5px solid var(--accent-bg);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    display: flex;
    gap: 20px;
}

.edu-icon {
    font-size: 2rem;
    color: var(--accent-dark);
}

.edu-info h3 { font-size: 1.1rem; }
.institution { display: block; font-weight: 700; color: #555; font-size: 0.9rem; }
.year { color: #999; font-size: 0.85rem; margin-bottom: 10px; display: block; }
.details { font-size: 0.9rem; color: #666; font-style: italic; }

/* SKILLS */
.skills-wrapper {
    display: flex;
    gap: 50px;
}

.skills-col { flex: 1; }
.col-title { margin-bottom: 25px; border-bottom: 1px solid #eee; padding-bottom: 10px; font-family: 'Playfair Display', serif; }

.tech-item { margin-bottom: 20px; }
.tech-header { display: flex; justify-content: space-between; margin-bottom: 5px; font-weight: 600; font-size: 0.95rem; }
.skill-track { width: 100%; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.skill-progress { height: 100%; background: var(--primary-bg); border-radius: 4px; }

.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px; }
.lang-box { background: var(--white); padding: 15px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); text-align: center; border: 1px solid #eee; margin-bottom: 30px; }
.lang-name { display: block; font-weight: 700; }
.lang-level { color: var(--accent-dark); font-size: 0.9rem; }

.soft-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { background: var(--accent-bg); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; color: #1a3334; font-weight: 600; }

/* FOOTER & BUTTON */
.main-footer { text-align: center; color: #888; padding: 40px 0; font-size: 0.9rem; border-top: 1px solid #eee; }

.pdf-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background-color: var(--primary-bg);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    z-index: 2000;
    transition: transform 0.3s;
}
.pdf-fab:hover { transform: translateY(-5px) rotate(10deg); background-color: #000; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Ocultar menú enlaces en móvil para simplificar */
    .hero-container { flex-direction: column-reverse; text-align: center; }
    .hero-text h1 { font-size: 2.5rem; }
    .hero-actions { justify-content: center; }
    .image-wrapper img { width: 250px; height: 250px; }
    .grid-2-col, .skills-wrapper { flex-direction: column; display: flex; }
    .timeline-container { border-left: none; padding-left: 0; }
    .timeline-card::before { display: none; } /* Quitar puntos línea tiempo en móvil */
}
