body {
    margin: 0;
    min-height: 100vh;
    background-color: white;
    position: relative;
}

main {
    padding-top: 80px;
}

.portfolio-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    max-width: 1500px;
    margin-left: 20px;
    margin-right: auto;
    padding: 0 20px 40px;
}

.portfolio-project {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-column: 1 / -1;
    gap: 20px;
    min-height: auto;
    align-content: start;
}

.project-details {
    display: grid;
    grid-column: 4 / span 2;
    gap: 14px;
    color: #111;
    text-decoration: none;
}

.project-image-link {
    display: block;
    margin-bottom: 11px;
    overflow: hidden;
    width: 100%;
    user-select: none;
}

.project-details > .project-image-link:not(.project-slideshow)::after {
    content: none;
}

.project-slideshow {
    overflow: visible;
    position: relative;
}

.project-slide-image-button {
    display: grid;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.project-slide-image-button .project-image {
    grid-area: 1 / 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.project-slide-image-button .project-image.is-active {
    opacity: 1;
}

.project-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.project-slideshow .project-image.is-portrait {
    object-fit: contain;
    object-position: left center;
}

.project-slideshow-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 0;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
}

.project-slideshow-arrows {
    display: flex;
    gap: 4px;
}

.project-slideshow-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #555;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    line-height: 1;
}

.project-slideshow-button:hover,
.project-slideshow-button:focus-visible {
    color: #111;
}

.project-slideshow-count {
    color: #555;
    font-size: 0.7rem;
    line-height: 1;
}

.project-title {
    font-size: 0.8rem;
    line-height: 1.2;
    font-weight: normal;
    color: #111;
}

.project-slideshow + .project-title {
    padding-right: 96px;
}

.project-meta {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0;
    font-size: 0.8rem;
    line-height: 1.2;
    color: #555;
}

.project-place,
.project-year {
    font-size: 0.8rem;
    font-weight: 300;
}

.project-copy {
    font-size: 0.8rem;
    line-height: 1.2;
    font-weight: 300;
    color: #333;
}

.project-copy a,
.project-copy a:visited {
    color: #666;
    font-style: italic;
    text-decoration: none;
}

.project-copy sup {
    font-size: 0.65em;
    line-height: 0;
    vertical-align: super;
}

.project-footnotes {
    margin: 0;
    padding-left: 1.2em;
    color: #999;
    font-size: 0.8rem;
    line-height: 1.2;
    font-weight: 300;
}

.project-footnotes em {
    font-style: italic;
}

@media (max-width: 900px) {
    .portfolio-list {
        grid-template-columns: 1fr;
    }

    .portfolio-project {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
   .project-copy,
   .project-footnotes {
    font-size: 1rem;
    font-weight: 300;
}

    .portfolio-list {
        margin-left: 20px;
        margin-right: 20px;
        padding: 0 0 40px;
    }

    .portfolio-project {
        grid-template-columns: 1fr;
    }

    .project-details {
        grid-column: 1 / -1;
    }

    .project-title {
        font-size: 20px;
        font-weight: normal;
    }

    .project-place,
    .project-year {
        font-size: 18px;
    }

    .project-slideshow-count {
    font-size: 0.9rem;
}
}
