/* ============================================
   NAKHOMBE CONSULTANTS â€” Past Projects Page
   Design: Architectural Portfolio with Interactive Filters
   ============================================ */

/* 1. HERO */
.prj-hero {
    position: relative;
    padding: calc(var(--nav-height) + 60px) 0 80px;
    overflow: hidden;
    min-height: 540px;
    display: flex;
    align-items: center;
}
.prj-hero-bg { position: absolute; inset: 0; z-index: 0; }
.prj-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.prj-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5,46,22,0.93) 0%, rgba(66,42,25,0.85) 50%, rgba(15,23,42,0.9) 100%);
}
.prj-hero-bg-slider { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.prj-hero-bg-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--ease-out); }
.prj-hero-bg-slide.active { opacity: 1; }
.prj-hero-bg-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 8s linear; }
.prj-hero-bg-slide.active img { transform: scale(1.1); }
.prj-hero-bg-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5,46,22,0.93) 0%, rgba(66,42,25,0.85) 50%, rgba(15,23,42,0.9) 100%);
}
.prj-hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 140px;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(15,23,42,0) 0%, rgba(15,23,42,0.35) 100%);
}
.prj-hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.prj-hero-content { animation: fadeInUp 0.8s var(--ease-out) both; }

/* Waypoint Breadcrumb */
.prj-breadcrumb {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 22px 8px 8px;
    margin-bottom: 28px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.04);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 4px 24px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.05);
    animation: bc-enter 0.7s var(--ease-out) 0.15s both;
}
@keyframes bc-enter { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.prj-breadcrumb .bc { display: inline-flex; align-items: center; gap: 0; list-style: none; padding: 0; margin: 0; }
.prj-breadcrumb .bc__waypoint { display: flex; align-items: center; position: relative; animation: bc-item-in 0.55s var(--ease-out) both; }
.prj-breadcrumb .bc__waypoint:nth-child(1) { animation-delay: 0.2s; }
.prj-breadcrumb .bc__waypoint:nth-child(3) { animation-delay: 0.5s; }
@keyframes bc-item-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.prj-breadcrumb .bc__node { display: flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: var(--radius-full); text-decoration: none; transition: all 0.35s var(--ease-out); }
.prj-breadcrumb .bc__node:hover { background: rgba(255,255,255,0.06); }
.prj-breadcrumb .bc__node-ring {
    width: 34px; height: 34px; min-width: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.1);
    transition: all 0.4s var(--ease-out);
}
.prj-breadcrumb .bc__node:hover .bc__node-ring { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.prj-breadcrumb .bc__node-ring--active { background: rgba(22,163,74,0.15); border-color: rgba(52,211,153,0.35); box-shadow: 0 0 0 4px rgba(52,211,153,0.06); }
.prj-breadcrumb .bc__node-icon { color: rgba(255,255,255,0.4); transition: color 0.35s; }
.prj-breadcrumb .bc__node:hover .bc__node-icon { color: rgba(255,255,255,0.75); }
.prj-breadcrumb .bc__node-ring--active .bc__node-icon { color: var(--green-300); }
.prj-breadcrumb .bc__label { font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.38); white-space: nowrap; transition: color 0.35s; }
.prj-breadcrumb .bc__node:hover .bc__label { color: rgba(255,255,255,0.7); }
.prj-breadcrumb .bc__label--active { font-weight: 600; color: rgba(255,255,255,0.92); }
.prj-breadcrumb .bc__trail { display: flex; align-items: center; gap: 2px; padding: 0 4px; animation: bc-trail-fade 0.5s var(--ease-out) 0.35s both; }
@keyframes bc-trail-fade { from { opacity: 0; transform: scaleX(0.5); } to { opacity: 1; transform: scaleX(1); } }
.prj-breadcrumb .bc__trail-path { stroke-dasharray: 3 5; animation: bc-trail-flow 3.5s linear infinite; }
@keyframes bc-trail-flow { to { stroke-dashoffset: -40; } }
.prj-breadcrumb .bc__trail-arrow { color: rgba(255,255,255,0.22); }
.prj-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 700;
    color: white;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin-bottom: 20px;
    text-wrap: balance;
}
.prj-highlight {
    background: linear-gradient(135deg, var(--green-300) 0%, var(--green-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.prj-hero-lead { font-size: 1.05rem; color: rgba(255,255,255,0.7); line-height: 1.8; margin-bottom: 28px; max-width: 520px; }
.prj-hero-visual { animation: fadeInUp 0.8s var(--ease-out) 0.3s both; }
.prj-hero-stats { display: flex; flex-direction: column; gap: 14px; }
.prj-hero-stat {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 22px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-xl);
    transition: all 0.4s var(--ease-out);
}
.prj-hero-stat:hover { background: rgba(255,255,255,0.08); transform: translateX(8px); border-color: rgba(255,255,255,0.18); }
.prj-hero-stat-icon {
    width: 44px; height: 44px; min-width: 44px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(22,163,74,0.15);
    border: 1px solid rgba(52,211,153,0.2);
    border-radius: var(--radius-lg);
    color: var(--green-300);
}
.prj-hero-stat-val { display: block; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: white; }
.prj-hero-stat-lbl { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 500; margin-top: 2px; }

/* 2. CONTROL BAR */
.prj-controls {
    padding: 0;
    background: rgba(255,253,249,0.88);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
    border-bottom: 1px solid rgba(66,42,25,0.1);
    transition: box-shadow 0.3s var(--ease-out);
}
.prj-controls.shadow { box-shadow: 0 10px 30px -18px rgba(66,42,25,0.45); }
.prj-controls-inner { display: flex; align-items: center; gap: 14px; padding: 14px 0; flex-wrap: wrap; }
.prj-search { position: relative; flex: 1; min-width: 240px; }
.prj-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--slate-400); pointer-events: none; transition: color 0.3s; }
.prj-search input {
    width: 100%;
    padding: 12px 16px 12px 46px;
    background: #fff;
    border: 1px solid rgba(66,42,25,0.14);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--slate-800);
    transition: all 0.3s var(--ease-out);
    outline: none;
    box-shadow: 0 1px 2px rgba(66,42,25,0.04);
}
.prj-search input::placeholder { color: var(--slate-400); }
.prj-search input:focus { border-color: var(--green-500); background: white; box-shadow: 0 0 0 3px rgba(22,163,74,0.1); }
.prj-search input:focus + .prj-search-icon { color: var(--green-500); }
.prj-search-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: var(--slate-200); border: none; border-radius: 50%;
    width: 24px; height: 24px;
    display: none; align-items: center; justify-content: center;
    cursor: pointer; color: var(--slate-500); font-size: 0.7rem;
    transition: all 0.2s;
}
.prj-search-clear.visible { display: flex; }
.prj-search-clear:hover { background: var(--slate-300); }
.prj-filter-group { display: flex; gap: 10px; align-items: center; }
.prj-filter { position: relative; }
.prj-filter-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 16px;
    background: #fff;
    border: 1px solid rgba(66,42,25,0.14);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px rgba(66,42,25,0.04);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}
