/* general */
* {
    background-color: white;
    color: black;
    font-size: 14px;
    font-family: "Be Vietnam Pro", Helvetica, sans-serif;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

:root {
    --gap-size: 16px;
    --min-width-half: 300px;
}

/* main sections */
.menu {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--gap-size);
}

.menu-button {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid transparent;
    max-height: 18px;
    font-family: "Xanh Mono", "Chivo Mono", "EB Garamond", serif;
    font-size: 20px;
}

.menu-button:hover {
    border-color: black;
    font-style: italic;
}

#name {
    margin-right: auto;
}

#current {
    font-style: italic;
}

/* gallery */
.main-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: calc(var(--gap-size)/2);
}

.project-gallery {
    display: grid;
    grid-template-columns: 3fr 4fr;
    gap: var(--gap-size);
}

.media-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    position: sticky;
    align-self: start;
    justify-self: stretch;
    top: 0;
}

.media-wrapper {
    display: flex;
    flex: 1 1 auto;
    justify-content: stretch;
    width: 100%;
    position: relative;
}

.media-wrapper img {
    width: 100%;
    max-height: 100%;
    display: block;
}

a.external-media {
    display: block;
    position: relative;
}

a.external-media::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    z-index: 1;
    box-sizing: border-box;
}

a.external-media:hover::after {
    border-color: black;
}

/* project card */
.gallery-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    border: 1px solid transparent;
    min-width: 0;
}

.project-card .media-wrapper {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.project-card .media-wrapper img, #about img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#about {
    aspect-ratio: 1/1;
    overflow: hidden;
}

/* text */
.project-text {
    display: flex;
    flex-direction: column;
    flex: 1 1 var(--min-width-half);
    gap: 1em;
    position: sticky;
    align-self: start;
    justify-self: stretch;
    top: 0;
}

.text {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 1em;
    text-align: left;
    padding-bottom: 4px;
}

.header {
    display: flex;
    flex-direction: column;
    padding-top: 4px;
}

.header.row{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
}

.header .title {
    font-family: "Xanh Mono", "Chivo Mono", "EB Garamond", serif;
    font-size: 20px;
    font-style: italic;
    margin-right: 8px;
}

p.divider {
    text-align: center ;
}

p.info {
    font-style: italic;
}

.project-card .text {
    text-align: center;
    gap: 0px;
    overflow: hidden;
    min-width: 0;
    display: block;
}

.project-card .text .title {
    display: block;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card p.info {
    color: gray;
    display: none;
}

span.title {
    font-family: inherit;
    font-size: inherit;
    font-style: italic;
}

.project-card:hover {
    border-color: black;
    font-style: italic;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: white;
    font-size: 30px;
    pointer-events: none;
    z-index: 1;
}

.media-wrapper:hover .play-button {
    color: black;
}

/* image */

/* responsive */
@media (max-width: 1000px) {
    .main-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .main-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .project-gallery {
        grid-template-columns: 1fr;
    }
    .project-text {
        position: unset;
    }
}

@media (max-width: 500px) {
    .main-gallery {
        grid-template-columns: 1fr;
    }
}