/* ── Floating particles ── */
#projectsParticles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.projects-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(144, 195, 63, 0.3);
    animation: projectsFloat 20s infinite linear;
}

@keyframes projectsFloat {
    0%   { transform: translateY(110vh) rotate(0deg);   opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

.project-detail {
    background-color: #242424;
    background-image: url(../images/projects-background.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.project-hero img {
    width: 100%;
    height: auto;
    max-height: min(72vh, 550px);
    object-fit: cover;
    object-position: center;
    display: block;
}

.project-info {
    padding: 20px 56px;
    max-width: 100%;
}

.project-info-inner {
    position: relative;
    padding: 5px 35px 10px 35px;
    background: rgba(30, 30, 30, 0.80);
    border-radius: 7px;
}

@keyframes border-pulse {
    0%, 100% { box-shadow: 0 0 4px 1px rgba(144, 195, 63, 0.5); }
    50%       { box-shadow: 0 0 12px 4px rgba(144, 195, 63, 0.15); }
}

.project-info-inner::before {
    display: none;
}

.project-info h1 {
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    font-weight: 300;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0px 0px 15px;
    position: relative;
    z-index: 1;
}

.project-info-inner > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    position: relative;
    z-index: 1;
}

.project-meta-container {
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
    padding: 10px 0px;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-meta p {
    margin: 0;
    font-size: 15px;
    line-height: 1;
    color: #fff;
}

.project-meta strong {
    font-weight: 500;
    color: #fff;
}

.project-awards h2 {
    font-size: 15px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 5px;
}

.project-awards ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.project-awards li {
    font-size: 14px;
    line-height: 1.65;
    color: #fff;
    padding-left: 16px;
    position: relative;
}

.project-awards li::before {
    content: '\2013';
    position: absolute;
    left: 0;
    color: #fff;
}

/* ── Gallery grid ── */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0px 56px;
    padding-bottom: 60px;
}

.project-gallery img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.25s ease;
    border-radius: 8px;
}

.project-gallery img:hover {
    opacity: 0.88;
    transform: scale(1.015);
}

/* ── Scroll-driven fade-in for gallery images ── */
.project-gallery img.gallery-reveal {
    opacity: 0;
    transition: opacity 0.7s ease;
}

.project-gallery img.gallery-reveal.is-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .project-gallery img.gallery-reveal {
        opacity: 1;
        transition: none;
    }
}

/* ── Modal overlay ── */
.gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.96);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.gallery-modal.open {
    display: flex;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gallery-modal.open {
    animation: modalFadeIn 0.22s ease forwards;
}

/* Image wrapper */
.gm-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    min-height: 0;
    padding: 20px 80px;
    box-sizing: border-box;
}

.gm-image-wrap img {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 2px;
    transition: opacity 0.5s ease;
}

.gm-image-wrap img.fade-out {
    opacity: 0;
}

/* Prev / Next arrows */
.gm-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    color: #fff;
    opacity: 0.55;
    transition: opacity 0.15s ease, transform 0.15s ease;
    line-height: 1;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.gm-arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.gm-arrow svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gm-prev { left: 16px; }
.gm-next { right: 16px; }

/* Top bar: counter + close */
.gm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 24px 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.gm-counter {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
}

.gm-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.55);
    padding: 4px;
    line-height: 1;
    transition: color 0.15s ease, transform 0.15s ease;
    outline: none;
}

.gm-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.gm-close svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* Thumbnail strip */
.gm-thumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 24px 24px;
    flex-shrink: 0;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gm-thumbs::-webkit-scrollbar { display: none; }

.gm-thumb {
    width: 54px;
    height: 38px;
    object-fit: cover;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.4;
    border: 1.5px solid transparent;
    transition: opacity 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.gm-thumb:hover {
    opacity: 0.75;
}

.gm-thumb.active {
    opacity: 1;
    border-color: #90c33f;
}

@media (max-width: 767px) {
    .project-gallery {
        grid-template-columns: 1fr;
        margin: 0 20px;
    }

    .project-info {
        padding: 24px 20px 40px;
    }

    .project-info-inner {
        padding: 12px 20px 16px;
    }

    /* Stack the meta + highlights columns on mobile */
    .project-info-inner > div {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .gm-image-wrap {
        padding: 12px 48px;
    }

    .gm-arrow svg {
        width: 26px;
        height: 26px;
    }

    .gm-prev { left: 8px; }
    .gm-next { right: 8px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* proj-pager */
.proj-pager{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:10px 56px 16px;}
.proj-pager-card{position:relative;overflow:hidden;border-radius:8px;min-height:160px;display:flex;
 flex-direction:column;justify-content:center;padding:24px 34px;text-decoration:none;color:#fff;
 border:1px solid rgba(255,255,255,.09);isolation:isolate;
 transition:border-color .3s ease,transform .3s ease,box-shadow .3s ease;}
.proj-pager-card::before{content:'';position:absolute;inset:0;z-index:-2;background-image:var(--img);
 background-size:cover;background-position:center;transform:scale(1.04);transition:transform .6s ease;}
.proj-pager-card::after{content:'';position:absolute;inset:0;z-index:-1;}
.proj-pager-card.prev::after{background:linear-gradient(90deg,rgba(18,18,18,.9) 0%,rgba(18,18,18,.55) 60%,rgba(18,18,18,.32) 100%);}
.proj-pager-card.next{align-items:flex-end;text-align:right;}
.proj-pager-card.next::after{background:linear-gradient(270deg,rgba(18,18,18,.9) 0%,rgba(18,18,18,.55) 60%,rgba(18,18,18,.32) 100%);}
.proj-pager-card:hover{border-color:rgba(144,195,63,.55);transform:translateY(-2px);box-shadow:0 12px 30px rgba(0,0,0,.35);}
.proj-pager-card:hover::before{transform:scale(1.1);}
.proj-pager-dir{display:flex;align-items:center;gap:8px;font-family:'AnekBangla',sans-serif;font-size:11px;
 font-weight:600;letter-spacing:.18em;text-transform:uppercase;color:var(--window-green-color,#90c33f);margin-bottom:10px;}
.proj-pager-card.next .proj-pager-dir{justify-content:flex-end;}
.proj-pager-arrow{font-size:14px;transition:transform .3s ease;display:inline-block;}
.proj-pager-card.prev:hover .proj-pager-arrow{transform:translateX(-5px);}
.proj-pager-card.next:hover .proj-pager-arrow{transform:translateX(5px);}
.proj-pager-title{font-family:'AnekBangla',sans-serif;font-weight:400;font-size:clamp(20px,2.4vw,28px);
 line-height:1.15;letter-spacing:-.01em;text-shadow:0 1px 10px rgba(0,0,0,.5);}
.proj-pager-hint{text-align:center;margin:0 56px 54px;font-family:'AnekDevangari',sans-serif;font-size:12px;
 letter-spacing:.04em;color:rgba(255,255,255,.4);}
.proj-pager-hint kbd{font-family:inherit;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);
 border-radius:4px;padding:1px 7px;color:rgba(255,255,255,.7);margin:0 2px;}
@media (max-width:640px){.proj-pager{grid-template-columns:1fr 1fr;gap:10px;margin:10px 20px 12px;}.proj-pager-card{min-height:120px;padding:16px 16px;}.proj-pager-title{font-size:16px;}.proj-pager-dir{font-size:9px;letter-spacing:.14em;margin-bottom:6px;}.proj-pager-hint{display:none;}}