.prj-filter-btn:hover, .prj-filter-btn.active { border-color: var(--green-500); color: var(--green-600); background: var(--green-50); }
.prj-filter-btn svg { transition: transform 0.3s var(--ease-out); }
.prj-filter-btn.active svg { transform: rotate(180deg); }
.prj-filter-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 220px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--slate-100);
    padding: 8px;
    opacity: 0; visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s var(--ease-out);
    z-index: 200;
    max-height: 320px;
    overflow-y: auto;
}
.prj-filter-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.prj-filter-option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--slate-600);
    transition: all 0.2s var(--ease-out);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-sans);
}
.prj-filter-option:hover { background: var(--green-50); color: var(--green-600); }
.prj-filter-option.selected { background: var(--green-50); color: var(--green-600); font-weight: 600; }
.prj-filter-option-check {
    width: 18px; height: 18px;
    border-radius: 4px;
    border: 2px solid var(--slate-300);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.prj-filter-option.selected .prj-filter-option-check { background: var(--green-500); border-color: var(--green-500); color: white; }
.prj-filter-count { margin-left: auto; font-size: 0.75rem; background: var(--slate-100); padding: 2px 8px; border-radius: var(--radius-full); color: var(--slate-500); font-weight: 600; }
.prj-sort-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 11px 16px;
    background: #fff;
    border: 1px solid rgba(66,42,25,0.14);
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px rgba(66,42,25,0.04);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}
.prj-sort-btn:hover { border-color: var(--green-500); color: var(--green-600); }
.prj-active-filters { display: none; align-items: center; gap: 8px; padding: 12px 0 0; flex-wrap: wrap; }
.prj-active-filters.visible { display: flex; }
.prj-active-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: var(--green-50);
    border: 1px solid rgba(22,163,74,0.15);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green-700);
    cursor: pointer;
    transition: all 0.2s;
}
.prj-active-tag:hover { background: rgba(22,163,74,0.15); }
.prj-active-tag svg { width: 14px; height: 14px; }
.prj-clear-all {
    font-size: 0.8rem; color: var(--slate-500);
    cursor: pointer; font-weight: 600;
    border: none; background: none;
    font-family: var(--font-sans);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    transition: all 0.2s;
}
.prj-clear-all:hover { color: var(--green-600); background: var(--green-50); }
.prj-results-bar { display: flex; align-items: center; justify-content: space-between; padding: 28px 0 18px; gap: 12px; }
.prj-results-count { font-size: 0.82rem; letter-spacing: 0.4px; text-transform: uppercase; color: var(--slate-500); font-weight: 600; }
.prj-results-count strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--brown-800); font-weight: 700; text-transform: none; letter-spacing: 0; }
.prj-view-toggle { display: flex; gap: 4px; background: rgba(66,42,25,0.06); border-radius: var(--radius-md); padding: 4px; }
.prj-view-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--slate-400);
    cursor: pointer;
    transition: all 0.2s;
}
.prj-view-btn.active { background: white; color: var(--green-600); box-shadow: var(--shadow-sm); }

/* 3. PROJECT CARDS */
.prj-grid-section { padding: 0 0 var(--section-padding); background: linear-gradient(180deg, #f6f4ef 0%, #faf9f6 40%, #f8f7f3 100%); }
.prj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prj-grid.list-view { grid-template-columns: 1fr; }
.prj-card {
    --accent: var(--green-600);
    --tint: rgba(21,128,61,0.08);
    position: relative;
    background: #fff;
    border-radius: 4px 16px 16px 16px;
    overflow: hidden;
    border: 1px solid rgba(66,42,25,0.09);
    box-shadow: 0 1px 2px rgba(66,42,25,0.04);
    transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
    display: flex;
    flex-direction: column;
    animation: prjCardIn 0.5s var(--ease-out) both;
}
@keyframes prjCardIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.prj-card:hover {
    transform: translateY(-5px);
    border-color: rgba(66,42,25,0.14);
    box-shadow: 0 24px 40px -26px rgba(66,42,25,0.5), 0 4px 12px -8px rgba(0,0,0,0.12);
}
.prj-tone-esia { --accent: var(--green-600); --tint: rgba(21,128,61,0.08); }
.prj-tone-esmp { --accent: #2563eb; --tint: rgba(37,99,235,0.08); }
.prj-tone-layout { --accent: #7c3aed; --tint: rgba(124,58,237,0.08); }
.prj-tone-planning { --accent: #d97706; --tint: rgba(217,119,6,0.08); }
.prj-tone-audit { --accent: #dc2626; --tint: rgba(220,38,38,0.08); }
.prj-tone-consultancy { --accent: #0d9488; --tint: rgba(13,148,136,0.08); }
.prj-tone-research { --accent: #4f46e5; --tint: rgba(79,70,229,0.08); }
.prj-tone-land { --accent: var(--brown-600); --tint: rgba(109,85,53,0.08); }
.prj-card-spine {
    position: absolute; top: 0; bottom: 0; left: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0.22);
    transform-origin: top;
    transition: transform 0.55s var(--ease-out), opacity 0.4s;
    opacity: 0.5;
}
.prj-card:hover .prj-card-spine { transform: scaleY(1); opacity: 1; }
.prj-card-ref {
    position: absolute; right: 16px; bottom: 10px;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(66,42,25,0.05);
    letter-spacing: -1px;
    pointer-events: none;
    transition: color 0.4s var(--ease-out);
    font-variant-numeric: tabular-nums;
}
.prj-card:hover .prj-card-ref { color: var(--tint); }
.prj-card-header { padding: 20px 22px 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prj-card-category {
    display: inline-flex; align-items: center;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    white-space: nowrap;
}
.prj-cat-esia,
.prj-cat-esmp,
.prj-cat-layout,
.prj-cat-planning,
.prj-cat-audit,
.prj-cat-consultancy,
.prj-cat-research,
.prj-cat-land { background: var(--tint); color: var(--accent); }
.prj-card-year { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--slate-400); white-space: nowrap; font-variant-numeric: tabular-nums; }
.prj-card-body { padding: 14px 22px 20px 24px; flex: 1; display: flex; flex-direction: column; position: relative; z-index: 1; }
.prj-card-title {
    font-family: var(--font-display);
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.4;
    letter-spacing: -0.2px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.35s var(--ease-out);
}
.prj-card:hover .prj-card-title { color: var(--accent); }
.prj-card-meta { display: flex; flex-direction: column; gap: 0; margin: auto 0 0; padding-top: 4px; border-top: 1px solid rgba(66,42,25,0.08); }
.prj-card-meta-item { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px dashed rgba(66,42,25,0.07); }
.prj-card-meta-item:last-child { border-bottom: none; }
.prj-card-meta-item dt {
    display: inline-flex; align-items: center; gap: 6px;
    flex-shrink: 0;
    width: 74px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--slate-400);
    line-height: 1.45;
    min-height: calc(0.82rem * 1.45);
}
.prj-card-meta-item dt svg { width: 13px; height: 13px; color: var(--accent); opacity: 0.7; flex-shrink: 0; }
.prj-card-meta-item dd {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--slate-700);
    line-height: 1.45;
    min-height: calc(0.82rem * 1.45);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.prj-card-funding {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 14px;
    padding: 4px 11px;
    background: var(--tint);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--accent);
}
.prj-grid.list-view .prj-card { flex-direction: row; align-items: stretch; border-radius: 4px 14px 14px 4px; }
.prj-grid.list-view .prj-card-header { flex-direction: column; align-items: flex-start; justify-content: center; padding: 20px 22px 20px 24px; min-width: 190px; gap: 10px; border-right: 1px dashed rgba(66,42,25,0.1); }
.prj-grid.list-view .prj-card-status { margin: 0; }
.prj-grid.list-view .prj-card-body { padding: 18px 24px; flex: 1; }
.prj-grid.list-view .prj-card-title { -webkit-line-clamp: 2; margin-bottom: 12px; }
.prj-grid.list-view .prj-card-meta { flex-direction: row; flex-wrap: wrap; gap: 8px 28px; border-top: none; padding-top: 4px; }
.prj-grid.list-view .prj-card-meta-item { border-bottom: none; padding: 0; flex: 0 1 auto; align-items: flex-start; }
.prj-grid.list-view .prj-card-meta-item dd { flex: 0 1 auto; -webkit-line-clamp: 1; }
.prj-grid.list-view .prj-card-ref { bottom: auto; top: 12px; font-size: 1.6rem; }

/* Card description + status â€” no pulse */
.prj-card-desc {
    margin: 10px 0 14px;
    font-size: .9rem;
    line-height: 1.6;
    color: var(--slate-600, #475569);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.prj-card-status {
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: auto; margin-right: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .7rem; font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--slate-100); color: var(--slate-600);
}
.prj-status-ongoing { background: var(--tint); color: var(--accent); }
.prj-status-planned { background: var(--slate-100); color: var(--slate-600); }
.prj-status-on_hold { background: var(--slate-100); color: var(--slate-600); }
.prj-status-cancelled { background: var(--slate-100); color: var(--slate-500); }

/* 4. EMPTY STATE */
.prj-empty { text-align: center; padding: 80px 24px; grid-column: 1 / -1; }
.prj-empty-icon {
    width: 80px; height: 80px;
    margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    border: 1px solid rgba(66,42,25,0.1);
    border-radius: 4px 20px 20px 20px;
    color: var(--brown-300);
    box-shadow: 0 14px 30px -22px rgba(66,42,25,0.6);
}
.prj-empty h3 { font-family: var(--font-display); font-size: 1.5rem; color: var(--slate-700); margin-bottom: 8px; }
.prj-empty p { font-size: 0.95rem; color: var(--slate-400); max-width: 400px; margin: 0 auto; }

/* 5. PAGINATION */
.prj-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 48px 0 0; }
.prj-page-btn {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(66,42,25,0.14);
    background: white;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 2px rgba(66,42,25,0.04);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}
.prj-page-btn:hover { border-color: var(--green-500); color: var(--green-600); background: var(--green-50); }
.prj-page-btn.active { background: var(--green-700); color: white; border-color: var(--green-700); box-shadow: 0 8px 18px -10px rgba(21,128,61,0.8); }
.prj-page-btn:disabled { opacity: 0.4; pointer-events: none; }
.prj-page-ellipsis { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--slate-400); }
.prj-page-info { margin-left: 16px; font-size: 0.85rem; color: var(--slate-400); font-weight: 500; }

/* 6. CTA */
.prj-cta { position: relative; padding: clamp(80px, 10vw, 120px) 0; overflow: hidden; }
.prj-cta-bg { position: absolute; inset: 0; }
.prj-cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.prj-cta-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5,46,22,0.94) 0%, rgba(44,26,14,0.9) 50%, rgba(15,23,42,0.94) 100%);
}
.prj-cta-content { position: relative; z-index: 2; text-align: center; max-width: 640px; margin: 0 auto; }
.prj-cta-content h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: white; margin-bottom: 16px; }
.prj-cta-content p { font-size: 1.05rem; color: rgba(255,255,255,0.7); line-height: 1.8; margin-bottom: 32px; }
.prj-cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* 7. TIMELINE */
.prj-timeline-accent {
    position: fixed; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 120px;
    background: var(--gradient-green);
    border-radius: 0 4px 4px 0;
    opacity: 0; transition: opacity 0.5s;
    z-index: 50;
}
.prj-timeline-accent.visible { opacity: 0.6; }

