/* ======== Configuración Global y Variables ======== */
:root {
    --primary-color: #007BFF; /* Azul brillante para botones y acentos */
    --primary-color-dark: #0056b3;
    --dark-color: #0d2c4b; /* Azul oscuro para fondos y texto */
    --light-color: #f8f9fa; /* Gris claro para fondos de sección */
    --text-color: #333;
    --white-color: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

p {
    margin-bottom: 1rem;
}

section {
    padding: 5rem 0;
}

.section-light {
    background-color: var(--light-color);
}

/* ======== Botones ======== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--dark-color);
    border: 2px solid var(--dark-color);
}

.btn-secondary:hover {
    background-color: var(--dark-color);
    color: var(--white-color);
    transform: translateY(-3px);
}

/* ======== Header / Navbar ======== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white-color);
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    display: flex;
}

.nav-menu li {
    margin-left: 1.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--white-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Navbar con Scroll */
.header.scrolled {
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header.scrolled .nav-logo,
.header.scrolled .nav-menu a {
    color: var(--dark-color);
}

.header.scrolled .nav-menu a:hover {
    color: var(--primary-color);
}

/* ======== Sección Hero ======== */
.hero {
    min-height: 100vh;
    background-color: var(--dark-color); /* Fondo oscuro profesional */
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 6rem; /* Para compensar la navbar */
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white-color);
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero .description {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* ======== Sección Sobre Mí ======== */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.about-text strong {
    color: var(--dark-color);
}

/* ======== Áreas de Enfoque ======== */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.focus-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.focus-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.focus-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ======== Experiencia (Timeline) ======== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after { /* La línea central */
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 1rem 2.5rem;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 3rem;
}

/* Círculo en la línea */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--white-color);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -8px;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-item h3 {
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}
.timeline-item p {
    font-style: italic;
    color: #555;
    margin: 0;
}

/* ======== Formación y Habilidades ======== */
.education-skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.education-list ul, .skills-list ul {
    list-style: none;
    padding-left: 0;
}

.education-list li, .skills-list li {
    background: var(--white-color);
    padding: 0.75rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.education-list strong {
    color: var(--primary-color);
}

/* ======== Contacto ======== */
#contacto {
    text-align: center;
}

#contact-form {
    max-width: 700px;
    margin: 2rem auto 0;
    text-align: left;
}

.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
}

#contact-form textarea {
    margin-bottom: 1rem;
}

#contact-form button {
    display: block;
    width: 100%;
    font-size: 1rem;
}

/* ======== Footer ======== */
.footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin: 0;
}

/* ======== Animación de Fade-in ======== */
.section-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ======== Responsive (Móvil) ======== */
@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }

    /* Navbar Móvil (simple) */
    .nav-menu {
        display: none; /* Ocultamos el menú normal */
        /* Para un menú móvil completo se necesitaría más JS (hamburguesa) */
        /* Por simplicidad, lo ocultamos */
    }

    .nav-logo {
        color: var(--dark-color); /* Logo visible en móvil */
    }

    .header { /* Header visible en móvil desde el inicio */
        background-color: var(--white-color);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .hero {
        text-align: left;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.2rem;
    }

    /* Timeline Móvil */
    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 3.5rem !important;
        padding-right: 0 !important;
        margin-bottom: 1rem;
    }

    .timeline-item::after {
        left: 12px !important;
    }

    /* Grids a una columna */
    .education-skills-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        grid-template-columns: 1fr;
    }
}