:root {
  --brand:    rgb(31,135,164);
  --brand-lt: rgb(80,180,210);
  --brand-dim:rgba(31,135,164,0.12);
  --ink:      #04090f;
  --ink-2:    #070d16;
  --panel:    rgba(255,255,255,0.03);
  --edge:     rgba(255,255,255,0.07);
  --edge-b:   rgba(31,135,164,0.3);
  --text:     #ffffff;
  --sub:      rgba(255,255,255,0.52);
  --muted:    rgba(255,255,255,0.25);
  --ff-head:  'Syne', sans-serif;
  --ff-body:  'IBM Plex Sans', sans-serif;
  --ease:     cubic-bezier(0.25,0.46,0.45,0.94);
}

/* ══════════════════════════════════════════
   PAGE SCOPE (scoped to avoid base conflicts)
══════════════════════════════════════════ */
.pf-page {
  background: var(--ink);
  color: var(--text);
  font-family: var(--ff-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.pf-hero {
  position: relative;
  padding: 130px 40px 100px;
  overflow: hidden;
  background: var(--ink);
}

.pf-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(31,135,164,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,135,164,0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

.pf-hero-glow {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31,135,164,0.18) 0%, transparent 65%);
  top: -200px; right: -100px;
  animation: glow-breathe 9s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes glow-breathe {
  0%,100%{transform:scale(1);opacity:1;}
  50%{transform:scale(1.1);opacity:.7;}
}

.pf-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.pf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
}

.pf-breadcrumb a,
.pf-breadcrumb span {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.pf-breadcrumb a {
  color: var(--sub);
  transition: color .2s;
}

.pf-breadcrumb a:hover { color: var(--brand-lt); }

.pf-breadcrumb span { color: var(--muted); }

.pf-breadcrumb-sep {
  color: var(--muted);
  font-size: 12px;
}

.pf-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-lt);
  border: 1px solid rgba(31,135,164,0.3);
  background: rgba(31,135,164,0.07);
  padding: 7px 16px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.pf-label-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-lt);
  animation: dot-pulse 2s infinite;
}

@keyframes dot-pulse {
  0%,100%{opacity:1;transform:scale(1);}
  50%{opacity:.4;transform:scale(1.4);}
}

.pf-hero h1 {
  font-family: var(--ff-head);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 28px;
}

.pf-hero h1 .accent {
  color: var(--brand-lt);
  display: inline-block;
  position: relative;
}

.pf-hero-desc {
  font-size: 18px;
  color: var(--sub);
  font-weight: 300;
  line-height: 1.75;
  max-width: 600px;
  margin-bottom: 60px;
}

/* STATS ROW */
.pf-stats-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--edge);
  border-radius: 16px;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 0;
}

.pf-stat {
  padding: 24px 40px;
  border-right: 1px solid var(--edge);
  position: relative;
}

.pf-stat:last-child { border-right: none; }

