.team {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.team .hero {
  padding-top: 4rem;
  padding-bottom: 2rem;
}

/* Make "MEET THE" and "TEAM" smaller on team page */
.hero h1 small {
  font-size: 0.45em;
  letter-spacing: 0.15em;
}

/* Normalize spacing around small text in team hero */
.hero h1 small {
  display: block;
  line-height: 1;
  margin: 0.35em 0;
}

/* Team page title spacing fix */
.team-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
}

.team-title .title-top,
.team-title .title-bottom {
  font-size: 0.3em;
  letter-spacing: 0.15em;
  color: #888;
}

.team-title .title-main {
  line-height: 1;
}

/* TEAM GRID */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 350px);
  gap: 2rem;
  margin-top: 0rem;
  justify-content: center;
}

/* TEAM CARD */
.team-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.team-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.06);
}

.team-card img {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.team-card h3 {
  margin: 0.5rem 0 0.2rem;
}

.team-card .role {
  font-size: 0.9rem;
  color: #aaa;
}

/* MODAL OVERLAY */
.portfolio-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* MODAL CONTENT */
.modal-content {
  background: #0f0f14;
  padding: 2.5rem;
  border-radius: 22px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: modalFade 0.4s ease;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-role {
  color: #888;
  margin-bottom: 1.5rem;
}

/* CLOSE BUTTON */
.close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.8rem;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: white;
}

/* PORTFOLIO LIST */
.portfolio-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.portfolio-list li {
  padding: 0.4rem 0;
  color: #ddd;
}

.work-cta {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  text-align: center;
}

.work-cta a {
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #aaa;
  text-decoration: none;
  cursor: pointer;
}

.work-cta a::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin: 6px auto 0;
  background: linear-gradient(90deg, #9b84cc, #d89a8f, #f4bc4c);
  transition: width 0.35s ease;
}

.work-cta a:hover {
  color: white;
}

.work-cta a:hover::after {
  width: 100%;
}

/* SOCIAL LINKS IN MODAL */
.social-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.social-btn {
  font-size: 0.7rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;

  padding: 0.35rem 1.1rem;
  line-height: 1;

  border-radius: 999px;
  border: 1px solid #333;

  color: #ccc;
  text-decoration: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition: color 0.25s ease, border-color 0.25s ease,
    background-color 0.25s ease, transform 0.2s ease;
}

.social-btn:hover {
  color: white;
  border-color: #f4bc4c;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

/* === MOBILE & SMALL SCREEN SUPPORT === */
@media (max-width: 768px) {
  /* HERO */
  .hero {
    height: auto !important;
    padding: 3rem 0 2rem;
  }

  .team-title .title-top,
  .team-title .title-bottom {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
  }

  /* TEAM GRID */
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .team-card {
    padding: 1.25rem;
  }

  .team-card img {
    max-height: 260px;
    object-fit: cover;
  }

  /* TEXT SIZES */
  .team-card h3 {
    font-size: 1.1rem;
  }

  .team-card .role {
    font-size: 0.85rem;
  }

  /* MODAL */
  .modal-content {
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.75rem;
  }

  .modal-content h2 {
    font-size: 1.4rem;
  }

  .modal-role {
    font-size: 0.9rem;
  }

  /* SOCIAL BUTTONS */
  .social-links {
    gap: 0.5rem;
  }

  .social-btn {
    font-size: 0.65rem;
    padding: 0.6rem 1.2rem;
  }

  /* BACK LINK */
  .work-cta {
    margin: 2.5rem 0 3rem;
  }
}
