.member-profile {
  max-width: 1080px;
  margin: 32px auto 72px;
  padding: 0 32px;
  min-height: 60vh;
}
.profile-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 16px;
  color: #aeb7c2;
  font-size: 14px;
}
.profile-back:hover { color: #72c8ff; }
.profile-header {
  overflow: hidden;
  background: #191d22;
  border: 1px solid #34383d;
  border-radius: 12px;
}
.profile-cover {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 112px;
  padding-right: 40px;
  background: #123248;
  overflow: hidden;
}
.profile-cover img { width: 160px; height: 160px; opacity: .22; }
.profile-identity {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
}
.profile-identity .profile-portrait {
  width: 112px;
  height: 112px;
  margin: -32px 0 0;
  position: relative;
  border: 6px solid #191d22;
  border-radius: 24px;
  background: #143a50;
  font-size: 44px;
}
.profile-name { min-width: 0; padding-top: 20px; }
.profile-name h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.profile-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 12px; }
.profile-role { color: #aeb7c2; }
.profile-online { display: inline-flex; align-items: center; gap: 6px; color: #a3ddc9; }
.profile-online > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.profile-edit-link { margin: 20px 0 0 auto; white-space: nowrap; }
.profile-about { padding: 24px 32px 28px; }
.profile-bio { max-width: 68ch; color: #d5dee9; font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.profile-bio p + p { margin-top: 12px; }
.profile-add-bio { color: #72c8ff; font-size: 14px; }
.profile-joined { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: #aeb7c2; font-size: 13px; }
.profile-joined:first-child { margin-top: 0; }
.profile-joined time { font-variant-numeric: tabular-nums; }
.profile-activity { margin-top: 32px; }
.profile-tabs { display: flex; gap: 24px; border-bottom: 1px solid #34383d; }
.profile-tabs a { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px 4px; border-bottom: 2px solid transparent; color: #aeb7c2; font-size: 15px; font-weight: 600; }
.profile-tabs a:hover { color: #f3f3ef; }
.profile-tabs a[aria-current=page] { color: #72c8ff; border-bottom-color: #009dff; }
.profile-tabs a > span { background: #242b33; padding: 0 8px; min-width: 24px; border-radius: 5px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.profile-tabs a[aria-current=page] > span { background: #123248; }
.profile-activity-entry { padding: 28px 4px; border-bottom: 1px solid #34383d; }
.profile-entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; color: #aeb7c2; font-size: 12px; }
.profile-entry-meta time { font-variant-numeric: tabular-nums; }
.profile-activity-entry h3 { font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; overflow-wrap: anywhere; }
.profile-activity-entry h3 a:hover { color: #72c8ff; }
.profile-entry-excerpt { max-width: 75ch; margin-top: 12px; color: #aeb7c2; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.profile-entry-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; font-size: 13px; color: #72c8ff; }
.profile-entry-link:hover, .profile-text-link:hover, .profile-add-bio:hover { text-decoration: underline; text-underline-offset: 4px; }
.profile-empty { padding: 48px 24px; text-align: center; }
.profile-empty > svg { color: #72c8ff; margin-bottom: 16px; }
.profile-empty h2 { font-size: 22px; letter-spacing: -.025em; }
.profile-empty p { color: #aeb7c2; margin: 12px auto 16px; max-width: 48ch; font-size: 15px; }
.profile-text-link { display: inline-flex; align-items: center; min-height: 44px; color: #72c8ff; font-size: 14px; }
.profile-pagination { align-items: center; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.profile-pagination a { padding: 8px 0; }
.profile-pagination span { color: #aeb7c2; font-size: 13px; }
.profile-moderation { border-top: 1px solid #34383d; margin-top: 40px; padding-top: 24px; font-size: 14px; }
.profile-moderation summary { cursor: pointer; color: #aeb7c2; }
.profile-moderation .editor { max-width: 560px; }
@media (max-width: 700px) {
  .member-profile { margin: 20px auto 48px; padding: 0 18px; }
  .profile-back { margin-bottom: 12px; }
  .profile-cover { height: 88px; padding-right: 20px; }
  .profile-cover img { width: 120px; height: 120px; }
  .profile-identity { flex-wrap: wrap; align-items: flex-start; gap: 0 12px; padding: 0 20px; }
  .profile-identity .profile-portrait { width: 80px; height: 80px; border-width: 4px; border-radius: 18px; margin-top: -24px; font-size: 32px; }
  .profile-name { flex: 1; min-width: 0; padding-top: 16px; }
  .profile-name h1 { font-size: 28px; }
  .profile-badges { gap: 8px; }
  .profile-edit-link { margin: 20px 0 0; }
  .profile-about { padding: 20px; }
  .profile-bio { font-size: 15px; }
  .profile-activity { margin-top: 24px; }
  .profile-activity-entry { padding: 24px 0; }
  .profile-entry-excerpt { font-size: 14px; }
  .profile-empty { padding: 36px 12px; }
}

/* Keep the member's profile reachable in the compact header too. */
.account-nav > a.member-link { display: inline-flex; align-items: center; gap: 8px; max-width: none; }
.member-link .header-avatar { width: 28px; height: 28px; border-radius: 6px; font-size: 12px; }
.member-link > span:last-child { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .account-nav > a.member-link { min-width: 32px; min-height: 44px; }
  .member-link > span:last-child { display: none; }
}
