@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 80px;
}

/* ---------------------- scroll-indicator ---------------------- */
.scroll-indicator {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.scroll-indicator i {
    font-size: 24px;
    color: #fff;
    /* cambia si tu fondo es claro */
    animation: bounce 1.5s infinite;
}

/* Animación de “bote” sutil */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(6px);
    }

    60% {
        transform: translateY(3px);
    }
}

/* ---------------------- LOGO ---------------------- */
.logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo .nombre {
    font-size: 14px;
    font-weight: 500;
    color: #aaa;
}

.logo .apellido {
    font-size: 26px;
    font-weight: 700;
    color: #3c46d4;
}

.logo-link {
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
}

/* ---------------------- INICIO ---------------------- */
#inicio {
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url("../img/fondo-inicio.jpg");
    background-size: cover;
    background-position: center center;
    height: 100vh;
}

#inicio header {
    background-color: rgba(0, 0, 0, .8);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.contenido-header {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    margin: 0 12px;
    transition: .3s;
    font-size: 14px;
    margin: 0 8px;
}

nav ul li a:hover,
.seleccionado {
    color: #3c46d4;
}

.redes a {
    color: #fff;
    margin-left: 10px;
    font-size: 20px;
    text-decoration: none;
}

#icono-nav {
    display: none;
    color: #fff;
}

/* ---------------------- PRESENTACIÓN ---------------------- */
.presentacion {
    max-width: 1100px;
    height: 100vh;
    margin: auto;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.presentacion .bienvenida {
    letter-spacing: 5px;
    margin-bottom: 20px;
}

.presentacion h2 {
    font-size: 45px;
}

.presentacion h2 span {
    color: #3c46d4;
}

.presentacion .descripcion {
    margin-top: 20px;
    max-width: 600px;
}

/* ---------------------- SOBRE MI ---------------------- */
#sobremi {
    max-width: 1100px;
    margin: auto;
    padding: 100px 15px;
    color: #111135;
    display: flex;
}

#sobremi .contenedor-foto {
    max-width: 400px;
    margin-right: 80px;
}

#sobremi .contenedor-foto img {
    padding: 20px;
    width: 100%;
    border-radius: 20px;
    background-color: #f3f3f3;
}

#sobremi .sobremi {
    margin: 0 40px;
}

#sobremi .sobremi .titulo-seccion {
    font-size: 22px;
    text-transform: uppercase;
    color: #111135;
    text-decoration: underline;
    text-decoration-color: #d3d3d3;
    text-decoration-thickness: 5px;
}

#sobremi .sobremi h2 {
    font-size: 34px;
    font-weight: bold;
    margin: 20px 0;
    letter-spacing: 2px;
}

#sobremi .sobremi h2 span {
    color: #3c46d4;
}

#sobremi .sobremi h3 {
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

#sobremi .sobremi p {
    font-size: 14px;
    line-height: 25px;
    color: #565656;
    margin-bottom: 12px;
}

#sobremi .sobremi a {
    display: inline-block;
    text-decoration: none;
    color: #000;
    border-radius: 30px;
    padding: 10px 20px;
    border: 1px solid #000;
    margin-top: 30px;
    transition: .5s;
}

#sobremi .sobremi a:hover {
    background-color: #040733;
    color: #fff;
}

/* ---------------------- FORMACIÓN ---------------------- */
#formacion {
    background: #f6f8ff;
    padding: 100px 15px;
}

.titulo-seccion {
    text-align: center;
    font-size: 22px;
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-color: #d3d3d3;
    text-decoration-thickness: 5px;
}

.contenedor-formacion {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    align-items: stretch;
    /* 👈 importante */
}

.item-formacion {
    background: white;
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
    border-left: 5px solid #3c46d4;
    flex: 1 1 320px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    text-align: center;
    margin: 0 auto;
}

/* Reset interno de párrafos */
.item-formacion p {
    margin: 0;
    line-height: 1.4;
}

/* Tipo de estudio (Secundario / Universitario) */
.item-formacion h4 {
    font-size: 13px;
    text-transform: uppercase;
    color: #3c46d4;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.item-formacion .titulo {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;

    min-height: 48px;
    /* 👈 clave */
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-formacion .institucion {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.item-formacion .ubicacion {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}

/* ESTADO */
.item-formacion .detalle {
    font-size: 12px;
    color: #aaa;
    font-style: italic;
    margin-top: auto;
}

.item-formacion {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-formacion:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .12);
}

/* ---------------------- TECNOLOGÍAS ---------------------- */
#tecnologias {
    background: #f3f3f3;
    padding: 100px 15px;
}

.contenedor-tecnologias {
    max-width: 1100px;
    margin: auto;
}

.descripcion-tecnologias {
    text-align: center;
    margin: 30px 0;
    color: #565656;
}

.slider {
    overflow: hidden;
}

.slide-track {
    display: flex;
    gap: 30px;
    animation: scroll 28s linear infinite;
}

