/* Public creator and organization layouts are independent of package detail styles. */
.public-profile { min-width: 0; }
.profile-cover {
    overflow: hidden;
    margin: 0;
}
.profile-cover img { position: relative; z-index: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-heading {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: end;
    min-width: 0;
    gap: var(--space-4);
    margin: calc(-1 * var(--public-cover-overlap)) 0 28px 24px;
}
.profile-heading h1, .profile-heading p { margin: 0; }
.profile-heading p { color: var(--mp-muted); }
.public-profile .identity-mark { width: 96px; height: 96px; background: var(--mp-background); box-shadow: 0 8px 24px rgb(0 0 0 / .14); }
.public-profile .profile-heading > .identity-mark { border: 5px solid var(--public-cover-edge); }
.public-profile .profile-heading > .creator-avatar { box-shadow: none; }
.public-profile > h2 { margin: 44px 0 20px; font-size: 25px; font-weight: 700; letter-spacing: -.025em; }
.public-profile .profile-description { margin-top: 24px; border-radius: 16px; }
.profile-description p { margin: 0; color: var(--mp-subtle); }
.public-profile-layout { display: grid; grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr); align-items: start; gap: 24px; }
.public-profile .profile-about { min-width: 0; margin: 0; background: var(--mp-surface); }
.profile-about > h2, .profile-socials > h2 { margin: 0 0 12px; font-size: 20px; }
.profile-socials { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--mp-border); }
.profile-social-list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.profile-social-list a { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; text-decoration: none; }
.profile-social-list a:hover { text-decoration: underline; }
.profile-social-list .social-icon-github { --icon: url("../images/social/github.svg"); }
.profile-social-list .social-icon-linkedin { --icon: url("../images/social/linkedin.svg"); }
.profile-social-list .social-icon-discord { --icon: url("../images/social/discord.svg"); }
.profile-social-list .social-icon-instagram { --icon: url("../images/social/instagram.svg"); }
.profile-social-list .social-icon-email { --icon: url("../images/social/email.svg"); }

.creator-profile-listings { container: creator-listings / inline-size; min-width: 0; }
.public-profile-layout .catalog-section > h2 { margin: 0 0 16px; }
.marketplace-page .creator-profile-listings :is(.package-grid, .profile-organization-grid) {
    --profile-card-columns: 1;
    display: grid;
    grid-template-columns: repeat(var(--profile-card-columns), minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.profile-show-more { margin-top: 16px; }
.profile-org-card { display: flex; flex-direction: column; align-items: start; gap: 10px; min-width: 0; height: 100%; padding: 16px; background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: 16px; color: var(--mp-text); text-decoration: none; overflow-wrap: anywhere; }
.profile-org-card:hover { border-color: var(--mp-control-border); }
.profile-org-card .identity-mark { width: 52px; height: 52px; border: 0; }
.marketplace-page .creator-profile-listings .package-card-content { min-width: 0; padding: 12px; }
.marketplace-page .creator-profile-listings .package-card .package-artwork { height: 122px; }
.creator-profile-listings .split-download .split-download-main { padding-inline: 13px; }
.creator-profile-listings .split-download .dropdown-trigger { padding-inline: 10px; }
@container creator-listings (min-width: 23rem) {
    .marketplace-page .creator-profile-listings :is(.package-grid, .profile-organization-grid) { --profile-card-columns: 2; }
}
@container creator-listings (min-width: 35rem) {
    .marketplace-page .creator-profile-listings :is(.package-grid, .profile-organization-grid) { --profile-card-columns: 3; }
}
@container creator-listings (min-width: 47rem) {
    .marketplace-page .creator-profile-listings :is(.package-grid, .profile-organization-grid) { --profile-card-columns: 4; }
}
@media (max-width: 60rem) {
    .public-profile-layout { grid-template-columns: minmax(0, 1fr); }
}
.organization-profile .profile-heading .organization-logo {
    width: 104px;
    height: 104px;
    padding: 0px;
    border: 5px solid var(--public-cover-edge);
    border-radius: 20px;
    background: var(--mp-background);
    box-shadow: none;
    object-fit: contain;
}
.organization-profile .profile-heading .identity-placeholder.organization-logo { padding: 18px; }
.organization-members { margin-bottom: 24px; }
.organization-members > h2 { margin: 0 0 16px; }
.organization-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.organization-member-card { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px; border: 1px solid var(--mp-border); border-radius: 16px; background: var(--mp-surface); color: var(--mp-text); text-decoration: none; transition: border-color .18s, background-color .18s; }
.organization-member-card:hover { border-color: var(--mp-control-border); background: var(--mp-raised); }
.organization-member-avatar { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; object-fit: cover; }
.organization-member-details { display: grid; min-width: 0; gap: 2px; }
.organization-member-details strong, .organization-member-details small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organization-member-details small { color: var(--mp-muted); }
.organization-owner-badge { margin-inline-start: auto; padding: 4px 8px; border-radius: 999px; background: var(--mp-accent-soft); color: var(--mp-accent); font-size: .75rem; font-weight: 650; }

@media (max-width: 48rem) {
    .profile-heading { margin-inline-start: 8px; }
}

.profile-search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.profile-search-card { display: flex; align-items: center; gap: 16px; height: 100%; min-width: 0; padding: 20px; border: 1px solid var(--mp-border); border-radius: 16px; background: var(--mp-surface); color: var(--mp-text); text-decoration: none; }
.profile-search-card:hover { border-color: var(--mp-control-border); background: var(--mp-raised); }
.profile-search-details { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.profile-search-details small { color: var(--mp-muted); }
