/* =========================================================
   PROJECT DETAIL — FULL CSS
========================================================= */

.project-detail {
    width: 100%;
    overflow: visible;
}


/* =========================================================
   PROJECT NAV
========================================================= */

.project-nav {
    width: 100%;
}

.project-nav-inner {
    width: min(1100px, calc(100% - 40px));
    min-height: 72px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-logo {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.back-home {
    color: inherit;
    text-decoration: none;
    font-size: 13px;
    opacity: 0.5;
    transition: opacity 0.25s ease;
}

.back-home:hover {
    opacity: 1;
}


/* =========================================================
   PROJECT HERO
========================================================= */

.project-hero-section {
    width: 100%;
    padding: 70px 0 0;
}

.project-hero-wrap {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================================
   PROJECT META TOP
========================================================= */

.project-top-meta {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 22px;

    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-top-meta span {
    opacity: 0.45;
}

.project-top-meta #project-category {
    opacity: 0.8;
}

.meta-dot {
    opacity: 0.25 !important;
}


/* =========================================================
   PROJECT TITLE
========================================================= */

.project-title {
    max-width: 900px;
    margin: 0;

    font-size: clamp(48px, 6vw, 76px);
    line-height: 0.95;

    letter-spacing: -0.055em;
    font-weight: 600;
}


/* =========================================================
   PROJECT DESCRIPTION
========================================================= */

.project-description {
    max-width: 650px;

    margin: 28px 0 0;

    font-size: 17px;
    line-height: 1.65;

    letter-spacing: -0.015em;
    opacity: 0.6;
}


/* =========================================================
   PROJECT INFO
========================================================= */

.project-meta-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

    margin-top: 55px;
    padding: 20px 0;

    border-top:
        1px solid rgba(128, 128, 128, 0.22);

    border-bottom:
        1px solid rgba(128, 128, 128, 0.22);
}

.project-meta-item {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.project-meta-label {
    font-family: "JetBrains Mono", monospace;

    font-size: 9px;
    letter-spacing: 0.1em;

    text-transform: uppercase;
    opacity: 0.4;
}

.project-meta-value {
    font-size: 13px;
    opacity: 0.8;
}


/* =========================================================
   PROJECT COVER
========================================================= */

.project-cover {
    width: 100%;
    max-width: 1000px;

    margin: 45px auto 0;

    overflow: hidden;
    border-radius: 18px;
}

.project-cover img {
    display: block;

    width: 100%;
    height: auto;

    max-height: 620px;

    object-fit: cover;
    border-radius: 18px;
}


/* =========================================================
   CASE STUDY
========================================================= */

.case-study {
    width: 100%;

    margin-top: 130px;

    overflow: visible;
}


/* =========================================================
   CASE STUDY LAYOUT
========================================================= */

.case-study-layout {
    width: min(1050px, calc(100% - 40px));

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        170px minmax(0, 1fr);

    gap: 70px;

    align-items: start;

    overflow: visible;
}


/* =========================================================
   STICKY CASE STUDY SIDEBAR
========================================================= */

.case-study-sidebar {
    position: -webkit-sticky;
    position: sticky;

    top: 100px;

    align-self: start;

    width: 170px;
    height: fit-content;

    z-index: 20;

    overflow: visible;
}


/* =========================================================
   CASE STUDY NAV
========================================================= */

.case-study-nav {
    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 12px;

    width: 100%;

    overflow: visible;
}


/* =========================================================
   CASE STUDY LABEL
========================================================= */

.case-study-label {
    display: block;

    margin: 0 0 12px;

    font-family: "JetBrains Mono", monospace;

    font-size: 10px;
    line-height: 1;

    letter-spacing: 0.14em;

    text-transform: uppercase;

    opacity: 0.38;
}


/* =========================================================
   CASE STUDY LINKS
========================================================= */

.case-study-nav a {
    position: relative;

    display: flex;

    align-items: center;

    gap: 9px;

    width: max-content;

    padding: 0;
    margin: 0;

    color: inherit;
    text-decoration: none;

    font-family: "Inter", sans-serif;

    font-size: 15px;
    line-height: 1.4;

    font-weight: 500;

    opacity: 0.32;

    transform: translateX(0);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


/* =========================================================
   NAV NUMBER
========================================================= */

.case-nav-number {
    font-family: "JetBrains Mono", monospace;

    font-size: 10px;
    line-height: 1;

    opacity: 0.6;
}


/* =========================================================
   NAV HOVER
========================================================= */

.case-study-nav a:hover {
    opacity: 0.75;
    transform: translateX(3px);
}


/* =========================================================
   ACTIVE NAV ITEM
========================================================= */

.case-study-nav a.active {
    opacity: 1;
    font-weight: 600;
}

.case-study-nav a.active .case-nav-number {
    opacity: 1;
}


/* Active dot */

.case-study-nav a.active::before {
    content: "";

    position: absolute;

    left: -20px;
    top: 50%;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: currentColor;

    transform: translateY(-50%);
}


/* =========================================================
   CASE STUDY CONTENT
========================================================= */

.case-study-content {
    width: 100%;
    min-width: 0;

    overflow: visible;
}


/* =========================================================
   CASE STUDY SECTION
========================================================= */

.case-section {
    width: 100%;

    min-height: 65vh;

    padding-bottom: 130px;

    scroll-margin-top: 110px;
}

.case-section:last-child {
    padding-bottom: 60px;
}


/* =========================================================
   SECTION NUMBER
========================================================= */

.section-number {
    margin: 0 0 14px;

    font-family: "JetBrains Mono", monospace;

    font-size: 10px;
    line-height: 1;

    opacity: 0.35;
}


/* =========================================================
   CASE STUDY HEADING
========================================================= */

.case-section h2 {
    margin: 0 0 25px;

    font-family: "Inter", sans-serif;

    /*
       Bigger than previous version,
       but still consistent with homepage.
    */

    font-size: clamp(42px, 4.5vw, 58px);

    line-height: 0.98;

    letter-spacing: -0.045em;

    font-weight: 500;

    opacity: 0.72;

    transform: translateX(0);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}


/* =========================================================
   ACTIVE SECTION HEADING
========================================================= */

.case-section.is-active h2 {
    opacity: 1;

    transform: translateX(5px);
}


/* =========================================================
   SECTION CONTENT
========================================================= */

.section-content {
    max-width: 650px;
}

.section-content p {
    margin: 0 0 18px;

    font-family: "Inter", sans-serif;

    font-size: 16px;
    line-height: 1.7;

    opacity: 0.62;
}

.section-content p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   PROJECT GALLERY
========================================================= */

.project-gallery {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;

    width: 100%;

    margin-top: 45px;
}

.project-gallery img {
    display: block;

    width: 100%;
    height: auto;

    border-radius: 14px;

    object-fit: cover;
}

.project-gallery img:only-child {
    grid-column: 1 / -1;
}


/* =========================================================
   NEXT PROJECT
========================================================= */

.next-project-section {
    width: 100%;

    margin-top: 60px;

    padding: 80px 0 100px;

    border-top:
        1px solid rgba(128, 128, 128, 0.2);
}

.next-project-wrap {
    width: min(1050px, calc(100% - 40px));

    margin: 0 auto;
}

.next-project-label {
    display: block;

    margin-bottom: 20px;

    font-family: "JetBrains Mono", monospace;

    font-size: 9px;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    opacity: 0.35;
}

.next-project-link {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    color: inherit;
    text-decoration: none;
}

.next-project-title {
    font-size: clamp(38px, 5vw, 64px);

    line-height: 0.95;

    letter-spacing: -0.05em;
}

.next-project-arrow {
    font-size: 28px;

    opacity: 0.45;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.next-project-link:hover
.next-project-arrow {
    transform: translate(4px, -4px);

    opacity: 1;
}


/* =========================================================
   FOOTER
========================================================= */

.project-footer {
    width: 100%;

    padding: 25px 0 35px;
}

.project-footer-inner {
    width: min(1100px, calc(100% - 40px));

    margin: 0 auto;

    padding-top: 20px;

    border-top:
        1px solid rgba(128, 128, 128, 0.2);

    display: flex;

    align-items: center;
    justify-content: space-between;

    font-family: "JetBrains Mono", monospace;

    font-size: 9px;

    opacity: 0.45;
}

.project-footer-inner a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   TABLET — 1024px
========================================================= */

@media (max-width: 1024px) {

    .project-title {
        font-size: clamp(
            46px,
            7vw,
            68px
        );
    }


    .case-study-layout {
        grid-template-columns:
            150px minmax(0, 1fr);

        gap: 50px;
    }


    .case-study-sidebar {
        width: 150px;
    }


    .case-section h2 {
        font-size: clamp(
            40px,
            5vw,
            54px
        );
    }


    .case-section {
        min-height: 60vh;
    }
}


/* =========================================================
   MOBILE — 768px
========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------
       NAV
    ----------------------------------------- */

    .project-nav-inner {
        width: calc(100% - 32px);

        min-height: 65px;
    }

    .project-logo {
        font-size: 13px;
    }

    .back-home {
        font-size: 11px;
    }


    /* -----------------------------------------
       HERO
    ----------------------------------------- */

    .project-hero-section {
        padding-top: 50px;
    }

    .project-hero-wrap {
        width: calc(100% - 32px);
    }

    .project-title {
        font-size: clamp(
            42px,
            12vw,
            62px
        );

        line-height: 0.94;
    }

    .project-description {
        margin-top: 22px;

        font-size: 15px;
        line-height: 1.65;
    }


    /* -----------------------------------------
       META
    ----------------------------------------- */

    .project-meta-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 20px;

        margin-top: 45px;
    }


    /* -----------------------------------------
       COVER
    ----------------------------------------- */

    .project-cover {
        width: 100%;
        max-width: 900px;

        margin-top: 35px;

        border-radius: 14px;
    }

    .project-cover img {
        max-height: 500px;

        border-radius: 14px;
    }


    /* =================================================
       CASE STUDY
    ================================================= */

    .case-study {
        margin-top: 90px;

        overflow: visible;
    }


    /* -----------------------------------------
       LAYOUT
    ----------------------------------------- */

    .case-study-layout {
        width: calc(100% - 32px);

        display: grid;

        grid-template-columns: 1fr;

        gap: 35px;

        overflow: visible;
    }


    /* -----------------------------------------
       STICKY SIDEBAR
    ----------------------------------------- */

    .case-study-sidebar {
        position: -webkit-sticky;
        position: sticky;

        top: 65px;

        width: 100%;
        height: fit-content;

        z-index: 100;

        overflow: visible;
    }


    /* -----------------------------------------
       HORIZONTAL NAV
    ----------------------------------------- */

    .case-study-nav {
        display: flex;

        flex-direction: row;

        flex-wrap: nowrap;

        align-items: center;

        gap: 22px;

        width: 100%;

        overflow-x: auto;
        overflow-y: hidden;

        white-space: nowrap;

        padding: 12px 4px;

        scrollbar-width: none;

        -ms-overflow-style: none;

        -webkit-overflow-scrolling: touch;

        overscroll-behavior-x: contain;
    }

    .case-study-nav::-webkit-scrollbar {
        display: none;
    }


    /* -----------------------------------------
       LABEL
    ----------------------------------------- */

    .case-study-label {
        flex: 0 0 auto;

        margin: 0;

        font-size: 8px;

        white-space: nowrap;
    }


    /* -----------------------------------------
       NAV LINKS
    ----------------------------------------- */

    .case-study-nav a {
        flex: 0 0 auto;

        width: max-content;

        font-size: 13px;

        white-space: nowrap;

        transform: none;
    }

    .case-study-nav a:hover {
        transform: none;
    }


    .case-nav-number {
        font-size: 8px;
    }


    /* -----------------------------------------
       ACTIVE MOBILE NAV
    ----------------------------------------- */

    .case-study-nav a.active {
        opacity: 1;

        font-weight: 600;
    }

    .case-study-nav a.active::before {
        display: none;
    }


    /* -----------------------------------------
       CASE CONTENT
    ----------------------------------------- */

    .case-study-content {
        width: 100%;
        min-width: 0;

        overflow: visible;
    }


    .case-section {
        min-height: auto;

        padding-bottom: 100px;

        scroll-margin-top: 120px;
    }


    .section-number {
        font-size: 8px;

        margin-bottom: 13px;
    }


    /* -----------------------------------------
       CASE STUDY HEADING
    ----------------------------------------- */

    .case-section h2 {
        margin-bottom: 22px;

        font-size: clamp(
            38px,
            10vw,
            48px
        );

        line-height: 0.96;

        letter-spacing: -0.045em;
    }


    .case-section.is-active h2 {
        opacity: 1;

        transform: translateX(4px);
    }


    /* -----------------------------------------
       BODY
    ----------------------------------------- */

    .section-content {
        max-width: 100%;
    }

    .section-content p {
        font-size: 15px;

        line-height: 1.7;
    }


    /* -----------------------------------------
       GALLERY
    ----------------------------------------- */

    .project-gallery {
        grid-template-columns: 1fr;

        gap: 12px;

        margin-top: 35px;
    }

    .project-gallery img {
        border-radius: 12px;
    }


    /* -----------------------------------------
       NEXT PROJECT
    ----------------------------------------- */

    .next-project-section {
        padding: 65px 0 80px;
    }

    .next-project-wrap {
        width: calc(100% - 32px);
    }

    .next-project-title {
        font-size: clamp(
            34px,
            10vw,
            52px
        );
    }

    .next-project-arrow {
        font-size: 24px;
    }


    /* -----------------------------------------
       FOOTER
    ----------------------------------------- */

    .project-footer-inner {
        width: calc(100% - 32px);

        flex-direction: column;

        align-items: flex-start;

        gap: 10px;
    }
}


/* =========================================================
   SMALL MOBILE — 480px
========================================================= */

@media (max-width: 480px) {

    .project-nav-inner {
        width: calc(100% - 24px);

        min-height: 60px;
    }


    .project-hero-wrap {
        width: calc(100% - 24px);
    }


    .project-title {
        font-size: 40px;

        line-height: 0.96;
    }


    .project-description {
        font-size: 14px;
    }


    .project-meta-grid {
        gap: 18px 12px;

        margin-top: 38px;
    }


    .project-meta-label {
        font-size: 8px;
    }


    .project-meta-value {
        font-size: 12px;
    }


    /* -----------------------------------------
       COVER
    ----------------------------------------- */

    .project-cover {
        margin-top: 28px;

        border-radius: 12px;
    }

    .project-cover img {
        border-radius: 12px;
    }


    /* -----------------------------------------
       CASE STUDY
    ----------------------------------------- */

    .case-study {
        margin-top: 70px;
    }


    .case-study-layout {
        width: calc(100% - 24px);

        gap: 28px;
    }


    .case-study-sidebar {
        top: 60px;
    }


    /* -----------------------------------------
       HORIZONTAL NAV
    ----------------------------------------- */

    .case-study-nav {
        gap: 18px;

        padding: 10px 3px;
    }


    .case-study-label {
        font-size: 8px;
    }


    .case-study-nav a {
        font-size: 12px;
    }


    .case-nav-number {
        font-size: 7px;
    }


    /* -----------------------------------------
       CASE SECTION
    ----------------------------------------- */

    .case-section {
        padding-bottom: 80px;

        scroll-margin-top: 105px;
    }


    .case-section h2 {
        font-size: 38px;

        margin-bottom: 20px;
    }


    .section-content p {
        font-size: 14px;
    }


    /* -----------------------------------------
       NEXT PROJECT
    ----------------------------------------- */

    .next-project-wrap {
        width: calc(100% - 24px);
    }
}


/* =========================================================
   VERY SMALL — 360px
========================================================= */

@media (max-width: 360px) {

    .project-title {
        font-size: 38px;
    }


    .case-study-nav {
        gap: 16px;
    }


    .case-study-nav a {
        font-size: 11px;
    }


    .case-section h2 {
        font-size: 36px;
    }


    .section-content p {
        font-size: 14px;
    }
}