/* ================================================================
   PROJECT VIEWER — Behance-style fullscreen image modal
   Always dark / editorial. Theme-agnostic overlay.
   ================================================================ */

/* ── Body lock ───────────────────────────────────────────────── */
body.pv-open {
  overflow: hidden;
}

/* ── Overlay ─────────────────────────────────────────────────── */
/* z-index 10100: above the page and the floating menu trigger/
   backdrop/panel (9998-10000), so opening the viewer fully hides
   the menu button. Stays below the page-transition curtain (10500)
   so a real page navigation still covers the viewer too. */
.pv-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  background: #080808;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  pointer-events: none;
  will-change: transform;
}

div#pvIntro {
    display: none;
}


.pv-overlay.is-open {
  pointer-events: auto;
}

/* ── Reading progress bar ────────────────────────────────────── */
.pv-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #d4f10c; /* accent — override with var if needed */
  z-index: 2;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ── Header ──────────────────────────────────────────────────── */
.pv-header {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pv-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 160px;
}

.pv-header__center {
  flex: 1;
  text-align: center;
  overflow: hidden;
}

.pv-header__title {
  font-family: var(--font-geist, 'Geist', sans-serif);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-header__right {
  min-width: 160px;
  display: flex;
  justify-content: flex-end;
}

/* ── Shared icon button ──────────────────────────────────────── */
.pv-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  flex-shrink: 0;
  padding: 0;
}

.pv-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pv-icon-btn:active {
  transform: scale(0.92);
}

.pv-icon-btn:focus-visible {
  outline: 2px solid rgba(212, 241, 12, 0.7);
  outline-offset: 2px;
}

.pv-icon-btn svg {
  display: block;
  flex-shrink: 0;
}

.pv-icon-btn--close {
  background: rgba(255, 255, 255, 0.08);
}

.pv-icon-btn--close:hover {
  background: rgba(255, 60, 60, 0.25);
  color: #fff;
}

/* Nav disabled state */
.pv-icon-btn:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

/* ── Counter ─────────────────────────────────────────────────── */
.pv-counter {
  font-family: var(--font-geist, 'Geist', sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  letter-spacing: 0.04em;
  user-select: none;
}

/* ── Scroll container ────────────────────────────────────────── */
.pv-scroll-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Custom scrollbar */
.pv-scroll-container::-webkit-scrollbar {
  width: 4px;
}
.pv-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}
.pv-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}
.pv-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── Content inner ───────────────────────────────────────────── */
.pv-content-inner {
  /* width: min(1400px, 100% - 2 * 48px); */
  margin: 0 auto;
  /* padding: 80px 0 120px; */
}

/* ── Project intro ───────────────────────────────────────────── */
.pv-intro {
  margin-bottom: 72px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pv-intro__eyebrow {
  font-family: var(--font-geist, 'Geist', sans-serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 20px;
}

.pv-title {
  font-family: var(--font-geist, 'Geist', sans-serif);
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 28px;
}

.pv-desc {
  font-family: var(--font-geist, 'Geist', sans-serif);
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
  max-width: 720px;
  margin: 0 0 28px;
}

.pv-meta-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.pv-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pv-meta-label {
  font-family: var(--font-geist, 'Geist', sans-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

.pv-meta-value {
  font-family: var(--font-geist, 'Geist', sans-serif);
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
}

/* ── Gallery ─────────────────────────────────────────────────── */
.pv-gallery {
  display: flex;
  flex-direction: column;
  /* gap: 16px; */
}

.pv-figure {
  margin: 0;
  padding: 0;
  will-change: opacity, transform;
  /* starts hidden — JS sets this */
}

.pv-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0px;
  background: #111;
  /* placeholder shimmer */
  /* min-height: 200px; */
}

/* Placeholder shimmer while image loads */
.pv-img[data-loading] {
  animation: pv-shimmer 1.5s ease-in-out infinite;
}

@keyframes pv-shimmer {
  0%, 100% { background: #111; }
  50%       { background: #1a1a1a; }
}

/* ── End navigation ──────────────────────────────────────────── */
.pv-end-nav {
  margin-top: 96px;
  padding-top: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: none;
  justify-content: space-between;
  gap: 24px;
}

.pv-end-nav__btn {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px 32px;
  cursor: pointer;
  color: #fff;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  flex: 1;
  max-width: 360px;
}

.pv-end-nav__btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.pv-end-nav__btn:focus-visible {
  outline: 2px solid rgba(212, 241, 12, 0.7);
  outline-offset: 2px;
}

.pv-end-nav__btn--next {
  text-align: right;
  margin-left: auto;
}

.pv-end-nav__dir {
  font-family: var(--font-geist, 'Geist', sans-serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.pv-end-nav__name {
  font-family: var(--font-geist, 'Geist', sans-serif);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

/* ── Project switcher transition ─────────────────────────────── */
.pv-gallery.is-switching {
  opacity: 0;
  transform: translateY(16px);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .pv-content-inner {
    /* width: calc(100% - 64px); */
    /* padding: 60px 0 100px; */
  }
}

@media (max-width: 768px) {
  .pv-header {
    height: 56px;
    padding: 0 16px;
  }

  .pv-header__left {
    gap: 10px;
    min-width: auto;
  }

  .pv-header__right {
    min-width: auto;
  }

  .pv-counter {
    display: none;
  }

  .pv-content-inner {
    /* width: calc(100% - 32px); */
    /* padding: 48px 0 80px; */
  }

  .pv-intro {
    margin-bottom: 48px;
    padding-bottom: 40px;
  }

  /* .pv-gallery {
    gap: 10px;
  } */

  .pv-end-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .pv-end-nav__btn {
    max-width: 100%;
  }

  .pv-end-nav__btn--next {
    margin-left: 0;
    text-align: left;
  }
}

/* ── Card cursor — make cards show pointer ───────────────────── */
[data-project-id] {
  cursor: pointer;
}
