/* --------------------------- */
/* CONFIGURACIÓN GENERAL */
/* --------------------------- */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f7f9fc;
    color: #222;
    scroll-behavior: smooth;
}

/* Encabezados y párrafos */
h1, h2, h3 {
    color: #003366;
    text-align: center;
}

p {
    line-height: 1.6;
    font-size: 16px;
    text-align: justify;
}

/* --------------------------- */
/* HEADER */
/* --------------------------- */
header {
    background-color: #002855;
    color: #ffffff;
    text-align: center;
    padding: 60px 20px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
}

header p {
    margin-top: 8px;
    color: #d6e2ff;
    font-size: 15px;
}

/* --------------------------- */
/* HERO */
/* --------------------------- */
.hero-content {
    text-align: center;
}

.hero-subtitle {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 400;
    color: #c7d2fe;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* --------------------------- */
/* MENÚ */
/* --------------------------- */
nav {
    margin-top: 15px;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover,
nav a.activo {
    color: #ffcc00;
}

/* --------------------------- */
/* SECCIONES */
/* --------------------------- */
.seccion {
    padding: 120px 20px 60px;
    max-width: 1000px;
    margin: auto;
}

.seccion.gris {
    background-color: #eef3f9;
}

.seccion h2 {
    margin-bottom: 20px;
    color: #003366;
}

/* --------------------------- */
/* SOBRE MÍ */
/* --------------------------- */
#sobre {
    margin-top: 120px;
}

.foto-perfil {
    display: block;
    margin: 30px auto;
    border-radius: 50%;
    width: 180px;
    height: 180px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.sobre-texto {
    max-width: 800px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

/* --------------------------- */
/* FORMACIÓN */
/* --------------------------- */
#formacion {
    padding-top: 140px;
}

.formacion-item {
    background: #ffffff;
    max-width: 650px;
    margin: 20px auto;
    padding: 20px 25px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.formacion-item:hover {
    transform: translateY(-4px);
}

.formacion-item h3 {
    margin-bottom: 6px;
    color: #002855;
    font-size: 20px;
}

.formacion-item span {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: #555;
}

/* --------------------------- */
/* CURSOS */
/* --------------------------- */
#cursos {
    padding-top: 60px;
}

.curso-item {
    background: #ffffff;
    max-width: 750px;
    margin: 25px auto;
    padding: 25px 30px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.curso-item h3,
.curso-item p,
.curso-item span {
    text-align: center;
}

.lista-cursos {
    max-width: 600px;
    margin: 15px auto 0;
    padding-left: 20px;
}

/* --------------------------- */
/* HABILIDADES */
/* --------------------------- */
.lista-habilidades {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.lista-habilidades li {
    background-color: white;
    padding: 10px 22px;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    font-weight: 500;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.lista-habilidades li:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 6px 16px rgba(0,40,120,0.2);
    background-color: #eef4ff;
}

/* --------------------------- */
/* PROYECTOS */
/* --------------------------- */
.proyectos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.proyecto p {
    text-align: left;              /* evita cortes raros */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.proyecto {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    width: 300px;
    max-width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-align: center;
    transition: transform 0.3s ease;
}

.proyecto:hover {
    transform: translateY(-5px);
}

.proyecto img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

.boton {
    display: inline-block;
    background-color: #003366;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.boton:hover {
    background-color: #0055aa;
}

/* --------------------------- */
/* CONTACTO */
/* --------------------------- */
#contacto a {
    color: #003366;
    font-weight: 600;
    text-decoration: none;
}

#contacto a:hover {
    color: #0055aa;
}

/* --------------------------- */
/* FOOTER */
/* --------------------------- */
footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 60px;
    font-size: 14px;
}

/* --------------------------- */
/* RESPONSIVE CELULARES */
/* --------------------------- */
@media (max-width: 600px) {

    /* Header */
    header {
        padding: 40px 15px 15px;
    }

    header h1 {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Menú */
    nav a {
        display: inline-block;
        margin: 6px 8px;
        font-size: 14px;
    }

    /* Secciones */
    .seccion {
        padding: 100px 15px 50px;
    }

    /* Sobre mí */
    .sobre-texto {
        font-size: 15px;
        text-align: left;
    }

    .foto-perfil {
        width: 130px;
        height: 130px;
    }

    /* Formación y cursos */
    .formacion-item,
    .curso-item {
        padding: 18px;
        margin: 15px auto;
    }

    /* Habilidades */
    .lista-habilidades {
        justify-content: center;
        margin: 0 auto;
    }

    .lista-habilidades li {
        font-size: 14px;
        padding: 8px 16px;
        margin: 0 auto;
        text-align: center;
    }

    /* ✅ PROYECTOS (FIX REAL) */
    .proyectos {
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .proyecto {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 20px;
        box-sizing: border-box;   /* 🔑 CLAVE */
    }

    .proyecto p {
        text-align: left;
        word-break: break-word;
    }

    /* Footer */
    footer {
        font-size: 13px;
        padding: 15px;
    }
}
/* --------------------------- */
/* ANIMACIÓN AL HACER SCROLL */
/* --------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

