/* Match the legacy page selector's specificity so the fixed header keeps its space. */
.unified-ready.studio-ready #page-profile.page {
  padding-top: 110px;
}
/* Personal tabs stay inside their content area rather than underlining the header. */
.unified-ready #page-profile .page-shell {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 32px 64px;
}
.unified-ready #profileTabs {
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 5px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
}
.unified-ready #profileTabs button {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 11px;
  color: var(--fg-muted);
  white-space: nowrap;
}
.unified-ready #profileTabs button.active {
  color: var(--fg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.unified-ready #profileTabs button:focus-visible {
  outline: 2px solid var(--pop);
  outline-offset: 2px;
}
.profile-card { padding: 30px; }
.profile-identity { display: flex; align-items: center; gap: 18px; }
.profile-identity > .st-avatar { width: 76px; height: 76px; flex: 0 0 76px; font-size: 26px; }
.profile-identity-copy { min-width: 0; }
.profile-identity-copy h1 { font-size: 22px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.profile-identity-copy p { color: var(--fg-muted); font-size: 13px; overflow-wrap: anywhere; }
.profile-role { display: inline-block; margin-top: 6px; }
.profile-bio { margin-top: 24px; color: var(--fg-muted); font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-stats { display: flex; gap: 48px; margin-top: 28px; }
.profile-stats > div { display: flex; flex-direction: column-reverse; gap: 5px; }
.profile-stats dt { color: var(--fg-muted); font-size: 12px; }
.profile-stats dd { font-size: 24px; font-weight: 500; line-height: 1.2; }
.profile-joined { margin-top: 26px; color: var(--fg-dim); font-size: 12px; }
#page-profile #avPreview { flex-shrink: 0; }
#page-profile #avFile { min-width: 0; }
.profile-work-links { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-work-links > span { color: var(--fg-muted); font-size: 13px; }
.profile-work-links > a { color: var(--fg); font-size: 13px; border: 1px solid var(--border); border-radius: 22px; padding: 10px 16px; }
@media (max-width: 800px) {
  .unified-ready.studio-ready #page-profile.page { padding-top: 90px; }
  .unified-ready #page-profile .page-shell { padding: 10px 16px 32px; }
  .unified-ready #profileTabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 2px; padding: 4px; overflow: visible; border-radius: 14px; }
  .unified-ready #profileTabs button { min-width: 0; padding: 10px 3px; font-size: 12px; border-radius: 10px; }
  .profile-card { padding: 22px; }
  .profile-identity { gap: 14px; }
  .profile-identity > .st-avatar { width: 62px; height: 62px; flex-basis: 62px; font-size: 22px; }
  .profile-identity-copy h1 { font-size: 19px; }
  .profile-stats { justify-content: space-between; gap: 20px; }
  #page-profile .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
