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


/* =========================================
   PROJECT CATEGORY CARD
   ========================================= */

.project-category-card {
    width: 100%;

    padding: 24px;

    background:
        #29282e;

    border:
        1px solid var(--border);

    border-radius: 10px;

    box-shadow:
        0 4px 16px rgba(
            0,
            0,
            0,
            0.16
        );
}


/* =========================================
   PROJECT CATEGORY HEADER
   ========================================= */

.project-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;

    padding-bottom: 20px;

    border-bottom:
        1px solid var(--border);
}


.project-category-header h2 {
    margin-top: 4px;
    margin-bottom: 8px;

    font-size:
        clamp(
            1.25rem,
            2vw,
            1.55rem
        );

    font-weight: 600;

    letter-spacing:
        -0.02em;
}


.project-category-header p {
    max-width: 750px;

    color:
        var(--text-secondary);

    font-size: 0.84rem;

    line-height: 1.6;
}


/* =========================================
   PROJECT LIST
   ========================================= */

.project-list {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 16px;
}


/* =========================================
   PROJECT CARD
   ========================================= */

.project-card {
    width: 100%;

    padding: 24px;

    background:
        #302f35;

    border:
        1px solid var(--border);

    border-radius: 8px;

    box-shadow:
        0 2px 8px rgba(
            0,
            0,
            0,
            0.12
        );

    transition:
        border-color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}


.project-card:hover {
    background:
        #333238;

    border-color:
        #52515b;

    transform:
        translateY(-1px);
}


/* =========================================
   PROJECT HEADER
   ========================================= */

.project-card-header {
    margin-bottom: 24px;
}


/* =========================================
   PROJECT HEADER MAIN
   ========================================= */

.project-card-header-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 14px;
}


/* =========================================
   PROJECT HEADER LEFT
   ========================================= */

.project-card-header-left {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 14px;
}


/* =========================================
   PROJECT ICON
   ========================================= */

.project-card-icon {
    width: 60px;
    height: 60px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        #25242a;

    border:
        1px solid var(--border);

    border-radius: 10px;

    overflow: hidden;

    box-shadow:
        0 2px 7px rgba(
            0,
            0,
            0,
            0.18
        );
}


.project-card-icon img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.project-card-icon span {
    color:
        var(--accent-light);

    font-family:
        "Cascadia Code",
        "Fira Code",
        Consolas,
        monospace;

    font-size: 0.82rem;

    font-weight: 600;
}


/* =========================================
   PROJECT HEADING
   ========================================= */

.project-card-heading {
    min-width: 0;
}


.project-card-eyebrow {
    display: block;

    margin-bottom: 5px;

    color:
        var(--accent-light);

    font-family:
        "Cascadia Code",
        "Fira Code",
        Consolas,
        monospace;

    font-size: 0.7rem;
}


.project-card-heading h2 {
    margin: 0;

    font-size:
        clamp(
            1.35rem,
            2.3vw,
            1.9rem
        );

    font-weight: 600;

    line-height: 1.2;

    letter-spacing:
        -0.025em;
}


/* =========================================
   PROJECT HEADER RIGHT
   ========================================= */

.project-card-header-right {
    flex-shrink: 0;

    display: flex;
    align-items: flex-start;
}


/* =========================================
   DESCRIPTION
   ========================================= */

.project-description {
    max-width: 850px;

    margin-left: 74px;

    color:
        var(--text-secondary);

    font-size: 0.9rem;

    line-height: 1.65;
}


/* =========================================
   FEATURED PROJECT
   ========================================= */

.project-featured {
    border-color:
        rgba(
            123,
            131,
            235,
            0.38
        );
}


.project-featured-badge {
    flex-shrink: 0;

    padding:
        5px 8px;

    color:
        var(--accent-light);

    background:
        rgba(
            123,
            131,
            235,
            0.08
        );

    border:
        1px solid rgba(
            123,
            131,
            235,
            0.25
        );

    border-radius: 5px;

    font-family:
        "Cascadia Code",
        "Fira Code",
        Consolas,
        monospace;

    font-size: 0.63rem;
    font-weight: 600;

    text-transform:
        uppercase;

    letter-spacing:
        0.05em;
}


