/* Ciphers Portfolio — Single Project Page */

.cp-single { font-family: 'Jost', sans-serif; -webkit-font-smoothing: antialiased; }

/* Hero */
.cp-single-hero {
    position: relative; height: 68vh; min-height: 420px;
    display: flex; align-items: flex-end; overflow: hidden;
}
.cp-single-hero-img {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transition: transform 8s ease;
    animation: cp-hero-zoom 8s ease forwards;
}
@keyframes cp-hero-zoom {
    from { transform: scale(1.06); }
    to   { transform: scale(1); }
}
.cp-single-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10,20,11,.88) 0%, rgba(10,20,11,.3) 60%, transparent 100%);
}
.cp-single-hero-content {
    position: relative; z-index: 2;
    max-width: 900px; margin: 0 auto; width: 100%;
    padding: 2.5rem 2rem;
    animation: cp-hero-content .8s cubic-bezier(.22,1,.36,1) .2s both;
}
@keyframes cp-hero-content {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cp-single-cats {
    display: flex; gap: .35rem; margin-bottom: .9rem;
}
.cp-single-cats span {
    font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.22);
    padding: .18rem .55rem; border-radius: 2px;
}
.cp-single-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 600; line-height: 1.4;
    color: #fff; margin: 0 0 .9rem; text-align: center;
}
.cp-single-location {
    display: inline-flex; align-items: flex-start; gap: .45rem;
    font-size: .82rem; color: rgba(255,255,255,.6);
}
.cp-single-location > span {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.cp-single-cross-streets {
    font-size: .74rem;
    color: rgba(255,255,255,.42);
    font-style: italic;
}

/* Body layout */
.cp-single-body {
    display: grid; grid-template-columns: 280px 1fr;
    gap: 4rem; max-width: 1100px; margin: 0 auto;
    padding: 3.5rem 2rem;
}
@media (max-width: 768px) {
    .cp-single-body { grid-template-columns: 1fr; gap: 2rem; }
}

/* Meta sidebar */
.cp-single-meta {
    background: #f7fbf7; border: 1px solid #e0eee0;
    border-radius: 12px; padding: 1.75rem 1.5rem;
    height: fit-content; position: sticky; top: 2rem;
}
.cp-single-meta-heading {
    font-family: 'Playfair Display', serif;
    font-size: 24px; font-weight: 600; color: #1e2b21;
    margin: 0 0 1.25rem; padding-bottom: 1rem;
    border-bottom: 1px solid #e0eee0;
}
.cp-single-meta-row {
    display: flex; flex-direction: column; gap: .2rem;
    padding: .7rem 0; border-bottom: 1px solid #f0f6f0;
}
.cp-single-meta-row:last-of-type { border-bottom: none; }
.cp-single-meta-label {
    font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #9aaa9c;
}
.cp-single-meta-row span:last-child { font-size: 18px; color: #3a3f3d; line-height: 1.5; }
.cp-single-ext-link {
    display: inline-flex; align-items: center; gap: .4rem;
    margin-top: 1.25rem; font-size: .78rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: #4F9459; text-decoration: none;
    transition: gap .2s;
}
.cp-single-ext-link:hover { gap: .65rem; }

/* Content */
.cp-single-prose { font-size: 18px; line-height: 1.8; color: #4a4f4d; }
.cp-single-prose h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px; color: #1e2b21; margin: 2rem 0 .75rem;
}
.cp-single-prose p { margin: 0 0 1.2rem; }
.cp-single-prose img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }

/* Prev/Next */
.cp-single-nav {
    display: grid; grid-template-columns: 1fr 1fr;
    border-top: 1px solid #e8f0e9; max-width: 1100px; margin: 0 auto;
}
.cp-single-nav-link {
    display: flex; flex-direction: column; gap: .3rem;
    padding: 1.75rem 2rem; text-decoration: none;
    transition: background .2s;
}
.cp-single-nav-link:hover { background: #f7fbf7; }
.cp-single-nav-link--next { text-align: right; border-left: 1px solid #e8f0e9; }
.cp-single-nav-dir {
    font-size: .68rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: #4F9459;
}
.cp-single-nav-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem; color: #1e2b21;
}

/* Back link */
.cp-single-back {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #4F9459; text-decoration: none; transition: gap .2s;
}
.cp-single-back:hover { gap: .65rem; }



/* ══════════════════════════════════════
   PROJECT VIDEO
══════════════════════════════════════ */
.cp-single-video {
    margin-bottom: 2rem;
}
.cp-single-video-player {
    width: 100%;
    display: block;
    border-radius: 6px;
    outline: none;
}

/* ══════════════════════════════════════
   PROJECT GALLERY
══════════════════════════════════════ */
.cp-gallery {
    background: #f7fbf7;
    border-top: 1px solid #e0eee0;
    border-bottom: 1px solid #e0eee0;
    padding: 3rem 2rem;
}
.cp-gallery-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.cp-gallery-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e2b21;
    margin: 0 0 1.75rem;
}

/* Masonry-style responsive grid */
.cp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
}
.cp-gallery-item {
    position: relative;
    display: block;
    border: none;
    padding: 0;
    margin: 0;
    background: #e0eee0;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 1/1;
    width: 100%;
    min-width: 0;
}
.cp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.25,.46,.45,.94), filter .4s;
    filter: saturate(.9);
}
.cp-gallery-item:hover img {
    transform: scale(1.05);
    filter: saturate(1.1);
}
.cp-gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,20,11,.0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s;
    color: #fff;
    opacity: 0;
}
.cp-gallery-item:hover .cp-gallery-item-overlay {
    background: rgba(10,20,11,.35);
    opacity: 1;
}

/* ══════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════ */
.cp-lb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cp-lb[hidden] { display: none; }

.cp-lb-bg {
    position: absolute;
    inset: 0;
    background: rgba(5, 12, 6, .94);
    backdrop-filter: blur(4px);
}
.cp-lb-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(100vw - 140px);
    max-height: calc(100vh - 80px);
}
.cp-lb-img {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    object-fit: contain;
    display: block;
    border-radius: 4px;
    transition: opacity .25s;
}
.cp-lb-img--loading { opacity: .3; }
.cp-lb-caption {
    margin-top: .75rem;
    font-size: .82rem;
    color: rgba(255,255,255,.55);
    font-style: italic;
    text-align: center;
    min-height: 1.2em;
    font-family: 'Jost', sans-serif;
}
.cp-lb-counter {
    margin-top: .35rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    font-family: 'Jost', sans-serif;
}
.cp-lb-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 3;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
}
.cp-lb-close:hover { background: rgba(255,255,255,.2); }
.cp-lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
}
.cp-lb-nav:hover { background: rgba(79,148,89,.5); }
.cp-lb-nav--prev { left: 1.25rem; }
.cp-lb-nav--next { right: 1.25rem; }

@media (max-width: 640px) {
    .cp-gallery-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
    .cp-gallery-grid .cp-gallery-item { aspect-ratio: 1/1; }
    .cp-lb-stage { max-width: 100vw; }
    .cp-lb-nav--prev { left: .5rem; }
    .cp-lb-nav--next { right: .5rem; }
}
