@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

.public-profile {
    display: flex;
    flex: 1 0 auto;
    width: 100%;
    background:
        radial-gradient(120% 95% at 0% 0%, rgba(255, 255, 255, 0.82) 0%, transparent 60%),
        radial-gradient(110% 85% at 100% 0%, rgba(214, 230, 246, 0.9) 0%, transparent 58%),
        linear-gradient(165deg, #edf3f9 0%, #dee8f2 100%);
    overflow-x: hidden;
}

.pubprof-page,
.pubprof-page * {
    box-sizing: border-box;
    font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
}

.pubprof-page {
    max-width: 1100px;
    width: 100%;
    margin: 18px auto 28px;
    padding: 18px;
    color: #12233a;
}

.pubprof-card {
    border: 1px solid #d6e2ef;
    border-radius: 24px;
    background: #fff;
    padding: 22px;
    box-shadow: 0 18px 44px rgba(15, 33, 56, 0.08);
}

.pubprof-hero {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.pubprof-avatar {
    width: 140px;
    height: 140px;
    border-radius: 22px;
    overflow: hidden;
    background: #eef3f9;
    border: 1px solid #d4e1ef;
    flex: 0 0 auto;
}

.pubprof-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pubprof-info {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.pubprof-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pubprof-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #f0f6fc;
    border: 1px solid #d2e1f0;
    color: #2b4b6b;
}


.pubprof-name {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.pubprof-note {
    margin: 0;
    color: #5f7289;
    font-size: 15px;
    line-height: 1.6;
    max-width: 62ch;
}

.pubprof-actions {
    display: grid;
    gap: 10px;
    align-items: stretch;
}

.pubprof-form {
    margin: 0;
}

.pubprof-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid #c7d7ea;
    background: #f8fbff;
    color: #1a3e6a;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    gap: 10px;
    line-height: 1;
}

.pubprof-btn:hover {
    transform: translateY(-1px);
    border-color: #b0c6df;
}

.pubprof-btn--primary {
    background: #0f2138;
    border-color: #0f2138;
    color: #fff;
    box-shadow: 0 12px 22px rgba(15, 33, 56, 0.18);
}

.pubprof-btn--ghost {
    background: #fff;
}

.pubprof-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pubprof-btn__icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.pubprof-empty {
    border: 1px solid #d6e2ef;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 33, 56, 0.08);
    padding: 32px;
    text-align: center;
}

.pubprof-empty h1 {
    margin: 0 0 10px;
    font-size: 30px;
}

.pubprof-empty p {
    margin: 0 0 18px;
    color: #5f7289;
    font-size: 15px;
}

.pubprof-sticky {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translate(-50%, -120%) scale(0.96);
    opacity: 0;
    pointer-events: none;
    width: min(1100px, calc(100% - 32px));
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 18px;
    border: 1px solid #d3e2f1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.96));
    box-shadow: 0 18px 40px rgba(15, 33, 56, 0.14);
    backdrop-filter: blur(12px);
    z-index: 3500;
    transition: top 0.24s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    will-change: transform, opacity;
}

.pubprof-sticky.is-visible {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.pubprof-sticky img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #d6e2ef;
    background: #eef3f9;
}

.pubprof-sticky strong {
    display: block;
    font-size: 14px;
    color: #12233a;
}

.pubprof-sticky span {
    font-size: 12px;
    color: #6a7e95;
    font-weight: 700;
}

.pubprof-sticky-top {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid #d3e2f1;
    background: #f8fbff;
    color: #1a3e6a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pubprof-sticky-top:hover {
    transform: translateY(-1px);
    border-color: #b0c6df;
    box-shadow: 0 10px 18px rgba(15, 33, 56, 0.12);
}

@media (max-width: 980px) {
    .pubprof-hero {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .pubprof-actions {
        width: 100%;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 640px) {
    .pubprof-page {
        padding: 10px;
    }

    .pubprof-card,
    .pubprof-empty {
        padding: 18px;
        border-radius: 18px;
    }

    .pubprof-avatar {
        width: 110px;
        height: 110px;
    }

    .pubprof-name {
        font-size: 28px;
    }

    .pubprof-actions {
        grid-template-columns: 1fr;
    }

    .pubprof-sticky {
        left: 12px;
        right: 12px;
        width: auto;
        transform: translateY(-120%) scale(0.96);
        grid-template-columns: 36px minmax(0, 1fr) 34px;
        gap: 10px;
        padding: 8px 10px;
        border-radius: 14px;
        box-shadow: 0 12px 26px rgba(15, 33, 56, 0.12);
    }

    .pubprof-sticky.is-visible {
        transform: translateY(0) scale(1);
    }

    .pubprof-sticky img {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .pubprof-sticky strong {
        font-size: 13px;
    }

    .pubprof-sticky span {
        font-size: 11px;
    }

    .pubprof-sticky-top {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }
}

@media (max-width: 768px) {
    html.menu-mobile-header-hidden .pubprof-sticky {
        top: calc(env(safe-area-inset-top, 0px) + 10px);
    }
}

.pubprof-posts {
    margin-top: 18px;
    border: 1px solid #d6e2ef;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    padding: 20px;
    box-shadow: 0 14px 32px rgba(15, 33, 56, 0.08);
}

.pubprof-posts__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.pubprof-posts__head h2 {
    margin: 0;
    font-size: 22px;
}

.pubprof-posts__head span {
    font-size: 12px;
    font-weight: 800;
    color: #6a7e95;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pubprof-posts__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pubprof-post {
    border: 1px solid #d7e3ef;
    border-radius: 16px;
    background: #f8fbff;
    padding: 12px;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    height: max-content;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pubprof-post:hover {
    border-color: #c4d6ea;
    box-shadow: 0 10px 22px rgba(15, 33, 56, 0.12);
    transform: translateY(-1px);
}

.pubprof-post__media {
    width: 92px;
    height: 92px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d6e2ef;
    background: #eef3f9;
    display: block;
    flex-shrink: 0;
}

.pubprof-post__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pubprof-post__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pubprof-post__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pubprof-post__badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: #f3efe6;
    color: #7b5c2b;
    border: 1px solid #edd9b8;
    width: fit-content;
}

.pubprof-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid transparent;
}

.pubprof-status--approved {
    color: #1f7a43;
    background: #e9f7ef;
    border-color: #b9e6c9;
}

.pubprof-status--pending {
    color: #8a5600;
    background: #fff1d1;
    border-color: #ffd58a;
}
.pubprof-post__badge--blue {
    background: #e8f1ff;
    border-color: #c6dbff;
    color: #1d4ed8;
}

.pubprof-post__badge--gold {
    background: #fff6d9;
    border-color: #f2d88a;
    color: #8a5b00;
}

.pubprof-post h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}

.pubprof-post h3 a {
    color: #12233a;
    text-decoration: none;
}

.pubprof-post h3 a:hover {
    text-decoration: underline;
}

.pubprof-post p {
    margin: 0;
    color: #546b85;
    font-size: 14px;
    line-height: 1.45;
}

.pubprof-post__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 12px;
    color: #6a7e95;
}

.pubprof-post__link {
    color: #1b4d85;
    font-weight: 800;
    text-decoration: none;
}

.pubprof-post__link:hover {
    text-decoration: underline;
}

.pubprof-posts__empty {
    border: 1px dashed #cfdceb;
    border-radius: 16px;
    background: #f8fbff;
    color: #6b8098;
    padding: 18px;
    text-align: center;
    font-size: 14px;
}

.pubprof-posts__loader {
    margin-top: 12px;
    height: 1px;
    opacity: 0;
}

.pubprof-posts__loader.is-visible {
    opacity: 1;
}

@media (max-width: 980px) {
    .pubprof-posts__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .pubprof-posts {
        padding: 16px;
        border-radius: 18px;
    }

    .pubprof-posts__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .pubprof-posts__grid {
        grid-template-columns: 1fr;
    }

    .pubprof-post {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .pubprof-post__media {
        width: 72px;
        height: 72px;
    }
}
