/* =========================================
   1. GLOBAL RESET & TYPOGRAPHY
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background-color: #1a1d21; /* Deep Slate Background */
  color: #e4e6eb; /* Soft White Text */
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
header {
  background-color: rgba(33, 37, 41, 0.95); /* Semi-transparent surface */
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #2f3336;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

header .highlight {
  color: #a29bfe; /* Lavender Accent */
}

.nav-link {
  color: #b0b3b8;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #a29bfe;
  text-shadow: 0 0 10px rgba(162, 155, 254, 0.3);
}

/* =========================================
   3. GALLERY LAYOUT
   ========================================= */
.gallery-container {
  padding: 60px 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto; /* Center the container */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-group {
  width: 100%;
  margin-bottom: 60px;
}

.group-title {
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 30px;
  padding-left: 20px;
  border-left: 5px solid #a29bfe; /* Lavender bar */
  font-weight: 700;
  letter-spacing: -0.5px;
}

.gallery {
  display: grid;
  /* Auto-fit for responsive cards */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  width: 100%;
}

/* =========================================
   4. AVATAR CARDS
   ========================================= */
.avatar-card {
  background-color: #212529; /* Card Surface */
  border: 1px solid #2f3336; /* Subtle Border */
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Image styling */
.avatar-card img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Ensures square images */
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
  transition: transform 0.4s ease;
  background-color: #1a1d21; /* Placeholder color */
}

/* Text styling */
.avatar-card p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e4e6eb;
  text-align: center;
}

/* Hover Effects */
.avatar-card:hover {
  transform: translateY(-8px); /* Smooth lift up */
  border-color: #a29bfe; /* Lavender Border on hover */
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(162, 155, 254, 0.1); /* Glow */
}

.avatar-card:hover img {
  transform: scale(1.03); /* Subtle zoom */
}

/* Remove the old 'tiltRotate' animation for a cleaner look */

/* =========================================
   5. MODAL (POPUP)
   ========================================= */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8); /* Darker overlay */
  backdrop-filter: blur(8px); /* Strong blur behind modal */
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: #212529;
  border: 1px solid #3e4042;
  padding: 20px;
  border-radius: 20px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Close Button (X) */
.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  color: #b0b3b8;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
  z-index: 10;
  background: rgba(33, 37, 41, 0.8);
  padding: 5px 10px;
  border-radius: 50%;
}

.close:hover {
  color: #a29bfe;
}

/* Modal Animations */
@keyframes modalPop {
  0% {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* =========================================
   6. BUTTONS (CTA)
   ========================================= */
.cta-button {
  display: inline-block;
  margin-top: 20px;
  background-color: #a29bfe;
  color: #1a1d21; /* Dark text for contrast */
  padding: 12px 30px;
  border-radius: 50px; /* Pill shape */
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
  box-shadow: 0 4px 15px rgba(162, 155, 254, 0.3);
}

.cta-button:hover {
  background-color: #b2adff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(162, 155, 254, 0.5);
}

/* =========================================
   7. FOOTER (Matching Main Page)
   ========================================= */
footer {
  text-align: center;
  padding: 40px 20px;
  background-color: #0d0f10; /* Slightly darker than body */
  border-top: 1px solid #2f3336;
  margin-top: auto;
}

footer h3 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

footer .social-links {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

footer .social-links a {
  color: #b0b3b8;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

footer .social-links a:hover {
  color: #a29bfe;
}

/* =========================================
   8. RESPONSIVENESS
   ========================================= */
@media screen and (max-width: 768px) {
  header {
    padding: 15px 20px;
  }

  header h1 {
    font-size: 1.2rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
    gap: 15px;
  }
}

@media screen and (max-width: 480px) {
  header {
    flex-direction: column;
    gap: 10px;
  }

  .gallery {
    grid-template-columns: 1fr; /* 1 column on mobile */
  }

  .group-title {
    font-size: 1.5rem;
  }
}