.pf-stat-val {
  font-family: var(--ff-head);
  font-size: 36px;
  font-weight: 800;
  color: var(--brand-lt);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.pf-stat-lbl {
  font-size: 13px;
  color: var(--sub);
  font-weight: 300;
}

/* ══════════════════════════════════════════
   FILTER BAR
══════════════════════════════════════════ */
.pf-filter-wrap {
  background: var(--ink-2);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
}

.pf-filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.pf-filters {
  display: flex;
  gap: 4px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}

.pf-filters::-webkit-scrollbar { display: none; }

.pf-filter-btn {
  background: none;
  border: 1px solid transparent;
  padding: 8px 20px;
  border-radius: 50px;
  font-family: var(--ff-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  cursor: pointer;
  transition: all .25s;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.pf-filter-btn:hover {
  color: var(--text);
  border-color: var(--edge);
}

.pf-filter-btn.active {
  background: var(--brand-dim);
  border-color: var(--edge-b);
  color: var(--brand-lt);
}

.pf-count {
  font-family: var(--ff-head);
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  padding: 14px 0;
}

.pf-count span {
  color: var(--brand-lt);
}

/* ══════════════════════════════════════════
   PORTFOLIO GRID
══════════════════════════════════════════ */
.pf-grid-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

.pf-grid {
  columns: 3;
  column-gap: 20px;
}

/* CARD */
.pf-card {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--edge);
  background: var(--panel);
  transition: border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.pf-card:hover {
  border-color: var(--edge-b);
  transform: translateY(-8px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(31,135,164,0.15);
}

/* THUMB */
.pf-thumb {
  position: relative;
  overflow: hidden;
}

.pf-thumb-img {
  width: 100%; height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--ease);
}

.pf-card:hover .pf-thumb-img {
  transform: scale(1.06);
}

/* Fallback gradient thumb for cases without image */
.pf-thumb-placeholder {
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .6s var(--ease);
}

.pf-card:hover .pf-thumb-placeholder {
  transform: scale(1.06);
}

.pf-thumb-placeholder svg {
  width: 64px; height: 64px;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 1;
  fill: none;
}

/* Gradient variants */
.pf-grad-1 { background: linear-gradient(135deg, #06182a 0%, #0d3a52 100%); }
.pf-grad-2 { background: linear-gradient(135deg, #041210 0%, #0c2e27 100%); }
.pf-grad-3 { background: linear-gradient(135deg, #0c0820 0%, #1a0f40 100%); }
.pf-grad-4 { background: linear-gradient(135deg, #100808 0%, #2a0f0f 100%); }
.pf-grad-5 { background: linear-gradient(135deg, #0a1020 0%, #081832 100%); }
.pf-grad-6 { background: linear-gradient(135deg, #060e0e 0%, #0d2a28 100%); }

/* WIPE OVERLAY on hover */
.pf-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(31,135,164,0.25) 0%, rgba(31,135,164,0.05) 100%);
  opacity: 0;
  transition: opacity .4s;
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  transition: opacity .4s, clip-path .5s var(--ease);
}

.pf-card:hover .pf-thumb::after {
  opacity: 1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* OVERLAY CTA */
.pf-thumb-cta {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  opacity: 0;
  transition: opacity .35s, transform .35s var(--ease);
  background: var(--brand);
  color: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: var(--ff-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pf-thumb-cta svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2.5; fill: none;
}

.pf-card:hover .pf-thumb-cta {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* TAGS row on thumb */
.pf-thumb-tags {
  position: absolute;
  top: 14px; left: 14px;
  display: flex; gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}

.pf-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(31,135,164,0.18);
  border: 1px solid rgba(31,135,164,0.35);
  color: var(--brand-lt);
  padding: 4px 10px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

/* Visit badge */
.pf-visit-badge {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--edge);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity .3s, transform .3s var(--ease);
  z-index: 3;
  backdrop-filter: blur(8px);
}

.pf-visit-badge svg {
  width: 14px; height: 14px;
  stroke: var(--brand-lt); stroke-width: 2; fill: none;
}

.pf-card:hover .pf-visit-badge {
  opacity: 1;
  transform: scale(1);
}

/* BODY */
.pf-card-body {
  padding: 24px;
}

.pf-card-body h3 {
  font-family: var(--ff-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  line-height: 1.25;
}

.pf-card-body p {
  font-size: 14px;
  color: var(--sub);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 18px;
}

.pf-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--edge);
}

.pf-card-meta {
  display: flex;
  gap: 16px;
}

.pf-meta-chip {
  display: flex;
  flex-direction: column;
}

.pf-meta-val {
  font-family: var(--ff-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-lt);
  letter-spacing: -0.02em;
  line-height: 1;
}

.pf-meta-lbl {
  font-size: 10px;
  color: var(--muted);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.pf-card-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-lt);
  transition: gap .25s;
}

.pf-card-link svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2.5; fill: none;
}

.pf-card:hover .pf-card-link { gap: 10px; }

/* ── FEATURED / WIDE CARD ── */
.pf-card-wide {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.pf-card-wide .pf-thumb {
  min-height: 300px;
}

.pf-card-wide .pf-thumb-placeholder {
  min-height: 300px;
}

.pf-card-wide .pf-card-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pf-card-wide .pf-card-body h3 {
  font-size: 26px;
  margin-bottom: 14px;
}

.pf-card-wide .pf-card-body p {
  font-size: 15px;
  margin-bottom: 24px;
}

.pf-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-lt);
  margin-bottom: 14px;
}

.pf-featured-badge svg {
  width: 14px; height: 14px;
  fill: var(--brand-lt);
}

/* ══════════════════════════════════════════
   FULL-SCREEN VIEWER (lightbox-style)
══════════════════════════════════════════ */
.pf-viewer {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}

.pf-viewer.open {
  opacity: 1;
  pointer-events: auto;
}

.pf-viewer-backdrop {
  position: absolute; inset: 0;
  background: rgba(4,9,15,0.92);
  backdrop-filter: blur(20px);
}

.pf-viewer-box {
  position: relative;
  z-index: 2;
  background: #080f18;
  border: 1px solid var(--edge);
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
  transform: translateY(40px) scale(0.97);
  transition: transform .4s var(--ease);
}

.pf-viewer.open .pf-viewer-box {
  transform: translateY(0) scale(1);
}

.pf-viewer-top {
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.pf-viewer-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.pf-viewer-img-placeholder {
  width: 100%; height: 340px;
  display: flex; align-items: center; justify-content: center;
}

.pf-viewer-img-placeholder svg {
  width: 80px; height: 80px;
  stroke: rgba(255,255,255,0.08); stroke-width: 1; fill: none;
}

.pf-viewer-top-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,15,24,1) 0%, transparent 60%);
}

.pf-viewer-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--edge);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .25s, border-color .25s;
  backdrop-filter: blur(8px);
  z-index: 3;
  line-height: 1;
}

.pf-viewer-close:hover {
  background: rgba(31,135,164,0.2);
  border-color: var(--edge-b);
}

.pf-viewer-body {
  padding: 36px 44px 44px;
}

.pf-viewer-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}

.pf-viewer-body h2 {
  font-family: var(--ff-head);
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.pf-viewer-body > p {
  font-size: 16px;
  color: var(--sub);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 36px;
}

.pf-viewer-metrics {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.pf-viewer-metric {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 20px 18px;
  text-align: center;
  transition: border-color .25s;
}

.pf-viewer-metric:hover { border-color: var(--edge-b); }

.pf-viewer-metric-val {
  font-family: var(--ff-head);
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-lt);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.pf-viewer-metric-lbl {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 300;
}

.pf-viewer-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
}

.btn-viewer-primary {
  background: var(--brand);
  color: #fff;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: var(--ff-head);
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  transition: background .25s, transform .25s, box-shadow .25s;
}

.btn-viewer-primary svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2.5; fill: none;
}

.btn-viewer-primary:hover {
  background: var(--brand-lt);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(31,135,164,0.3);
}

.btn-viewer-outline {
  background: transparent;
  border: 1px solid var(--edge);
  color: var(--sub);
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  transition: border-color .25s, color .25s;
}

.btn-viewer-outline:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text);
}

/* ══════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════ */
.pf-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 40px;
  border-top: 1px solid var(--edge);
}

.pf-page-btn {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--sub);
  font-family: var(--ff-head);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .25s, background .25s, color .25s;
}

.pf-page-btn:hover {
  border-color: var(--edge-b);
  background: var(--brand-dim);
  color: var(--brand-lt);
}

.pf-page-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pf-page-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.pf-page-btn svg {
  width: 16px; height: 16px;
  stroke: currentColor; stroke-width: 2; fill: none;
}

.pf-page-info {
  font-size: 13px;
  color: var(--muted);
  padding: 0 8px;
  font-weight: 300;
}

/* ══════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════ */
.pf-empty {
  text-align: center;
  padding: 100px 40px;
}

.pf-empty svg {
  width: 64px; height: 64px;
  stroke: var(--muted); stroke-width: 1; fill: none;
  margin: 0 auto 24px;
  display: block;
}

.pf-empty h3 {
  font-family: var(--ff-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--sub);
  margin-bottom: 10px;
}

.pf-empty p { font-size: 15px; color: var(--muted); font-weight: 300; }

/* ══════════════════════════════════════════
   CTA STRIP
══════════════════════════════════════════ */
.pf-cta {
  background: var(--ink-2);
  border-top: 1px solid var(--edge);
  padding: 100px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pf-cta-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31,135,164,0.14) 0%, transparent 65%);
  top: -200px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.pf-cta-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative; z-index: 2;
}

