.fav-grid {
    margin: 30px;
    width: calc(100% - 60px);
    height: fit-content;
    position: relative;
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(max(400px, calc(50% - 16px)), 1fr));
    grid-gap: 20px 20px;
}

.skong-grid {
    margin: 30px;
    width: calc(100% - 60px);
    height: fit-content;
    position: relative;
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(max(400px, calc(33% - 16px)), 1fr));
    grid-gap: 20px 20px;
}

.flat-section-container {
    height: fit-content;
    position: relative;
    left: 0;
    margin: 20px 0;
    padding: 50px 10px;
    background: linear-gradient(5deg, var(--dark-grey), var(--darkest-grey));
    border-top: 1px solid var(--border-grey);
    border-bottom: 1px solid var(--border-grey);
}

.smaller-grid {
    margin: 0 auto 0 auto;
    width: calc(75% - 60px);
    height: fit-content;
    position: relative;
    display: grid; 
    grid-template-columns: repeat(2, minmax(max(200px, calc(32.5% - 16px)), 1fr));
    grid-gap: -20px;
}

.grid-item {
    width: calc(100% - 40px);
    height: fit-content;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-grey);
    box-shadow: 0 0 20px 2px #0a0a0d;
    transition: all 0.2s;
    padding-bottom: 35px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.grid-item-invis {
    width: calc(100% - 40px);
    height: 100%;
    padding: 20px;
    transition: all 0.2s;
    padding-bottom: 35px;
    align-items: center;
    display:flex;
}

.grid-img {
    height: calc(70%);
    width: 100%;
    position: relative;
    left: 0;
    top: 0;
    object-fit: contain;
    image-rendering: crisp-edges;
}

.h-score-img {
    width: 100%;
    position: relative;
    left: 0;
    top: 0;
    margin-top: 0;
    object-fit: contain;
    image-rendering: optimizeSpeed;
}

.grid-title {
    width: 100%;
    height: 30px;
    text-align: center;
    left: 0;
    top: 0;
    margin-top: 20px;
    margin-bottom: 0;
    font-size: calc(15px + 1vw);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.grid-description {
    width: 95%;
    height: fit-content;
    padding: 10px 0;
    text-align: center;
    margin: 0 auto;
    display: block;
    top: 0;
}

.grid-description-sm {
    width: 80%;
    height: 100%;
    padding: 10px 0;
    text-align: center;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(15px + 0.5vw);
}

    .grid-item:hover {
        background-color: var(--selected);
        transform: translateY(5px);
    }

.text-button {
    color: white;
    font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
    text-align: center;
    width: 100%;
    font-weight: 600;
    display: block;
    text-underline-offset: 3px;
}

.quote {
    height: fit-content;
    color: var(--white);
    width: 70%;
    left: 15%;
    display: block;
    position: relative;
    text-align: center;
    margin-bottom: 0;
    font-style: italic;
}

.quote-from {
    text-align: end;
    color: var(--light-grey);
    height: 20px;
    position: relative;
    width: 70%;
    left: 15%;
    margin-top: 5px;
    margin-bottom: 20px;
    font-style: italic;
}

.music-tags {
    width: fit-content;
    margin: 10px auto -10px auto;
    position: relative;
    height: fit-content;
}

.ee-icon {
    position: relative;
    float: right;
    margin-right: 5px;
    height: 40px;
    margin-bottom: -40px;
}

@media (max-width: 930px) {
    .ee-icon {
        height: 30px;
        margin-bottom: -30px;
    }
}

.babyjam-img {
    width: calc(28vw / 5 * 3 - 40px);
    position: relative;
    display: inline;
    top: 0;
    left: calc(50% - 28vw / 5 * 1.5 - 20px);
    margin-right: calc(28vw / 5 * -3 + 50px);
    transform: rotateZ(calc(var(--angle) * 10deg / 4deg - 5deg)) 
        translateX(calc(sin(var(--angle) * 180deg / 4deg - 90deg) * 50px));
    transition: 0.5s;
    box-shadow: 0 0 10px #0a0a0d;
}

    .grid-item-invis:hover > .babyjam-img {
        transform: rotateZ(calc(var(--angle) * 60deg / 4deg - 30deg)) 
            translateX(calc(sin(var(--angle) * 180deg / 4deg - 90deg) * calc(50px + 3vw)))
            translateY(calc(pow(cos(var(--angle) * 180deg / 4deg), 2) * -3vw + max(sin(var(--angle) * 180deg / 4deg) - 0.9, 0) * -12vw));
    }

@media (max-width: 880px) {
    .smaller-grid {
        grid-template-columns: minmax(max(200px, calc(90vw - 16px)), 1fr);
        width: calc(90vw);
        height: fit-content;
    }

    .grid-item-invis {
        align-items: baseline;
    }

    .grid-description-sm {
        align-items: baseline;
    }

    .babyjam-img {
        width: calc(32.5vw - 40px);
        margin-right: calc(-32.5vw + 40px);
        transform: rotateZ(calc(var(--angle) * 30deg / 4deg - 15deg)) 
            translateX(calc(sin(var(--angle) * 180deg / 4deg - 90deg) * 150px));
    }
}

.normal-description {
    width: 80%;
    height: fit-content;
    padding: 30px 0;
    margin: 30px auto;
    text-align: center;
    left: 0;
    display: block;
    position: relative;
    font-size: calc(15px + 0.5vw);
}

.light-mode {
    color: var(--grey);
    text-shadow: none;
}

.video-iframe {
    width: 100%;
    left: 0;
    position: relative;
    display: block;
}

.project {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.project-title {
    color: var(--grey);
    text-shadow: none;
}

.project-date {
    color: var(--grey);
    text-shadow: none;
}

.project-tags-comp {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: calc(100% - 10px);
    height: fit-content;
    font-weight: 400;
    font-size: 13px;
    color: var(--grey);
    font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
}

.project-tag {
    color: var(--grey);
}

.project-icon.skewed-page {
    translate: 0 10px;
}