/* 8. ARCHIVE LEDGER */
.prj-ledger {
    position: relative;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(22,163,74,0.05) 0%, transparent 55%),
        linear-gradient(180deg, #fbfaf7 0%, #f6f4ef 100%);
    padding: clamp(56px, 7vw, 96px) 0;
    border-top: 1px solid rgba(66,42,25,0.06);
    border-bottom: 1px solid rgba(66,42,25,0.06);
    overflow: hidden;
}
.prj-ledger-grain {
    position: absolute; inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(180deg, rgba(66,42,25,0.035) 0, rgba(66,42,25,0.035) 1px, transparent 1px, transparent 34px);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
    opacity: 0.55;
}
.prj-ledger .container { position: relative; z-index: 1; }
.prj-ledger-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.prj-ledger-eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 2.4px; text-transform: uppercase;
    color: var(--brown-500);
    margin-bottom: 22px;
}
.prj-ledger-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.5px;
    color: var(--slate-900);
    margin-bottom: 20px;
}
.prj-ledger-title em { position: relative; font-style: italic; color: var(--green-700); white-space: nowrap; }
.prj-ledger-delivery { color: #594C42; }
.prj-ledger-swash {
    position: absolute; left: 0; right: 0; bottom: -6px;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='8' viewBox='0 0 200 8'%3E%3Cpath d='M2 5C40 1 70 1 100 4s70 3 98-1' fill='none' stroke='%2315803d' stroke-width='2.2' stroke-linecap='round' opacity='0.55'/%3E%3C/svg%3E") no-repeat center/100% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.9s var(--ease-out) 0.2s;
}
.reveal.visible .prj-ledger-swash { transform: scaleX(1); }
.prj-ledger-copy { font-size: 1.02rem; line-height: 1.75; color: var(--slate-600); max-width: 30rem; margin-bottom: 34px; }
.prj-ledger-facts { display: flex; align-items: flex-start; gap: clamp(24px, 4vw, 48px); padding-top: 26px; border-top: 1px solid rgba(66,42,25,0.12); }
.prj-ledger-fact dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--slate-500); margin-bottom: 6px; }
.prj-ledger-fact dd { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; line-height: 1; color: var(--brown-800); }
.prj-ledger-fact-num em { font-style: normal; color: var(--green-600); }
.prj-ledger-index {
    position: relative;
    background: #fffdf9;
    border: 1px solid rgba(66,42,25,0.1);
    border-radius: var(--radius-lg);
    padding: 12px clamp(16px, 2vw, 26px) 20px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 26px 50px -28px rgba(66,42,25,0.45), 0 6px 16px -12px rgba(0,0,0,0.2);
}
.prj-ledger-index::before {
    content: '';
    position: absolute;
    top: 14px; bottom: 14px;
    left: clamp(46px, 5.4vw, 62px);
    width: 1px;
    background: repeating-linear-gradient(180deg, rgba(22,163,74,0.35) 0 6px, transparent 6px 12px);
}
.prj-ledger-index-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 6px 14px;
    margin-bottom: 4px;
    border-bottom: 1.5px solid rgba(66,42,25,0.14);
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 1.8px; text-transform: uppercase;
    color: var(--brown-500);
}
.prj-ledger-list { list-style: none; margin: 0; padding: 0; }
.prj-ledger-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 13px 6px;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(66,42,25,0.07);
    font-family: var(--font-sans);
    text-align: left;
    cursor: pointer;
    color: var(--slate-700);
    transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.prj-ledger-list li:last-child .prj-ledger-row { border-bottom: none; }
