:root {
    /* === Colors === */

    --Black: #000000;
    --White: #FFF;
    --Background: #FFFBFB;


    /* === Font family === */
    --font-primary: "Cimo";
    --font-secondary: "DM Sans";
    --font-num: "DM Mono";
}

body {
    overflow-x: hidden;
    width: 90rem;
}

html {
    overflow-x: hidden;
    background-color: var(--Background);
}

.site {
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    max-width: 100vw;
    min-height: 100dvh;
    width: 100%;

    margin: 0;

    a {
        text-decoration: none;
    }

    /* === Base Typography === */
    h1 {
        /* Desktop/H1 */
        font-family: var(--font-primary);
        font-size: 13.5rem;
        font-style: normal;
        font-weight: 400;
        line-height: 13.5rem;

        padding: 0;
        margin: 0;

        color: var(--Black);
    }

    h2 {
        /* Desktop/H2 */
        font-family: var(--font-primary);
        font-size: 6.25rem;
        font-style: normal;
        font-weight: 400;
        line-height: 6.25rem;

        padding: 0;
        margin: 0;

        color: var(--Black);
    }

    h3 {
        /* Desktop/H3 - list items */
        font-family: var(--font-primary);
        font-size: 5.5rem;
        font-style: normal;
        font-weight: 400;
        line-height: 5.5rem;

        padding: 0;
        margin: 0;

        color: var(--Black);
    }

    .sub1 {
        /* Desktop/Subhead 1 */
        font-family: var(--font-secondary);
        font-size: 2rem;
        font-style: normal;
        font-weight: 700;
        line-height: 2.5rem;

        padding: 0;
        margin: 0;

        color: var(--Black);
    }

    .sub2 {
        /* Desktop/Subhead 2 */
        font-family: var(--font-secondary);
        font-size: 1.5rem;
        font-style: normal;
        font-weight: 700;
        line-height: 2.125rem;


        padding: 0;
        margin: 0;

        color: var(--Black);
    }

    .body-black,
    .body-bold,
    .body-medium {
        font-family: var(--font-secondary);
        font-size: 1rem;
        font-style: normal;
        line-height: 1.5rem;

        padding: 0;
        margin: 0;

        color: var(--Black);
    }

    .body-black {
        /* Desktop/Body Text Black */
        font-weight: 900;
    }

    .body-bold {
        /* Desktop/Body Text Bold */
        font-weight: 700;
    }

    .body-medium {
        /* Desktop/Body Text Medium */
        font-weight: 500;
    }

    .num {
        /* Desktop/Numbers */
        font-family: var(--font-num);
        font-size: 1rem;
        font-style: normal;
        font-weight: 400;
        line-height: 1.5rem;

        padding: 0;
        margin: 0;

        color: var(--Black);
    }

    /* === Extra wide Typography === */

    @media (min-width: 1920px) {

        h1 {
            /* Extra wide/H1 */
            font-size: 17.1875rem;
            line-height: 15rem;
        }

        h2 {
            /* Extra wide/H2 */
            font-size: 7.5rem;
            line-height: 7.5rem;
        }

        h3 {
            /* Extra wide/H3 - list */
            font-size: 5.5rem;
            line-height: 6.25rem;
        }

        .sub1 {
            /* Extra wide/Subhead 1 */
            font-size: 2.5rem;
            line-height: 3rem;
        }

        .sub2 {
            /* Extra wide/Subhead 2 */
            font-size: 1.5rem;
            line-height: 2.125rem;
        }

        .body-black {
            /* Extra wide/Body Text Black */
            font-size: 1.125rem;
            line-height: 1.75rem;
        }

        .body-bold {
            /* Extra wide/Body Text Bold */
            font-size: 1.125rem;
            line-height: 1.75rem;
        }

        .body-medium {
            /* Extra wide/Body Text Medium */
            font-size: 1.125rem;
            line-height: 1.75rem;
        }

        .num {
            /* Extra wide/Numbers */
            font-size: 1.125rem;
            line-height: 1.75rem;
        }
    }

    /* === Mobile Typography === */

    @media (max-width: 767px) {

        h1 {
            /* Mobile/H1 */
            font-size: 7.5rem;
            line-height: 6.25rem;
        }

        h2 {
            /* Mobile/H2 */
            font-size: 5rem;
            line-height: 5.5rem;
        }

        h3 {
            /* Mobile/H3 - list */
            font-size: 4rem;
            line-height: 3.5rem;
        }

        .sub1 {
            /* Mobile/Subhead 1 */
            font-size: 1.25rem;
            line-height: 1.75rem;
        }

        .sub2 {
            /* Mobile/Subhead 2 */
            font-size: 1rem;
            line-height: 1.5rem;
        }

        .body-black {
            /* Mobile/Body Text Black */
            font-size: 1rem;
            line-height: 1.5rem;
        }

        .body-bold {
            /* Mobile/Body Text Bold */
            font-size: 1rem;
            line-height: 1.5rem;
        }

        .body-medium {
            /* Mobile/Body Text Medium */
            font-size: 1rem;
            line-height: 1.5rem;
        }

        .num {
            /* Mobile/Numbers */
            font-size: 1rem;
            line-height: 1.5rem;
        }
    }


    .content {
        margin: 5rem 2.5rem 0rem 2.5rem;
    }

    /* === HEADER === */

    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 5rem;
        display: flex;
        padding: 0 2.5rem;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--Black);
        background-color: var(--Background);
        z-index: 100;
    }

    .header-link:hover {
        text-decoration: underline;
    }

    /* === FOOTER === */

    .footer {
        padding: 12rem 2.5rem;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-text {
        font-family: var(--font-primary);
        font-style: normal;
        font-weight: 400;

        padding: 0;
        margin: 0;

        color: var(--Black);

        display: inline-block;
    }

    .footer-link,
    .footer-title {
        line-height: 0.8;
    }

    .footer-mobile .footer-link {
        line-height: 0.6;
    }

    .footer-link:hover {
        color: transparent;
        -webkit-text-stroke: 2px black;
    }

    .footer-bottom {
        justify-content: space-between;
        width: 100%;
    }

    .footer-mobile {
        display: none !important;
        width: 100%;
    }

    /* Mobile breakpoint */
    @media (max-width: 767px) {
        .footer {
            flex-direction: column;
            align-items: flex-start;
            text-align: left;
            padding: 12.5rem 1.5rem;
        }

        .footer-mobile {
            display: block !important;
        }

        .footer-left .footer-text {
            white-space: nowrap;
        }

        .footer-right {
            margin-top: 2rem;
        }
    }

    /* === HOME PAGE === */
    .footer-wrap,
    .project-title-wrap,
    .home-title-wrap {
        width: 100%;
        min-width: 0;
        display: flex;
    }

    .home-title-wrap {
        margin-bottom: 2rem;
    }

    .home-title {
        line-height: 0.8;
    }

    .project-title {
        line-height: 0.9;
    }

    .project-title {
        margin-bottom: 3rem;
    }

    .project-title-bottom {
        margin-bottom: 1.5rem;
        line-height: 0.9;
    }

    .project-title-bottom,
    .home-title-bottom {
        opacity: 0;
    }

    .subheader {
        display: flex;
        justify-content: space-between;
        padding-top: 2rem;
    }

    .home-images-wrapper {
        display: flex;
        flex-direction: column;
        gap: 3rem;
        z-index: 50;
        position: relative;
    }

    .home-images-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .home-image-large {
        width: 49%;
        height: fit-content;
        max-height: 100dvh;
        object-fit: cover;
    }

    .home-image-small img,
    .home-image-large img {
        width: 100%;
        height: auto;
        max-height: 100dvh;
        object-fit: cover;
    }

    .home-image-small {
        width: 24%;
        height: fit-content;
        max-height: 100dvh;
        object-fit: cover;
    }

    .home-info-container {
        margin-top: 1.5rem;
    }

    .transparent {
        color: transparent;
    }

    .home-image-small:hover .transparent,
    .home-image-large:hover .transparent {
        color: var(--Black);
    }

    .button {
        border: 1px solid var(--Black);
        background: #FFFBFB;
        width: fit-content;
        display: flex;
        padding: 0.6rem 4rem;
    }

    .button:hover {
        border: 1px solid var(--Black);
        background: var(--Black);
        color: var(--Background);
    }

    .button:hover p {
        color: var(--Background);
    }

    .home-description-image img {
        width: 100%;
        height: auto;
    }

    .specialized-section {
        display: flex;
        gap: 2rem;
        margin-top: 10rem;
    }

    .specialized-list {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .specialized-item {
        flex: 1;
        display: flex;
        justify-content: space-between;
        position: relative;
    }

    .specialized-image {
        width: 32.5%;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .specialized-image img {
        width: 100%;
        height: auto;
    }

    .specialized-image {
        opacity: 0;
    }

    .specialized-item:hover .specialized-image {
        opacity: 1;
    }

    .specialized-item:hover .line {
        opacity: 1;
    }

    .specialized-image-placeholder {
        opacity: 0;
        height: 0.3rem;
        width: 32.5%;
    }

    .line {
        position: relative;
        flex: 1;
        padding: 0 1.25rem;
        opacity: 0;
    }

    .line::after {
        content: "";
        position: absolute;
        top: 60%;
        left: 1.25rem;
        right: 1.25rem;
        height: 0.3rem;
        background: var(--Black);
        transform: translateY(-50%);
    }


    /* === ABOUT PAGE === */

    .info-section {
        padding: 2.5rem 0;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .socials {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 4rem;
    }

    .info-section img {
        width: 100%;
    }

    .achievements-section {
        border-top: 1px solid black;
        margin-bottom: 10rem;
    }

    .achievement-title-container {
        padding: 1rem 0;
        border-bottom: 1px solid black;

        display: flex;
        justify-content: space-between;

        cursor: pointer;
    }

    .achievement-title-wrapper {
        display: flex;
        align-items: flex-end;
        gap: 1rem;
    }

    .achievement-title-container:hover .achievement-title,
    .achievement-title-container.is-open .achievement-title {
        color: transparent;
        -webkit-text-stroke: 1px black;
    }

    .achievement-title-container.is-open {
        border-bottom: none;
    }

    .achievement-items-grid {
        display: grid;
        grid-template-columns: 65% 20% 5%;
        gap: 5%;
        width: 100%;

        border-bottom: 1px solid rgba(0, 0, 0, 0.30);
        padding: 1rem 0;
    }

    .hidden {
        display: none;
    }

    .clients-section {
        display: flex;
        gap: 10%;
        flex-direction: row;
    }

    .clients-list {
        margin-top: 2.5rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* === WORK PAGE === */

    .work-icons-container {
        display: flex;
        gap: 1rem;
        justify-content: flex-end;
    }

    .work-icon {
        cursor: pointer;
    }

    .work-subheader {
        padding: 1.5rem 0;
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid var(--Black);
    }

    .project-filter {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .filter-button {
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: pointer;
    }

    .filter-button.is-active {
        text-decoration: underline;
    }

    .work-item {
        display: grid;
        grid-template-columns: 7.5rem 3.3fr 1fr 0.2fr;
        gap: 2%;
        border-bottom: 1px solid var(--Black);
        padding: 1.5rem 0;

        align-items: center;
    }

    .work-item img {
        aspect-ratio: 4 / 3;
        max-width: 7.5rem;
    }

    .work-item:hover .work-title {
        color: transparent;
        -webkit-text-stroke: 1px black;
    }

    .related-projects-container,
    .grid-view-container {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 1.25rem;
        padding-top: 2.5rem;
    }

    .related-projects-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .related-projects {
        margin-top: 12.5rem;
    }

    .grid-view-container .work-item-link {
        opacity: 1;
        border: none;
    }

    .grid-view-container .work-item-link.is-faded .cover-image-wrapper,
    .grid-view-container .work-item-link.is-faded .slideshow-wrapper {
        border: 1px solid black;
    }

    .grid-view-container .work-item-link.is-faded .cover-image-wrapper img,
    .grid-view-container .work-item-link.is-faded .slideshow-wrapper img {
        opacity: 0;
    }

    .work-item-link.is-faded .work-grid-bottom-container {
        display: none;
    }

    .image-container {
        position: relative;
        max-width: 7.5rem;
    }

    .grid-image-container {
        position: relative;
    }

    .slideshow-wrapper {
        position: relative;
        width: 100%;
        aspect-ratio: 4 / 3;
        overflow: hidden;
    }

    .slideshow-wrapper .slideshow-image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        pointer-events: none;
        aspect-ratio: 4 / 3;
    }

    .slideshow-wrapper .slideshow-image.active {
        opacity: 1;
    }

    .work-grid-bottom-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        margin: 1rem 2.5rem 0rem 2.5rem;
        padding-bottom: 1rem;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--Black);
        background-color: var(--Background);
        z-index: 100;
        opacity: 0;

    }

    .grid-image-container:hover .work-grid-bottom-container {
        opacity: 1;
        transform: translateY(0);
    }

    /* === SINGLE PROJECT === */

    .back-icon-container,
    .back-icon {
        width: 1.5rem;
        height: 1.5rem;
        z-index: 99;
        position: relative;
        display: block;
    }

    .back-icon-container {
        padding-top: 1.5rem;
    }

    .cover-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 100dvh;
        object-fit: cover;
        z-index: 50;
        position: relative;
    }

    .home-info-container,
    .project-info-container {
        display: flex;
        gap: 1.25rem;
        justify-content: space-between;
    }

    .description-container {
        flex: 0 0 65%;
    }

    .info-container,
    .about-info-container {
        flex: 0 0 28%;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2.5rem;
    }

    .image-row {
        display: flex;
        gap: 1.25rem;
        flex-wrap: nowrap;
        margin-bottom: 2.5rem;
    }

    .image-row div,
    .image-row img {
        flex: 1 1 0;
        min-width: 0;
        width: 100%;
        height: auto;
        display: block;
        max-height: 100dvh;
        object-fit: cover;
    }

    .image-row.match-height {
        align-items: stretch;
    }

    .image-row.match-height img {
        height: 100%;
        object-fit: cover;
    }

    .desktop {
        display: flex !important;
        ;
    }

    .mobile {
        display: none !important;
    }

    /* === GALLERY OVERLAY === */

    .gallery-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.9);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

    .gallery-overlay.is-open {
        display: flex;
    }

    .gallery-img {
        max-width: calc(100vw - 8rem);
        max-height: calc(100dvh - 8rem);
        object-fit: contain;
        display: block;
    }

    .gallery-btn {
        position: absolute;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 2rem;
        line-height: 1;
        padding: 0;
        cursor: pointer;
        user-select: none;
    }

    .gallery-close {
        top: 2.5rem;
        left: 2.5rem;
        font-size: 2.25rem;
    }

    .gallery-prev {
        left: 2.5rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .gallery-next {
        right: 2.5rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .gallery-btn:hover {
        color: #ddd;
    }

    body.no-scroll {
        overflow: hidden;
    }

    .gallery-img {
        cursor: default;
    }

    /* === MOBILE CSS === */

    @media (max-width: 767px) {

        .desktop {
            display: none !important;
        }

        .mobile {
            display: flex !important;
        }

        .header {
            padding: 0.75rem 1.25rem;
            height: fit-content;
        }

        .content {
            margin: 4.5rem 1.25rem 0rem 1.25rem;
        }

        /* === ABOUT PAGE === */

        .subheader {
            padding-top: 1rem;
        }

        .info-section {
            flex-direction: column;
        }

        .about-info-container {
            gap: 0rem;
            margin-bottom: 3.5rem;
        }

        .socials {
            margin-bottom: 2.5rem;
        }

        .clients-section {
            gap: 1.5rem;
            flex-direction: column;
        }

        .clients-list {
            margin-top: 0;
        }

        .achievement-items-grid {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            width: 100%;
            padding: 1rem 0;
        }

        .item-info-mobile {
            display: flex;
            gap: 0.5rem;
        }

        .achievements-section {
            margin-bottom: 7.5rem;
        }

        .achievement-title-wrapper {
            gap: 0.5rem;
        }

        /* === HOMEPAGE === */

        .home-image-large {
            width: 100%;
        }

        .home-images-wrapper {
            gap: 1.5rem;
        }

        .button {
            width: 100%;
            padding: 0.625rem;
            align-items: center;
            justify-content: center;
        }

        .home-info-container,
        .project-info-container {
            flex-direction: column;
            gap: 1.5rem;
        }

        .specialized-section {
            flex-direction: column;
            align-items: center;
            gap: 2.5rem;
        }

        .specialized-list {
            align-items: center;
        }

        /* === SINGLE PROJECT PAGE === */

        .back-icon-container {
            padding-bottom: 0.75rem;
        }

        .project-info-container {
            gap: 2.5rem;
        }

        .info-container {
            gap: 1rem;
        }

        .image-row {
            gap: 1.5rem;
            flex-direction: column;
            margin-bottom: 1.5rem;
        }

        /* === WORK PAGE === */

        .work-icon {
            width: 1.25rem;
            height: 1.25rem;
        }

        .work-subheader {
            padding: 1rem 0;
        }

        .related-projects-container,
        .grid-view-container {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            padding-top: 1.5rem;
        }

        .related-projects {
            margin-top: 7.5rem;
        }

        .work-item {
            display: flex;
            flex-direction: column;
            padding: 1.5rem 0;
            align-items: flex-start;
        }

        .project-filter p {
            font-size: 1.125rem;
        }

        /* .achievement-title-container:hover .achievement-title {
            color: var(--Black);
            -webkit-text-stroke: 0px;
        } */

        .work-item:hover .work-title {
            color: var(--Black);
            -webkit-text-stroke: 0px;
        }

        .project-filter {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            display: flex;
            padding: 1.5rem 1.25rem;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid var(--Black);
            background-color: var(--Background);
            z-index: 100;
            flex-direction: row;
            align-content: center;
            flex-wrap: nowrap;
            overflow-x: auto;
        }

        .filter-button {
            white-space: nowrap;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .filter-button::-webkit-scrollbar {
            display: none;
        }

        .grid-view-container .work-item-link.is-faded {
            display: none;
        }

        /* === GALLERY OVERLAY === */

        .gallery-close {
            top: 1.5rem;
            left: 1.5rem;
            font-size: 2.25rem;
        }

        .gallery-prev {
            left: 1.5rem;
            bottom: 1.5rem;
            top: auto;
            transform: none;
        }

        .gallery-next {
            right: 1.5rem;
            bottom: 1.5rem;
            top: auto;
            transform: none;
        }

        .gallery-img {
            max-width: calc(100vw - 2.5rem);
        }
    }
}

