/* ==========================================================================
   PROJECTS V3 — Project Detail page
   ========================================================================== */

.project-v3 {
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px clamp(16px, 2.5vw, 48px) 80px;
}

/* ───────────────── BREADCRUMB ───────────────── */
.pv3d-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text-2, #b8c2cc);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.pv3d-breadcrumb a {
  color: var(--c-text-2, #b8c2cc);
  text-decoration: none;
  transition: color .15s ease;
}
.pv3d-breadcrumb a:hover { color: var(--c-accent, #15d8c8); }
.pv3d-breadcrumb__sep { color: rgba(255,255,255,.18); }
.pv3d-breadcrumb__current { color: var(--c-text-1, #e6edf3); }

/* ───────────────── HERO ───────────────── */
.pv3d-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: var(--pv3-stroke);
  margin-bottom: 32px;
}
.pv3d-hero__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pv3d-hero__title {
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.025em;
  margin: 0;
  padding-bottom: 0.15em;
  background: linear-gradient(180deg, #fff 0%, #c9d2da 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.pv3d-hero__desc {
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-text-2, #b8c2cc);
  max-width: 760px;
  margin: 6px 0 0;
}
.pv3d-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.pv3d-hero__actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* ───────────────── GALLERY ───────────────── */
.pv3d-gallery {
  margin-bottom: 36px;
}
.pv3d-gallery__main {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--pv3-radius);
  overflow: hidden;
  background: #0a1218;
  border: var(--pv3-stroke);
}
.pv3d-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a1218;
}
.pv3d-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(8, 14, 20, .65);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
  backdrop-filter: blur(8px);
}
.pv3d-gallery__nav:hover { background: rgba(21,216,200,.18); border-color: rgba(21,216,200,.35); }
.pv3d-gallery__nav--prev { left: 12px; }
.pv3d-gallery__nav--next { right: 12px; }
.pv3d-gallery__nav:disabled { opacity: .3; cursor: not-allowed; }
.pv3d-gallery__counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(8, 14, 20, .75);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
}
.pv3d-gallery__expand {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(8, 14, 20, .75);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.pv3d-gallery__expand:hover { background: rgba(21,216,200,.18); border-color: rgba(21,216,200,.35); }
.pv3d-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.pv3d-gallery__thumb {
  flex: 0 0 auto;
  width: 96px;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #0a1218;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s ease, transform .12s ease;
}
.pv3d-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pv3d-gallery__thumb.is-active {
  border-color: var(--c-accent, #15d8c8);
}
.pv3d-gallery__thumb:hover { transform: translateY(-1px); }

/* Lightbox (full screen) */
.pv3d-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 10, .92);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  backdrop-filter: blur(6px);
}
.pv3d-lightbox.is-open { display: flex; }
.pv3d-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.pv3d-lightbox__close,
.pv3d-lightbox__nav {
  position: absolute;
  background: rgba(8, 14, 20, .65);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pv3d-lightbox__close { top: 20px; right: 20px; }
.pv3d-lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.pv3d-lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ───────────────── BODY LAYOUT ───────────────── */
.pv3d-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--pv3-aside-w);
  gap: 36px;
  align-items: start;
}
.pv3d-main { min-width: 0; }
.pv3d-aside {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Tabs */
.pv3d-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: var(--pv3-stroke);
  position: sticky;
  top: 64px;
  background: var(--c-bg, #07101b);
  z-index: 5;
  padding: 4px 0 0;
}
.pv3d-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-2, #b8c2cc);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.pv3d-tab:hover { color: var(--c-text-1, #e6edf3); }
.pv3d-tab.is-active {
  color: var(--c-accent, #15d8c8);
  border-color: var(--c-accent, #15d8c8);
}

/* Sections */
.pv3d-section {
  padding: 24px 0;
  border-bottom: var(--pv3-stroke);
  scroll-margin-top: 120px;
}
.pv3d-section:last-of-type { border-bottom: 0; }
.pv3d-section__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pv3d-section__title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(21, 216, 200, .08);
  color: var(--c-accent, #15d8c8);
}
.pv3d-section p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--c-text-1, #e6edf3);
  margin: 0 0 12px;
}

/* Features grid */
.pv3d-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pv3d-features__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--pv3-card-bg-2);
  border: var(--pv3-stroke);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-text-1, #e6edf3);
}
.pv3d-features__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(21, 216, 200, .12);
  color: var(--c-accent, #15d8c8);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* Tag/tech list (fallback) */
.pv3d-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Rich Tech Stack ── */
.pv3d-tech-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pv3d-tech-group {}
.pv3d-tech-group__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text-2, #b8c2cc);
  margin: 0 0 10px;
}
.pv3d-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.pv3d-tech-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: var(--pv3-card-bg-2);
  border: var(--pv3-stroke);
  border-radius: var(--pv3-radius-sm);
  transition: border-color .15s ease, transform .12s ease;
}
.pv3d-tech-card:hover {
  border-color: rgba(255, 255, 255, .16);
  transform: translateY(-1px);
}
.pv3d-tech-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}
.pv3d-tech-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-1, #e6edf3);
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Enhanced Features ── */
.pv3d-features__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pv3d-features__title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-text-1, #e6edf3);
  line-height: 1.3;
}
.pv3d-features__desc {
  font-size: 12.5px;
  color: var(--c-text-2, #b8c2cc);
  line-height: 1.55;
}

/* ── Gallery Tab Grid ── */
.pv3d-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.pv3d-gallery-grid__item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #0a1218;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s ease, transform .12s ease;
}
.pv3d-gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pv3d-gallery-grid__item:hover {
  border-color: rgba(21, 216, 200, .40);
  transform: scale(1.015);
}
.pv3d-gallery-grid__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5) 100%);
  opacity: 0;
  transition: opacity .15s ease;
}
.pv3d-gallery-grid__item:hover::after { opacity: 1; }

