/* 1. VARIABLES & RESET */
:root {
    --primary-color: #ff4d4d; /* Tu color rojo característico */
    --secondary-color: #333;
    --bg-light: #f0f2f5;
    --text-color: #444;
    --text-light: #777;
    --white: #ffffff;
    --dark: #1a1a1a;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* 2. UTILITIES */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

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

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    margin-left: 10px;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
}

.btn-full {
    width: 100%;
    border: none;
}

.section { padding: 80px 0; }
.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }
.text-highlight { color: var(--primary-color); }

/* 3. NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(22, 24, 26, 0.87);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.logo span { color: var(--primary-color); }

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

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--white);
    transition: var(--transition);
}

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

.hamburger { display: none; cursor: pointer; font-size: 1.5rem; }

/* 4. HERO SECTION */
.hero {
    height: 100vh;
    background: url('assets/img/FONDO.jpg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65); /* Capa oscura */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.greeting {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* 5. ABOUT SECTION */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
}

.about-img img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-text p { margin-bottom: 15px; color: var(--text-light); }

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.skill-item {
    background: var(--bg-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    border: 1px solid #ddd;
}

.skill-item i { color: var(--primary-color); margin-right: 5px; }

/* 6. PROJECTS SECTION (GRID) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img { transform: scale(1.05); }

.project-info { padding: 25px; }

.project-info h4 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.tech-stack {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.project-links a {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 15px;
    display: inline-block;
    color: var(--dark);
}

.project-links a:hover { color: var(--primary-color); }

/* 7. CONTACT SECTION */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-list li {
    margin: 15px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.contact-list i {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 15px;
}

.social-icons { margin-top: 30px; }

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-radius: 50%;
    margin-right: 10px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary-color);
    color: var(--white);
}

.form-group { margin-bottom: 20px; }

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 8. FOOTER */
footer {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* 9. RESPONSIVE MEDIA QUERIES */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        top: 60px;
        background: var(--white);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 20px 0;
        transform: translateY(-150%); /* Oculto arriba */
        transition: var(--transition);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active { transform: translateY(0); }

    .hamburger { display: block; color: var(--dark); }

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

    .about-container, .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .about-img { text-align: center; }
    .about-img img { max-width: 300px; margin: 0 auto; }
}

/* --- NUEVOS ESTILOS: RESUME & SEPARADORES --- */

/* 1. Separador Visual (La línea debajo de los títulos) */
.section-header {
    margin-bottom: 60px;
}

/* Reemplaza tu .separator-line actual por este */
.separator-line {
    width: 150px; /* Mucho más largo */
    height: 30px;  /* Un poco más fino */
    background: var(--primary-color);
    margin: 25px auto 0; /* Más espacio arriba */
    border-radius: 3px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15); /* Sombra suave para destacar */
    opacity: 0.8; /* Un poco de transparencia para que no sea tan agresivo */
}

/* 2. Grid del Resume */
.resume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 60px;
}

.resume-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.resume-title i {
    color: var(--primary-color);
}

/* 3. Tarjetas de Items (Experiencia/Educación) */
.resume-item {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid #e0e0e0; /* Línea gris vertical */
    padding-bottom: 40px;
}

.resume-item::before {
    content: '';
    position: absolute;
    left: -6px; /* Ajuste para centrar el punto en la línea */
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* El último item no necesita padding abajo */
.resume-item:last-child {
    padding-bottom: 0;
}

.resume-date {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.resume-item h5 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.institution {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* 4. Separadores de Sección (Opcional: Forma de ola o curva) */
/* Agrega esta clase al HTML de una sección si quieres una división curva */
.curve-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.curve-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

.curve-divider .shape-fill {
    fill: var(--bg-light); /* Color de la siguiente sección */
}

/* --- RESPONSIVE PARA RESUME --- */
@media (max-width: 768px) {
    .resume-grid {
        grid-template-columns: 1fr; /* Una columna en celular */
        gap: 40px;
    }
}

/* --- NUEVOS ESTILOS: RESUME & SEPARADORES --- */

/* 1. Separador Visual (La línea debajo de los títulos) */
.section-header {
    margin-bottom: 60px;
}

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

/* 2. Grid del Resume */
.resume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 60px;
}

.resume-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.resume-title i {
    color: var(--primary-color);
}

/* 3. Tarjetas de Items (Experiencia/Educación) */
.resume-item {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid #e0e0e0; /* Línea gris vertical */
    padding-bottom: 40px;
}

.resume-item::before {
    content: '';
    position: absolute;
    left: -6px; /* Ajuste para centrar el punto en la línea */
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* El último item no necesita padding abajo */
.resume-item:last-child {
    padding-bottom: 0;
}

.resume-date {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.resume-item h5 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.institution {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* 4. Separadores de Sección (Opcional: Forma de ola o curva) */
/* Agrega esta clase al HTML de una sección si quieres una división curva */
.curve-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.curve-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

.curve-divider .shape-fill {
    fill: var(--bg-light); /* Color de la siguiente sección */
}

/* --- RESPONSIVE PARA RESUME --- */
@media (max-width: 768px) {
    .resume-grid {
        grid-template-columns: 1fr; /* Una columna en celular */
        gap: 40px;
    }
}



/* --- ANIMACIONES DE SCROLL (Scroll Reveal) --- */

/* 1. Estado inicial (Oculto) */
.reveal {
    opacity: 0;
    transform: translateY(50px); /* Empieza 50px más abajo */
    transition: all 0.8s ease-out; /* Tarda 0.8 segundos en subir */
}

/* 2. Estado visible (Cuando llega el scroll) */
.reveal.active {
    opacity: 1;
    transform: translateY(0); /* Vuelve a su lugar original */
}

/* 3. Animación de entrada para el HERO (Carga inicial) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Aplicar al texto del inicio para que cargue solo al abrir la web */
.hero-content h1 { animation: fadeInUp 1s ease-out forwards; }
.hero-content h2 { animation: fadeInUp 1s ease-out 0.3s forwards; opacity: 0; } /* Retraso de 0.3s */
.hero-content p { animation: fadeInUp 1s ease-out 0.6s forwards; opacity: 0; }  /* Retraso de 0.6s */
.hero-btns { animation: fadeInUp 1s ease-out 0.9s forwards; opacity: 0; }       /* Retraso de 0.9s */



/* AJUSTE PARA EL MENÚ EN MÓVIL */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--white); /* IMPORTANTE: Blanco al inicio para verse sobre la foto */
    transition: all 0.4s ease;
}

/* Cuando se hace scroll, el botón se vuelve oscuro */
.navbar.scrolled .hamburger {
    color: var(--secondary-color);
}

/* Aseguramos que en pantallas grandes no se vea */
@media (min-width: 769px) {
    .hamburger { display: none; }
}

/* En pantallas chicas (celular) */
@media (max-width: 768px) {
    .hamburger { display: block; }

    /* El menú desplegable siempre debe tener fondo sólido */
    .nav-links {
        background-color: var(--white);
    }

    /* Los enlaces dentro del menú móvil siempre oscuros */
    .nav-links a {
        color: var(--secondary-color);
    }
}