@import url('https://fonts.googleapis.com/css2?family=Michroma&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Blinker:wght@300;400;600;700&display=swap');

/* ========== VARIABLES ========== */

:root {
    --rosa: #c16fb1;
    --rosa-claro: #ffb3e6;
    --morado: #7a4575;
    --texto: #222;
    --borde-caja: 44px;
}

/* ========== ESTILOS GENERALES ========== */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Blinker', sans-serif;
    margin: 0;
    padding: 2em 3em 5em 3em;
    background: transparent;
    isolation: isolate;
    color: var(--texto);
}

/* Fondo extendido para cubrir los bordes */

body::before {
    content: "";
    position: fixed;
    inset: -7%;
    z-index: -1;
    pointer-events: none;

    background: url('Assets/Fondo.png')
                center / cover no-repeat;
}

h1,
h2 {
    font-family: 'Michroma', sans-serif;
    font-weight: 400;
    color: #333;
}

h2 {
    font-size: 1.2em;
}

h3 {
    font-family: 'Blinker', sans-serif;
    font-size: 1.1em;
}

p {
    line-height: 1.6;
}

/* ========== HEADER ========== */

header {
    --tam-titulo: 2.6rem;

    max-width: 1300px;
    margin: 0 auto 1.5em auto;
    text-align: center;
}

header h1 {
    font-size: var(--tam-titulo);
    margin: 0.3em 0 0 0;
}

header .subtitulo {
    font-family: 'Michroma', sans-serif;
    font-size: calc(var(--tam-titulo) / 2);
    color: #333;
    margin: 0.4em 0 0 0;
}

/* ========== LAYOUT ========== */

.layout {
    display: grid;
    grid-template-columns: 240px 1fr 220px;
    gap: 2em;
    align-items: start;
    max-width: 1300px;
    margin: 0 auto;
}

/* ========== BARRA IZQUIERDA ========== */

.barra-izquierda {
    display: flex;
    flex-direction: column;
    gap: 0.7em;
}

.enlaces-izquierda {
    display: flex;
    flex-direction: column;
    gap: 0.7em;
}

.enlaces-izquierda .nav-btn {
    display: block;
}

/* ========== SOBRE MÍ ========== */

.sobre-mi {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 1.2em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.sobre-mi .foto {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--rosa-claro);
    margin-bottom: 1em;
}

.sobre-mi .foto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sobre-mi h2 {
    font-size: 1em;
    margin: 0 0 0.6em 0;
}

.sobre-mi p {
    font-size: 0.95em;
    text-align: left;
    margin: 0;
}

/* ========== CENTRO ========== */

main {
    min-height: 420px;
}

/* ========== PANELES ========== */

.panel {
    display: none;
}

.panel.activo {
    display: block;
    animation: aparecer 0.35s ease;
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== TÍTULOS ========== */

.titulo-pildora {
    display: flex;
    align-items: center;
    justify-content: center;

    width: min(100%, 560px);
    min-height: 56px;

    margin: 0 auto 1.4em auto;
    padding: 0.7em 1.2em;

    text-align: center;

    font-family: 'Michroma', sans-serif;
    font-size: 1.13em;
    font-weight: 400;

    color: var(--morado);
    text-shadow: 2px 2px 0 var(--rosa-claro);
    -webkit-text-stroke: 0.5px currentColor;

    border: none;
    border-radius: 999px;

    background: url('Assets/barra-titulos.png')
                center / 100% 100% no-repeat;
}

/* ========== CAJAS ========== */

.caja {
    border: var(--borde-caja) solid transparent;
    padding: 0.4em 0.8em;
}

/* Cajas blancas y lisas */

.caja-texto {
    border: none;
    border-radius: 12px;

    padding: calc(var(--borde-caja) + 0.4em)
             calc(var(--borde-caja) + 0.8em);

    background: rgba(255, 255, 255, 0.85);

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Caja original de tareas */

.caja-tareas {
    border-image: url('Assets/caja-tareas.png')
                  150 fill / var(--borde-caja) stretch;
}

/* ========== COLUMNAS DE TEXTO ========== */

.columnas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
}

.columnas p {
    margin-top: 0;
}

/* ========== MARCOS DE TAREAS ========== */

.marcos {
    --separacion: 1.4em;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--separacion);
}

