/* ============================================================
   PROJECT PAGE — REDESIGNED
   Matches main site: Plus Jakarta Sans + DM Mono
   Colors: Near-black base, warm white text, electric lime accent
   Layout: identical to original
   ============================================================ */

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-latin-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 300 800;
    font-display: block;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-latin-italic-300.woff2') format('woff2');
    font-style: italic;
    font-weight: 300;
    font-display: block;
}

@font-face {
    font-family: 'DM Mono';
    src: url('assets/fonts/dm-mono-latin-300.woff2') format('woff2');
    font-style: normal;
    font-weight: 300;
    font-display: block;
}

@font-face {
    font-family: 'DM Mono';
    src: url('assets/fonts/dm-mono-latin-400.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: block;
}

@font-face {
    font-family: 'DM Mono';
    src: url('assets/fonts/dm-mono-latin-500.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: block;
}

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
    --bg:          #0d0d0d;
    --bg-2:        #1a1a1a;
    --bg-3:        #161616;
    --card-bg:     rgba(255, 255, 255, 0.02);
    --border:      rgba(255, 255, 255, 0.08);
    --border-hover:rgba(255, 255, 255, 0.18);
    --accent:      #e0e0e0;
    --accent-dim:  rgba(255, 255, 255, 0.06);
    --text-main:   #f0f0f0;
    --text-dim:    #7a7a7a;
    --text-mid:    #b0b0b0;
    --font-display:'Plus Jakarta Sans', sans-serif;
    --font-mono:   'DM Mono', 'Courier New', monospace;
    --font-body:   'Plus Jakarta Sans', sans-serif;
    --radius-main: 2px;
    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

/* ─── BASE ───────────────────────────────────────────── */
body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Grain texture — disabled */
body::before {
    display: none;
}


/* ─── PROJECT NAV ────────────────────────────────────── */
.project-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem calc(5% + 20px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.4s var(--ease-out), background 0.4s ease;
    background: rgba(13, 13, 13, 0.89);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.project-nav.scrolled {
    padding: 0.9rem 5%;
    background: var(--bg);
    transition: padding 0.4s var(--ease-out), background 0.4s ease;
    background: rgba(13, 13, 13, 0.89);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.project-nav .logo {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: font-size 0.3s ease;
}

.project-nav.scrolled .logo { font-size: 1.2rem; }

.project-nav .logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-main);
    object-fit: cover;
    border: 1px solid var(--border);
    transition: width 0.3s ease, height 0.3s ease;
}

.project-nav.scrolled .logo-img { width: 30px; height: 30px; }

.project-nav .accent-dot { color: var(--accent); }

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.88rem;
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-main);
    transition: color 0.2s ease, background 0.2s ease;
}

.back-link:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.back-link svg { width: 18px; height: 18px; }

/* ─── PROJECT HERO ───────────────────────────────────── */
.project-hero {
    position: relative;
    width: 100%;
    height: 56vh;
    overflow: hidden;
}

.project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(transparent, var(--bg));
}

.project-hero-overlay {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    padding: 0 10%;
    z-index: 2;
}

.project-hero-overlay h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin-bottom: 10px;
}

.project-hero-overlay h1 span { color: var(--accent); }

.project-hero-overlay .project-tagline {
    color: var(--text-mid);
    font-size: 1.1rem;
    font-weight: 400;
}

.project-title-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.project-title-row h1 {
    margin-bottom: 0;
}

.project-ext-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-main);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-decoration: none;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.project-ext-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── CONTENT AREA ───────────────────────────────────── */
.project-content {
    max-width: 1250px;
    margin: 0 auto;
    padding: 60px 5% 100px;
}

.project-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-mid);
    margin-bottom: 60px;
    max-width: 2000px;
    width: 120%;
    margin-left: -10%;
}

.project-description p { margin-bottom: 20px; }

/* ─── PROJECT META ───────────────────────────────────── */
.project-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    padding: 25px 30px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-main);
    flex-wrap: wrap;
    width: 120%;
    margin-left: -10%;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-item .meta-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    font-weight: 400;
}

.meta-item .meta-value {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 400;
}

/* ─── IMAGE GALLERY ──────────────────────────────────── */
.project-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
    justify-items: stretch;
    width: 120%;
    margin-left: -10%;
    margin-top: 32px;
}

