/* ============ PORTFOLIO PAGE ============ */

.nav-links a.active { color: var(--orange); }

.pf-hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 4.5rem 2rem 2rem;
  text-align: left;
}
.pf-hero p { margin-top: 0.8rem; max-width: 54ch; font-size: 1.05rem; }

/* ---- Filter tabs ---- */
.pf-tabs-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem 2.5rem;
}
.pf-tabs {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.4rem;
}
.pf-tab {
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.65rem 1.1rem;
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.3s ease;
}
.pf-tab.active { color: #14161C; }
.pf-tab-glider {
  position: absolute;
  z-index: 1;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0.4rem;
  width: 60px;
  border-radius: 9px;
  background: var(--grad);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), width 0.35s cubic-bezier(.2,.8,.2,1);
}

/* ---- Grid ---- */
.pf-grid-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem 6rem;
}
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.pf-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.pf-card.in-view { opacity: 1; transform: translateY(0); }
.pf-card:hover {
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,122,69,0.15);
  border-color: rgba(255,122,69,0.35);
  transform: translateY(-5px);
}
.pf-card.hidden-card { display: none; }

.pf-thumb {
  height: 190px;
  position: relative;
  background-size: 200% 200%;
}
.pf-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 14px);
}
.pf-thumb--a { background-image: linear-gradient(135deg, #2E3242, #FF7A45 140%); }
.pf-thumb--b { background-image: linear-gradient(135deg, #22262F, #3DA9FC 140%); }
.pf-thumb--c { background-image: linear-gradient(135deg, #2A2440, #FF7A45 140%); }
.pf-thumb--d { background-image: linear-gradient(135deg, #202A3A, #3DA9FC 140%); }
.pf-thumb--e { background-image: linear-gradient(135deg, #2F2A22, #FF7A45 140%); }
.pf-thumb--f { background-image: linear-gradient(135deg, #202D2C, #3DA9FC 140%); }
.pf-thumb--g { background-image: linear-gradient(135deg, #2E2233, #FF7A45 140%); }
.pf-thumb--h { background-image: linear-gradient(135deg, #202832, #3DA9FC 140%); }
.pf-thumb--i { background-image: linear-gradient(135deg, #332822, #FF7A45 140%); }
.pf-thumb--j { background-image: linear-gradient(135deg, #202A2E, #3DA9FC 140%); }
.pf-thumb--k { background-image: linear-gradient(135deg, #2C2530, #FF7A45 140%); }
.pf-thumb--l { background-image: linear-gradient(135deg, #202331, #3DA9FC 140%); }

.pf-card-body { padding: 1.2rem 1.3rem 1.5rem; }
.pf-card-body h3 { font-size: 0.98rem; margin-bottom: 0.45rem; }
.pf-card-body p { font-size: 0.86rem; }

/* ---- Lightbox ---- */
.pf-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,11,14,0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 2rem;
}
.pf-lightbox.open { opacity: 1; pointer-events: auto; }
.pf-lightbox-inner {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  overflow: hidden;
  transform: scale(0.94);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.pf-lightbox.open .pf-lightbox-inner { transform: scale(1); }
.pf-lightbox-media { height: 320px; background-size: 200% 200%; }
.pf-lightbox-body { padding: 1.8rem 2rem 2.2rem; position: relative; }
.pf-lightbox-body h3 { font-family: var(--font-display); margin-bottom: 0.6rem; }
.pf-lightbox-body p { font-size: 0.98rem; }
.pf-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20,22,28,0.6);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pf-lightbox-close:hover { border-color: var(--orange); color: var(--orange); }

@media (max-width: 900px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-tabs { flex-direction: column; width: 100%; }
  .pf-tab-glider { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-card { transition: none; opacity: 1; transform: none; }
}
