/* ============================================================
   DWAIN THOMAS PHOTOGRAPHY — Portfolio Stylesheet
   css/dtp-portfolio.css  |  v1.0
   ============================================================ */

/* ── PORTFOLIO HERO ── */
.portfolio-hero {
  padding-top: calc(var(--nav-height) + 56px);
  padding-bottom: 0;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

.portfolio-hero-text {
  padding-bottom: 40px;
}

.portfolio-hero-text h1 {
  margin-top: 12px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.2s forwards;
}

.portfolio-intro {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-mid);
  max-width: 560px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.35s forwards;
}

/* ── PORTFOLIO SUB NAV ── */
.portfolio-subnav {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--rule);
  margin: 0 calc(-1 * var(--page-padding));
  padding: 0 var(--page-padding);
  overflow-x: auto;
  scrollbar-width: none;
}

.portfolio-subnav::-webkit-scrollbar { display: none; }

.portfolio-subnav a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  padding: 14px 20px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.portfolio-subnav a:first-child { padding-left: 0; }

.portfolio-subnav a:hover,
.portfolio-subnav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── MASONRY GRID ── */
.portfolio-grid-wrap {
  padding: 40px var(--page-padding) 0;
}

.masonry {
  columns: 3;
  column-gap: 6px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--bg-dark);
  display: block;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease, opacity 0.3s ease;
  opacity: 0;
}

.masonry-item img.loaded {
  opacity: 1;
}

.masonry-item:hover img {
  transform: scale(1.03);
}

/* ── PORTFOLIO CTA ── */
.portfolio-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px var(--page-padding);
  margin-top: 40px;
  border-top: 1px solid var(--rule);
}

.portfolio-cta p {
  font-size: 16px;
  color: var(--text-mid);
  margin: 0;
}

.portfolio-cta strong {
  color: var(--near-black);
  font-weight: 400;
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 6, 0.96);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox-inner img.loaded {
  opacity: 1;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: none;
  border: none;
  color: rgba(247, 232, 211, 0.6);
  font-size: 32px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 12px;
  line-height: 1;
  z-index: 201;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--gold-light);
}

.lightbox-close {
  top: 20px;
  right: 24px;
  font-size: 36px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .masonry { columns: 2; }
}

@media (max-width: 600px) {
  .masonry { columns: 1; }
  .portfolio-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
