/* 1. CLOUD FONTS IMPORT */
@import url('https://cdnfonts.com');
@import url('https://googleapis.com');
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

#portfolio-section {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 2rem 8rem;
  box-sizing: border-box;
  background-color: #000000;
  font-family: "Press Start 2P", cursive;
}

.portfolio-heading {
  font-family: "Press Start 2P", cursive;
  text-align: center;
  color: #ffffff;
  font-size: 3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3.5rem;
  opacity: 0.95;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease,
              border-color 0.3s ease;
}

.portfolio-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
  transition: transform 0.6s ease, filter 0.6s ease;
}

.portfolio-card:hover img {
  transform: scale(1.06);
  filter: grayscale(0%);
}

.portfolio-card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0) 100%);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.portfolio-card:hover .portfolio-card-overlay {
  transform: translateY(0);
}

.portfolio-card-title {
  font-family: "Anton", sans-serif;
  color: #ffffff;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
}

.portfolio-card-category {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0.2rem 0 0;
}

/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  box-sizing: border-box;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.06);
}

.lightbox-caption {
  font-family: "Anton", sans-serif;
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-close {
  top: 1.5rem;
  right: 2rem;
  font-size: 2.2rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  padding: 0.5rem 1rem;
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}

@media (max-width: 600px) {
  .portfolio-heading {
    font-size: 1.6rem;
  }

  #portfolio-section {
    padding: 3.5rem 1rem 5rem;
  }

  .lightbox-nav {
    font-size: 1.3rem;
  }
}

/* ---------------- Scroll-down indicator ---------------- */
/* Sits inside #welcome-section. If your hero section isn't already
   position: relative and full-height, add these two lines to its
   existing rule in style.css:
     #welcome-section { position: relative; min-height: 100vh; }
*/

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.scroll-indicator:hover {
  color: #ffffff;
}

.scroll-indicator-text {
  font-family: "Anton", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.scroll-indicator-arrow {
  font-size: 1.1rem;
  animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(10px);
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .scroll-indicator {
    bottom: 1.5rem;
  }
}

/* ---------------- Scroll-progress rail (artwork section hint) ---------------- */

.scroll-progress-rail {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 140px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.scroll-progress-rail.is-active {
  opacity: 1;
}

.scroll-progress-fill {
  width: 100%;
  height: 0%;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  transition: height 0.15s linear;
}

@media (max-width: 900px) {
  .scroll-progress-rail {
    display: none;
  }
}