.prj-ledger-row-num { font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; color: var(--slate-300); font-variant-numeric: tabular-nums; transition: color 0.3s var(--ease-out); }
.prj-ledger-row-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--slate-50);
    border: 1px solid rgba(66,42,25,0.08);
    color: var(--green-600);
    transition: all 0.3s var(--ease-out);
}
.prj-ledger-row-icon svg { width: 17px; height: 17px; }
.prj-ledger-row-label { font-size: 0.94rem; font-weight: 600; color: var(--slate-800); letter-spacing: -0.1px; }
.prj-ledger-row-leader {
    height: 1px;
    margin: 0 2px;
    background-image: radial-gradient(circle, rgba(66,42,25,0.28) 1px, transparent 1.4px);
    background-size: 7px 2px;
    background-repeat: repeat-x;
    background-position: left center;
    opacity: 0.5;
}
.prj-ledger-row-count { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--brown-700); font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.prj-ledger-row:hover, .prj-ledger-row:focus-visible { outline: none; color: var(--green-700); transform: translateX(4px); }
.prj-ledger-row:hover .prj-ledger-row-num, .prj-ledger-row:focus-visible .prj-ledger-row-num { color: var(--green-500); }
.prj-ledger-row:hover .prj-ledger-row-icon, .prj-ledger-row:focus-visible .prj-ledger-row-icon { background: var(--green-600); border-color: var(--green-600); color: #fff; box-shadow: var(--shadow-green); }
.prj-ledger-row:hover .prj-ledger-row-label, .prj-ledger-row:focus-visible .prj-ledger-row-label { color: var(--green-800); }
.prj-ledger-row:hover .prj-ledger-row-leader, .prj-ledger-row:focus-visible .prj-ledger-row-leader { opacity: 0.9; }
.prj-ledger-row.is-active .prj-ledger-row-icon { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.prj-ledger-hint { display: flex; align-items: center; gap: 8px; margin: 16px 6px 0; font-size: 0.78rem; font-weight: 500; color: var(--slate-400); font-style: italic; }
.prj-ledger-hint svg { width: 15px; height: 15px; color: var(--green-500); }
.reveal .prj-ledger-row { opacity: 0; transform: translateY(10px); }
.reveal.visible .prj-ledger-row { opacity: 1; transform: translateY(0); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.reveal.visible .prj-ledger-list li:nth-child(1) .prj-ledger-row { transition-delay: 0.06s; }
.reveal.visible .prj-ledger-list li:nth-child(2) .prj-ledger-row { transition-delay: 0.12s; }
.reveal.visible .prj-ledger-list li:nth-child(3) .prj-ledger-row { transition-delay: 0.18s; }
.reveal.visible .prj-ledger-list li:nth-child(4) .prj-ledger-row { transition-delay: 0.24s; }
.reveal.visible .prj-ledger-list li:nth-child(5) .prj-ledger-row { transition-delay: 0.30s; }
.reveal.visible .prj-ledger-list li:nth-child(6) .prj-ledger-row { transition-delay: 0.36s; }
.reveal.visible .prj-ledger-list li:nth-child(7) .prj-ledger-row { transition-delay: 0.42s; }
.prj-controls-caption {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 1.6px; text-transform: uppercase;
    color: var(--brown-500);
    padding-right: 4px;
}
.prj-controls-caption::before {
    content: none;
}
.prj-controls-caption-icon {
    width: 16px; height: 16px;
    color: var(--green-500);
    opacity: 0.9;
    flex-shrink: 0;
}

/* 9. TRUST */
.prj-trust { padding: var(--section-padding) 0; background: white; position: relative; overflow: hidden; }
.prj-trust::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--slate-200), transparent);
}
.prj-trust-header { text-align: center; margin-bottom: 56px; }
.prj-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.prj-trust-card {
    position: relative;
    padding: 36px 28px;
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-xl);
    transition: all 0.45s var(--ease-out);
    overflow: hidden;
}
.prj-trust-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}
.prj-trust-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: transparent; background: white; }
.prj-trust-card:hover::before { transform: scaleX(1); }
.prj-trust-card-icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: var(--green-50);
    border-radius: var(--radius-lg);
    color: var(--green-600);
    margin-bottom: 20px;
    transition: all 0.4s var(--ease-out);
}
.prj-trust-card:hover .prj-trust-card-icon { background: var(--gradient-green); color: white; transform: scale(1.08) rotate(-3deg); box-shadow: var(--shadow-green); }
.prj-trust-card h4 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--slate-900); margin-bottom: 8px; }
.prj-trust-card p { font-size: 0.9rem; color: var(--slate-500); line-height: 1.7; margin-bottom: 16px; }
.prj-trust-contact {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: rgba(22,163,74,0.04);
    border: 1px solid rgba(22,163,74,0.08);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green-700);
    transition: all 0.3s;
}
.prj-trust-contact:hover { background: rgba(22,163,74,0.1); border-color: rgba(22,163,74,0.2); }
.prj-trust-contact svg { width: 14px; height: 14px; color: var(--green-500); flex-shrink: 0; }
.prj-trust-bottom { display: flex; align-items: center; justify-content: center; gap: 48px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--slate-100); }
.prj-trust-stat { text-align: center; }
.prj-trust-stat-num { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--green-600); line-height: 1; margin-bottom: 6px; }
.prj-trust-stat-label { font-size: 0.82rem; color: var(--slate-500); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.prj-trust-stat-divider { width: 1px; height: 48px; background: var(--slate-200); }

/* ============================================
   RESPONSIVE â€” PAGE
   ============================================ */
@media (max-width: 1024px) {
    .prj-hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .prj-hero-visual { display: none; }
    .prj-grid { grid-template-columns: repeat(2, 1fr); }
    .prj-ledger-inner { grid-template-columns: 1fr; gap: 40px; }
    .prj-ledger-copy { max-width: 42rem; }
    .prj-trust-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .prj-hero { min-height: 400px; padding: calc(var(--nav-height) + 40px) 0 50px; }
    .prj-controls-inner { gap: 10px; }
    .prj-search { min-width: 100%; }
    .prj-filter-group { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .prj-grid { grid-template-columns: 1fr; }
    .prj-grid.list-view .prj-card { flex-direction: column; }
    .prj-grid.list-view .prj-card-header { flex-direction: row; padding: 20px 20px 0; min-width: 0; }
    .prj-grid.list-view .prj-card-body { padding: 12px 20px 20px; }
    .prj-cta-actions { flex-direction: column; align-items: center; }
    .prj-view-toggle { display: none; }
    .prj-results-bar { padding: 16px 0 12px; }
    .prj-ledger { padding: 48px 0; }
    .prj-ledger-facts { flex-wrap: wrap; gap: 20px 32px; }
    .prj-ledger-index { padding: 8px 14px 16px; }
    .prj-ledger-index::before { display: none; }
    .prj-ledger-row { grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 2px; }
    .prj-ledger-row-num { display: none; }
    .prj-ledger-row-leader { display: none; }
    .prj-controls-caption { display: none; }
    .prj-trust-bottom { flex-direction: column; gap: 24px; }
    .prj-trust-stat-divider { width: 60px; height: 1px; }
}
@media (max-width: 480px) {
    .prj-hero h1 { font-size: 1.8rem; }
    .prj-breadcrumb { padding: 6px 16px 6px 6px; margin-bottom: 22px; }
    .prj-breadcrumb .bc__node { padding: 4px 12px 4px 4px; gap: 8px; }
    .prj-breadcrumb .bc__node-ring { width: 30px; height: 30px; min-width: 30px; }
    .prj-breadcrumb .bc__label { font-size: 0.76rem; }
    .prj-breadcrumb .bc__trail-svg { width: 30px; }
    .prj-card-header { padding: 16px 16px 0; }
    .prj-card-body { padding: 12px 16px 16px; }
    .prj-page-btn { width: 36px; height: 36px; font-size: 0.8rem; }
}

/* ============================================================
   PUBLIC PROJECT PHOTOS â€” cards that carry a cover image
   ============================================================ */
.prj-card--media { cursor: pointer; }
.prj-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--tint), rgba(66,42,25,0.06));
    overflow: hidden;
    flex: none;
}
.prj-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--ease-out); }
.prj-card--media:hover .prj-card-media img { transform: scale(1.045); }
.prj-card-media::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(5,46,22,0) 55%, rgba(5,46,22,0.55) 100%);
    pointer-events: none;
}
.prj-media-count, .prj-media-story {
    position: absolute; z-index: 1;
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.5px; color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.prj-media-count { top: 10px; right: 10px; background: rgba(15,23,42,0.55); }
.prj-media-count svg { width: 12px; height: 12px; }
.prj-media-story { left: 12px; bottom: 10px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.28); text-transform: uppercase; }
.prj-card--media .prj-card-header { padding-top: 16px; }
.prj-card--media .prj-card-ref { display: none; }
.prj-card-open {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: none;
    font: 700 0.76rem var(--font-sans);
    letter-spacing: 0.4px;
    color: var(--accent);
    cursor: pointer;
}
.prj-card-open svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease-out); }
.prj-card--media:hover .prj-card-open svg { transform: translateX(4px); }
.prj-card-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.prj-grid.list-view .prj-card-media { aspect-ratio: auto; width: 220px; min-height: 150px; }
@media (max-width: 768px) {
    .prj-grid.list-view .prj-card-media { width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
}
.prj-photo-toggle {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(66,42,25,0.14);
    background: #fff;
    border-radius: 999px;
    font: 600 0.8rem var(--font-sans);
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}
.prj-photo-toggle svg { width: 15px; height: 15px; }
.prj-photo-toggle:hover { border-color: var(--green-500); color: var(--green-700); }
.prj-photo-toggle.active { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.prj-photo-toggle-n { font-size: 0.7rem; background: rgba(66,42,25,0.08); border-radius: 999px; padding: 1px 7px; }
.prj-photo-toggle.active .prj-photo-toggle-n { background: rgba(255,255,255,0.22); }
.prj-photo-toggle + .prj-view-toggle { margin-left: 0; }

/* ============================================================
   PHOTO VIEWER â€” one consolidated block.
   Layout: flex column with fixed head/tabs/thumbs and a
   flexible middle that holds the image + caption.
   ============================================================ */
html.pv-lock { overflow: hidden; }

dialog.pv {
    border: 0;
    padding: 0;
    width: min(1100px, calc(100vw - 24px));
    height: min(calc(100vh - 24px), 900px);
    max-height: calc(100vh - 24px);
    background: #0d1712;
    color: #e7ece9;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0,0,0,0.5);
}
dialog.pv::backdrop {
    background: rgba(4,14,8,0.82);
    backdrop-filter: blur(4px);
}
dialog.pv[open] { animation: pvIn 0.35s var(--ease-out); }
@keyframes pvIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } }

