/* ==========================================================================
   PORTFOLIO SECTION — Full-image horizontal scroll gallery
   ========================================================================== */

.portfolio-section {
  background-image: radial-gradient(circle 700px at 12% 100%, rgba(122, 14, 34, 0.105) 0%, transparent 68%),
                     radial-gradient(circle 700px at 90% 0%, rgba(200, 16, 46, 0.088) 0%, transparent 68%);
  background-color: #0D0707;
  padding: var(--section-pad-y) 0;
  overflow: hidden;
}

.portfolio__header {
  text-align: center;
  margin-bottom: var(--sp-3xl);
  padding: 0 var(--sp-lg);
}

.portfolio__header .section-label {
  color: var(--c-primary);
  opacity: 0.85;
  display: inline-flex;
  margin-bottom: var(--sp-md);
}

.portfolio__headline {
  font-family: var(--ff-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-extrabold);
  color: #fff;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  text-transform: uppercase;
  margin: 0;
}

/* -- Track ------------------------------------------------------------------ */
.portfolio-track-outer {
  overflow-x: auto;
  overflow-y: visible;
  padding: var(--sp-lg) var(--sp-2xl) var(--sp-2xl);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.portfolio-track-outer::-webkit-scrollbar { display: none; }

.portfolio-track {
  display: flex;
  gap: 20px;
  width: max-content;
  align-items: center;
}

/* -- Post Card -------------------------------------------------------------- */
.post-card {
  flex-shrink: 0;
  width: 260px;
  scroll-snap-align: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #170D0C;
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  position: relative;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.3s ease;
}

@media (min-width: 640px)  { .post-card { width: 280px; } }
@media (min-width: 1024px) { .post-card { width: 300px; } }

.post-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,0.7), 0 0 0 1px rgba(200,16,46,0.3);
  border-color: rgba(200,16,46,0.2);
}

/* Image shown fully — no crop */
.post-card__img-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #120908;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.post-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
}

.post-card:hover .post-card__img {
  transform: scale(1.04);
}

/* Zoom hint overlay */
.post-card__zoom {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.post-card__zoom-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(200,16,46,0.85);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-spring);
  pointer-events: none;
}

.post-card__zoom-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
}

.post-card:hover .post-card__zoom { background: rgba(0,0,0,0.25); }
.post-card:hover .post-card__zoom-btn {
  opacity: 1;
  transform: scale(1);
}

/* -- Portfolio nav ---------------------------------------------------------- */
.portfolio-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: var(--sp-lg);
  padding: 0 var(--sp-lg);
}

.portfolio-nav button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.portfolio-nav button:hover {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.portfolio-nav button svg {
  width: 18px; height: 18px;
  stroke: currentColor; stroke-width: 2; fill: none;
}

.portfolio-counter {
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.3);
  min-width: 60px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.portfolio-caption {
  text-align: center;
  margin-top: var(--sp-xl);
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.3);
  font-style: italic;
  padding: 0 var(--sp-lg);
}

/* -- Lightbox -------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 3, 6, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active { opacity: 1; visibility: visible; }

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover { color: #fff; transform: scale(1.1); }

.lightbox__close {
  top: 24px; right: 24px;
  font-size: 40px; width: 48px; height: 48px; z-index: 2;
}

.lightbox__nav {
  top: 50%; transform: translateY(-50%);
  font-size: 40px; padding: 24px; z-index: 2;
}

.lightbox__nav:hover { transform: translateY(-50%) scale(1.1); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

.lightbox__content {
  position: relative;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), opacity 0.4s ease;
}

.lightbox.active .lightbox__content img {
  transform: scale(1);
  opacity: 1;
}

/* Counter in lightbox */
.lightbox__counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  z-index: 2;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) { .lightbox__nav { display: none; } }

/* -- Global Scrollbar ------------------------------------------------------- */
:root {
  scrollbar-width: thin;
  scrollbar-color: var(--c-primary) transparent;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-primary); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-primary-hover); }