@media (max-width: 1200px) {
    .project-description,
    .project-meta,
    .project-gallery {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 700px) {
    .project-gallery {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.gallery-item {
    border-radius: var(--radius-main);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card-bg);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.07);
    max-width: 100%;
    height: 100%;
    position: relative;
}

.gallery-item:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.gallery-item.is-clickable-item {
    cursor: pointer;
}

.gallery-item.is-clickable-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    min-height: 120px;
     max-height: 360px;
}

.gallery-item .caption {
    padding: 14px 16px 18px 16px;
    color: var(--text-mid);
    font-size: 0.93rem;
    line-height: 1.6;
    flex: 1 1 auto;
}

.gallery-item .caption strong {
    color: var(--text-main);
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    margin: 0;
    padding: 6px 10px;
    border-radius: var(--radius-main);
    background: linear-gradient(135deg, rgba(10, 28, 21, 0.507), rgba(10, 15, 28, 0.62));
    border: 1px solid rgba(255, 255, 255, 0.16);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    max-width: calc(100% - 52px);
    line-height: 1.35;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gallery-item .caption ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.gallery-item .caption ul li {
    padding-left: 16px;
    position: relative;
    margin-bottom: 4px;
}

.gallery-item .caption ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ─── DOWNLOAD BUTTON ────────────────────────────────── */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    margin-right: 8px;
    padding: 4px 10px;
    background: var(--bg-2);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    border-radius: var(--radius-main);
    border: 1px solid var(--border);
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.2s var(--ease-out);
}

.download-btn:hover {
    border-color: rgba(214, 172, 95, 0.3);
    color: var(--text-main);
    background: rgba(214, 172, 95, 0.05);
    box-shadow: 0 0 0 1px rgba(214, 172, 95, 0.1);
    transform: translateY(-1px);
}

.download-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.download-btn:focus-visible {
    outline: 2px solid rgba(214, 172, 95, 0.8);
    outline-offset: 2px;
}

/* ─── CAROUSEL ───────────────────────────────────────── */
.gallery-images {
    position: relative;
    overflow: hidden;
}

.gallery-images::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    opacity: 0.7;
    z-index: 4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    transition: transform 0.25s var(--ease-out);
}

.gallery-item:hover .gallery-images::after {
    transform: translate(1px, -1px) scale(1.04);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6ac5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
    opacity: 0.7;
}

.gallery-images img {
    width: 100%;
    height: auto;
    display: none;
    cursor: zoom-in;
}

.gallery-images img.active { display: block; }

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-main);
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.gallery-item:hover .gallery-nav { opacity: 1; }

.gallery-nav:hover {
    background: rgba(200, 241, 53, 0.2);
    border-color: var(--accent);
}

.gallery-nav.prev { left: 15px; }
.gallery-nav.next { right: 15px; }

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 6px 0;
    background: var(--card-bg);
}

.gallery-dot {
    width: 18px;
    height: 2px;
    border-radius: var(--radius-main);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
}

.gallery-dot.active {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(200, 241, 53, 0.4);
}

.gallery-dot:hover { background: rgba(255, 255, 255, 0.4); }

/* ─── TWO-COLUMN GALLERY ─────────────────────────────── */
.gallery-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* ─── LIGHTBOX ───────────────────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: var(--radius-main);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.7);
    transform: scale(0.96);
    transition: transform 0.3s var(--ease-out);
}

.lightbox.active img { transform: scale(1); }

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: var(--text-dim);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    font-family: var(--font-mono);
    font-weight: 300;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 2001;
}

.lightbox-close:hover {
    color: var(--text-main);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-main);
    color: var(--text-main);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 2001;
}

.lightbox-nav:hover {
    background: rgba(200, 241, 53, 0.15);
    border-color: var(--accent);
}

.lightbox-nav.lb-prev { left: 20px; }
.lightbox-nav.lb-next { right: 20px; }

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    z-index: 2001;
}

.gallery-images img,
.gallery-item > img { cursor: zoom-in; }

/* ─── CONTENT ───────────────────────────────────────── */
.skill-tags {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
}

