/* ═══════════════════════════════════════════════════════
   PORTFOLIO — categories page + gallery sub-pages
   ═══════════════════════════════════════════════════════ */

@keyframes wkUp { from{opacity:0;transform:translateY(36px)} to{opacity:1;transform:translateY(0)} }

/* ── Shared hero (categories page + gallery pages) ── */
.pf-hero{
  padding: calc(var(--navh) + 90px) var(--pad) 50px;
  max-width: 100%;
  background: transparent;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.45s;
}
.pf-hero-title{
  font-family: var(--fh);
  font-size: clamp(64px, 10vw, 140px);
  line-height: 0.9;
  text-transform: uppercase;
  margin: 12px 0 20px;
  opacity: 0;
  transform: translateY(40px);
  animation: wkUp 0.85s cubic-bezier(0.16,1,0.3,1) 0.15s forwards;
}
.pf-hero-sub{
  font-size: 16px; line-height: 1.75; color: var(--fg2); transition: color 0.45s;
  max-width: 520px;
  opacity: 0; animation: wkUp 0.7s ease 0.4s forwards;
}

/* ── Gallery-page hero: centred + shifted down + yellow tag ── */
.pf-hero-centered{
  padding: calc(var(--navh) + 130px) var(--pad) 40px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.pf-hero-centered .pf-hero-title{
  position: relative;
  display: inline-block;
}
.pf-tag{
  display: inline-block;
  font-family: var(--fb); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--yellow); color: #141414;
  padding: 4px 12px; border-radius: 3px;
  transform: rotate(-3deg);
  position: relative; top: -0.6em; margin: 0 6px 0 22px;
  opacity: 0; animation: wkUp 0.7s ease 0.55s forwards;
}
.pf-back{
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg2); margin-top: 10px; transition: color 0.2s;
  opacity: 0; animation: wkUp 0.6s ease 0.7s forwards;
}
.pf-back:hover{ color: var(--yellow); }

/* ── Categories grid — 3 cols x 2 rows bento, every block 4:3 ── */
.pf-section{ padding: 30px var(--pad) 100px; background: var(--bg); transition: background 0.5s; }
.pf-grid{
  max-width: var(--max); margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pf-card{
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg3);
  display: block;
  cursor: none;
}
.pf-card-img{
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: saturate(0.85);
  transition: transform 0.65s var(--ease-o), filter 0.4s;
}
.pf-card:hover .pf-card-img{ transform: scale(1.06); filter: saturate(1.05); }
.pf-card-overlay{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,20,20,0) 40%, rgba(20,20,20,0.82) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px 24px;
}
.pf-card-eyebrow{
  font-size: 9px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 4px;
}
.pf-card-name{
  font-family: var(--fh); font-size: clamp(22px, 2.6vw, 34px);
  text-transform: uppercase; color: #fff; line-height: 1;
}
.pf-card-cta{
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: rgba(255,255,255,0.65);
  margin-top: 6px; opacity: 0; transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
}
.pf-card:hover .pf-card-cta{ opacity: 1; transform: translateY(0); }

/* ── Masonry image gallery (gallery sub-pages) ── */
.pf-masonry{
  max-width: var(--max); margin: 0 auto;
  columns: 3; column-gap: 14px;
}
.pf-masonry img{
  width: 100%; height: auto; display: block;
  margin: 0 0 14px; border-radius: 3px;
  break-inside: avoid; -webkit-column-break-inside: avoid;
  cursor: zoom-in;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.pf-masonry img:hover{ transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,0.14); }
.pf-empty{
  padding: 60px 24px; text-align: center; color: var(--fg3);
  font-size: 13px; letter-spacing: 0.04em;
}

/* ── Lightbox (same-tab viewer) ── */
.pf-lightbox{
  position: fixed; inset: 0; background: rgba(10,10,10,0.94);
  z-index: 9999; display: none; align-items: center; justify-content: center;
  padding: 60px; cursor: zoom-out;
}
.pf-lightbox.open{ display: flex; }
.pf-lightbox img{
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 4px; box-shadow: 0 20px 70px rgba(0,0,0,0.55); cursor: default;
}
.pf-lightbox-close{
  position: absolute; top: 22px; right: 28px; color: #fff; font-size: 30px;
  background: none; border: none; cursor: pointer; z-index: 2; line-height: 1;
  opacity: 0.75; transition: opacity 0.2s;
}
.pf-lightbox-close:hover{ opacity: 1; }
.pf-lightbox-nav{
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 46px; height: 46px; border-radius: 50%; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 2;
}
.pf-lightbox-nav:hover{ background: rgba(255,255,255,0.22); }
.pf-lightbox-prev{ left: 18px; }
.pf-lightbox-next{ right: 18px; }
.pf-lightbox-count{
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.55); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; z-index: 2;
}

/* ── Responsive ── */
@media (max-width: 900px){
  .pf-grid{ grid-template-columns: 1fr 1fr; }
  .pf-masonry{ columns: 2; }
}
@media (max-width: 600px){
  .pf-hero, .pf-hero-centered{ padding-top: calc(var(--navh) + 60px); }
  .pf-grid{ grid-template-columns: 1fr; }
  .pf-masonry{ columns: 1; }
  .pf-section{ padding: 24px 16px 60px; }
  .pf-lightbox{ padding: 20px; }
  .pf-lightbox-nav{ width: 38px; height: 38px; font-size: 18px; }
  .pf-lightbox-prev{ left: 8px; }
  .pf-lightbox-next{ right: 8px; }
}
