/* MEMBERS Page */

.members-page {
  max-width: 1100px;
}

/* Hero */
.members-hero {
  margin-bottom: 32px;
}

.members-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
}

/* Sticky quick nav */
.member-nav {
  display: flex;
  gap: 8px;
  padding: 8px;
  margin-bottom: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow-x: auto;
  position: sticky;
  top: calc(var(--banner-height, 0px) + var(--nav-height, 64px) + 12px);
  z-index: 50;
  scrollbar-width: none;
}

.member-nav::-webkit-scrollbar { display: none; }

.member-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: var(--transition);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.member-nav-item:hover {
  color: var(--text-primary);
  background: var(--surface-muted);
}

.member-nav-item.active {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--member-color) 12%, transparent);
  border-color: color-mix(in srgb, var(--member-color) 40%, transparent);
}

.member-nav-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--member-color);
  flex-shrink: 0;
}

.member-nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Profile cards */
.member-profiles {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 48px;
}

.member-profile {
  scroll-margin-top: calc(var(--banner-height, 0px) + var(--nav-height, 64px) + 80px);
}

.member-profile-inner {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-top: 3px solid var(--member-color);
  transition: var(--transition);
}

.member-profile.is-highlight .member-profile-inner {
  box-shadow: 0 0 0 2px var(--member-color), 0 16px 48px rgba(0, 0, 0, 0.35);
}

.member-profile.reverse .member-profile-inner {
  direction: rtl;
}

.member-profile.reverse .member-detail-col,
.member-profile.reverse .member-photo-col {
  direction: ltr;
}

/* Photo column */
.member-photo-col {
  position: relative;
  background: var(--surface-muted);
}

.member-photo-frame {
  position: relative;
  height: 100%;
  min-height: 380px;
  overflow: hidden;
}

.member-photo-lg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.member-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    transparent 45%
  );
  pointer-events: none;
}

.member-color-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--member-color);
}

/* Detail column */
.member-detail-col {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.member-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.member-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.member-profile-meta {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.member-profile-meta .member-follower-count {
  color: var(--text-muted);
}

.member-name-block h2 a.member-profile-link {
  color: inherit;
  text-decoration: none;
}

.member-name-block h2 a.member-profile-link:hover {
  color: var(--member-color);
}

.member-profile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  align-self: flex-start;
}

.member-name-block h2 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 900;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.member-kr {
  display: block;
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

.member-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.color-badge {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.06em;
}

.color-badge[style*="2B2B2B"],
.color-badge[style*="#2B2B2B"] {
  border: 1px solid #555;
}

.role-badge {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.role-badge.leader {
  background: rgba(230, 57, 70, 0.2);
  color: var(--cortis-red);
  border: 1px solid rgba(230, 57, 70, 0.4);
}

.role-badge.maknae {
  background: rgba(255, 214, 10, 0.15);
  color: var(--cortis-yellow);
  border: 1px solid rgba(255, 214, 10, 0.35);
}

.member-bio {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* Info grid */
.member-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-cell {
  padding: 12px 14px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--member-color);
}

.info-cell dt {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.info-cell dd {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
}

/* Facts */
.member-facts h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--member-color);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.facts-icon {
  display: flex;
  color: var(--member-color);
}

.member-facts ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-facts li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 14px 10px 28px;
  position: relative;
  line-height: 1.6;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}

.member-facts li::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--member-color);
}

/* Color strip */
.member-colors-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}

.color-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  text-align: center;
}

.color-strip-item:hover {
  border-color: var(--chip-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.color-strip-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--chip-color);
  box-shadow: 0 0 12px color-mix(in srgb, var(--chip-color) 50%, transparent);
}

.color-strip-item span {
  font-size: 12px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.color-strip-item small {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Group Info */
.group-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.group-info-grid h3 {
  font-size: 12px;
  font-weight: 800;
  color: var(--cortis-green);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.group-info-grid p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.group-info-grid em {
  color: var(--cortis-pink);
  font-style: normal;
}

/* Light theme */
[data-theme="light"] .member-photo-overlay {
  background: linear-gradient(
    to top,
    rgba(42, 37, 35, 0.4) 0%,
    transparent 45%
  );
}

/* Responsive */
@media (max-width: 860px) {
  .member-profile-inner,
  .member-profile.reverse .member-profile-inner {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .member-photo-frame {
    min-height: 320px;
    max-height: 420px;
  }

  .member-detail-col {
    padding: 24px 20px;
  }

  .member-head-actions {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .member-colors-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .member-nav {
    border-radius: var(--radius-md);
  }

  .member-nav-name { display: none; }

  .member-nav-item {
    padding: 4px;
  }

  .member-nav-thumb {
    width: 40px;
    height: 40px;
  }

  .member-info-grid {
    grid-template-columns: 1fr;
  }

  .member-colors-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .group-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .member-profile.is-highlight .member-profile-inner {
    box-shadow: 0 0 0 2px var(--member-color);
  }
}
