@font-face {
    font-family: 'Monument Grotesk';
    src: url('fonts/ABCMonumentGroteskWidthsVariable.ttf') format('truetype');
    font-weight: 100 900;
}

@font-face {
    font-family: 'Monument Grotesk Mono';
    src: url('fonts/ABCMonumentGroteskMonoVariable.ttf') format('truetype');
    font-weight: 100 900;
}

:root {
    --image-color: rgb(5, 111, 69);
    /* --image-color: #1149d8; */
    /* --image-color: #d81111; */
}

.no-image-filter {
    --image-color: #056f45;
    /* --image-color: #1149d8; */
    /* --image-color: #d81111; */
}

.no-image-filter .meta,
.no-image-filter .words .pub {
    color: #000;
}

.no-image-filter .active {
    color: #000;
    border-color: #000;
}

body {
    font-family: "Monument Grotesk", Helvetica, sans-serif;
    font-weight: 400;
    margin: 0 16px;
}

figcaption {
    font-size: 12px;
    font-weight: 400;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    box-sizing: border-box;
    font-family: "Monument Grotesk Mono", monospace;
}

.container {
    max-width: 1200px;
    margin: 0px auto;
}

main {
    margin-bottom: 64px;
}

.site-footer {
    padding: 16px 0 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    font-family: "Monument Grotesk Mono", monospace;
    font-size: 14px;
}

.footer-email,
.footer-socials a {
    color: inherit;
    text-decoration: none;
}

.footer-email:hover,
.footer-socials a:hover {
    color: var(--image-color);
}

.footer-socials svg {
    display: block;
    width: 24px;
    height: 24px;
}

