.portfolio-section {
  margin: 100px auto;
  width: 95%;
}

.title-title {
  display: flex;
  font-size: 5vw;
}

.title-title .title-text {
  color: #e1e1e1;
}


.portfolio-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(4, 1fr);
}

.portfolio-item {
  border-radius: 7px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  width: 100%;
}

.portfolio-item::after {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 7px;
  content: "";
  inset: 0;
  opacity: 1;
  pointer-events: none;
  position: absolute;
}

.portfolio-item:hover::after {
  background: rgba(0, 0, 0, 0);
  transition: all 0.3s ease;
}

.portfolio-item:hover {
  transform: scale(1.05);
  transition: all 0.3s ease;
  z-index: 10;
}

.portfolio-item img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.modal {
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  inset: 0;
  justify-content: center;
  align-items: center;
  opacity: 0;
  padding: 20px;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

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

.modal-content {
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-content img {
  border-radius: 15px;
  max-height: 700px;
  object-fit: contain;
  width: 100%;
}

.close-btn {
  color: #e6007d;
  cursor: pointer;
  font-size: 30px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 10px;
  transition: all 0.3s ease;
  z-index: 10;
}

.close-btn:hover {
  transform: scale(1.50);
  transition: all 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

body.gallery-hover::before {
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media screen and (max-width: 890px) {
  .portfolio-section {
    margin: 100px auto;
    width: 90%;
  }

  .title-title {
  display: flex;
  font-size: 10vw;
}

  .portfolio-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(3, 1fr);
  }

}

@media screen and (max-width: 500px) {
  .portfolio-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
  }
}
