* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  background: #fdfcf7;
  color: #333;
  display: flex;
  flex-direction: column;
}

header {
  background: linear-gradient(to right, #fffaf0, #fdf6e3);
  padding: 6px 0;
  text-align: center;
  border-bottom: 1px solid #e2dbc8;
}

header h1 {
  font-size: 24px;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

main {
  flex: 1;
  padding: 20px 5%;
  overflow-y: auto;
}

.profile {
  display: flex;
  align-items: flex-start;
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  gap: 20px;
}

.profile-img,
.card-img {
  width: 140px;
  height: 140px;
  border-radius: 15px;
  object-fit: cover;
  border: 2px solid #fdf9ec;
  box-shadow: 0 0 0 3px #ccc, 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-img {
  cursor: pointer;
}

.profile-details {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 30px;
  width: 100%;
}

.profile-details h2 {
  font-size: 22px;
  margin: 0;
  border-right: 2px solid #ccc;
  padding-right: 20px;
  height: 140px;
  line-height: 140px;
}

.info-grid {
  display: flex;
  gap: 30px;
  justify-content: space-around;
  flex: 1;
}

.info-grid .column p {
  margin: 10px 0;
}

.card-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.index-card-section {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1800px;
  margin: 0 auto;
}

.team-card-section {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  flex: 1;
  min-width: 250px;
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.index-card {
  min-width: 500px;
  max-width: 600px;
}

.card h2 {
  font-size: 18px;
  color: #2c3e50;
  margin: 10px 0;
}

.card p {
  margin: 8px 0;
}

.card ul {
  list-style: square;
  padding-left: 20px;
}

.card ul li {
  margin: 8px 0;
}

.nested-box {
  border: 1px solid #e2dbc8;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
}

.team-member {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.team-member .image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-member .profile-details h2 {
  border-right: none;
  padding-right: 0;
  height: auto;
  line-height: normal;
  margin: 10px 0;
}

.image-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.github-caption,
.card-caption,
.nav-caption {
  font-size: 13px;
  color: #777;
  text-align: center;
  margin-top: 5px;
}

.card-caption:hover {
  color: #2c3e50;
}

.study-link a {
  font-size: 14px;
  color: #2c3e50;
  text-decoration: none;
  transition: transform 0.3s ease, color 0.3s ease;
}

.study-link a:hover {
  transform: scale(1.05);
  color: #1a252f;
}

.nav-links {
  text-align: center;
  padding: 15px 0 5px;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
}

.nav-item a img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.nav-item a img:hover {
  transform: scale(1.08);
}

.nav-title {
  margin-top: 10px;
  font-weight: bold;
  font-size: 15px;
  color: #333;
}

footer {
  text-align: center;
  padding: 6px;
  background: #fdf9ec;
  color: #333;
  font-size: 14px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  display: block;
  margin: 5% auto;
  max-width: 80%;
  max-height: 80%;
  border-radius: 15px;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #ccc;
}

.review-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}

@media (max-width: 768px) {
  .profile,
  .team-member,
  .review-body,
  .review-content {
    flex-direction: column;
    align-items: center;
  }

  .profile-img,
  .card-img {
    margin: 0 auto 15px;
  }

  .profile-details,
  .info-grid,
  .index-card-section,
  .team-card-section {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .profile-details h2 {
    border-right: none;
    padding-right: 0;
    height: auto;
    line-height: normal;
  }

  .nav-buttons {
    flex-direction: column;
    gap: 20px;
  }

  .nav-item a img {
    width: 170px;
    height: 170px;
  }

  .index-card {
    min-width: 300px;
    max-width: 100%;
  }
}