/* Shell â€” the flex column that drives everything */
dialog.pv .pv-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ---- HEAD ---- */
dialog.pv .pv-head {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 12px;
}
dialog.pv .pv-kicker {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
dialog.pv .pv-cat {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
dialog.pv .pv-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
}
dialog.pv .pv-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
dialog.pv .pv-title {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
    line-height: 1.3;
    color: #fff;
    margin: 0;
}
dialog.pv .pv-meta {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: rgba(231,236,233,0.65);
}
dialog.pv .pv-close {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}
dialog.pv .pv-close svg { width: 18px; height: 18px; }
dialog.pv .pv-close:hover { background: rgba(255,255,255,0.14); }

/* ---- TABS ---- */
dialog.pv .pv-tabs {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.28);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
dialog.pv .pv-tabs::-webkit-scrollbar { display: none; }
dialog.pv .pv-tabs::before { content: none; }   /* no stray labels */
dialog.pv .pv-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.78);
    font: 600 0.82rem/1.2 var(--font-sans);
    letter-spacing: 0.005em;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
dialog.pv .pv-tab:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.28);
    color: #fff;
}
dialog.pv .pv-tab.active,
dialog.pv .pv-tab.active:hover {
    background: #fff;
    border-color: #fff;
    color: #0d1712;
    box-shadow: 0 0 0 3px rgba(52,211,153,0.22), 0 6px 18px -8px rgba(255,255,255,0.35);
}
dialog.pv .pv-tab > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.92);
    font: 700 0.7rem/1 var(--font-sans);
    font-variant-numeric: tabular-nums;
    opacity: 1;
}
dialog.pv .pv-tab.active > span {
    background: #15803d;
    color: #fff;
}

/* ---- MAIN ZONE â€” image + caption ---- */
dialog.pv .pv-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 18px 22px 0;
}
dialog.pv .pv-figure {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
}
dialog.pv .pv-frame {
    /* The middle gets ALL remaining space; image scales inside it */
    flex: 1 1 auto;
    min-height: 320px;             /* floor â€” never smaller than this */
    position: relative;
    width: 100%;
    background: #060b08;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    place-items: center;
    touch-action: pan-y;
}
dialog.pv .pv-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.25s;
}
dialog.pv .pv-img.loading { opacity: 0.35; }
dialog.pv .pv-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.94);
    color: #0d1712;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.42);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
