/* Portfolio page — extends main.css tokens */

/* ---- Hero ---- */
.pf-hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink-950);
}
.pf-hero__media { position: absolute; inset: 0; }
.pf-hero__media video, .pf-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.pf-hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(11,11,10,0.94) 0%, rgba(11,11,10,0.35) 46%, rgba(11,11,10,0.12) 100%),
    linear-gradient(to bottom, rgba(11,11,10,0.55) 0%, rgba(11,11,10,0) 30%);
}
.pf-hero__content { position: relative; padding-block: clamp(3rem, 8vw, 6rem) clamp(4rem, 9vw, 7rem); max-width: 900px; }
.pf-hero__content .eyebrow { margin-bottom: 1rem; }
.pf-hero__content h1 { margin-bottom: 1.4rem; }
.pf-hero__content .lede { color: var(--paper-200); margin-bottom: 2.2rem; max-width: 52ch; }
.display-dot { color: var(--gold-400); }

.pf-hero__scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.pf-hero__scroll span { width: 1px; height: 34px; background: linear-gradient(to bottom, var(--gold-400), transparent); }
@media (max-width: 700px) { .pf-hero__scroll { display: none; } }

/* ---- Filter bar ---- */
.pf-gallery-zone { position: relative; }
.pf-filterbar-wrap {
  position: sticky;
  top: 76px; /* sits just below the fixed nav bar */
  z-index: 100;
  background: rgba(11,11,10,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-block: 1rem;
}
.pf-filterbar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.pf-filterbar::-webkit-scrollbar { display: none; }
.pf-filterbar button {
  flex: none;
  padding: 0.55em 1.2em;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-300);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.pf-filterbar button:hover { color: var(--paper-100); border-color: var(--paper-300); }
.pf-filterbar button.is-active { color: var(--ink-950); background: var(--gold-400); border-color: var(--gold-400); }

/* ---- Masonry gallery ---- */
.pf-masonry {
  columns: 4 280px;
  column-gap: 1.1rem;
}
@media (max-width: 1100px) { .pf-masonry { columns: 3 240px; } }
@media (max-width: 700px) { .pf-masonry { columns: 2 160px; column-gap: 0.7rem; } }

.pf-card {
  break-inside: avoid;
  margin: 0 0 1.1rem;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--ink-800);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}
@media (max-width: 700px) { .pf-card { margin-bottom: 0.7rem; } }
.pf-card.is-hidden { display: none; }

.pf-card__frame { display: block; width: 100%; position: relative; text-align: left; }
.pf-card img, .pf-card video { width: 100%; height: auto; display: block; transition: transform var(--dur-slow) var(--ease-out); }
.pf-card--tall .pf-card__frame img,
.pf-card--tall .pf-card__frame video { aspect-ratio: 3 / 4; object-fit: cover; }
.pf-card--video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--dur-med) var(--ease-out); }
.pf-card--video:hover video { opacity: 1; }
.pf-card__frame:hover img { transform: scale(1.045); }

.pf-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 3.4rem; height: 3.4rem;
  border-radius: 50%;
  background: rgba(11,11,10,0.55);
  border: 1px solid rgba(246,242,233,0.5);
  color: var(--paper-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  backdrop-filter: blur(3px);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
}
.pf-card__frame:hover .pf-play { transform: translate(-50%, -50%) scale(1.12); background: rgba(11,11,10,0.7); }

.pf-card__hover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.1rem;
  background: linear-gradient(to top, rgba(11,11,10,0.88) 0%, rgba(11,11,10,0) 55%);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.pf-card__frame:hover .pf-card__hover, .pf-card__frame:focus-visible .pf-card__hover { opacity: 1; }
.pf-card__title { font-family: var(--font-display); font-size: 1rem; color: var(--paper-100); }
.pf-card__meta { display: block; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-400); margin-top: 0.2rem; }
.pf-card__view { display: block; font-size: 0.75rem; color: var(--paper-300); margin-top: 0.5rem; }

/* ---- Featured project ---- */
.pf-featured {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 74vh;
}
.pf-featured__media { position: relative; overflow: hidden; background: var(--ink-800); }
.pf-featured__media video { width: 100%; height: 100%; object-fit: cover; }
.pf-featured__panel { display: flex; align-items: center; background: var(--ink-900); padding: clamp(2.5rem, 5vw, 5rem); }
.pf-featured__inner { max-width: 480px; }
.pf-featured__inner h2 { margin-block: 1rem 1.2rem; }
.pf-featured__inner .lede { margin-bottom: 2rem; }
@media (max-width: 900px) {
  .pf-featured { grid-template-columns: 1fr; }
  .pf-featured__media { aspect-ratio: 4 / 3; }
}

/* ---- Social showcase ---- */
.pf-social__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.pf-social__card { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 9 / 16; background: var(--ink-800); }
.pf-social__card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.pf-social__card:hover img { transform: scale(1.05); }
.pf-social__cta { text-align: center; margin-top: 2.8rem; }
@media (max-width: 760px) {
  .pf-social__row { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Closing CTA ---- */
.pf-close { position: relative; min-height: 62vh; display: flex; align-items: center; overflow: hidden; }
.pf-close picture, .pf-close img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-close__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,11,10,0.92), rgba(11,11,10,0.55) 60%, rgba(11,11,10,0.35)); }
.pf-close__content { position: relative; text-align: center; margin-inline: auto; padding-block: 5rem; }
.pf-close__content .lede { margin-inline: auto; margin-block: 1.2rem 2.2rem; }
.pf-close__ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 900;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(6,6,5,0.96);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.is-open { display: flex; }
.lightbox__figure { max-width: min(1400px, 92vw); max-height: 88vh; text-align: center; }
.lightbox__figure img { max-height: 78vh; max-width: 100%; object-fit: contain; margin-inline: auto; border-radius: var(--radius-sm); }
.lightbox__figure figcaption { margin-top: 1.1rem; display: flex; gap: 0.8rem; justify-content: center; align-items: baseline; }
.lightbox__figure figcaption span:first-child { color: var(--gold-400); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.lightbox__figure figcaption span:last-child { color: var(--paper-100); font-family: var(--font-display); font-size: 1.05rem; }
.lightbox__close {
  position: absolute; top: 1.4rem; right: 1.6rem;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--paper-100);
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.lightbox__close:hover { border-color: var(--gold-400); color: var(--gold-400); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--paper-100);
  font-size: 1.6rem; display: flex; align-items: center; justify-content: center;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.lightbox__nav:hover { border-color: var(--gold-400); color: var(--gold-400); }
.lightbox__nav--prev { left: clamp(0.6rem, 3vw, 2.4rem); }
.lightbox__nav--next { right: clamp(0.6rem, 3vw, 2.4rem); }
@media (max-width: 640px) { .lightbox__nav { display: none; } }

/* ---- Video modal ---- */
.video-modal {
  position: fixed; inset: 0; z-index: 900;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(6,6,5,0.97);
  padding: clamp(0.5rem, 4vw, 3rem);
}
.video-modal.is-open { display: flex; }
.video-modal__frame { width: 100%; max-width: 1400px; aspect-ratio: 16 / 9; background: #000; }
.video-modal__frame video { width: 100%; height: 100%; }
.video-modal__close {
  position: absolute; top: 1.4rem; right: 1.6rem;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--paper-100);
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.video-modal__close:hover { border-color: var(--gold-400); color: var(--gold-400); }