.pf-cta h2 {
  font-family: var(--ff-head);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin: 18px 0 18px;
}

.pf-cta h2 span { color: var(--brand-lt); }

.pf-cta p {
  font-size: 16px;
  color: var(--sub);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 40px;
}

.pf-cta-btns {
  display: flex; gap: 14px;
  justify-content: center; flex-wrap: wrap;
}

.btn-cta-solid {
  background: var(--brand);
  color: #fff;
  padding: 15px 32px;
  border-radius: 8px;
  font-family: var(--ff-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: background .25s, transform .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}

.btn-cta-solid::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: .5s;
}

.btn-cta-solid:hover::before { transform: translateX(100%); }

.btn-cta-solid:hover {
  background: var(--brand-lt);
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(31,135,164,0.35);
}

.btn-cta-ghost {
  background: transparent;
  border: 1px solid var(--edge);
  color: var(--text);
  padding: 15px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .25s, background .25s;
}

.btn-cta-ghost:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
}

/* ══════════════════════════════════════════
   REVEAL
══════════════════════════════════════════ */
.pf-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s, transform .8s;
}

.pf-reveal.visible {
  opacity: 1; transform: none;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1000px) {
  .pf-grid { columns: 2; }
  .pf-card-wide { grid-template-columns: 1fr; }
  .pf-card-wide .pf-thumb-placeholder { min-height: 220px; }
}

@media (max-width: 700px) {
  .pf-hero { padding: 100px 24px 70px; }
  .pf-hero h1 { font-size: 44px; }
  .pf-hero-desc { font-size: 16px; }
  .pf-stats-row { flex-wrap: wrap; width: 100%; }
  .pf-stat { border-right: none; border-bottom: 1px solid var(--edge); }
  .pf-stat:last-child { border-bottom: none; }
  .pf-filter-inner { padding: 0 20px; }
  .pf-grid { columns: 1; }
  .pf-grid-section { padding: 60px 24px 80px; }
  .pf-viewer-body { padding: 24px 24px 32px; }
  .pf-viewer-body h2 { font-size: 26px; }
  .pf-viewer-metrics { grid-template-columns: 1fr 1fr; }
  .pf-cta { padding: 70px 24px; }
  .pf-viewer-img { height: 250px; }
}