.marco {
    position: relative;
    display: block;

    width: calc((100% - 2 * var(--separacion)) / 3);
    aspect-ratio: 684 / 816;

    background: linear-gradient(
        180deg,
        #ffb3e6 0%,
        #ffeaf7 70%,
        #ffffff 100%
    );

    border: 4px solid var(--rosa);
    border-radius: 24px;

    box-shadow: inset 0 0 0 6px
                rgba(255, 255, 255, 0.5);

    text-decoration: none;
    color: var(--morado);

    transition: transform 0.2s ease-in-out;
}

.marco:hover {
    transform: scale(1.04);
}

/* Miniatura dentro del marco */

.miniatura {
    position: absolute;

    left: 9%;
    right: 8.5%;
    top: 7%;

    aspect-ratio: 1 / 1;
    border-radius: 10%;
    overflow: hidden;

    background: #5d5d5d;
}

.miniatura img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marco-titulo {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 4%;

    text-align: center;

    font-weight: 700;
    font-size: 1.05em;
    color: var(--morado);
}

/* ========== PROYECTO FINAL ========== */

.proyecto-final {
    text-align: center;
    margin-top: 2em;
}

.proyecto-final p {
    margin: 0 0 1em 0;
    font-weight: 600;
    color: var(--morado);
}

/* ========== MENÚ DERECHO ========== */

.menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7em;
    position: sticky;
    top: 1.5em;
}

.nav-btn {
    font-family: 'Blinker', sans-serif;
    font-size: 1.15em;
    font-weight: 700;
    text-align: center;

    padding: 0.8em 1em;

    border: 2px solid var(--rosa);
    border-radius: 999px;

    background: linear-gradient(
        180deg,
        #ffb3e6 0%,
        #ffd9f2 55%,
        #fff 100%
    );

    color: var(--morado);
    text-shadow: 1px 1px 0 #ffb3e6;

    box-shadow: inset 0 3px 0
                rgba(255, 255, 255, 0.7);

    cursor: pointer;

    transition: background 0.2s, color 0.2s;
}

a.nav-btn {
    display: block;
    text-decoration: none;
}

.nav-btn:hover,
.nav-btn:focus-visible,
.nav-btn.activo {
    background: #fff;
    color: var(--rosa);
    text-shadow: none;
}

/* ========== OTROS PROYECTOS ========== */

.grilla {
    display: grid;

    grid-template-columns: repeat(
        auto-fill,
        minmax(190px, 1fr)
    );

    gap: 1.5em;
}

.tarjeta {
    background: linear-gradient(
        180deg,
        #ffb3e6 0%,
        #ffeaf7 70%,
        #ffffff 100%
    );

    border: 4px solid var(--rosa);
    border-radius: 24px;

    aspect-ratio: 684 / 816;
    padding: 9% 8.5% 4%;

    box-shadow: inset 0 0 0 6px
                rgba(255, 255, 255, 0.5);

    overflow: hidden;
}

.tarjeta > a {
    display: flex;
    flex-direction: column;
    height: 100%;

    text-decoration: none;
    color: inherit;

    transition: transform 0.2s ease-in-out;
}

.tarjeta > a:hover {
    transform: scale(1.04);
}

.tarjeta h3 {
    text-align: center;

    padding: 0.5em 0 0;
    margin: auto 0 0;

    color: var(--morado);
}

/* ========== PORTADAS ========== */

.portada {
    position: relative;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    border: none;
    border-radius: 10%;

    background: #111;
}

.portada img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== PREVIEW DE TAREAS ========== */

