/* ============================================================
   PORTFÓLIO — Nanda Farias
   ============================================================ */

.portfolio-page {
  padding-top: 100px;
}

.portfolio-hero {
  text-align: center;
  margin-bottom: 48px;
}

.portfolio-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
.portfolio-title em {
  font-style: italic;
  font-weight: 400;
}

/* ---------- FILTROS ---------- */
.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.filter-btn {
  font-family: var(--font-sig);
  font-size: 10.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--warm-gray);
  background: none;
  border: 1px solid transparent;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 300ms var(--ease), border-color 300ms var(--ease);
}
.filter-btn:hover {
  color: var(--ink);
  border-color: var(--warm-gray-soft);
}
.filter-btn.active {
  color: var(--ink);
  border-color: var(--champagne);
}

/* ---------- GALLERY GRID ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 480px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* R-01: aspect-ratio derivado da imagem (--ar inline). Foto sem crop. */
.gallery-item {
  margin: 0;
  overflow: hidden;
  position: relative;
  background: var(--bone-2);
  aspect-ratio: var(--ar, 3 / 4);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bone-2);
  transition: transform 900ms var(--ease);
}
.gallery-item:hover img {
  transform: scale(1.02);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 14px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(22, 21, 19, 0.6) 100%);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- PORTFOLIO CTA ---------- */
.portfolio-cta {
  text-align: center;
  margin: 56px 0 32px;
}
.portfolio-cta-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(24px, 4vw, 32px);
  font-style: italic;
  color: var(--ink);
  margin: 0 0 20px;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox[hidden] {
  display: none;
}

.lb-content {
  margin: 0;
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  text-align: center;
}
.lb-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border: none;
}
.lb-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  color: rgba(240, 235, 227, 0.7);
  margin-top: 12px;
  letter-spacing: 0.02em;
}

.lb-close,
.lb-prev,
.lb-next {
  position: fixed;
  background: none;
  border: none;
  color: rgba(240, 235, 227, 0.6);
  cursor: pointer;
  font-size: 32px;
  z-index: 101;
  transition: color 300ms var(--ease);
  padding: 12px;
  line-height: 1;
}
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  color: var(--champagne);
}
.lb-close {
  top: 16px;
  right: 20px;
  font-size: 40px;
}
.lb-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
}
.lb-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 540px) {
  .portfolio-page { padding-top: 80px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .lb-prev, .lb-next { font-size: 36px; }
}