dialog.pv .pv-nav:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.52);
}
dialog.pv .pv-nav svg { width: 22px; height: 22px; }
dialog.pv .pv-prev { left: 14px; }
dialog.pv .pv-next { right: 14px; }
dialog.pv .pv-cap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 4px 6px;
    font-size: 0.92rem;
    min-height: 52px;
}
dialog.pv .pv-stage {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 7px;
}
dialog.pv .pv-text { flex: 1 1 200px; color: #fff; font-weight: 500; }
dialog.pv .pv-date { font-size: 0.78rem; color: rgba(231,236,233,0.62); font-variant-numeric: tabular-nums; }
dialog.pv .pv-pos {
    color: rgba(255,255,255,0.9);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}
dialog.pv .pv-st-concept  { background: rgba(167,139,250,0.18); color: #c4b5fd; }
dialog.pv .pv-st-before   { background: rgba(251,191,36,0.16);  color: #fcd34d; }
dialog.pv .pv-st-progress { background: rgba(96,165,250,0.16);  color: #93c5fd; }
dialog.pv .pv-st-after    { background: rgba(74,222,128,0.16);  color: #86efac; }

/* ---- THUMBNAIL FILMSTRIP ---- */
dialog.pv .pv-thumbs {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    padding: 16px 22px 20px;
    margin: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.28));
    border-top: 2px solid rgba(255,255,255,0.14);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.34) transparent;
}
dialog.pv .pv-thumbs::before { content: none; }   /* no stray label */
dialog.pv .pv-thumbs::-webkit-scrollbar { height: 8px; }
dialog.pv .pv-thumbs::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 999px; }
dialog.pv .pv-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.32); border-radius: 999px; }
dialog.pv .pv-thumbs::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }

dialog.pv .pv-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 148px;
    height: 104px;
    padding: 0;
    margin: 0;
    border: 3px solid rgba(255,255,255,0.30);
    border-radius: 12px;
    background: #1b2620;
    overflow: hidden;
    cursor: pointer;
    opacity: 1;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
