body {
    font-size: 1rem;
    margin: 0;
    font-family: sans-serif;
    color: #312f2f;
}

#pageDiv {

    background-color: white;
    box-shadow: inset 0 0 15px rgba(146, 110, 63, 0.618);
    height: 100vh;
    width: 100vw;
}

#firstDiv {
    height: 100%;
    width: 100%;

    background-color: white;
    box-shadow: inset 0 0 15px rgba(146, 110, 63, 0.618);
    display: flex;
}

#leftDiv {

    background-color: white;
    box-shadow: inset 0 0 15px rgba(146, 110, 63, 0.618);
    width: 60%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

#upLeftDiv {
    grid-column: 1/2;
    grid-row: 1/2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.5s;
    overflow-y: auto;
    background-image: url("./images/desk_final.webp");
    background-size: cover;
    background-repeat: no-repeat;
    flex-wrap: nowrap;
}

#upLeftDiv:hover {
    transition-duration: 0.5s;
    transition-property: box-shadow;
    box-shadow: inset 0 0 15px white;
}

#pictureDiv {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50%;
    width: 100%;
}

#pictureDiv img {
    height: 80%;
}

.sectionLabel {
    margin-top: 15lh;
    font-size: 0.7rem;
    padding: 1.5lh;
    background-color: white;
    display: flex;
    flex-direction: row;
    border-radius: 10px;
}

#upRightDiv {

    background-color: white;
    grid-column: 2/3;
    grid-row: 1/2;
    display: flex;
    flex-direction: row;
    align-items: center;
    transition: box-shadow 0.5s;
    overflow-y: auto;
    background-image: url("./images/trabajo.webp");
    background-size: cover;
    background-repeat: no-repeat;
    flex-wrap: nowrap;
    justify-content: center;
}

#upRightDiv:hover {
    transition-duration: 0.5s;
    transition-property: box-shadow;
    box-shadow: inset 0 0 15px white;
}

#lowerDiv {

    background-color: white;
    grid-column: 1/3;
    grid-row: 2/3;
    display: flex;
    flex-direction: row;
    align-items: center;
    transition: box-shadow 0.5s;
    overflow-y: auto;
    background-image: url("./images/sobre-mi2.webp");
    background-size: cover;
    background-repeat: no-repeat;
    flex-wrap: nowrap;
    justify-content: center;
}

#lowerDiv:hover {
    transition-duration: 0.5s;
    transition-property: box-shadow;
    box-shadow: inset 0 0 15px white;
}

#lowerDiv:hover {
    transition-duration: 0.5s;
    transition-property: box-shadow;
    box-shadow: inset 0 0 15px white;
}

#rightDiv {

    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    width: 39.8%;
    justify-content: center;
    transition: box-shadow 0.5s;

    #studiesDiv {
        height: 50%;
        align-items: center;
        width: 100%;
        background-image: url("./images/library.webp");
        background-size: cover;
        background-repeat: no-repeat;
        flex-wrap: nowrap;
        justify-content: center;
    }

    #projectsDiv {
        height: 50%;
        display: flex;
        align-items: center;
        width: 100%;
        background-image: url("./images/projects.webp");
        background-size: cover;
        background-repeat: no-repeat;
        flex-wrap: nowrap;
        justify-content: center;
    }
}

#rightDiv:hover {
    transition-duration: 0.5s;
    transition-property: box-shadow;
    box-shadow: inset 0 0 15px white;
}


#studiesDiv:hover {
    transition-duration: 0.5s;
    transition-property: box-shadow;
    box-shadow: inset 0 0 15px white;
}


#projectsDiv:hover {
    transition-duration: 0.5s;
    transition-property: box-shadow;
    box-shadow: inset 0 0 15px white;
}

#studiesDiv {
    display: flex;
    flex-direction: column;
    overflow-y: auto;

    li {
        margin: 5% 0 0 0%;
    }

}

hr {
    width: 90%;
    margin: 0;
    border-color: rgba(146, 110, 63, 0.618);
}


h3 {
    margin: 0;
}


.listDiv {
    width: 100%;
    height: fit-content;
    margin-bottom: 2%;
}



/* Fondo oscuro (overlay) */
#overlay {
    width: 100vw;
    display: none;
    /* oculto al inicio */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.4s ease forwards;
}

