/* contributors.css (page-specific)
   Matches the classic cream/gold theme defined in style.css.
*/

.contributors-page .contributors-section {
  padding-top: 4.25rem;
}

.contributors-page .contributors-section > p {
  margin-bottom: 2.1rem;
}

.contributors-status {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-secondary);
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 0.98rem;
  min-height: 1.5rem;
}

.contributors-status.is-error {
  color: #a12b2b;
}

.contributors-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

@media (min-width: 1100px) {
  .contributors-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  }
}

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

.contributor-card {
  position: relative;
  border-radius: 18px;
  padding: 1.35rem 1.35rem 1.15rem;
  background: rgb(255 255 255 / 92%);
  box-shadow: var(--shadow-main);
  border: 1px solid rgb(212 175 55 / 22%);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contributor-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(900px circle at 0% 0%, rgb(212 175 55 / 14%), transparent 45%),
    radial-gradient(700px circle at 100% 0%, rgb(27 38 59 / 10%), transparent 45%);
  pointer-events: none;
}

.contributor-card.is-visible {
  animation: oscFadeUp 0.5s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .contributor-card {
    transition: none;
  }
  .contributor-card.is-visible {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .contributor-skeleton .sk {
    animation: none;
  }
}

.contributor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.contributor-card-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.contributor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgb(212 175 55 / 55%);
  box-shadow: 0 8px 18px rgb(0 0 0 / 10%);
  flex: 0 0 auto;
}

.contributor-main {
  flex: 1;
  min-width: 0;
}

.contributor-name {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: var(--deep-navy);
  font-size: 1.25rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contributor-meta {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.contributor-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 0.82rem;
  color: var(--deep-navy);
  background: linear-gradient(135deg, rgb(212 175 55 / 14%), rgb(184 134 11 / 10%));
  border: 1px solid rgb(212 175 55 / 24%);
  white-space: nowrap;
}

.contributor-chip.is-bot {
  background: linear-gradient(135deg, rgb(27 38 59 / 12%), rgb(212 175 55 / 10%));
}

.contributor-actions {
  flex: 0 0 auto;
}

.contributor-github {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--deep-navy);
  background: rgb(255 255 255 / 90%);
  border: 1px solid rgb(212 175 55 / 24%);
  transition: transform 0.2s ease, background 0.2s ease;
}

.contributor-github:hover {
  transform: scale(1.06);
  background: rgb(255 248 231 / 95%);
}

/* Skeleton loading */
@keyframes oscShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.contributor-skeleton {
  border-radius: 18px;
  padding: 1.35rem;
  background: rgb(255 255 255 / 92%);
  box-shadow: var(--shadow-main);
  border: 1px solid rgb(212 175 55 / 22%);
}

.contributor-skeleton .sk {
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgb(212 175 55 / 10%) 25%,
    rgb(212 175 55 / 18%) 37%,
    rgb(212 175 55 / 10%) 63%
  );
  background-size: 400% 100%;
  animation: oscShimmer 1.1s ease infinite;
}

.contributor-skeleton .sk.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.contributor-skeleton .sk.line1 {
  height: 14px;
  width: 65%;
  margin: 0.25rem 0 0.7rem;
}

.contributor-skeleton .sk.line2 {
  height: 12px;
  width: 45%;
}

@media (max-width: 720px) {
  .contributors-page .contributors-section {
    padding-top: 3.5rem;
  }
  .contributors-grid {
    gap: 1rem;
  }
  .contributor-card {
    padding: 1.1rem;
  }
  .contributor-card-inner {
    flex-direction: column;
    text-align: center;
  }
  .contributor-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
  .contributor-meta {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .contributor-avatar {
    width: 58px;
    height: 58px;
  }
  .contributor-name {
    font-size: 1.15rem;
  }
}

.hero h1 {
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--glow);
  text-shadow: 0 0 10px rgb(0 247 255 / 50%);
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
}

.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgb(0 247 255 / 10%);
}

.stat-card h3 {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--glow);
  font-family: 'Orbitron', monospace;
}

.project-lead {
  position: relative;
  background: var(--secondary);
  padding: 2rem;
  border-radius: 12px;
  border: 2px solid var(--glow);
  margin: 2rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lead-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffc107;
  color: #000;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 0 10px rgb(255 193 7 / 50%);
}

.lead-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glow);
  box-shadow: 0 0 20px rgb(0 247 255 / 30%);
}

.project-lead h2 {
  font-size: 1.8rem;
  margin: 0.5rem 0;
}

.project-lead p {
  color: var(--muted);
  max-width: 400px;
}

.top-contributors {
  margin: 2rem 0;
}

.top-contributors h2 {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--glow);
  position: relative;
}

.top-contributors h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--glow);
  border-radius: 2px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contributor-card {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contributor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgb(0 247 255 / 10%);
  border-color: var(--glow);
}

.contributor-card.highlighted {
  border: 2px solid #ffc107;
  box-shadow: 0 0 20px rgb(255 193 7 / 50%);
}

.contributor-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 2px solid var(--glow);
}

.contributor-card .username {
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contributor-card .stats {
  background: rgb(0 247 255 / 10%);
  padding: 0.5rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-family: 'Orbitron', monospace;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination button {
  background: var(--secondary);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination button:hover {
  background: rgb(0 247 255 / 10%);
  color: var(--glow);
}

.pagination button:disabled {
  opacity: 50%;
  cursor: not-allowed;
}

.recent-activity {
  margin: 2rem 0;
}

.recent-activity h2 {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--glow);
  position: relative;
}

.recent-activity h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--glow);
  border-radius: 2px;
}

.activity-container {
  background: var(--secondary);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.activity-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 1rem;
  object-fit: cover;
}

.activity-item .details {
  flex: 1;
}

.activity-item .author {
  font-weight: bold;
  color: var(--glow);
  margin-right: 0.5rem;
}

.activity-item .date {
  color: var(--muted);
  font-size: 0.9rem;
}

.contribute-section {
  margin: 3rem 0;
  text-align: center;
}

.contribute-section h2 {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--glow);
  position: relative;
}

.contribute-section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--glow);
  border-radius: 2px;
}

.contribute-section p {
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contribute-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgb(0 247 255 / 10%);
}

.step-card .icon {
  font-size: 2.5rem;
  color: var(--glow);
  margin-bottom: 1rem;
}

.step-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.step-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (width <= 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .contributor-card {
    padding: 1rem;
  }

  .contributor-card img {
    width: 60px;
    height: 60px;
  }

  .activity-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .activity-item .avatar {
    margin-right: 0;
  }

  .contribute-steps {
    grid-template-columns: 1fr;
  }
}