/* Hidden state for tab panes */
.pv3d-section[hidden] {
  display: none;
}

/* Aside cards */
.pv3d-card {
  background: var(--pv3-card-bg-2);
  border: var(--pv3-stroke);
  border-radius: var(--pv3-radius);
  padding: 16px;
}
.pv3d-card__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-text-2, #b8c2cc);
  margin: 0 0 10px;
}
.pv3d-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pv3d-meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.pv3d-meta-list li > span:first-child {
  color: var(--c-text-2, #b8c2cc);
}
.pv3d-meta-list li > span:last-child {
  color: var(--c-text-1, #e6edf3);
  font-weight: 600;
  text-align: right;
}

.pv3d-aside .pv3-btn {
  width: 100%;
  justify-content: center;
}

/* Share buttons */
.pv3d-share {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pv3d-share button,
.pv3d-share a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--c-text-2, #b8c2cc);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.pv3d-share button:hover, .pv3d-share a:hover {
  background: rgba(21, 216, 200, .08);
  border-color: rgba(21, 216, 200, .30);
  color: var(--c-accent, #15d8c8);
}

/* Related projects */
.pv3d-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

/* Prev/Next */
.pv3d-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: var(--pv3-stroke);
}
.pv3d-prevnext a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: var(--pv3-stroke);
  border-radius: var(--pv3-radius);
  text-decoration: none;
  color: var(--c-text-1, #e6edf3);
  background: var(--pv3-card-bg-2);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.pv3d-prevnext a:hover {
  border-color: rgba(21, 216, 200, .30);
  transform: translateY(-1px);
}
.pv3d-prevnext__label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-text-2, #b8c2cc);
  font-weight: 700;
}
.pv3d-prevnext__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.pv3d-prevnext__next { text-align: right; }

/* ───────────────── RESPONSIVE ───────────────── */
@media (max-width: 980px) {
  .pv3d-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .pv3d-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .pv3d-aside > * { flex: 1 1 240px; }
}
@media (max-width: 560px) {
  .project-v3 { padding: 18px 14px 60px; }
  .pv3d-hero__title { font-size: 32px; }
  .pv3d-prevnext { grid-template-columns: 1fr; }
  .pv3d-tabs { overflow-x: auto; }
}
