/* project page styles — loaded alongside style.css */

/* ── BACK ── */
.back-wrap {
  padding: 32px 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  transition: color 0.15s;
}

.back-link:hover { color: var(--ink); }

.back-arrow {
  font-size: 17px;
  line-height: 1;
  margin-top: -1px;
}

/* ── PROJECT HEADER ── */
.project-header {
  padding: 28px 0 24px;
  border-bottom: 0.5px solid var(--border);
}

.project-cats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.project-title {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/* ── PROJECT BODY ── */
.project-body {
  padding: 28px 0 96px;
}

.block + .block {
  margin-top: 37px;
  padding-top: 32px;
  border-top: 0.5px solid var(--border);
}

.block-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── SUB-PROJECT TITLE ── */
.sub-project-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}

/* ── GIF TRIO ── */
.gif-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 700px) {
  .gif-trio { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 440px) {
  .gif-trio { grid-template-columns: 1fr; }
}

/* ── PROJECT SPLIT (video + text side by side) ── */
.project-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 700px) {
  .project-split { grid-template-columns: 1fr; }
}

.embed-wrap--short {
  aspect-ratio: 9 / 16;
  max-width: 360px;
}

.project-split--short {
  align-items: start;
}

/* ── BLOCK INNER GAP ── */
.block-inner-gap {
  margin-top: 20px;
}

/* ── GIF PAIR ── */
.gif-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gif-item {
  display: flex;
  flex-direction: column;
}

.gif-pair img,
.gif-trio img {
  width: 100%;
  display: block;
}

.gif-caption {
  margin-top: 8px;
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 580px) {
  .gif-pair {
    grid-template-columns: 1fr;
  }
}

/* ── VIDEO ── */
.video-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.video-caption {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.embed-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.video-item {
  display: flex;
  flex-direction: column;
}

@media (max-width: 580px) {
  .embed-pair {
    grid-template-columns: 1fr;
  }
}

/* ── RENDER STACK ── */
.render-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.render-stack img {
  width: 100%;
  display: block;
}

/* ── RIG GALLERY ── */
.rig-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.rig-gallery img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.rig-big {
  grid-column: 1 / -1;
  max-height: 520px;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

@media (max-width: 580px) {
  .rig-gallery { grid-template-columns: 1fr 1fr; }
  .rig-big { grid-column: span 2; }
}

/* ── BOLD COLLAPSIBLE ── */
.tech-overview--bold summary .block-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.06em;
}

/* ── LARGER SUB-PROJECT TITLE ── */
.sub-project-title--lg {
  font-size: clamp(24px, 3.5vw, 34px);
}

/* ── TECHNICAL OVERVIEW ── */
.tech-overview {
  border: none;
}

.tech-overview summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  margin-bottom: 0;
}

.tech-overview summary::-webkit-details-marker { display: none; }

.tech-overview summary .block-label {
  margin-bottom: 0;
}

.tech-toggle-icon {
  width: 22px;
  height: 22px;
  position: relative;
  flex-shrink: 0;
}

.tech-toggle-icon::before,
.tech-toggle-icon::after {
  content: '';
  position: absolute;
  background: var(--ink);
  border-radius: 1.5px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tech-toggle-icon::before {
  width: 14px;
  height: 2.5px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tech-toggle-icon::after {
  width: 2.5px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tech-overview[open] .tech-toggle-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.tech-body {
  margin-top: 20px;
}

/* ── DESCRIPTION ── */
.desc {
  font-size: 15px;
  line-height: 1.85;
}

.desc p + p { margin-top: 14px; }

/* ── VIDEO EMBED ── */
.embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.embed-wrap iframe,
.embed-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.embed-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
  padding-left: 2px;
}

.embed-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ── IMAGE GRID ── */
.img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.img-ph {
  aspect-ratio: 4 / 3;
  background: #ebebeb;
  border: 0.5px solid var(--border);
}

@media (max-width: 700px) {
  .img-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 440px) {
  .img-grid {
    grid-template-columns: 1fr;
  }
}

/* ── POSTER GRID ── */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.poster-thumb {
  width: 100%;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.poster-thumb:hover { opacity: 0.85; }

@media (max-width: 580px) {
  .poster-grid { grid-template-columns: repeat(2, 1fr); }
}

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

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

.lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  user-select: none;
}

.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
  line-height: 1;
  padding: 4px;
}

.lb-close:hover { opacity: 1; }

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
  padding: 12px;
  line-height: 1;
  user-select: none;
}

.lb-nav:hover { opacity: 1; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
