/* =========================================
   PROJECT — project.css
   ========================================= */

/* ── White background ── */
body.page-project,
body.page-proj-detail {
  background: #ffffff;
}

/* ── GNB on white pages ── */
body.page-project #gnb,
body.page-proj-detail #gnb {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* =========================================
   PROJECT LIST PAGE
   ========================================= */

/* ── Stage ── */
#proj-stage {
  position: relative;
  width: 100%;
  /* Row2 top ~420px + max card height ~108px + padding 80px = ~610px */
  min-height: 660px;
}

/* ── Slot ── */
.proj-slot {
  position: absolute;
  transform-origin: center center;
  will-change: transform, opacity;
}

.proj-slot--filled {
  cursor: none;
}

/* ── Label ── */
.proj-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--black);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  /* overflow: hidden 제거 — 타이틀이 슬롯 너비 밖으로 삐져나와도 잘리지 않도록 */
}

.proj-num {
  flex-shrink: 0;
}

.proj-title-lbl {
  will-change: opacity, transform;
}

/* ── Card ── */
.proj-card {
  width: 100%;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  line-height: 0;
  will-change: filter, transform;
  filter: blur(8px);
  position: relative;
}

.proj-card img {
  display: block;
  width: 100%;
  /* 원본 비율에 관계없이 16:10 고정 — 높이 예측 가능하게 만들어 겹침 방지 */
  aspect-ratio: 16 / 10;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Empty slot ── */
.proj-slot--empty .proj-card {
  background: rgba(0, 0, 0, 0.055);
  aspect-ratio: 16 / 10;
  filter: none;
}

/* ── UPDATE SOON badge (empty slot) ── */
.proj-update-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}

.pub-inner {
  background: var(--accent);
  color: var(--black);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 5px 12px;
  white-space: nowrap;
}

/* ── Mobile: stack vertically ── */
@media (max-width: 768px) {
  #proj-stage {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 110px 24px 80px;
    min-height: unset;
  }

  .proj-slot {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    transform: none !important;
  }

  .proj-card {
    filter: none;
  }

  .proj-title-lbl {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================================
   DETAIL PAGE
   ========================================= */

.proj-detail-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 120px 40px 120px;
}

/* ── Back link ── */
.proj-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 60px;
  transition: color 0.2s;
  cursor: none;
}

.proj-back:hover {
  color: var(--black);
}

/* ── Hero image ── */
.proj-detail-hero {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 24px;
}

/* ── Meta row ── */
.proj-detail-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 6px;
}

.proj-detail-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #aaa;
}

.proj-detail-cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #aaa;
}

/* ── Title ── */
.proj-detail-title {
  font-family: var(--mono);
  font-size: clamp(24px, 3.6vw, 52px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: 44px;
}

/* ── Description text ── */
.proj-detail-desc {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2;
  color: var(--black);
  white-space: pre-line;
  margin-bottom: 32px;
}

.proj-detail-desc.kr {
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ── Credit ── */
.proj-detail-credit {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #bbb;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ── Additional images gallery ── */
.proj-detail-gallery {
  margin-top: 72px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.proj-detail-gallery img {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================================
   DETAIL — SECTION BLOCKS
   ========================================= */

.proj-section {
  margin-bottom: 72px;
}

/* Section label (e.g. "Logic: Architecture to Viewfinder") */
.proj-section-label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--black);
  margin-bottom: 10px;
}

/* Section image(s) wrapper */
.proj-section-imgs {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.proj-section-imgs img,
.proj-section-imgs video,
.proj-detail-gallery img,
.proj-detail-gallery video {
  display: block;
  width: 100%;
  height: auto;
}

/* 2-column image grid */
.proj-img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* 3-column image grid */
.proj-img-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

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

@media (max-width: 768px) {
  .proj-detail-wrap {
    padding: 100px 20px 80px;
  }

  .proj-detail-title {
    font-size: clamp(22px, 6vw, 36px);
  }
}
