/* Portfolio slider + overlay: structure only. Each design option styles the look
   through these custom properties and its own rules. */
.pf {
  --pf-height: clamp(220px, 32vw, 420px);
  --pf-gap: 24px;
  --pf-duration: 60s;
  display: grid;
  gap: var(--pf-gap);
}
/* Clip only the sides, so items can lift or grow on hover without losing their top.
   Browsers without overflow: clip ignore those lines and keep hidden. */
.pf, .pf-row { overflow: hidden; overflow-x: clip; overflow-y: visible; }
.pf-track {
  display: flex;
  gap: var(--pf-gap);
  width: max-content;
  padding-right: var(--pf-gap);
}
.pf-item {
  flex: none;
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}
.pf-item img {
  display: block;
  height: var(--pf-height);
  width: auto;
}
.pf-caption { display: grid; gap: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .pf-track { animation: pf-scroll var(--pf-duration) linear infinite; will-change: transform; }
  .pf-row--reverse .pf-track { animation-direction: reverse; }
  .pf-row:focus-within .pf-track { animation-play-state: paused; }
}
/* Pause on hover with a mouse only: on a phone a tap leaves :hover stuck and the row would stop */
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .pf-row:hover .pf-track { animation-play-state: paused; }
}
@keyframes pf-scroll {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .pf-row { overflow-x: auto; }
  .pf-item[aria-hidden="true"] { display: none; }
}

/* Overlay */
.pf-dialog {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}
.pf-dialog::backdrop { background: rgba(8, 10, 16, 0.88); backdrop-filter: blur(6px); }
.pf-dialog[open] { display: grid; place-items: center; }
.pf-figure {
  margin: 0;
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 72px 16px 32px;
}
.pf-figure img {
  max-width: min(92vw, 1400px);
  max-height: calc(100dvh - 180px);
  width: auto;
  height: auto;
  display: block;
}
.pf-figure figcaption { text-align: center; display: grid; gap: 4px; }
.pf-figure .pf-title { font-weight: 600; font-size: 1.125rem; }
.pf-figure .pf-meta { opacity: 0.7; font-size: 0.9375rem; }
.pf-btn {
  position: fixed;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.pf-btn:hover { background: rgba(255, 255, 255, 0.15); }
.pf-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.pf-close { top: 16px; right: 16px; }
.pf-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.pf-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 680px) {
  .pf-prev, .pf-next { top: auto; bottom: 16px; transform: none; }
}
