/* -------------------- VAR XS -------------------- */
:root {
    --grid-margin: 15px;
    --grid-gutter: 15px;

    --fs-m: 15.5px;
    --fs-l: 24px;
}

/* -------------------- VAR MD -------------------- */
@media screen and (min-width: 768px) {
    :root {
        --fs-l: 40px;
    }
}

/* -------------------- VAR LG -------------------- */
@media screen and (min-width: 1024px) {
    :root {
        --grid-margin: 15px;
        --grid-gutter: 15px;

        --fs-l: 45px;
    }
}

/* -------------------- VAR XL -------------------- */
@media screen and (min-width: 1440px) {
    :root {
        --grid-margin: 20px;
        --grid-gutter: 20px;

        --fs-m: 16.5px;
        --fs-l: 50px;
    }
}

/* -------------------- VAR XXL -------------------- */
@media screen and (min-width: 1512px) {
    :root {
        --grid-margin: 25px;
        --grid-gutter: 25px;

        --fs-m: 17.5px;
        --fs-l: 55px;
    }
}

/* -------------------- VAR XXXL -------------------- */
@media screen and (min-width: 1920px) {
    :root {
        --fs-m: calc(17.5px + 0.125vw);
        --fs-l: calc(55px + 0.125vw);
    }
}

/* -------------------- VAR GLOBAL -------------------- */
:root {
    --black: #000000;
    --white: #FFFFFF;
    --accent-color: #7112DD;

    --text-underline-offset: 0.12em;
    --text-underline-thickness: 0.08em;

    --lh-l: 1.15em;
    --lh-m: 1.33em;
}

/* -------------------- RESET -------------------- */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
}

html {
    scroll-behavior: smooth;
}

:focus {
    outline: none;
}

::selection {
    background: var(--accent-color);
    color: var(--white);
    text-shadow: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    user-select: none;
    -webkit-user-drag: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
    font-style: normal;
    margin: 0;
    padding: 0;
}

p {
    margin: 0;
    padding: 0;
}


/* -------------------- TEXT STYLES -------------------- */
.type-l {
    font-family: "helvetica-lt-pro", Helvetica, Arial, sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: var(--fs-l);
    line-height: var(--lh-l);
}

.type-m {
    font-family: "helvetica-lt-pro", Helvetica, Arial, sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: var(--fs-m);
    line-height: var(--lh-m);
}

.italic {
    font-style: italic;
}

/* -------------------- HEADER HOME -------------------- */
.header-home {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: calc(var(--grid-margin) * 1) var(--grid-margin);
    background: var(--white);
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--grid-gutter);
}

.header-filters {
    grid-column: span 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
}

.header-filters-text {
    margin-right: 0.33em;
}

.header-filters-break {
    flex-basis: 100%;
    width: 100%;
    height: 0;
}

.category-filter-group {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.category-filter-sep {
    margin-right: 0.33em;
}

.category-filter-sep-and {
    margin-right: 0.33em;
}

.category-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.33em;
    color: inherit;
}

.category-filter-dot {
    display: block;
    width: calc(var(--fs-m) * 1.25);
    height: calc(var(--fs-m) * 1.25);
    flex-shrink: 0;
    border: 1px solid var(--black);
    border-radius: 50%;
    background: transparent;
}

.category-filter.is-active .category-filter-dot {
    background: var(--accent-color);
}

.header-view-switcher {
    grid-column: span 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-self: start;
    gap: 0.33em;
    justify-content: flex-start;
}

.header-view-switcher-or {
    margin: 0 0.15em;
}

/* Mobile */
@media screen and (max-width: 1023px) {
    .header-filters {
        grid-column: span 12;
    }

    .header-view-switcher {
        grid-column: span 12;
        margin-top: calc(var(--grid-margin) * 0.5);
    }
}

/* Small Desktop */
@media screen and (min-width: 1024px) and (max-width: 1439px) {

    .header-filters {
        grid-column: span 9;
    }

    .header-view-switcher {
        grid-column: span 3;
    }
}

/* Medium Desktop */
@media screen and (min-width: 1440px) and (max-width: 1511px) {
    .header-home {
        grid-template-columns: repeat(5, 1fr);
    }

    .header-filters {
        grid-column: span 4;
    }

    .header-view-switcher {
        grid-column: span 1;
    }
}

/* -------------------- PROJECTS -------------------- */
.projects {
    position: relative;
    margin-top: calc(var(--grid-margin) * 4);
    padding: var(--grid-margin);
}

.projects-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    column-gap: var(--grid-gutter);
    row-gap: calc(var(--grid-gutter) * 1);
    align-content: start;
    list-style: none;
}

.project {
    position: relative;
    aspect-ratio: 5/4;
}

.project.is-filtered {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.project-link {
    display: block;
    position: relative;
}

.project-cover img,
.project-cover video {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 5/4;
    object-fit: contain;
    object-position: top;
}

.projects-list[data-view="text"] .project-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
}

.projects-list[data-view="images"] .project-text {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
}

@media screen and (min-width: 1024px) {
    .projects-list[data-view="text"] .project:hover .project-text {
        opacity: 0;
    }

    .projects-list[data-view="text"] .project:hover .project-cover {
        opacity: 1;
    }

    .projects-list[data-view="images"] .project:hover .project-cover {
        opacity: 0;
    }

    .projects-list[data-view="images"] .project:hover .project-text {
        opacity: 1;
    }
}

/* Mobile */
@media screen and (max-width: 575px) {
    .projects-list {
        grid-template-columns: repeat(1, 1fr);
    }

    .header-filters {
        grid-column: span 12;
    }

    .header-view-switcher {
        grid-column: span 12;
        justify-content: flex-start;
        margin-top: 1em;
    }

    .project {
        aspect-ratio: 2/1;
    }

    .project-cover img,
    .project-cover video {
        aspect-ratio: 2/1;
    }
}

/* Small Tablet */
@media screen and (min-width: 576px) and (max-width: 767px) {
    .projects-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    .projects-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small Desktop */
@media screen and (min-width: 1024px) and (max-width: 1439px) {
    .projects-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Medium Desktop */
@media screen and (min-width: 1440px) and (max-width: 1511px) {
    .projects-list {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* -------------------- ABOUT -------------------- */
.bio {
    position: absolute;
    top: calc(var(--grid-margin) * -4);
    left: 0;
    right: 0;
    z-index: 90;
    padding: var(--grid-margin);
    color: var(--accent-color);
    pointer-events: auto;
    user-select: text;
    -webkit-user-select: text;
}

.projects:has(.bio) .projects-list {
    position: relative;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.bio p {
    margin-top: var(--fs-l);
}

.bio p:first-child {
    margin-top: 0;
}

.bio a {
    text-decoration: underline;
    text-underline-offset: var(--text-underline-offset);
    text-underline-thickness: var(--text-underline-thickness);
}

.credits a {
    text-decoration: none;
}