/* ===== PORTFOLIO GRID ===== */
.portfolio {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.portfolio img {
  width: 250px;
  height: 250px;
  object-fit: cover; /* prevents stretching */
  cursor: pointer;
}

/* ===== LIGHTBOX ===== */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border: 5px ridge #fff;

  user-select: none;
  -webkit-user-drag: none;
  transform: translateZ(0);
}

#close {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

/* Mobile friendly */
@media (max-width: 700px) {
  .portfolio img {
    width: 45%;
  }
}

.thumb {
  width: 180px;
  height: 120px;
  border: 3px solid #000;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;

  user-select: none;
  -webkit-user-drag: none;
}

/* Desktop hover */
.thumb:hover img {
  transform: scale(1.2);
}

/* Mobile tap */
.thumb:active img {
  transform: scale(1.2);
}

.responsive {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.expanded-container{
  width:100%;
  display:flex;
  justify-content:center;
  margin:30px 0;
}

#expandedImg{
  max-width:600px;
  max-height:70vh;
  width:auto;
  height:auto;
  object-fit:contain;
}

/* The popup background */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  display: block;
  margin: auto;
  margin-top: 5%;
  max-width: 80%;
  max-height: 80vh;
}

.close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}