.slide {
    width: 250px;
    background: white;
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.slide i {
    font-size: 40px;
    color: #3c46d4;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.fila-tecnologias {
    display: flex;
    gap: 25px;
    margin-top: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.bloque {
    background: white;
    padding: 25px;
    border-radius: 18px;
    width: 320px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.bloque ul {
    list-style: none;
}

/* ---------------------- PROYECTOS ---------------------- */
#portfolio {
    background: #f6f8ff;
    padding: 100px 15px;
}

.grid-proyectos {
    max-width: 1100px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card-proyecto {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
    transition: .3s;
}

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

.card-proyecto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.contenido-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.contenido-card h4 {
    margin-bottom: 10px;
}

.contenido-card p {
    font-size: 14px;
    color: #565656;
    min-height: 60px;
    flex: 1;
}

.tecnologias {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin: 12px 0;
}

.tecnologias span {
    background: #eef0ff;
    color: #3c46d4;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
}

.links {
    margin-top: auto;
}

.links a {
    text-decoration: none;
    color: #3c46d4;
    font-weight: 600;
}

/* ---------------------- CERTIFICACIONES ---------------------- */
#certificaciones {
    background: #f3f3f3;
    padding: 100px 15px;
}

.contenedor-certificaciones {
    max-width: 1100px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card-certificado {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.card-certificado:hover {
    transform: translateY(-6px);
}

.card-certificado img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.contenido-certificado {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.contenido-certificado h4 {
    margin-bottom: 8px;
    min-height: 48px;
}

.institucion {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.acciones {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.acciones a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    padding: 8px;
    border-radius: 20px;
    background: #eef0ff;
    color: #3c46d4;
    transition: 0.3s;
}

.acciones a:hover {
    background: #3c46d4;
    color: white;
}

.estado-curso {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 8px;
    border-radius: 20px;
    background: #ffeaa7;
    color: #b7791f;
    display: inline-block;
}

/* ---------------------- CONTACTO ---------------------- */
#contacto {
    background-color: #f6f8ff;
    padding: 100px 15px;
}

#contacto .titulo-seccion {
    margin-bottom: 20px;
    text-align: center;
    font-size: 22px;
    text-transform: uppercase;
    color: #111135;
    text-decoration: underline;
    text-decoration-color: #d3d3d3;
    text-decoration-thickness: 5px;
}

#contacto .contenedor-form {
    max-width: 1100px;
    margin: auto;
}

#contacto .contenedor-form .fila {
    margin-bottom: 15px;
}

#contacto .contenedor-form .mitad {
    display: flex;
    justify-content: space-between;
}

#contacto .contenedor-form input,
#contacto .contenedor-form textarea {
    padding: 20px;
    border-radius: 20px;
    border: 1px solid #919191;
}

#contacto .contenedor-form .mitad input {
    width: 48%;
}

#contacto .contenedor-form .input-full {
    width: 100%;
}

#contacto .btn-enviar {
    display: block;
    margin: auto;
    cursor: pointer;
    transition: .5s;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: bold;
}

#contacto .btn-enviar:hover {
    background-color: #3c46d4;
    color: #fff;
}

#contacto .contacto-mail {
    text-align: center;
    margin-bottom: 25px;
    font-size: 15px;
    color: #565656;
}

#contacto .contacto-mail i {
    color: #3c46d4;
    margin-right: 8px;
}

#contacto .contacto-mail a {
    text-decoration: none;
    color: #565656;
    font-weight: 500;
}

#contacto .contacto-mail a:hover {
    color: #3c46d4;
}

/* ---------------------- FOOTER ---------------------- */
footer {
    background: black;
    color: white;
    text-align: center;
    padding: 15px;
}

footer a {
    color: white;
    font-size: 22px;
    margin: 0 5px;
}

/* ---------------------- RESPONSIVE ---------------------- */
@media screen and (max-width:800px) {
    .redes {
        display: none;
    }

    nav {
        display: none;
    }

    nav.responsive {
        display: block;
        background-color: rgba(0, 0, 0, .8);
        width: 100%;
        position: absolute;
        top: 48px;
        left: 0;
        padding: 10px 0;
    }

    nav.responsive ul {
        display: block !important;
        text-align: center;
    }

    nav.responsive ul li {
        margin: 5px 0;
    }

    #icono-nav {
        display: block;
    }

    #inicio .contenido .presentacion h2 {
        font-size: 40px;
    }

    #sobremi {
        padding: 50px 0;
        display: block;
    }

    #sobremi .contenedor-foto {
        max-width: 200px;
        margin: auto;
    }

    #sobremi .contenedor-foto img {
        padding: 8px;
    }

    #sobre mi .sobremi .titulo-seccion {
        text-align: center;
    }

    #sobremi .sobremi h2 {
        font-size: 25px;
        text-align: center;
    }

    #formacion {
        padding: 50px 15px;
    }

    #formacion .titulo-seccion {
        text-align: center;
    }

    #formacion .contenedor-formacion {
        display: block;
        width: 100%;
        padding: 0 10px;
    }

    #formacion .item-formacion {
        margin: 15px auto;
        width: 100%;
        max-width: 400px;
        text-align: center;
    }

    #formacion .item-formacion h4 {
        margin-bottom: 8px;
    }

    #formacion .item-formacion p {
        margin: 4px 0;
    }

    #portfolio {
        padding: 50px 0;
    }

    #portfolio .fila {
        display: block;
    }

    #portfolio .fila .proyecto {
        margin: 10px auto;
    }

    #contacto {
        padding: 50px 15px;
    }

    #contacto .contenedor-form .mitad {
        margin-bottom: 15px;
        display: block;
    }

    #contacto .contenedor-form .mitad input {
        width: 100%;
        margin-bottom: 15px;
    }
}