/* Flattened private identity structure: the cover, identity row, and About
   content remain siblings.  The avatar geometry mirrors the public profile
   contract so both routes use the same cover overlap and reading position. */
body.profile-page .profile-identity-card > .profile-identity {
  position: relative !important;
  z-index: 5;
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px;
  width: min(var(--profile-content-max-width, 1120px), calc(100% - 32px));
  min-height: 0 !important;
  margin: calc(var(--profile-avatar-size, 161px) * -0.6) auto 0 !important;
  padding: 0 !important;
  direction: rtl;
}
body.profile-page .profile-identity-card > .profile-identity > .profile-avatar-wrap {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  z-index: 6;
  flex: 0 0 var(--profile-avatar-size, 161px);
  width: var(--profile-avatar-size, 161px) !important;
  height: var(--profile-avatar-size, 161px) !important;
  transform: none !important;
}
body.profile-page .profile-identity-card > .profile-identity > .profile-identity-copy {
  display: grid !important;
  flex: 1 1 0;
  align-content: start;
  gap: 10px;
  min-width: 0;
  margin: 0 !important;
  padding: calc(var(--profile-avatar-size, 161px) * 0.6) 0 0 !important;
}
body.profile-page .profile-identity-card > .profile-details-box {
  width: min(var(--profile-content-max-width, 1120px), calc(100% - 32px));
  margin: 14px auto 0 !important;
  padding: 0 0 20px !important;
}
body.profile-page .profile-identity-card .profile-details-view > .profile-field-summary {
  margin-top: 0 !important;
}

@media (max-width: 700px) {
  body.profile-page .profile-identity-card {
    --profile-avatar-size: 104px;
  }
  body.profile-page .profile-identity-card > .profile-identity {
    width: calc(100% - 28px);
    gap: 12px;
  }
  body.profile-page .profile-identity-card > .profile-identity > .profile-identity-copy {
    gap: 8px;
    padding-top: calc(var(--profile-avatar-size) * 0.6) !important;
  }
  body.profile-page .profile-identity-card > .profile-details-box {
    width: calc(100% - 28px);
    margin-top: 10px !important;
    padding-bottom: 16px !important;
  }
}