dialog.pv .pv-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
dialog.pv .pv-thumb:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.85);
    box-shadow: 0 14px 28px -12px rgba(0,0,0,0.8);
}
dialog.pv .pv-thumb:hover img { transform: scale(1.05); }
dialog.pv .pv-thumb.active,
dialog.pv .pv-thumb.active:hover {
    border-color: #34d399;
    box-shadow: 0 0 0 4px rgba(52,211,153,0.5), 0 14px 28px -12px rgba(0,0,0,0.8);
}
dialog.pv .pv-thumb.active img { transform: scale(1.02); }
dialog.pv .pv-thumb-stage {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    pointer-events: none;
}
dialog.pv .pv-thumb-stage.pv-st-concept  { background: #a78bfa; }
dialog.pv .pv-thumb-stage.pv-st-before   { background: #fbbf24; }
dialog.pv .pv-thumb-stage.pv-st-progress { background: #60a5fa; }
dialog.pv .pv-thumb-stage.pv-st-after    { background: #4ade80; }

/* ---- DESCRIPTION ---- */
dialog.pv .pv-desc {
    flex: 0 0 auto;
    margin: 8px 22px 22px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(231,236,233,0.8);
    white-space: pre-line;
}

/* ---- COMPARE VIEW ---- */
dialog.pv .pv-compare {
    flex: 1 1 auto;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    padding-bottom: 18px;
}
dialog.pv .pv-cmp-frame {
    --pos: 50%;
    position: relative;
    flex: 1 1 auto;
    min-height: 300px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #060b08;
    user-select: none;
}
dialog.pv .pv-cmp-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
dialog.pv .pv-cmp-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
dialog.pv .pv-cmp-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 3px;
    margin-left: -1.5px;
    background: #fff;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
    pointer-events: none;
}
dialog.pv .pv-cmp-handle span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
dialog.pv .pv-cmp-handle span::before,
dialog.pv .pv-cmp-handle span::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    margin-top: -6px;
}
dialog.pv .pv-cmp-handle span::before { left: 6px; border-right-color: #0d1712; }
dialog.pv .pv-cmp-handle span::after { right: 6px; border-left-color: #0d1712; }
dialog.pv .pv-cmp-lbl {
    position: absolute;
    top: 12px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    pointer-events: none;
}
dialog.pv .pv-cmp-lbl--l { left: 12px; }
dialog.pv .pv-cmp-lbl--r { right: 12px; }
dialog.pv .pv-cmp-frame input[type=range] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    -webkit-appearance: none;
    appearance: none;
}
dialog.pv .pv-cmp-hint { margin: 10px 2px 0; font-size: 0.8rem; color: rgba(231,236,233,0.55); }

/* CRITICAL â€” restore [hidden] so JS can hide the figure, thumbs,
   compare-view etc. My flex rules have higher specificity than
   the global [hidden] rule in common.css, so this override is required. */
dialog.pv [hidden] { display: none !important; }

/* ---- Small screens ---- */
@media (max-width: 640px) {
    dialog.pv {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    dialog.pv .pv-head { padding: 14px 14px 8px; }
    dialog.pv .pv-tabs { padding: 10px 14px; gap: 5px; }
    dialog.pv .pv-tab { padding: 7px 11px; font-size: 0.78rem; }
    dialog.pv .pv-tab > span { min-width: 18px; height: 18px; padding: 0 5px; font-size: 0.66rem; }
    dialog.pv .pv-main { padding: 12px 12px 0; }
    dialog.pv .pv-frame,
    dialog.pv .pv-cmp-frame { min-height: 240px; }
    dialog.pv .pv-thumbs { padding: 12px 14px 14px; gap: 8px; }
    dialog.pv .pv-thumb { width: 118px; height: 84px; border-width: 2px; }
    dialog.pv .pv-thumb-stage { height: 5px; }
    dialog.pv .pv-desc { margin: 8px 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    dialog.pv[open] { animation: none; }
    .prj-card--media:hover .prj-card-media img { transform: none; }
    dialog.pv .pv-thumb,
    dialog.pv .pv-thumb img,
    dialog.pv .pv-tab { transition: none !important; }
    dialog.pv .pv-thumb:hover { transform: none; }
    dialog.pv .pv-thumb:hover img { transform: none; }
}
dialog.pv .pv-frame,
dialog.pv .pv-cmp-frame {
    min-height: min(62vh, 560px) !important;
}

@media (max-width: 640px) {
    dialog.pv .pv-frame,
    dialog.pv .pv-cmp-frame {
        min-height: 55vh !important;
    }
}
/* FINAL PHOTO VIEWER ALIGNMENT FIX */
dialog.pv {
  box-sizing: border-box;
  margin: auto;
  overflow: hidden;
}

dialog.pv .pv-shell {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

dialog.pv .pv-head,
dialog.pv .pv-tabs,
dialog.pv .pv-main,
dialog.pv .pv-thumbs,
dialog.pv .pv-desc {
  box-sizing: border-box;
}

dialog.pv .pv-main {
  min-height: 0;
  height: auto;
  overflow: hidden;
  padding: 18px 22px 0;
}

dialog.pv .pv-figure,
dialog.pv .pv-compare {
  min-height: 0;
  height: 100%;
}

dialog.pv .pv-frame,
dialog.pv .pv-cmp-frame {
  min-height: 0 !important;
  height: 100%;
}

dialog.pv .pv-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

dialog.pv .pv-thumbs {
  min-height: 0;
  max-height: 136px;
}

dialog.pv [hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  dialog.pv {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  dialog.pv .pv-main {
    padding: 12px 12px 0;
  }

  dialog.pv .pv-frame,
  dialog.pv .pv-cmp-frame {
    min-height: 0 !important;
  }

  dialog.pv .pv-thumbs {
    max-height: 112px;
  }
}

/* ============================================================
   NAKHOMBE PHOTO STORY MODAL, FINAL REDESIGN
   A contained editorial viewer: dark gallery stage, calm metadata,
   clear controls, and no page reflow behind the dialog.
   ============================================================ */
html.pv-lock,
html.pv-lock body { overflow: hidden; }

dialog.pv {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  overflow: hidden;
  color: #eef6f0;
  background: transparent;
}

dialog.pv::backdrop {
  background: rgba(2, 10, 6, .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

dialog.pv .pv-shell {
  box-sizing: border-box;
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  width: min(1240px, calc(100vw - 48px));
  height: min(900px, calc(100vh - 48px));
  min-height: 0;
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid rgba(167, 243, 208, .18);
  border-radius: 26px;
  background: #0b1711;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255,255,255,.03) inset;
}

dialog.pv .pv-head {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 30px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0));
}

dialog.pv .pv-head-text { min-width: 0; }

dialog.pv .pv-kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }

dialog.pv .pv-cat,
dialog.pv .pv-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  font: 800 .67rem/1 var(--font-sans, Inter, sans-serif);
  letter-spacing: .11em;
  text-transform: uppercase;
}

dialog.pv .pv-cat { color: #bbf7d0; background: rgba(22, 163, 74, .24); }
dialog.pv .pv-status { color: #bae6fd; background: rgba(14, 116, 144, .25); }
dialog.pv .pv-status::before { width: 6px; height: 6px; margin-right: 7px; background: currentColor; }

dialog.pv .pv-title {
  max-width: 820px;
  margin: 0;
  color: #f8fafc;
  font: 600 clamp(1.35rem, 2.6vw, 2.25rem)/1.12 var(--font-display, Georgia, serif);
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

dialog.pv .pv-meta { margin: 9px 0 0; color: rgba(226, 232, 240, .62); font-size: .88rem; overflow-wrap: anywhere; }

dialog.pv .pv-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  color: #e2e8f0;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  transition: .2s ease;
}

dialog.pv .pv-close:hover,
dialog.pv .pv-close:focus-visible { color: #062b16; background: #a7f3d0; transform: rotate(90deg); }
dialog.pv .pv-close svg { width: 20px; height: 20px; }

dialog.pv .pv-tabs {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 12px 30px;
  overflow-x: auto;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.2);
  scrollbar-width: none;
}

dialog.pv .pv-tabs::-webkit-scrollbar { display: none; }
dialog.pv .pv-tab { flex: 0 0 auto; padding: 9px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; color: rgba(255,255,255,.72); background: rgba(255,255,255,.04); font: 700 .78rem/1.2 var(--font-sans, Inter, sans-serif); white-space: nowrap; cursor: pointer; }
dialog.pv .pv-tab:hover { color: #fff; background: rgba(255,255,255,.12); }
dialog.pv .pv-tab.active { color: #062b16; border-color: #a7f3d0; background: #a7f3d0; box-shadow: 0 0 0 3px rgba(167,243,208,.12); }
dialog.pv .pv-tab > span { margin-left: 5px; opacity: .7; }

dialog.pv .pv-main {
  box-sizing: border-box;
  min-height: 0;
  padding: 22px 30px 0;
  overflow: hidden;
}

dialog.pv .pv-figure,
dialog.pv .pv-compare { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; margin: 0; }

dialog.pv .pv-frame,
dialog.pv .pv-cmp-frame {
  position: relative;
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  min-width: 0;
  min-height: 0 !important;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, #1b3525 0%, #07100b 62%);
}

dialog.pv .pv-frame::after { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.04); border-radius: inherit; content: ''; pointer-events: none; }
dialog.pv .pv-img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }

dialog.pv .pv-nav { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: #062b16; background: rgba(240,253,244,.94); box-shadow: 0 8px 24px rgba(0,0,0,.35); cursor: pointer; transform: translateY(-50%); transition: .2s ease; }
dialog.pv .pv-nav:hover { background: #a7f3d0; transform: translateY(-50%) scale(1.08); }
dialog.pv .pv-nav svg { width: 22px; height: 22px; }
dialog.pv .pv-prev { left: 18px; }
dialog.pv .pv-next { right: 18px; }

dialog.pv .pv-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 48px; padding: 12px 4px 5px; color: rgba(226,232,240,.72); font-size: .82rem; }
dialog.pv .pv-stage { padding: 5px 9px; border-radius: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
dialog.pv .pv-text { flex: 1 1 220px; color: #f8fafc; overflow-wrap: anywhere; }
dialog.pv .pv-date { color: rgba(226,232,240,.55); }
dialog.pv .pv-pos { margin-left: auto; color: #a7f3d0; font-weight: 800; }

dialog.pv .pv-thumbs { display: flex; gap: 10px; min-width: 0; max-height: 120px; margin: 12px 0 0; padding: 4px 30px 20px; overflow-x: auto; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.22)); scrollbar-color: rgba(167,243,208,.35) transparent; }
dialog.pv .pv-thumb { position: relative; flex: 0 0 112px; width: 112px; height: 76px; padding: 0; overflow: hidden; border: 2px solid rgba(255,255,255,.16); border-radius: 11px; background: #13251a; cursor: pointer; opacity: .68; transition: .18s ease; }
dialog.pv .pv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
dialog.pv .pv-thumb:hover { opacity: 1; transform: translateY(-3px); }
dialog.pv .pv-thumb.active { border-color: #a7f3d0; opacity: 1; box-shadow: 0 0 0 3px rgba(167,243,208,.16); }
dialog.pv .pv-thumb-stage { position: absolute; right: 6px; bottom: 6px; width: 7px; height: 7px; border: 1px solid #fff; border-radius: 50%; }

dialog.pv .pv-desc { margin: 4px 30px 20px; padding: 12px 0 0; border-top: 1px solid rgba(255,255,255,.09); color: rgba(226,232,240,.68); font-size: .85rem; line-height: 1.55; overflow: auto; }
dialog.pv [hidden] { display: none !important; }

@media (max-width: 700px) {
  dialog.pv .pv-shell { width: 100vw; height: 100vh; margin: 0; border: 0; border-radius: 0; }
  dialog.pv .pv-head { padding: 20px 18px 14px; }
  dialog.pv .pv-tabs { padding: 10px 18px; }
  dialog.pv .pv-main { padding: 14px 14px 0; }
  dialog.pv .pv-thumbs { padding: 4px 18px 16px; }
  dialog.pv .pv-desc { margin: 4px 18px 14px; }
  dialog.pv .pv-nav { width: 40px; height: 40px; }
  dialog.pv .pv-prev { left: 9px; }
  dialog.pv .pv-next { right: 9px; }
  dialog.pv .pv-thumb { flex-basis: 88px; width: 88px; height: 62px; }
}

/* MAIN IMAGE SIZE: give the gallery a real, generous viewing stage */
dialog.pv .pv-shell {
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

dialog.pv .pv-main {
  min-height: 0;
  height: auto;
}

dialog.pv .pv-figure,
dialog.pv .pv-compare {
  min-height: 0;
}

dialog.pv .pv-frame,
dialog.pv .pv-cmp-frame {
  height: clamp(420px, 64vh, 680px);
  min-height: clamp(420px, 64vh, 680px) !important;
  flex: 0 0 clamp(420px, 64vh, 680px);
}

dialog.pv .pv-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

dialog.pv .pv-thumbs {
  max-height: 96px;
}

dialog.pv .pv-desc {
  max-height: 58px;
  overflow-y: auto;
}

@media (max-width: 700px) {
  dialog.pv .pv-frame,
  dialog.pv .pv-cmp-frame {
    height: clamp(360px, 58vh, 560px);
    min-height: clamp(360px, 58vh, 560px) !important;
    flex-basis: clamp(360px, 58vh, 560px);
  }
}
/* ============================================================
NAKHOMBE PHOTO VIEWER — Editorial Split Gallery
A cinematic, immersive viewer with a split layout.
============================================================ */
html.pv-lock, html.pv-lock body { overflow: hidden; }

dialog.pv {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: #070d0a;
  color: #e2e8f0;
  font-family: var(--font-sans, Inter, sans-serif);
}
dialog.pv::backdrop {
  background: rgba(4, 10, 6, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
dialog.pv[open] { animation: pvFadeIn 0.3s ease-out; }
@keyframes pvFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Layout */
.pv-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Main Stage Area */
.pv-stage-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #070d0a;
  min-width: 0;
}

/* Top Bar */
.pv-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(24px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(7,13,10,0.85) 0%, rgba(7,13,10,0) 100%);
  z-index: 10;
  pointer-events: none;
}
.pv-top-bar > * { pointer-events: auto; }
.pv-top-info { display: flex; flex-direction: column; gap: 10px; max-width: 70%; }
.pv-cat {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(22, 163, 74, 0.15);
  color: #4ade80;
  width: fit-content;
}
.pv-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}
.pv-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pv-close:hover { background: rgba(255,255,255,0.15); transform: rotate(90deg); }
.pv-close svg { width: 20px; height: 20px; }

/* Canvas (Image Container) */
.pv-canvas {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px clamp(40px, 5vw, 80px);
  min-height: 0;
}
.pv-figure, .pv-compare {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.pv-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.pv-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  transition: opacity 0.3s ease;
}
.pv-img.loading { opacity: 0.2; }

/* Navigation Arrows */
.pv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 5;
}
.pv-nav:hover { background: rgba(255,255,255,0.2); transform: translateY(-50%) scale(1.05); border-color: rgba(255,255,255,0.3); }
.pv-nav svg { width: 24px; height: 24px; }
.pv-prev { left: 32px; }
.pv-next { right: 32px; }

/* Bottom Bar */
.pv-bottom-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(24px, 4vw, 40px);
  background: linear-gradient(0deg, rgba(7,13,10,0.85) 0%, rgba(7,13,10,0) 100%);
  z-index: 10;
  pointer-events: none;
}
.pv-bottom-bar > * { pointer-events: auto; }
.pv-cap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pv-stage {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.pv-st-concept  { background: rgba(167,139,250,0.15); color: #c4b5fd; }
.pv-st-before   { background: rgba(251,191,36,0.15);  color: #fcd34d; }
.pv-st-progress { background: rgba(96,165,250,0.15);  color: #93c5fd; }
.pv-st-after    { background: rgba(74,222,128,0.15);  color: #86efac; }

.pv-text { color: #f1f5f9; font-size: 0.95rem; font-weight: 500; }
.pv-date { color: #94a3b8; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.pv-counter {
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* Sidebar */
.pv-sidebar {
  width: min(380px, 35vw);
  flex-shrink: 0;
  background: #0d1712;
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 32px 28px;
  gap: 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.pv-sidebar::-webkit-scrollbar { width: 6px; }
.pv-sidebar::-webkit-scrollbar-track { background: transparent; }
.pv-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }

.pv-sidebar h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 14px;
}

/* Meta Block */
.pv-meta-block { display: flex; flex-direction: column; gap: 18px; }
.pv-meta-row { display: flex; flex-direction: column; gap: 4px; }
.pv-meta-row span { font-size: 0.72rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.pv-meta-row p { font-size: 0.95rem; color: #f8fafc; margin: 0; line-height: 1.5; font-weight: 500; }

/* Description */
.pv-desc-block p { font-size: 0.9rem; color: #cbd5e1; line-height: 1.7; margin: 0; }

/* Tabs */
.pv-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-tab {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pv-tab:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.15); }
.pv-tab.active { background: var(--green-600, #15803d); border-color: var(--green-500, #16a34a); color: #ffffff; box-shadow: 0 4px 12px rgba(22,163,74,0.3); }
.pv-tab > span { margin-left: 6px; opacity: 0.7; font-size: 0.7rem; }

/* Thumbnails */
.pv-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.pv-thumb {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  opacity: 0.5;
  background: #111c16;
}
.pv-thumb:hover { opacity: 0.85; transform: translateY(-2px); }
.pv-thumb.active { border-color: var(--green-400, #34d399); opacity: 1; box-shadow: 0 0 0 3px rgba(52,211,153,0.2); }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-thumb-stage {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.pv-thumb-stage.pv-st-concept  { background: #a78bfa; }
.pv-thumb-stage.pv-st-before   { background: #fbbf24; }
.pv-thumb-stage.pv-st-progress { background: #60a5fa; }
.pv-thumb-stage.pv-st-after    { background: #4ade80; }

/* Compare View */
.pv-compare {
  flex-direction: column;
  gap: 16px;
}
.pv-cmp-frame {
  --pos: 50%;
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1000px;
  max-height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  user-select: none;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.pv-cmp-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pv-cmp-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.pv-cmp-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  pointer-events: none;
}
.pv-cmp-handle span {
  position: absolute;
  top: 50%; left: 50%;
  width: 48px; height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
}
.pv-cmp-handle span::before, .pv-cmp-handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0; height: 0;
  border: 6px solid transparent;
  margin-top: -6px;
}
.pv-cmp-handle span::before { left: 14px; border-right-color: #0d1712; }
.pv-cmp-handle span::after { right: 14px; border-left-color: #0d1712; }
.pv-cmp-lbl {
  position: absolute;
  top: 16px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  pointer-events: none;
}
.pv-cmp-lbl--l { left: 16px; }
.pv-cmp-lbl--r { right: 16px; }
.pv-cmp-frame input[type=range] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}
.pv-cmp-hint { margin: 0; font-size: 0.85rem; color: #94a3b8; text-align: center; }

/* Responsive */
@media (max-width: 900px) {
  .pv-layout { flex-direction: column; }
  .pv-stage-area { flex: none; height: 60vh; }
  .pv-sidebar {
    width: 100%;
    height: 40vh;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 24px 20px;
    gap: 24px;
  }
  .pv-canvas { padding: 80px 20px; }
  .pv-prev { left: 12px; }
  .pv-next { right: 12px; }
  .pv-nav { width: 44px; height: 44px; }
  .pv-nav svg { width: 20px; height: 20px; }
  .pv-thumbs { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .pv-stage-area { height: 55vh; }
  .pv-sidebar { height: 45vh; }
  .pv-title { font-size: 1.15rem; }
  .pv-thumbs { grid-template-columns: repeat(2, 1fr); }
  .pv-cap { gap: 8px; }
  .pv-text { font-size: 0.85rem; }
}

/* Hidden utility for JS */
dialog.pv [hidden] { display: none !important; }