/* Container */
.board {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
}

/* Member */
.member {
  flex: 0 0 calc(25% - 20px); /* 4 per row */
  cursor: pointer;
  text-align: center;
}

/* Image */
.member img {
  max-width: 250px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: 0.3s;
}

.member img:hover {
  transform: scale(1.03);
}

/* Popup */
.popup {
  position: fixed;
  top: 5rem;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
}

/* Popup content */
.popup-content {
  background: white;
  padding: 10px;
  position: relative;
  /*display: inline-block;   /* ✅ shrink to fit content */
  max-width: 90vw;         /* prevent overflow */
  max-height: 90vh;
  border-radius: 10px;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 22px;
  cursor: pointer;
  font-weight: bold;
}

/* Bio image (NEW) */
.popup img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;      /* ✅ natural width */
  height: auto;     /* ✅ natural height */
  object-fit: contain;
}

/* Responsive */
@media (max-width: 900px) {
  .member {
    flex: 0 0 calc(50% - 20px); /* 2 per row */
  }
}

@media (max-width: 500px) {
  .member {
    flex: 0 0 100%; /* 1 per row */
  }
}
