body {
    margin: 70px;
    margin-top: 0;
    padding: 2em;
    background-color: #fffafc; /* fondo claro para el resto del sitio */
    font-family: sans-serif;
    padding-top: 70px;
}

/* === Header con portada fija === */
header {
    background-image: url("assets/fondo.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 👈 la imagen se queda fija */
    height: 100vh;  /* ocupa toda la pantalla */
    width: 100%;    /* ocupa todo el ancho */
    display: flex;
    justify-content: center;
    align-items: center;
}

header h1 {
    font-family: 'Constantia';
    color: rgb(81, 15, 35);
    font-size: 2.8em;
    text-align: center;
    background: rgba(255, 255, 255, 0.6);
    padding: 15px 25px;
    border-radius: 10px;
}

/* === Animación general (desde la izquierda) === */
.animate {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate.visible {
    opacity: 1;
    transform: translateX(0);
}

/* === Títulos secundarios === */
h2 {
    font-family: 'Constantia';
    color: rgb(81, 15, 35);
    font-size: 2em;
    margin-bottom: 1em;
}
h3 {
    font-family: 'Constantia';
    font-size: 1em;
    color: rgb(81, 15, 35);
    margin-top: 0.5em;
}

/* === Subtítulo en la intro === */
.subtitulo {
    font-family: 'Constantia';
    font-size: 1.6em;
    font-weight: bold;
    color: rgb(81, 15, 35);
    margin-bottom: 1em;
    text-align: left;
}

/* === Contenedor principal === */
#container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3em;
    align-items: start;
}

/* === Intro === */
.intro {
    display: flex;
    flex-direction: column;
    gap: 1em;
}
.intro p {
    text-align: justify;
    line-height: 1.6;
    font-size: 1.1em;
}
.intro button {
    font-family: 'Constantia';
    font-size: 1em;
    font-weight: bold;
    padding: 12px 35px;
    border: none;
    background-color: rgb(120, 47, 135);
    color: white;
    cursor: pointer;
    border-radius: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.intro button:hover {
    background: #501330;
    color: rgb(255, 210, 230);
    transform: translateY(-3px);
}

/* === Proyectos === */
.proyectos {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}
.proyectos h2 {
    position: relative;
    display: inline-block;
    padding: 5px 15px;
    z-index: 1;
}
.proyectos h2::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 1.6em;
    background: rgba(200, 100, 150, 0.4);
    z-index: -1;
}

/* === Galería === */
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2em;
    width: 100%;
}

/* === Tarjetas === */
.tarjeta {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.tarjeta:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.tarjeta img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid rgba(200, 100, 150, 0.4);
}
.tarjeta h3 {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
}
.tarjeta h3::before {
    content: "❤";
    margin-right: 4px;
    color: rgb(167, 78, 108);
}

/* === Información personal === */
.info-personal {
    max-width: 800px;
    margin: 3em auto;
    padding: 2em;
    background-color: rgba(255, 182, 193, 0.8);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.foto-redonda {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 1.5em auto;
    border: 3px solid rgb(167, 78, 108);
}

/* === Contacto === */
.contacto {
    max-width: 600px;
    margin: 3em auto;
    padding: 2em;
    background-color: rgba(255, 182, 193, 0.8);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.contacto a {
    color: rgb(81, 15, 35);
    font-weight: bold;
    text-decoration: none;
}
.contacto a:hover {
    color: rgb(167, 78, 108);
    text-decoration: underline;
}

/* Botón corazón */
.boton-corazon {
    display: inline-block;
    font-size: 2em;
    color: rgb(167, 78, 108);
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: 50%;
    background-color: rgba(255, 192, 203, 0.9);
    transition: all 0.3s ease;
}
.boton-corazon:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    color: white;
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 182, 193, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 0.8em 0;
    transition: all 0.3s ease;
}
.navbar.expanded {
    padding: 2em 0;
    background-color: rgba(255, 182, 193, 1);
}
.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2em;
}
.nav-icon {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}
.nav-icon:hover {
    transform: scale(1.2);
}

/* === Contenedor principal en columna (centrado) === */
#container {
    display: flex;
    flex-direction: column;
    align-items: center;   /* centra horizontalmente todo dentro */
    gap: 3em;
    margin: 0 auto;
    max-width: 1000px;     /* para que no se expanda demasiado */
}

/* === Intro (centrada en la página) === */
.intro {
    display: flex;
    flex-direction: column;
    gap: 1em;
    text-align: center;    /* centra textos */
    max-width: 800px;
    margin: 0 auto;        /* centra el bloque */
}
.intro p {
    text-align: justify;   /* si prefieres estilo académico */
    line-height: 1.6;
    font-size: 1.1em;
}

/* === Subtítulo en la intro === */
.subtitulo {
    font-family: 'Constantia';
    font-size: 1.6em;
    font-weight: bold;
    color: rgb(81, 15, 35);
    margin-bottom: 1em;
    text-align: center;
}

/* === Proyectos centrados debajo === */
.proyectos {
    display: flex;
    flex-direction: column;
    align-items: center;   /* centra el bloque */
    width: 100%;
    margin-top: 2em;
    text-align: center;
}
.proyectos h2 {
    text-align: center;
}
.galeria {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2em;
    width: 100%;
    max-width: 1000px;
}
