@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@800&family=Titan+One&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@800&family=Titan+One&display=swap");

.portfolio-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.portfolio-card {
  width: 300px;
  margin: 20px;
  border: 2px solid #000;
  border-radius: 15px;
  overflow: hidden;
  background-color: #f9f0df;
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

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

.portfolio-img {
  max-width: 100%;
  max-height: 210px;
  padding: 15px;
  display: block;
  margin: 0 auto;
}

.portfolio-details {
  padding: 15px;
  text-align: center;
}

.portfolio-img-container {
  height: 200px;
  overflow: hidden;
  display: flex;
  margin-top: 10px;
  justify-content: center;
  align-items: center;
}

.project-title {
  font-family: "Lexend", sans-serif;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-description {
  font-family: "Lexend", sans-serif;
  font-size: 14px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.portfolio-modal-container {
  width: 85%;
  max-width: 700px;
  height: 80vh;
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  border: 2px solid black;
  border-radius: 15px;
  overflow: hidden;
}

.portfolio-modal-content {
  height: 100%;
  overflow-y: auto;
  margin: auto;
  padding: 20px;
  box-sizing: border-box;
  background-color: #fff;
  position: relative;
  background-color: #f9f0df;
  text-align: center;
  border-radius: 15px;
}

.close-portfolio-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #000;
  cursor: pointer;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-portfolio-modal:hover,
.close-portfolio-modal:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.portfolio-modal-details {
  text-align: center;
}

.portfolio-modal-title {
  font-family: "Lexend", sans-serif;
  font-size: 24px;
  margin: 0;
  margin-bottom: 10px;
}

.portfolio-modal-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 15px;
}

.portfolio-card-description {
  font-family: "Lexend", sans-serif;
  font-size: 16px;
  color: #666;
}

.portfolio-modal-link {
  font-family: "Lexend", sans-serif;
  font-size: 14px;
  text-decoration: none;
  display: block;
  margin: 10px;
  transition: color 0.3s ease;
}

.portfolio-modal-link:hover {
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .portfolio-container {
    margin-top: 90px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .portfolio-modal-image-container {
    border: 1px solid black;
  }

  .portfolio-card {
    border: 1px solid #000;
  }

  .portfolio-modal-container {
    border: 1px solid black;
    z-index: 5;
    width: 85%;
    max-width: 700px;
    max-height: 320px;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 15px;
    overflow: hidden;
  }

  .portfolio-modal-details {
    padding: 10px;
  }

  .portfolio-modal-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .portfolio-modal-img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
  }

  .portfolio-card-description {
    font-size: 14px;
  }

  .close-portfolio-modal {
    font-size: 20px;
  }
}