/* ---------- Animación del overlay ---------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Div emergente centrado */
#centralUpLeftDiv {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    text-align: center;
    width: 80%;
    height: 80%;
    flex-direction: column;

    /* Animacion */
    animation: popupZoom 0.6s ease forwards;
    transform: scale(0.8);
    opacity: 0;
}

@keyframes popupZoom {
    0% {
        transform: scale(0.8);
        opacity: 0;
        box-shadow: 0 0 0 rgba(67, 47, 7, 0.888);
    }

    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 rgba(67, 47, 7, 0.888);
    }
}

/* Div emergente centrado */
#centralUpRightDiv {
    width: 80%;
    height: 80%;
    display: none;
    background: white;
    padding: 30px;
    border-radius: 12px;
    background-color: white;
    grid-column: 2/3;
    grid-row: 1/2;
    display: none;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.5s;
    overflow-y: auto;

    #titleUpRightDiv {
        text-align: center;
    }

    h3 {
        margin-bottom: 1%;
    }

    li {
        margin: 1%;
    }

    a {
        text-decoration: none;
    }
}

#centralUpLeftDiv::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
}



#centralPictureDiv {
    margin-bottom: 1lh;
}

#centralPictureDiv {
    position: relative;
    /* crea el contexto para el ::before */
    display: inline-block;
    overflow: hidden;
    /* recorta el brillo dentro del div */
    border-radius: 50%;
    /* si quieres que el brillo siga la forma circular */
}

#centralPictureDiv::before {
    content: "";
    /* NECESARIO para que se renderice */
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 4s ease-in-out;
}

#centralContactInfoDiv {
    justify-content: center;
    display: flex;
}

#contactInfoDiv {
    box-shadow: 0px 2px 5px #c68642;
    width: fit-content;
    padding: 1.5lh;
    border-radius: 15px;

    ul {
        padding: 0;
    }

    li {
        margin: 5%;
        text-align: start;
    }
}


@keyframes shine {
    0% {
        left: -75%;
    }

    60% {
        left: 125%;
    }

    100% {
        left: 125%;
    }
}


#centralUpLeftDiv img {
    width: 20%;
    border: 12px solid;
    /* grosor del marco */
    border-image: linear-gradient(45deg, #8b5a2b, #c68642, #8b5a2b) 1;
    /* degradado madera */
    box-sizing: border-box;
    /* aseguramos que el borde no aumente tamaño */
}

#workInProgress {
    z-index: 3;
    display: flex;
    /* flex*/
    padding: 0.5lh;
    border-radius: 5px;
    position: absolute;
    right: 5vw;
    bottom: 10vh;
    background-color: rgb(73, 73, 252);
    color: white;
}


#centralLowerDiv {
    width: 80%;
    height: 70%;
    align-items: center;
    margin-bottom: 2%;
    background-color: white;
    display: none;
    /* flex*/
    padding: 1lh;
    border-radius: 5px;
    flex-direction: column;
    overflow-y: auto;
}

#centralStudiesDiv {
    width: 80%;
    height: 70%;
    align-items: center;
    margin-bottom: 2%;
    background-color: white;
    display: none;
    /* flex*/
    padding: 0.5lh;
    border-radius: 5px;
    flex-direction: column;
    overflow-y: auto;

    li {
        margin: 2% 0 0 0%;
    }

    a {
        text-decoration: none;
    }
}


#centralProjectsDiv {
    width: 80%;
    height: 70%;
    align-items: center;
    margin-bottom: 2%;
    background-color: white;
    display: none;
    /* flex*/
    padding: 0.5lh;
    border-radius: 5px;
    flex-direction: column;
    overflow-y: auto;

    li {
        margin: 5% 0 0 0%;
    }
}

/*  Page rotation */

.book {
    width: 100vw;
    height: 100vh;
    perspective: 2000px;
    position: relative;
    overflow: hidden;
}

.page {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.front {
    transform-origin: left;
    z-index: 2;
    animation: flip 5s ease-out 1s forwards;
    background-color: #8B5A2B;
    background-image: url('./images/cuaderno-abierto-vacio.png');
    background-repeat: no-repeat;
    background-position: -3%;
    background-size: contain;
    position: fixed;
}

.frontLabel{
    padding: 1lh;
    background-color: white; 
    border-radius: 10px;
}

.back {
    z-index: 1;
}

/* 🎞️ Animación: pasa página hacia la izquierda */
@keyframes flip {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(-180deg);
        display: none;
    }
}