@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-sizing: border-box;

}

body {
    background-image: url('../img/fondo-textura.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 100vh; /* Para que la foto del fondo se vea entera*/
}

/* HEADER */
header {
    height: 50px;
    background-color: hotpink;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: white;
}

header a {
    color: white;
    text-decoration: none;
}

.logo a {
    font-family: 'Instrument Serif', serif;
    font-size: 40px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav ul li a:hover {
    opacity: 0.7;
    color: black;
}

nav ul li a.active {
    border-bottom: 2px solid black;
    padding-bottom: 2px;
    color: black;
}

.contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact a:hover {
    color: black;
}

/* INTRO: FOTO Y TEXTO */
.intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 100px auto;
    text-align: left;
    gap: 60px;
}

.intro-content {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.profile-img {
    width: 25%;
    min-width: 120px;
    max-width: 240px;
    height: auto;
    border-radius: 10px;
    transform: rotate(-5deg);
    animation-name: animacion-foto;
    animation-duration: 4s;
    animation-iteration-count: infinite;
}

@keyframes animacion-foto {
    0% {
        transform: rotate(-5deg) translateY(0px);
    }
    25% {
        transform: rotate(-20deg) translateY(-10px);
    }
    50% {
        transform: rotate(-7deg) translateY(10px);
    }
    75% {
        transform: rotate(-4deg) translateY(-30px);
    }
    100% {
        transform: rotate(-5deg) translateY(0px);
    }
}

h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 50px;
    
}

.intro-text h1 {
    margin-bottom: 10px;
}

.intro-text p {
    max-width: 800px;
    line-height: 1.5;
    font-size: 18px;
}

.detalles {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    font-weight: normal;
}

.contenedor-detalles {
    display: flex;
    gap: 40px;
}

.mitad-detalles {
    flex: 1;
}

.mitad-detalles img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    display: block;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
}

.caja-seccion {
    background-color: white;
    border: 2px solid hotpink;
    border-radius: 8px;
    padding: 12px 16px;
    display: inline-block;
    margin-bottom: 25px;
    transform: rotate(-2deg);

}

.caja-seccion h2 {
    font-family: 'Instrument Serif', serif;

}

.experiencia {
    margin-bottom: 18px;
}

.educacion {
    margin-bottom: 18px;
}

.detalles h4 {
    font-family: 'Instrument Serif', serif;
    font-size: 30px;
    font-weight: normal;
}

.experiencia p {
    line-height: 1.4;
    color: #333;
}

.educacion p {
    line-height: 1.4;
    color: #333;
}

/* CUALIDADES */
.cualidades {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    justify-content: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.cualidades-box {
    background-color: white;
    border: 2px solid hotpink;
    border-radius: 8px;
    padding: 12px 28px;
    flex: 0 0 auto;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    align-content: center;
}

.cualidades-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.cualidades-box h3 {
    color: black;
    font-size: 25px;
    font-family: 'Instrument Serif', serif;
    font-weight: normal;
}

#cualidades-box-1 {
    transform: rotate(4deg);
}

#cualidades-box-2 {
    transform: rotate(3deg);
}

#cualidades-box-3 {
    transform: rotate(-2deg);
}

#cualidades-box-4 {
    transform: rotate(4deg);
}

/* PROJECTS SECTION */
.proyectos {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
}

.contenedor-proyectos {
    display: block;
}

.titulo-proyectos {
    text-align: center;
    margin-bottom: 24px;
}

.grid-proyectos {
    display: grid;
    grid-template-columns:repeat(3, 32%);
    gap: 24px;
}

.tarjeta-proyecto {
    background: white;
    border: 2px solid hotpink;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.tarjeta-proyecto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin-bottom: 10px;
}

.tarjeta-proyecto h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 30px;
    font-weight: normal;
}

.tarjeta-proyecto p {
    line-height: 1.4;
    color: #333;
}

/* MEDIA QUERIES */
@media (max-width: 475px) {
    header {
        padding: 8px 12px;
        height: auto;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    nav ul {
        gap: 12px;
    }

    .intro {
        width: 95%;
        margin: 60px auto;
        gap: 24px;
    }

    .intro-content {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    h1 {
        font-size: 28px;
    }

    .intro-text h1 {
        text-align: center;
    }

    .intro-text p {
        font-size: 16px;
        max-width: 100%;
        text-align: center;
    }

    .cualidades {
        gap: 20px;
        width: 95%;
        margin: 0 auto;
    }

    .cualidades-box {
        min-width: 0;
        width: auto;
    }
    .detalles {
        width: 95%;
        margin: 20px auto;
    }

    .contenedor-detalles {
        flex-direction: column;
        gap: 12px;
    }

    .caja-seccion {
        display: block;
        width: 100%;
    }

    .proyectos {
        width: 95%;
        margin: 20px auto;
    }

    .grid-proyectos {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1280px) {
    .intro {
        max-width: 1400px;
        gap: 80px;
    }

    .intro-content {
        gap: 60px;
    }

    h1 {
        font-size: 100px;
    }

    .intro-text p {
        font-size: 20px;
    }

    .cualidades {
        width: 90%;
        max-width: 1400px;
        margin: 0 auto;
    }

    .cualidades-box h3 {
        font-size: 40px;
    }

    .caja-seccion h2 {
        font-size: 40px;
    }

    .detalles {
        width: 90%;
        max-width: 1400px;
        margin: 40px auto;
    }
    .proyectos {
        width: 90%;
        max-width: 1400px;
        margin: 40px auto;
    }
    .grid-proyectos {
        grid-template-columns: repeat(3, 32%);   
}