/* ============================================================
   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
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300&family=DM+Mono:wght@300;400;500&display=swap');

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
    --bg:          #0f0f0e;
    --bg-2:        #5a67662e;
    --bg-3:        #181816;
    --card-bg:     rgba(255, 255, 255, 0.03);
    --border:      rgba(255, 255, 255, 0.07);
    --border-hover:rgba(255, 255, 255, 0.18);
    --accent:      #d6ac5f;
    --accent-dim:  rgba(200, 241, 53, 0.12);
    --text-main:   #f5f5f5;
    --text-dim:    #8a8884;
    --text-mid:    #c4c2be;
    --font-display:'Plus Jakarta Sans', sans-serif;
    --font-mono:   'DM Mono', 'Courier New', monospace;
    --font-body:   'Plus Jakarta Sans', sans-serif;
    --radius-sm:   8px;
    --radius-md:   14px;
    --radius-lg:   20px;
    --radius-xl:   32px;
    --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 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.45;
}


/* ─── PROJECT NAV ────────────────────────────────────── */
.project-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 12, 11, 0.55);
    transition: padding 0.4s var(--ease-out), background 0.4s ease;
}

.project-nav.scrolled {
    padding: 0.85rem 5%;
    background: rgba(12, 12, 11, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

.project-nav .logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.05px;
    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: 50%;
    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-sm);
    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: 62vh;
    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;
}

/* ─── 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;
}

.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-md);
    flex-wrap: wrap;
}

.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;
    margin-top: 32px;
}

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

.gallery-item {
    border-radius: var(--radius-md);
    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%;
}

.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: block;
    margin-bottom: 5px;
    font-size: 1.05rem;
    font-weight: 600;
}

.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;
    padding: 6px 12px;
    background: var(--accent);
    color: var(--bg);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s var(--ease-out);
}

.download-btn:hover {
    background: hsl(172, 100%, 74%);
    transform: translateY(-2px);
}

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

/* ─── 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: 50%;
    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: 4px;
    padding: 4px 0;
    background: var(--card-bg);
}

.gallery-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    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-sm);
    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: 50%;
    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: 10px;
    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);
}

/* ─── 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;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
    .project-hero { height: 40vh; }
    .gallery-row { grid-template-columns: 1fr; }
    .project-meta { flex-direction: column; gap: 20px; }
    .project-hero-overlay { bottom: 40px; }
    .project-hero-overlay h1 { letter-spacing: -1px; }
}