.portfolio-header {
  text-align: center;
  margin-bottom: 60px;
  margin-top: 100px;
}

.portfolio-header h2 {
  font-size: clamp(30px, 4vw, 50px);
  margin-bottom: 12px;
}

.portfolio-header p {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== PROJECTS ===== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.project-card {
  background: #101722;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.35s;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 159, 67, 0.5);
}

.project-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: 0.5s;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-info {
  padding: 22px;
}

.project-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.project-info p {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== MODAL ===== */

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  opacity: 0;
  pointer-events: none;

  transition: 0.3s;
}

.gallery-modal.active {
  opacity: 1;
  pointer-events: all;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.gallery-content {
  position: relative;

  width: min(1400px, 95%);
  max-height: 90vh;

  overflow-y: auto;

  margin: 40px auto;
  z-index: 2;
}

.gallery-content h3 {
  margin-bottom: 25px;
  font-size: 32px;
}

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

.gallery-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;

  border-radius: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.03);
}

.gallery-close {
  position: fixed;
  top: 20px;
  right: 30px;

  background: none;
  color: white;

  font-size: 50px;
  z-index: 10;
}

/* ===== MOBILE ===== */

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .project-card img {
    height: 220px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-content h3 {
    font-size: 24px;
  }
}
.gallery-content {
  max-height: 90vh;
  overflow-y: auto;

  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
}

.gallery-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.image-viewer {
  position: fixed;
  inset: 0;

  z-index: 10000;

  opacity: 0;
  pointer-events: none;

  transition: 0.3s;
}

.image-viewer.active {
  opacity: 1;
  pointer-events: all;
}

.viewer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

#viewerImage {
  position: absolute;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  max-width: 90%;
  max-height: 90%;

  border-radius: 12px;
}

.viewer-prev,
.viewer-next {
  position: absolute;
  top: 50%;

  transform: translateY(-50%);

  width: 60px;
  height: 60px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.1);
  color: white;

  font-size: 30px;

  z-index: 2;
}

.viewer-prev {
  left: 30px;
}

.viewer-next {
  right: 30px;
}

.viewer-close {
  position: absolute;

  top: 20px;
  right: 30px;

  background: none;

  color: white;

  font-size: 50px;

  z-index: 2;
}
