/* ============================================================
   PROJECTS ARCHIVE
   ============================================================ */

.projects-archive {
    padding-top: 0;
    background: #383838;
    min-height: 100vh;
}

/* ── Filter bar ── */
.projects-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 28px 32px;
    background: #f4f3f1;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.projects-filter__btn {
    padding: 7px 20px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.2);
    background: transparent;
    color: rgba(0,0,0,0.45);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.22s ease;
    font-family: inherit;
}

.projects-filter__btn:hover {
    border-color: rgba(0,0,0,0.55);
    color: rgba(0,0,0,0.8);
}

.projects-filter__btn.is-active {
    background: #111;
    border-color: #111;
    color: #fff;
}

@media (max-width: 768px) {
    .projects-filter { padding: 20px 16px; }
}

/* 2-column full-width grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    background: #383838;
}

/* ── Card ── */
.project-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card.is-hidden {
    display: none;
}

.project-card__link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

/* ── Image ── */
.project-card__img {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.project-card__img img,
.project-card__no-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
    background: #1a1a1a;
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
    transition: background 0.45s ease;
}

.project-card__link:hover .project-card__img img {
    transform: scale(1.05);
}

.project-card__link:hover .project-card__overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.3) 55%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

/* ── Info (bottom overlay) ── */
.project-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
}

.project-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-card__cat {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.project-card__year {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
}

.project-card__title {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card__link:hover .project-card__title {
    transform: translateY(-3px);
}

.project-card__arrow {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.4);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.35s, transform 0.35s;
}

.project-card__link:hover .project-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── Pagination ── */
.projects-pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 48px 24px;
}

.projects-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.25s;
}

.projects-pagination .page-numbers.current,
.projects-pagination .page-numbers:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* ── Load more ── */
.projects-loadmore {
    display: flex;
    justify-content: center;
    padding: 48px 24px;
    background: #383838;
}

.projects-loadmore__btn {
    padding: 14px 48px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: rgba(255,255,255,0.75);
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.22s ease;
}

.projects-loadmore__btn:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}

/* ── Empty ── */
.projects-empty {
    grid-column: 1 / -1;
    padding: 100px 24px;
    text-align: center;
    color: rgba(0,0,0,0.35);
    font-size: 1rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .projects-archive { padding-top: var(--header-h); }
}

@media (max-width: 768px) {
    .projects-grid { grid-template-columns: 1fr; }
    .project-card { aspect-ratio: 3 / 2; }
    .project-card__info { padding: 24px 20px; }
}


/* ============================================================
   SINGLE PROJECT
   ============================================================ */

.single-project {
    background: #383838;
    min-height: 100vh;
    color: #fff;
}

/* ── Main row: gallery LEFT + info RIGHT ── */
.sp-main-row {
    display: grid;
    grid-template-columns: 1fr 420px;
    min-height: 100vh;
    padding-top: 0;
}

/* ── LEFT: gallery grid (2 columns) ── */
.sp-gallery-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    align-content: start;
    background: #383838;
}

.sp-gallery__item {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.sp-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.65s cubic-bezier(0.4,0,0.2,1);
}

.sp-gallery__item:hover img { transform: scale(1.04); }

.sp-gallery__empty {
    aspect-ratio: 4/3;
    background: #4a4a4a;
}

/* ── RIGHT: info column ── */
.sp-info-col {
    padding: 56px 52px;
    display: flex;
    flex-direction: column;
    gap: 36px;
    border-left: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: var(--header-h);
    align-self: start;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: #383838;
}

/* Title block */
.sp-title-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sp-info-cat {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.sp-info-title {
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}

/* Description */
.sp-description p {
    font-size: 0.95rem;
    line-height: 1.88;
    color: rgba(255,255,255,0.7);
    margin: 0 0 1.2em;
}
.sp-description p:last-child { margin-bottom: 0; }

/* Meta blocks */
.sp-meta-blocks {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sp-meta-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-meta-label {
    font-size: 0.67rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
}

.sp-meta-value {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

.sp-meta-value--link {
    text-decoration: none;
    color: rgba(255,255,255,0.85);
    transition: color 0.2s;
}
.sp-meta-value--link:hover { color: #fff; }

/* Prev/Next nav */
.sp-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sp-nav-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}
.sp-nav-card:hover { background: rgba(255,255,255,0.06); }
.sp-nav-card--next { flex-direction: row-reverse; text-align: right; }

.sp-nav-card__img {
    width: 54px;
    height: 42px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
    background: #555;
}
.sp-nav-card__img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

.sp-nav-card__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sp-nav-card__dir {
    font-size: 0.67rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    gap: 4px;
}

.sp-nav-card__title {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

/* All projects link */
.sp-all-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    letter-spacing: 0.04em;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    transition: color 0.2s;
}
.sp-all-link:hover { color: #fff; }

/* ── Lightbox ── */
.sp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
}

.sp-lightbox.is-open {
    display: flex;
}

.sp-lightbox__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 100px;
    box-sizing: border-box;
}

.sp-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    transition: opacity 0.15s ease;
}

.sp-lightbox__close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 2;
}
.sp-lightbox__close:hover { background: rgba(255,255,255,0.22); }

.sp-lightbox__arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 2;
}
.sp-lightbox__arrow:hover  { background: rgba(255,255,255,0.22); }
.sp-lightbox__arrow--prev  { left: 20px; }
.sp-lightbox__arrow--next  { right: 20px; }

@media (max-width: 600px) {
    .sp-lightbox__stage   { padding: 60px 20px; }
    .sp-lightbox__arrow   { width: 40px; height: 40px; }
    .sp-lightbox__arrow--prev { left: 8px; }
    .sp-lightbox__arrow--next { right: 8px; }
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .sp-main-row { grid-template-columns: 1fr 360px; }
    .sp-info-col { padding: 44px 36px; }
}

@media (max-width: 860px) {
    .sp-main-row            { grid-template-columns: 1fr; }
    .sp-info-col            { order: 1; border-left: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 40px 32px; position: static; max-height: none; }
    .sp-gallery-col         { order: 2; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
    .sp-gallery-col         { grid-template-columns: 1fr; }
    .sp-info-col            { padding: 32px 20px; }
}