/* =========================================
   INNER GRID
   ========================================= */

.project-inner-grid {
    display: grid;

    grid-template-columns:
        minmax(250px, 0.8fr)
        minmax(0, 1.5fr);

    gap: 12px;
}


/* =========================================
   INNER CELL
   ========================================= */

.project-inner-cell {
    min-width: 0;

    padding: 20px;

    background:
        #25242a;

    border:
        1px solid var(--border);

    border-radius: 7px;

    transition:
        background 150ms ease,
        border-color 150ms ease;
}


.project-inner-cell:hover {
    background:
        var(--surface-hover);

    border-color:
        #55545e;
}


.project-cell-label {
    display: block;

    margin-bottom: 5px;

    color:
        var(--text-muted);

    font-family:
        "Cascadia Code",
        "Fira Code",
        Consolas,
        monospace;

    font-size: 0.63rem;
    font-weight: 600;

    text-transform:
        uppercase;

    letter-spacing:
        0.08em;
}


.project-inner-cell h3 {
    margin-bottom: 17px;

    font-size: 1.05rem;

    font-weight: 600;
}


/* =========================================
   STACK
   ========================================= */

.project-stack-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}


.project-stack-tags span {
    padding:
        7px 10px;

    color:
        var(--accent-light);

    background:
        var(--surface-secondary);

    border:
        1px solid var(--border);

    border-radius: 5px;

    font-family:
        "Cascadia Code",
        "Fira Code",
        Consolas,
        monospace;

    font-size: 0.73rem;
}


/* =========================================
   WHAT I LEARNED
   ========================================= */

.project-learned-list {
    display: flex;
    flex-direction: column;

    gap: 10px;

    list-style: none;
}


.project-learned-list li {
    position: relative;

    padding-left: 17px;

    color:
        var(--text-secondary);

    font-size: 0.84rem;

    line-height: 1.55;
}


.project-learned-list li::before {
    content: "›";

    position: absolute;

    left: 0;

    color:
        var(--accent-light);

    font-weight: 600;
}


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

.project-gallery-cell {
    grid-column:
        1 / -1;
}


.project-gallery {
    display: grid;

    gap: 10px;
}


/* =========================================
   GALLERY COLUMN COUNTS
   ========================================= */

.project-gallery-1 {
    grid-template-columns:
        minmax(0, 1fr);
}


.project-gallery-2 {
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
}


.project-gallery-3 {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}


/* =========================================
   GALLERY IMAGE
   ========================================= */

.project-gallery-image {
    width: 100%;

    padding: 0;

    appearance: none;

    background:
        var(--surface-secondary);

    border:
        1px solid var(--border);

    border-radius: 6px;

    overflow: hidden;

    cursor:
        zoom-in;

    font: inherit;

    transition:
        border-color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}


.project-gallery-image:hover {
    border-color:
        var(--accent-light);

    transform:
        translateY(-2px);

    box-shadow:
        0 6px 18px rgba(
            0,
            0,
            0,
            0.22
        );
}


.project-gallery-image:focus-visible {
    outline:
        2px solid var(--accent-light);

    outline-offset:
        3px;
}


.project-gallery-image img {
    width: 100%;
    height: auto;

    aspect-ratio:
        16 / 9;

    display: block;

    object-fit: cover;

    transition:
        transform 180ms ease;
}


.project-gallery-image:hover img {
    transform:
        scale(1.025);
}


/* =========================================
   IMAGE VIEWER
   ========================================= */

.project-image-viewer {
    position: fixed;

    inset: 0;

    z-index: 10000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 32px;

    background:
        rgba(
            10,
            10,
            14,
            0.92
        );

    backdrop-filter:
        blur(8px);

    animation:
        projectViewerFadeIn
        160ms ease;
}


