/*
    Main 
*/

main {
    min-height: 95vh;
    padding: 0rem 0.5rem;
    margin: 2.75rem 0 0;
}

/* Desktop */
@media only screen and (min-width: 64rem) {
    main {
        padding: 0rem 2rem;
    }
}

/* 
    Grid 
*/

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: max-content;
    gap: 0rem 0.5rem;
}

/* Tablet */
@media only screen and (min-width: 48rem) {
    .grid {
        grid-template-columns: repeat(12, 1fr);
    } 
}

.gap-xs {
    gap: 0 0.25rem;
}

/* 
    PAGES 
*/

/* 
    Home Page
*/

.home-page {
    padding: 2.75rem 0 5rem;
    margin: 0;
}

.home-page-gallery {
    margin: 0;
}

.home-page-gallery-list {
    display: block;
}

.home-page-gallery-list-item {
    position: relative;
}

.home-page-gallery-list-item-cover,
.home-page-gallery-list-item-cover-image {
    width: 100%;
    height: auto;
    display: flex;
}

.home-page-gallery-list-item-title {
    position: absolute;
    padding: 0.5rem;
    color: white;
    bottom: 0;
    z-index: 2;
    mix-blend-mode: difference;
}

/* Desktop */
@media only screen and (min-width: 64rem) {
    .home-page {
        padding: 0;
        position: fixed;
        overflow-y: scroll;
        overflow-x: hidden;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .home-page-gallery-list {
        display: flex;
    }

    .home-page-gallery-list,
    .home-page-gallery-list-item {
        height: 100vh;
    }

    .home-page-gallery-list-item-cover,
    .home-page-gallery-list-item-cover-image {
        width: auto;
        height: 100%;
    }

    .home-page-gallery-list-item-title {
        padding: 1rem 2rem;
    }
}

/* 
    About Page
*/

.about-page {
    margin: 4rem 0 0;
}

.about-page a:hover {
    text-decoration: line-through;
}

.about-page-description {
    grid-column: 1 / -1;
    padding: 0 0 1rem;
}

.about-page-contact {
    grid-column: 1 / -1;
    padding: 2rem 0;
}

.about-page-cover {
    grid-column: 1 / -1;
    grid-row: 2;
}

.about-page-description p {
    margin-bottom: 0.75rem;
}

.about-page-description p:last-child {
    margin-bottom: 0;
}

.about-page-cover-figure,
.about-page-cover-figure-image {
    height: auto;
    width: 100%;
}

.about-page-contact-list {
    margin-top: 1rem;
}

/* Tablet */
@media only screen and (min-width: 48rem) {

}

/* Desktop */
@media only screen and (min-width: 64rem) {
    .about-page.grid {
        grid-auto-rows: inherit;
    }

    .about-page-description {
        grid-column: 1 / -10;
        padding: 0;
    }

    .about-page-contact {
        grid-column: 1 / -10;
        align-self: end;
        padding: 2rem 0 1rem;
    }
    
    .about-page-cover {
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;
    }

    .about-page-cover-figure {
        height: 100%;
        width: 70vw;
    }

    .about-page-cover-figure-image {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
}

/* 
    Project Page 
*/

.project-page {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.project-page::-webkit-scrollbar {
    display: none;
}

/* Desktop */
@media only screen and (min-width: 64rem) {
    .project-page {
        position: fixed;
        overflow-y: scroll;
        overflow-x: hidden;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

.project-page-title {
    display: block;
    padding: 3rem 0.5rem 1rem;
    justify-items: center;
}

.project-page-title-content {
    display: flex;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.project-page-title-controls {
    display: flex;
    cursor: pointer;
    opacity: 0.25;
    justify-content: center;
    transition: 300ms ease;
}

.project-page-title-controls:hover {
    opacity: 1;
}

/* Project Gallery */
.project-page-gallery {
    display: block;
}

.project-page-gallery-info {
    position: relative;
    min-height: 100vh;
    overflow-y: hidden;
}

.project-page-gallery-info-description {
    color: white;
    overflow-y: scroll;
    padding: 4rem 0.5rem 12rem 0.5rem;
}

/* Desktop */
@media only screen and (min-width: 64rem) {
    .project-page-title {
        position: fixed;
        color: white;
        z-index: 1;
        top: 4rem;
        right: 0;
        left: 0;
        padding: 0;
        justify-items: center;
        mix-blend-mode: difference;
    }

    .project-page-title.inactive,
    .preview.inactive {
        display: none;
    }

    .project-page-title.hidden {
        display: none;
    }
    
    .project-page-gallery-info {
        min-width: 70vw;
        height: 100vh;
        max-height: 100vh;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 1rem;
        padding: 6rem 2rem 2rem;
    }

    .project-page-gallery-info-description {
        min-width: 30rem;
        width: 35rem;
        max-height: 100vh;
        padding: 0 1rem 0 0;
    }    
}

/* Gallery Info Nav */
.project-page-gallery-info-nav {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    justify-self: end;
    opacity: 1;
    transition: 300ms ease;
}

.project-page-gallery-info-nav.inactive {
    opacity: 0;
}

.project-page-gallery-info-nav-figure {
    height: 8rem;
    width: 8rem;
}

.project-page-gallery-info-nav-picture,
.project-page-gallery-info-nav-picture-image {
    object-fit: cover;
    width: 100%;
    height: 100%;
    object-position: 50% 50%;
}

/* Desktop */
@media only screen and (min-width: 64rem) {
    .project-page-gallery-info-nav {
        position: static;
        place-self: end;
    }
}

/* Gallery */
.gallery {
    display: block;
}

.gallery-item {
    position: relative;
}

.gallery-item.video-player__video {
    height: auto;
    width: 100%;
}

/* Desktop */
@media only screen and (min-width: 64rem) {
    .gallery {
        display: flex;
    }
}

.gallery-item,
.project-page-gallery,
.gallery-image-picture-image {
    width: 100%;
    height: auto;
}

.gallery-image-picture {
    width: 100%;
    height: auto;
    display: flex;
    transition: 300ms ease;
}

.gallery-image-picture.open {
    transform: translateX(-70vw);
}

.gallery-image-caption.open .gallery-image-caption-icon {
    right: calc(70vw + 0.5rem);
}

/* Desktop */
@media only screen and (min-width: 64rem) {
    .gallery-item {
        height: 100vh;
    }

    .gallery-image-picture {
        display: inline;
    }

    .gallery-image-picture.open {
        width: auto;
        height: 100%;
        display: flex;
        transform: translateY(var(--captionHeight, -8rem));
    }

    .gallery-image-picture-image {
        width: auto;
        height: 100%;
    }
}

/* Gallery Caption */
.gallery-image-caption {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    padding: 0.5rem 0.75rem;
    align-content: center;
}

.gallery-image-caption.open {
    width: 50vw;
    top: 0;
    left: 30vw;
}

.gallery-image-caption .gallery-image-caption-icon {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    opacity: 0.5;
    transition: 300ms ease;
}

.gallery-image-caption .gallery-image-caption-icon svg {
    transform: rotate(270deg);
}

.gallery-image-caption.open .gallery-image-caption-icon svg {
    transform: rotate(90deg);
}

.gallery-image-caption:hover .gallery-image-caption-icon {
    opacity: 1;
}

.gallery-image-caption .gallery-image-caption-content {
    display: none;
}

.gallery-image-caption.open .gallery-image-caption-content {
    display: block;
}

.gallery-image-caption-content p {
    margin-bottom: 0.5rem;
}

/* Desktop */
@media only screen and (min-width: 64rem) {
    .gallery-image-caption {
        position: absolute;
        width: 100%;
        top: auto;
        left: 0;
        bottom: 0;
        z-index: 2;
        padding: 0.75rem 0.5rem;
        text-align: center;
        justify-items: center;
        align-content: end;
        transition: 300ms ease;
    }

    .gallery-image-caption.open {
        width: 100%;
        top: auto;
        left: 0;
    }

    .gallery-image-caption .gallery-image-caption-icon {
        top: -0.5rem;
        right: auto;
    }

    .gallery-image-caption .gallery-image-caption-icon:hover {
        transform: translateY(-4px);
        transition: 800ms ease;
    }

    .gallery-image-caption.open .gallery-image-caption-icon:hover {
        transform: translateY(4px);
        transition: 800ms ease;
    }

    .gallery-image-caption.open .gallery-image-caption-icon {
        top: -1.5rem;
        right: auto;
        opacity: 1;
    }

    .gallery-image-caption .gallery-image-caption-icon svg {
        transform: rotate(0deg);
    }

    .gallery-image-caption.open .gallery-image-caption-icon svg {
        transform: rotate(180deg);
    }
}

/* 
    Archive Page 
*/

.archive-page {
   padding: 0;
}

.archive-page-list {
    overflow-x: hidden;
    scroll-snap-type: x mandatory; 
}

.archive-page-list-item {
    height: 6rem;
    overflow-x: scroll !important;
    overflow-y: hidden;
    scroll-snap-align: start;
    transition: 300ms ease;
}

.archive-page-list-item.inactive {
    opacity: 0.5 !important;
}

.archive-page-list-item-link {
    height: 6rem;
    width: fit-content;
    display: block;
}

.archive-page-list-item-figure,
.archive-page-list-item-figure-picture,
.archive-page-list-item-figure-picture-image {
    display: block;
    height: 6rem;
    width: auto;
}

.archive-videoplayer .video-player__video {
    height: 100%;
    width: auto;
}

/* 
    Error Page 
*/

.error-page {
    display: flex;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/*
    Components 
*/

/* Top Gallery Preview */
.preview {
    position: fixed;
    display: block;
    z-index: 5;
    height: 5rem;
    right: 0;
    left: 0;
    bottom: 0;
    overflow-x: scroll;
    overflow-y: hidden;
    transition: 300ms ease;
    background-color: rgba(150, 146, 146, 0.3);
    -webkit-backdrop-filter: blur(35px);
    backdrop-filter: blur(35px);
    /* scroll-behavior: auto; */
}

.preview.hidden {
    display: none;
}

.preview-gallery,
.preview-videoplayer {
    height: 5rem;
}

.preview-gallery-item {
    position: relative;
    cursor: pointer;
    transition: 300ms ease;
}

.preview-gallery-item.inactive {
    opacity: 0.5 !important;
    /* filter: blur(1px); */
}

.preview-gallery-item,
.preview-gallery-image-picture {
    width: fit-content;
    height: 100%;
    display: flex;
}

.preview-gallery-image-picture-image {
    display: block;
    width: auto;
    height: 100%;
}

/* Desktop */
@media only screen and (min-width: 64rem) {
    .preview {
        height: 3rem;
        top: 0;
        justify-items: center;
        background-color: transparent;
        -webkit-backdrop-filter: blur(0px);
        backdrop-filter: blur(0px);
        left: 50%;
        overflow: auto;
        translate: -50%;
    }

    .preview-gallery {
        height: 3rem;
        /* overflow-y: hidden; */
        /* justify-content: center; */
    }

    .preview-videoplayer {
        height: 3rem;
    }
}

/* 
    Horizontal Scroll Animation 
*/

/* Desktop */
@media only screen and (min-width: 64rem) {    
    .horizontal-scroll-target {
        max-width: 100vw;
    }
    
    .home-page-gallery,
    .project-page-gallery {
        width: 100vw;
        height: var(--scrollHeight, 200vh) !important;
    }

    .horizontal-scroll-container {
        overflow-x: hidden;
        overflow-y: hidden;
        /* scroll-behavior: auto; */
    }
    
    .horizontal-scroll-elements {
        width: fit-content;
    }
}