.footer-socials {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

header {
    padding-top: 64px;
    padding-bottom: 64px;
}


.description {
    padding-top: 36px;
    padding-bottom: 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.description>* {
    flex: 1;
}

.meta {
    font-family: "Monument Grotesk Mono", Helvetica, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--image-color)
}

.arrow {
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.extra-info {
    flex: 0 0 100%;
    order: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.2s ease;
}

.extra-info.is-open {
    max-height: 30rem;
    opacity: 1;
}

.extra-info-section-double {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-icon > a {
    color: inherit;
    text-decoration: none;
}

.social-icon > a:hover {
    color: var(--image-color);
}

.col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.colors,
.cat {
    color: black;
    font-weight: 350;
    text-align: right;
    display: flex;
    flex-direction: row;
    justify-content: end;
    gap: 6px;

}

.extra-info-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.colors>*,
.cat>* {
    padding: 0px 4px;
    cursor: pointer;
}

.active {
    color: var(--image-color);
    border: 1px solid var(--image-color);
    border-radius: 999px;
}

.grid-container {
    --cols: 2;
    --gap: 36px;

    display: grid;
    grid-template-columns: repeat(var(--cols), 1fr);
    grid-auto-rows: calc(((min(100vw, 1200px) - (var(--cols) - 1) * var(--gap)) / var(--cols)) * 11 / 16);

    gap: var(--gap);

    max-width: 1200px;
    margin: 0 auto;


}

.grid-container.words-mode {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    row-gap: 0;
}

.writing-item {
    min-width: 0;
    padding: 24px 8px;
    border-top: 1px solid #b8b8b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    color: inherit;
    text-decoration: none;
}

.writing-item:hover {
    background-color: var(--image-color);
    
}

.writing-item:hover .title,
.writing-item:hover .pub {
    color: #fff;
}

.writing-item .title {
    font-size: 20px;
    font-weight: 500;
    color: #000;
}

.writing-item .pub {
    margin-top: 6px;
    font-family: "Monument Grotesk Mono", monospace;
    font-size: 14px;
    color: var(--image-color);
}

.grid-item.hidden,
.writing-item.hidden {
    display: none !important;
}

.grid-item {
    /* border: 1px solid #ccc; */
    background-color: var(--filter-color);

}

.grid-item.tall {
    grid-column: span 1;
    grid-row: span 2;
    gap: var(--gap);
    display: grid;
    grid-template-rows: 1fr 1fr;
}

.grid-item.tall article {
    min-width: 0;
    min-height: 0;
}

.project-image {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
    height: fit-content;
    overflow: hidden;
}

.project-caption {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    /* max-width: 54ch; */
    background: rgba(255, 255, 255, 0.95);
    color: #030303;
    font-size: clamp(14px, 1vw, 36px);
    line-height: 1.35;
    text-align: left;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}


.project-title {
    font-weight: 700;
}

.project-role {
    margin-top: 3px;
    font-family: "Monument Grotesk Mono", monospace;
    font-size: 0.72em;
    font-weight: 400;
     color: var(--image-color)
}

.project-heading {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.project-image:hover .project-caption {
    opacity: 1;
}

.project-image::after {
    content: "";
    position: absolute;
    inset: 0;

    background: var(--image-color);
    mix-blend-mode: screen;


    /* Use the image itself as the alpha mask */
    -webkit-mask-image: var(--image);
    mask-image: var(--image);

    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;


    pointer-events: none;

    opacity: 1;
    transition: opacity 0.5s ease-in;
}

.no-image-filter .project-image::after {
    opacity: 0;
}

.project-image img,
.project-image video {
    display: block;
    width: 100%;
    height: auto;



    filter: grayscale(100%);

    transition: filter 0.5s ease-in;
}

.project-image img {
    cursor: zoom-in;
}

.project-image img:focus-visible {
    outline: 2px solid #000;
    outline-offset: -2px;
}

.lightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 48px;
    border: 0;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    overflow: auto;
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.92);
}

.lightbox[open] {
    display: grid;
    place-items: center;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 96px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1;
    padding: 4px 10px;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.no-image-filter .project-image img,
.no-image-filter .project-image video {
    filter: none;
}

/* HOVER: RETURN TO ORIGINAL COLOR */

.project-image:hover::after {
    opacity: 0;
}

.project-image:hover img,
.project-image:hover video {
    filter: grayscale(0%);
}


.grid-container.words-mode .writing-item {
    flex-direction: row;
    gap: 24px;
}

/* Grid Items */

.square {
    grid-column: span 1;
    grid-row: span 1;
}

.wide {
    grid-column: span 2;
    grid-row: span 1;
}

.tall {
    grid-column: span 1;
    grid-row: span 2;
}

.large {
    grid-column: span 2;
    grid-row: span 2;
}

.title-container {
    font-weight: 460;
}

.title-container {
    width: 100%;
}

.fit-text {
    width: 100%;
    line-height: 0.85;
}

/* Each line */

.fit-line {
    display: flex;
    width: max-content;
    white-space: nowrap;
}

/* Animated Letters */

.animated-letters {
    display: flex;
    justify-content: flex-start;
    gap: 0;
    cursor: default;
}

.animated-letters>span {
    display: inline-block;
    font-weight: 400;
    transform: rotate(0deg);
    transition:
        transform 0.3s ease-in-out,
        font-weight 0.2s ease-in-out;
}

.animated-letters>span.left {
    transform: rotate(-15deg);
    font-weight: 300;
}

.animated-letters span.right {
    transform: rotate(15deg);
    font-weight: 600;
}

@media (max-width: 640px) {
    .project-image img {
        cursor: default;
    }

    .lightbox {
        padding: 24px;
    }

    .lightbox-image {
        max-height: calc(100vh - 48px);
    }

    .container > header > .description:not(.meta) {
        flex-direction: column;
    }

    .container > header > .description:not(.meta) .col-1 {
        display: contents;
    }

    .container > header > .description:not(.meta) .col-2 {
        order: 2;
    }

    .container > header > .description:not(.meta) .arrow {
        order: 3;
    }

    .container > header > .description:not(.meta) .extra-info {
        order: 4;
    }

    .container > header > .description:not(.meta) > .col-2 {
        flex: 0 0 100%;
    }

    .grid-container {
        --cols: 1;
    }

    .extra-info-stack {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid-container.words-mode .writing-item {
        flex-direction: column;
        gap: 4px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-socials {
        justify-content: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 16px;
    }
}