.img-preview {
    position: absolute;
    inset: 0;

    opacity: 0;

    transition: opacity 0.25s ease-in-out;
}

.marco:hover .img-preview {
    opacity: 1;
}

/* ========== BOTÓN VER PROYECTO ========== */

.boton-img {
    position: relative;
    display: inline-block;

    width: 280px;
    container-type: inline-size;

    text-decoration: none;
}

.boton-img img {
    display: block;
    width: 100%;
}

.boton-hover {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #fff;

    border: 2px solid var(--rosa);
    border-radius: 999px;

    color: var(--rosa);

    font-family: 'Blinker', sans-serif;
    font-weight: 700;
    font-size: 8cqw;

    padding-top: 0.1em;

    opacity: 0;

    transition: opacity 0.2s ease-in-out;
}

.boton-img:hover .boton-hover {
    opacity: 1;
}

/* ========== REPRODUCTOR PERSONALIZADO ========== */

/* ========== FONDO DEL REPRODUCTOR ========== */

.control-musica {
    position: fixed;

    right: 1.2em;
    bottom: 1.2em;

    z-index: 10;

    width: min(350px, calc(100vw - 2.4em));

    padding: 1em 1.4em 0.85em;

    border: 2px solid var(--rosa);
    border-radius: 999px;

    background: linear-gradient(
        180deg,
        #ffb3e6 0%,
        #ffd9f2 55%,
        #fff 100%
    );

    box-shadow: inset 0 3px 0
                rgba(255, 255, 255, 0.7);
}

/* Controles del reproductor */

.musica-controles {
    display: flex;
    align-items: center;
    gap: 1.1em;
    min-height: 38px;
}

/* Botón de reproducción */

#btn-musica {
    display: grid;
    place-items: center;

    flex-shrink: 0;

    width: 32px;
    height: 38px;
    padding: 3px;

    border: none;
    background: transparent;

    cursor: pointer;
}

#btn-musica:hover {
    transform: scale(1.08);
}

/* Imagen de Play / Pause */

#icono-musica {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

/* Volumen */

.volumen-grupo {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.65em;
    min-width: 0;
}

.volumen-grupo label {
    font-family: 'Blinker', sans-serif;
    font-size: 0.9em;
    color: var(--morado);
}

/* Barra de volumen */

#volumen-musica {
    flex: 1;
    min-width: 45px;
    height: 5px;

    margin: 0;
    border-radius: 999px;

    appearance: none;
    -webkit-appearance: none;

    background: #c16fb1;

    cursor: pointer;
}

/* Perilla usando dot.png */

#volumen-musica::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;

    width: 20px;
    height: 20px;

    border: 0;

    background: url('Assets/dot.png')
                center / contain no-repeat;
}

#volumen-musica::-moz-range-thumb {
    width: 20px;
    height: 20px;

    border: 0;

    background: url('Assets/dot.png')
                center / contain no-repeat;
}

/* Nombre y enlace de la canción */

.musica-pie {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 0.75em;
    margin-top: 0.15em;

    font-family: 'Blinker', sans-serif;
    font-size: 0.85em;

    color: var(--morado);
}

.link-cancion {
    color: var(--morado);
    text-decoration: underline;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1000px) {

    :root {
        --borde-caja: 30px;
    }

    body {
        padding: 1em 1.2em 5em 1.2em;
    }

    header {
        --tam-titulo: 1.4rem;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .menu {
    flex-direction: row;
    overflow-x: auto;
    position: static;
    padding-bottom: 0.4em;
}

    .nav-btn {
        white-space: nowrap;
    }

    .columnas {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 600px) {

    .marco {
        width: calc(
            (100% - var(--separacion)) / 2
        );
    }
}
@media (max-width: 600px) {
    .control-musica {
        position: relative;
        right: auto;
        bottom: auto;
        width: calc(100% - 2.4em);
        margin: 2em auto;
    }
}