/* =========================================
   IMAGE VIEWER CONTENT
   ========================================= */

.project-image-viewer-content {
    position: relative;

    width:
        fit-content;

    max-width:
        95vw;

    max-height:
        92vh;

    display: flex;

    align-items: center;
    justify-content: center;
}


/* =========================================
   IMAGE VIEWER IMAGE
   ========================================= */

.project-image-viewer-image {
    display: block;

    max-width:
        95vw;

    max-height:
        92vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border:
        1px solid rgba(
            255,
            255,
            255,
            0.14
        );

    border-radius: 8px;

    box-shadow:
        0 20px 60px rgba(
            0,
            0,
            0,
            0.55
        );

    animation:
        projectViewerImageIn
        180ms ease;
}


/* =========================================
   IMAGE VIEWER CLOSE BUTTON
   ========================================= */

.project-image-viewer-close {
    position: absolute;

    top: -18px;
    right: -18px;

    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    color:
        #ffffff;

    background:
        #302f35;

    border:
        1px solid #55545e;

    border-radius:
        50%;

    cursor:
        pointer;

    font-size:
        1.7rem;

    line-height:
        1;

    transition:
        background 150ms ease,
        border-color 150ms ease,
        transform 150ms ease;
}


.project-image-viewer-close:hover {
    background:
        #3a3940;

    border-color:
        var(--accent-light);

    transform:
        scale(1.05);
}


.project-image-viewer-close:focus-visible {
    outline:
        2px solid var(--accent-light);

    outline-offset:
        3px;
}


/* =========================================
   IMAGE VIEWER ANIMATIONS
   ========================================= */

@keyframes projectViewerFadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes projectViewerImageIn {

    from {
        opacity: 0;

        transform:
            scale(0.96);
    }

    to {
        opacity: 1;

        transform:
            scale(1);
    }

}


/* =========================================
   LINKS
   ========================================= */

.project-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 16px;

    padding-top: 16px;

    border-top:
        1px solid var(--border);
}


/* =========================================
   RESPONSIVE - 800PX
   ========================================= */

@media (max-width: 800px) {

    .project-inner-grid {
        grid-template-columns:
            1fr;
    }


    .project-gallery-cell {
        grid-column:
            auto;
    }

}


/* =========================================
   RESPONSIVE - 650PX
   ========================================= */

@media (max-width: 650px) {

    .project-category-card {
        padding: 18px;
    }


    .project-category-header {
        margin-bottom: 16px;

        padding-bottom: 16px;
    }


    .project-card {
        padding: 20px;
    }


    .project-gallery-2,
    .project-gallery-3 {
        grid-template-columns:
            1fr;
    }


    .project-image-viewer {
        padding: 16px;
    }


    .project-image-viewer-image {
        max-width:
            calc(100vw - 32px);

        max-height:
            85vh;
    }


    .project-image-viewer-close {
        top: -14px;
        right: -8px;

        width: 38px;
        height: 38px;
    }

}


/* =========================================
   RESPONSIVE - 550PX
   ========================================= */

@media (max-width: 550px) {

    .project-card-header-main {
        gap: 12px;
    }


    .project-card-header-left {
        gap: 11px;
    }


    .project-card-icon {
        width: 50px;
        height: 50px;

        border-radius: 8px;
    }


    .project-description {
        margin-left: 0;
    }


    .project-card-heading h2 {
        font-size: 1.2rem;
    }

}


/* =========================================
   RESPONSIVE - 450PX
   ========================================= */

@media (max-width: 450px) {

    .project-card {
        padding: 17px;
    }


    .project-inner-cell {
        padding: 17px;
    }


    .project-card-header-main {
        align-items: flex-start;
    }


    .project-card-header-right {
        margin-left: auto;
    }


    .project-featured-badge {
        padding:
            4px 6px;

        font-size: 0.56rem;
    }


    .project-links {
        justify-content:
            stretch;
    }


    .project-links a {
        width: 100%;
    }

}