/* Portfolio page — extends style.css */

.pf-hero {
  padding-top: calc(74px + clamp(56px, 8vw, 108px));
  padding-bottom: clamp(34px, 5vw, 58px);
}

.pf-hero__title {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  letter-spacing: -0.045em;
}

.pf-hero__lead {
  color: var(--fg-2);
  font-size: var(--t-lead);
  max-width: 46ch;
  margin-top: 18px;
}

/* --- Sticky filter bar ---------------------------------------------------- */
.pf-bar {
  position: sticky;
  top: 73px;
  z-index: 40;
  background: rgba(17, 17, 20, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--line);
}

.pf-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter {
  flex: none;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-2);
  font-size: var(--t-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.filter:hover { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 30%, transparent); }
.filter.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.pf-count {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-2);
  flex: none;
}
@media (max-width: 620px) { .pf-count { display: none; } }

/* --- Detail modal --------------------------------------------------------- */
.pf-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}
.pf-modal.is-open { display: flex; }

.pf-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 7, 10, .9); }

.pf-modal__box {
  position: relative;
  width: 100%;
  max-width: 1120px;
  max-height: 88vh;
  overflow: auto;
  display: grid;
  background: var(--ink-2);
  border: 1px solid var(--line-ink);
  border-radius: var(--r-lg);
}

@media (min-width: 900px) {
  .pf-modal__box { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); overflow: hidden; }
  .pf-modal__info { overflow: auto; }
}

.pf-modal__media {
  position: relative;
  background: #000;
  display: grid;
  place-items: center;
  min-height: 240px;
}
.pf-modal__media img,
.pf-modal__media video,
.pf-modal__media iframe {
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border: 0;
}
.pf-modal__media > .gal > img,
.pf-modal__media > .gal > video { max-height: 84vh; }
.pf-modal__media iframe { aspect-ratio: 16 / 9; }

.pf-modal__info { padding: clamp(24px, 3.5vw, 38px); }

.pf-modal__meta {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.pf-modal__title {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin-top: 12px;
}

.pf-modal__brand { color: var(--fg-2); font-size: var(--t-sm); margin-top: 8px; }

.pf-modal__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.pf-modal__tags span {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px 10px;
  color: var(--fg-2);
}

.pf-modal__desc {
  margin-top: 20px;
  color: var(--fg-2);
  font-size: var(--t-sm);
  line-height: 1.68;
  white-space: pre-line;
}
.pf-modal__desc:empty { display: none; }

.pf-modal__info .btn { margin-top: 26px; }

/* Gallery navigation */
.gal { position: relative; width: 100%; }
.gal__slide { display: none; width: 100%; }
.gal__slide.is-on { display: block; }

.gal__nav {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
}

.gal__btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(244, 242, 238, .22);
  background: rgba(17, 17, 20, .72);
  backdrop-filter: blur(8px);
  color: #F4F2EE;
  display: grid; place-items: center;
  cursor: pointer;
}
.gal__btn svg { width: 13px; height: 13px; }

.gal__dots { display: flex; gap: 6px; }
.gal__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(244, 242, 238, .32);
  cursor: pointer;
}
.gal__dot.is-on { background: var(--accent); }