@media (max-width: 700px) {
    .meta-item .meta-value .skill-tags {
        justify-content: flex-start;
        margin-left: 0;
    }
    .meta-item .meta-label {
        margin-bottom: 2px;
    }
    .meta-item .meta-value {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

.skill-tags span {
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: var(--radius-main);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    background: var(--bg-2);
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
    letter-spacing: 0.02em;
}

.skill-tags span:hover {
    border-color: rgba(214, 172, 95, 0.3);
    color: var(--text-main);
    background: rgba(214, 172, 95, 0.05);
    box-shadow: 0 0 0 1px rgba(214, 172, 95, 0.1);
}

/* ─── PROJECT IMAGES (grid layout) ───────────────────── */
.project-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 120%;
    margin-left: -10%;
}

.img-cell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-main);
    border: 1px solid var(--border);
    cursor: pointer;
}

.img-cell.wide {
    grid-column: 1 / -1;
}

.img-cell.wide img {
    aspect-ratio: 21 / 10;
}

.img-cell img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.img-cell:hover img {
    transform: scale(1.03);
}

.img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 28px 14px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.72));
    color: rgba(255,255,255,0.85);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

.img-cell:hover .img-caption {
    opacity: 1;
    transform: translateY(0);
}

.img-expand {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-main);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    z-index: 3;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.img-cell:hover .img-expand {
    opacity: 1;
}

.img-expand:hover {
    background: rgba(214, 172, 95, 0.2);
    border-color: rgba(214, 172, 95, 0.4);
}

.img-expand svg {
    width: 18px;
    height: 18px;
}

/* ─── IMAGE LIGHTBOX ─────────────────────────────────── */
.img-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-lightbox.active {
    display: flex;
    opacity: 1;
}

.img-lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-main);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.7);
    transform: scale(0.96);
    transition: transform 0.3s var(--ease-out);
}

.img-lightbox.active img {
    transform: scale(1);
}

.img-lightbox .lb-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: var(--text-dim);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    font-family: var(--font-mono);
    font-weight: 300;
    transition: color 0.2s ease;
    z-index: 2001;
}

.img-lightbox .lb-close:hover {
    color: var(--text-main);
}

.img-lightbox .lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-main);
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 2001;
}

.img-lightbox .lb-nav:hover {
    background: rgba(214, 172, 95, 0.15);
    border-color: rgba(214, 172, 95, 0.3);
}

.img-lightbox .lb-prev { left: 20px; }
.img-lightbox .lb-next { right: 20px; }

.img-lightbox .lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    z-index: 2001;
}

.lb-caption {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-align: center;
    max-width: 80vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2001;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .project-images {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .project-images {
        grid-template-columns: 1fr;
    }
    .img-cell.wide {
        grid-column: auto;
    }
    .img-expand {
        opacity: 0.7;
    }
}

/* ─── FOOTER ─────────────────────────────────────────── */
.project-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.project-footer-link {
    color: var(--text-mid);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.project-footer-link:hover {
    color: var(--accent);
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
    .project-hero {
        height: auto;
        overflow: visible;
        display: flex;
        flex-direction: column;
    }
    .project-hero img {
        height: 34vh;
        flex-shrink: 0;
        object-position: center 42%;
    }
    .project-hero::after {
        top: 17vh;
        bottom: auto;
        height: 17vh;
    }
    .project-hero-overlay {
        position: relative;
        bottom: auto;
        left: auto;
        width: 100%;
        padding: 0.5rem 5% 1.5rem;
        margin-top: -150px;
    }
    .project-hero:has(iframe) {
        align-items: stretch;
    }
    .project-hero:has(iframe) .project-hero-overlay[style*="display:flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 2rem !important;
    }
    .project-hero:has(iframe) .project-hero-overlay[style*="display:flex"] > div:last-child {
        width: 100% !important;
    }
    .project-hero-overlay h1 { letter-spacing: -1px; }
    .gallery-row { grid-template-columns: 1fr; }
    .project-meta { flex-direction: column; gap: 20px; }
    .gallery-item .caption strong { font-size: 0.78rem; }
}

@media (max-width: 420px) {
    .project-hero {
        height: auto;
    }
    .project-hero img {
        height: 30vh;
        object-position: center 45%;
    }
    .project-hero::after {
        top: 15vh;
        height: 15vh;
    }
    .project-hero-overlay {
        margin-top: -130px;
    }
}