
.references p{
    font-size: 1.3em;
}
.references #referencesSection{
    padding-top: 4%;
    min-height: 100vh;
    color: var(--primary);
    text-align: center;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    background: linear-gradient(var(--tertiary) 10%, var(--tertiaryT) 90%, var(--accent)), var(--backgroundTexture);
}
.references #referencesSection h1{
    font-size: 2em;
}
.references .desktop #referencesSection p{
    width: 60%;
}
.references .desktop #referencesContainer{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 15px;
    margin-bottom: 10%;
    width: 70vw;

    border: 2px solid var(--accent);
    border-radius: 20px;

    background-color: var(--primaryT);
}
.references #referencesContainerM .referenceButton,
.references .desktop #referencesContainer .referenceButton{
    border-radius: 5px;
    border: 2px solid var(--accent);
    background-size: cover;
    background-position: center 25%;
    cursor: pointer;
}
.references #referencesContainerM .referenceButton h3,
.references .desktop #referencesContainer .referenceButton h3{
    font-size: 1.5rem;
    font-weight: 100;
    text-align: start;
    background: linear-gradient(90deg, var(--accent), var(--accentT), transparent);
    margin: 0;
    padding: 1em 0;
    width: 50%;
}

.references #referencesWrapper{
    position: relative;

}

.references .mobile #referencesContainerM{
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 10px;
    gap: 10px;
    width: 90%;
    padding-bottom: 5%;
}
.references .referencesContainer .hide{
    opacity: 0;
    transform: scale(0.5);
}
.references .referencesContainer .hide.destroyed{
    display: none;
}
.references .desktop #refButtonContainer{
    --width:  12vw;

    position: absolute;
    top: 20px;
    right: calc(-1 * var(--width));
    display: flex;
    flex-direction: column;    
    justify-content: space-around;
    gap: 10px;
    width: var(--width);

    padding: 20px;

    border: 2px solid var(--accent);
    border-left: 0;
    border-radius: 20px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;

    background: var(--primaryT);

}
.references .mobile #refButtonContainerM{
    align-self: stretch;

    display: grid;
    grid-template-columns: 1fr 1fr;
}
.references .mobile #refButtonContainerM button{
    margin: 3%;
    position: relative;
    color: var(--primary);
}
/* .references #refButtonContainerM button:not(.active),
.references #refButtonContainer button:not(.active){
    background:linear-gradient(-3deg, transparent 50%, var(--secondary1) 50%);
    background-size: 100% 300%;
    background-position: bottom;
    background-repeat: no-repeat;

    border: 1px solid var(--secondary2);
}
.references #refButtonContainerM button:not(.active):hover,
.references #refButtonContainer button:not(.active):hover{
    background-position: top;
    border-color: transparent;
    
} */

.references dialog[open]{
    z-index: 99;
    border: 0;
    background: 0;
    
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-around;
    
}
.references dialog[open] #closeButton{
    background-color: transparent;
    border: 0;
    z-index: 1;
    position: fixed;
    top: 5%;
    left: 5%;
}

.references dialog::backdrop{
    background-color: var(--accentT);
}
.references dialog img{
    display: block;
    max-width:70vw;
    max-height:80vh;
    width: auto;
    height: auto;
}
.references dialog .mobilePrevButton{
    display: none;
}
.references dialog button{
    position: relative;
}
.references dialog button::before{
    content: "";
    position: absolute;
    background-color: var(--primary);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    border: 2px solid var(--secondary1);
}

@media screen and (max-width: 600px) {
    .references dialog[open]{
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 5fr 1fr;
        align-items: center;
        justify-items: center;
        gap: 15px;
    }
    .references dialog button{
        justify-self: stretch;
    }
    .references dialog img{
        grid-column: span 2;
        border-radius: 20px;
        box-shadow: 0 0 10px var(--primary);
    }
    .references dialog .desktopPrevButton{
        display: none;
    }
    .references dialog .mobilePrevButton{
        display: unset;
    }
}