/* ============================================================
   InternHub — People Page Styles
   ============================================================ */

.people-page {
  padding: 3rem 0 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  padding-left: 2.5rem;
  width: 260px;
}

/* ===== FILTER BAR ===== */
.people-filter-bar {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.people-filter-tab {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.people-filter-tab:hover {
  border-color: rgba(124,92,255,0.4);
  color: var(--text);
}

.people-filter-tab.active {
  background: rgba(124,92,255,0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== STATS ROW ===== */
.people-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.people-count-label {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

.online-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
}

/* ===== PEOPLE GRID ===== */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ===== PERSON CARD ===== */
.person-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.person-card:hover {
  border-color: rgba(124,92,255,0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

.person-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.person-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.person-card-meta {
  flex: 1;
  min-width: 0;
}

.person-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.person-role {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-company {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* School row */
.person-school-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Tags row */
.person-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Bio */
.person-bio {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Card footer */
.person-card-footer {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.person-card-footer .btn {
  flex: 1;
  justify-content: center;
}

/* Connected state */
.person-card.connected .connect-btn {
  background: rgba(34,197,94,0.1);
  border-color: var(--success);
  color: var(--success);
}

/* Empty state */
.people-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
}

.people-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.people-empty-title { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }

/* ===== CONNECT MODAL ===== */
.connect-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.connect-modal.open {
  display: flex;
}

.connect-modal-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  animation: modal-in 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-in {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.875rem;
  transition: all 0.15s;
  font-family: inherit;
}

.modal-close:hover { color: var(--text); border-color: var(--primary); }

.modal-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.modal-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.modal-sub {
  font-size: 0.9375rem;
  color: var(--muted);
}

.modal-bio {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.65;
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.modal-detail-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
}

.modal-detail-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.modal-detail-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.modal-actions .btn {
  justify-content: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
  }

  .search-input { width: 100%; }

  .people-grid {
    grid-template-columns: 1fr;
  }
}
