/*
 * Public profile page shell (/resume/{id}, templates-new/resume/view.html.twig, #476).
 * Scoped to #user-profile.resume-profile and its #addToFavoriteModal dialog. Colours follow the Vuexy palette; `.dark-layout` (set on
 * <html> by the site theme) switches the surfaces. `--profile-sticky-top` is measured by
 * public/assets/global/scripts/resume-profile.js from the real site header.
 */
.resume-profile,
#addToFavoriteModal {
    --profile-bg: #f8f8f8;
    --profile-card: #fff;
    --profile-border: #ebe9f1;
    --profile-heading: #5e5873;
    --profile-text: #6e6b7b;
    --profile-muted: #82868b;
    --profile-track: #ebe9f1;
    --profile-primary: #7367f0;
    --profile-primary-text: #6258d9;
    --profile-primary-soft: rgba(115, 103, 240, .12);
    --profile-success: #28c76f;
    --profile-success-text: #1f9d57;
    --profile-danger-text: #d33d3e;
    --profile-warning-text: #b86a14;
    --profile-shadow: 0 4px 24px rgba(34, 41, 47, .07);
}

.resume-profile {
    --profile-sticky-top: 0px;
    --profile-card-padding: 21px;
    --profile-section-gap: 28px;
    max-width: 1440px;
    margin-inline: auto;
    font-size: 14px;
    line-height: 1.8;
    color: var(--profile-text);
}

.dark-layout .resume-profile,
.dark-layout #addToFavoriteModal {
    --profile-bg: #161d31;
    --profile-card: #283046;
    --profile-border: #3b4253;
    --profile-heading: #d0d2d6;
    --profile-text: #b4b7bd;
    --profile-muted: #8d92a0;
    --profile-track: #3b4253;
    --profile-primary-soft: rgba(115, 103, 240, .12);
    --profile-primary-text: #b7a8f8;
    --profile-success-text: #4be08c;
    --profile-danger-text: #ff7a7b;
    --profile-warning-text: #ffb976;
    --profile-shadow: 0 4px 24px rgba(0, 0, 0, .25);
}

.resume-profile .card {
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    box-shadow: var(--profile-shadow);
}

/* ---------- Header ---------- */
.resume-profile .profile-header-card {
    overflow: visible;
}

.resume-profile .profile-cover {
    height: 170px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    background: var(--profile-primary-soft);
}

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

.resume-profile .profile-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .18));
    pointer-events: none;
}

.resume-profile .btn.profile-cover-edit {
    z-index: 2;
    position: absolute;
    top: .75rem;
    inset-inline-end: .75rem;
    width: 38px;
    height: 38px;
    min-height: 38px;
    background: var(--profile-card);
    color: var(--profile-heading);
    border: 0;
}

.resume-profile .profile-identity {
    display: flex;
    align-items: flex-start;
    gap: 21px;
    padding: 0 21px 21px;
}

.resume-profile .profile-avatar {
    position: relative;
    margin-top: -56px;
    flex: none;
}

.resume-profile .profile-avatar img {
    width: 112px;
    height: 112px;
    border-radius: 16px;
    border: 4px solid var(--profile-card);
    background: var(--profile-card);
    object-fit: cover;
    display: block;
}

.resume-profile .profile-avatar [class*='avatar-status-'] {
    position: absolute;
    inset-inline-end: -4px;
    bottom: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--profile-card);
    background: #babfc7;
}

.resume-profile .profile-avatar .avatar-status-online {
    background: var(--profile-success);
}

.resume-profile .btn.profile-avatar-change {
    position: absolute;
    inset-inline-start: -6px;
    bottom: -6px;
    width: 34px;
    height: 34px;
    min-height: 34px;
    border: 3px solid var(--profile-card);
    display: grid;
    place-items: center;
    padding: 0;
}

.resume-profile .profile-ident {
    flex: 1;
    min-width: 0;
    padding-top: 14px;
}

.resume-profile .profile-name {
    font-size: 24px;
    font-weight: 500;
    color: var(--profile-heading);
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin: 0;
    line-height: 36px;
    overflow-wrap: anywhere;
}

.resume-profile .profile-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--profile-heading);
    background: none;
    padding: 0;
}

.resume-profile .profile-verified-icon {
    width: 18px;
    height: 18px;
    flex: none;
}

.resume-profile .profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 14px;
    margin-top: 7px;
    font-size: 13px;
}

.resume-profile .profile-meta b {
    color: var(--profile-heading);
}

.resume-profile .profile-rating {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.resume-profile .profile-rating .coder-rate-stars {
    padding: 0;
}

.resume-profile .profile-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    padding-top: 1rem;
    flex: none;
    max-width: 100%;
}

.resume-profile .btn {
    font-size: 14px;
    font-weight: 500;
    min-height: 40px;
    border-radius: 6px;
}

.resume-profile .profile-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.resume-profile .profile-actions .btn-outline-secondary,
.resume-profile .profile-actions .btn-outline-primary {
    border-color: var(--profile-border) !important;
    background: var(--profile-card);
    color: var(--profile-heading);
}

.resume-profile .profile-actions .btn-outline-secondary:hover,
.resume-profile .profile-actions .btn-outline-primary:hover {
    border-color: var(--profile-primary) !important;
    color: var(--profile-primary-text);
}

.resume-profile .profile-actions .btn [class*="fa-"] {
    font-size: 18px;
}

.resume-profile .profile-action-icon {
    width: 18px;
    height: 18px;
    flex: none;
    vertical-align: middle;
}

.resume-profile .btn-sm {
    font-size: 12.6px;
    min-height: 0;
}

.resume-profile .btn-flat-primary {
    color: var(--profile-primary-text);
}

.resume-profile .profile-actions .btn-icon {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

/* ---------- Stats strip ---------- */
.resume-profile .profile-stats {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    overflow: visible;
}

.resume-profile .profile-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3.5px;
    padding: 21px;
    min-width: 0;
}

.resume-profile .profile-stat + .profile-stat {
    border-inline-start: 1px solid var(--profile-border);
}

.resume-profile .profile-stat-label {
    font-size: 12.6px;
    color: var(--profile-muted);
    display: flex;
    align-items: center;
    gap: .35rem;
}

.resume-profile .profile-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--profile-heading);
    display: flex;
    align-items: baseline;
    gap: 7px;
    line-height: 1.4;
}

.resume-profile .profile-stat-value small {
    font-size: 12.6px;
    font-weight: 400;
    color: var(--profile-muted);
}

.resume-profile .profile-account-type {
    align-items: center;
    font-size: 1rem;
}

.resume-profile .profile-stat-link {
    font-size: 12.6px;
    color: var(--profile-primary-text);
}

.resume-profile [data-stat="coder-success-rate"] {
    color: var(--profile-success-text);
}

.resume-profile .profile-owner-account,
.resume-profile .profile-owner-account .profile-account-type {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.resume-profile .profile-owner-account .profile-account-type img {
    width: 18px;
    height: 18px;
}

.resume-profile .profile-score-details .btn {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--profile-muted);
}

.resume-profile .profile-sheet {
    min-width: 20rem;
    max-width: calc(100vw - 2rem);
    padding: 1rem;
    top: calc(100% + .5rem);
}

/* Static display (no Popper): Vuexy only unscales a menu whose parent has `.show`. */
.resume-profile .profile-sheet.show {
    transform: none;
}

.resume-profile .profile-subrates li {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 30px;
    align-items: center;
    gap: .5rem;
    padding: .3rem 0;
    font-size: .9rem;
}

.resume-profile .profile-subrates .progress {
    height: 8px;
    background: var(--profile-track);
}

/* Keep the site's ten rating colours and rating_name thresholds. Unlike the legacy bucketed
 * gradients in custom-new.css, each fill is solid: its inline width carries the actual score. */
.resume-profile .progress-bar.bg-rating-excellent { --profile-rating-fill: #379252; }
.resume-profile .progress-bar.bg-rating-great { --profile-rating-fill: #3eab5e; }
.resume-profile .progress-bar.bg-rating-very-well { --profile-rating-fill: #6cd18a; }
.resume-profile .progress-bar.bg-rating-good { --profile-rating-fill: #6fbc55; }
.resume-profile .progress-bar.bg-rating-above-average { --profile-rating-fill: #8a9137; }
.resume-profile .progress-bar.bg-rating-average { --profile-rating-fill: #a59e33; }
.resume-profile .progress-bar.bg-rating-below-average { --profile-rating-fill: #d2c83c; }
.resume-profile .progress-bar.bg-rating-weak { --profile-rating-fill: #d29b3c; }
.resume-profile .progress-bar.bg-rating-bad { --profile-rating-fill: #d26a3c; }
.resume-profile .progress-bar.bg-rating-terrible { --profile-rating-fill: #d24c3c; }

.resume-profile .profile-subrates .progress-bar,
.resume-profile .profile-activity-subrate .progress-bar {
    background: var(--profile-rating-fill);
    border-radius: 8px;
}

.resume-profile .profile-subrates b {
    color: var(--profile-heading);
    text-align: end;
}

/* ---------- Layout, skills row and tabs ---------- */
.resume-profile .profile-header-card.mb-1,
.resume-profile .profile-stats.mb-1 {
    margin-bottom: 0 !important;
}

.resume-profile .profile-stats {
    margin-top: var(--profile-section-gap);
}

.resume-profile .profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--profile-section-gap);
    margin: var(--profile-section-gap) 0 0;
    align-items: start;
}

.resume-profile .profile-layout > .profile-main,
.resume-profile .profile-layout > .profile-side {
    width: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
}

.resume-profile .profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--profile-section-gap);
}

.resume-profile .profile-sidebar > .card,
.resume-profile .profile-panels {
    margin-bottom: 0;
}

.resume-profile .card-header {
    padding: var(--profile-card-padding);
    gap: 7px;
}

.resume-profile .card-title,
.resume-profile .profile-checklist h2,
.resume-profile .profile-empty-state h2 {
    font-size: 18px;
    line-height: 27px;
    font-weight: 500;
    margin-bottom: 0;
}

.resume-profile .card-header + .card-body {
    padding: 0 var(--profile-card-padding) var(--profile-card-padding);
}

.resume-profile .profile-panels > .card-body {
    padding: 0;
}

.resume-profile .profile-checklist,
.resume-profile .profile-empty-state {
    padding: var(--profile-card-padding);
}

@media (min-width: 992px) {
    .resume-profile .profile-layout:has(> .profile-side) {
        grid-template-columns: minmax(0, 1fr) clamp(300px, 25%, 340px);
    }
}

.resume-profile .profile-skill-chip {
    border: 1px solid var(--profile-border);
    color: var(--profile-heading);
    background: transparent;
    font-weight: 400;
    font-size: 12.6px;
    padding: .486rem .5rem;
    line-height: 22.68px;
    border-radius: 20px;
}

.resume-profile .profile-skill-chip:hover,
.resume-profile .profile-skill-chip:focus-visible {
    border-color: var(--profile-primary);
    color: var(--profile-primary);
}

.resume-profile .profile-skills-row {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: .1rem 0 .25rem;
}

.resume-profile .profile-skills-row::-webkit-scrollbar {
    display: none;
}

.resume-profile .profile-skills-row .profile-skill-chip {
    flex: none;
}

.resume-profile .profile-tabs-bar {
    position: sticky;
    top: var(--profile-sticky-top);
    z-index: 5;
    margin-bottom: var(--profile-section-gap);
    background: var(--profile-card);
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    box-shadow: var(--profile-shadow);
}

.resume-profile .profile-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 7px;
    margin: 0;
    border: 0;
}

.resume-profile .profile-tabs::-webkit-scrollbar {
    display: none;
}

.resume-profile .profile-tabs .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
    padding: .61rem 1.2rem;
    color: var(--profile-text);
    font-weight: 500;
    border: 0;
    background: none;
    font-size: 14px;
    line-height: 21px;
    min-height: 44px;
}

.resume-profile .profile-tabs .nav-link.active {
    color: var(--profile-primary-text);
}

.resume-profile .profile-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    inset-inline: .6rem;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--profile-primary);
}

.resume-profile .profile-tab-count {
    background: var(--profile-track);
    color: var(--profile-heading);
    font-weight: 500;
    font-size: 12px;
    line-height: 1;
    padding: .3rem .5rem;
}

.resume-profile .profile-tabs .nav-link.active .profile-tab-count {
    background: var(--profile-primary-soft);
    color: var(--profile-primary-text);
}

.resume-profile .profile-prose {
    width: 100%;
    max-width: calc(760px + 2 * var(--profile-card-padding));
    font-size: 15px;
    line-height: 27px;
    padding: var(--profile-card-padding);
    overflow-wrap: anywhere;
}

.resume-profile .profile-prose p,
.resume-profile .profile-prose li {
    line-height: 27px;
}

.resume-profile .profile-prose h4 {
    font-size: 18px;
    line-height: 27px;
    font-weight: 500;
    margin: 14px 0 7px;
}

.resume-profile .profile-prose ul {
    margin: 0 0 14px;
    padding-inline-start: 28px;
}

.resume-profile .profile-biography-content {
    --profile-biography-preview-lines: 18;
    display: flow-root;
}

.resume-profile .profile-biography-content.is-collapsed {
    max-height: calc(var(--profile-biography-preview-lines) * 27px);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--profile-biography-preview-lines);
    overflow: hidden;
    overflow: clip;
}

@supports (-webkit-line-clamp: 1) {
    .resume-profile .profile-biography-content.is-collapsed {
        /* Count actual lines, retaining rich-text spacing without slicing the final line. */
        max-height: none;
    }
}

.resume-profile .profile-biography-toggle {
    min-height: 44px;
    margin-top: 7px;
}

.resume-profile .profile-biography-toggle[hidden] {
    display: none;
}

@media (max-width: 767.98px) {
    .resume-profile .profile-biography-content {
        --profile-biography-preview-lines: 12;
    }
}

@media (min-width: 992px) {
    .resume-profile .profile-biography-content {
        --profile-biography-preview-lines: 25;
    }
}

.resume-profile .profile-projects-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.resume-profile .profile-prose + .d-flex {
    padding: 0 var(--profile-card-padding) var(--profile-card-padding);
}


/* ---------- Small screens ---------- */
@media (max-width: 991.98px) {
    .resume-profile {
        --profile-section-gap: 16px;
    }

    .resume-profile [data-profile-region="skills-row"] {
        margin-bottom: 16px !important;
    }

    .resume-profile .profile-identity {
        flex-wrap: wrap;
    }

    .resume-profile .profile-actions {
        width: 100%;
    }

    /* The sidebar cards belong to the "رزومه" tab on small screens. */
    .resume-profile:not([data-active-tab="resume"]) .profile-side {
        display: none;
    }
}

@media (max-width: 767px) {
    /*
     * custom-new-2.css sets `overflow-x: hidden` on the page content on phones, which turns it into
     * a scroll container and stops `position: sticky` from following the window. `clip` keeps the
     * horizontal clipping without that. This file is linked only by the profile page.
     */
    .horizontal-layout .app-content {
        overflow-x: clip;
    }
}

@media (max-width: 767.98px) {
    .resume-profile {
        --profile-card-padding: 16px;
        padding-top: 12px;
    }

    .resume-profile .profile-cover {
        height: 104px;
    }

    .resume-profile .profile-identity {
        flex-wrap: wrap;
        gap: 10.5px;
        padding: 0 14px 14px;
    }

    .resume-profile .profile-avatar {
        margin-top: -40px;
    }

    .resume-profile .profile-avatar img {
        width: 84px;
        height: 84px;
        border-radius: 14px;
    }

    .resume-profile .profile-avatar [data-online-status] {
        width: 16px;
        height: 16px;
        bottom: 4px;
    }

    .resume-profile .profile-ident {
        flex-basis: calc(100% - 100px);
        padding-top: 10.5px;
    }

    .resume-profile .profile-name {
        font-size: 20px;
        line-height: 30px;
    }

    .resume-profile .profile-actions {
        width: 100%;
        padding-top: 3.5px;
        flex-wrap: nowrap;
    }

    .resume-profile .profile-actions > .btn-primary {
        flex: 1;
    }

    .resume-profile .profile-actions > .btn:not(.btn-icon),
    .resume-profile .profile-actions .btn-icon {
        min-height: 44px;
    }

    .resume-profile .profile-actions .btn-icon,
    .resume-profile .profile-actions .profile-save {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }

    /* Keep the state text in the accessible name of the phone's compact save control. */
    .resume-profile .profile-actions [data-profile-save-label] {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .resume-profile .profile-meta {
        gap: 3.5px 10.5px;
    }

    .resume-profile [data-profile-region="skills-row"] .card-header {
        padding-bottom: 0;
    }

    .resume-profile .profile-stat {
        padding: 10.5px 3.5px;
        align-items: center;
        text-align: center;
    }

    .resume-profile .profile-stat-label {
        font-size: 12px;
        justify-content: center;
        white-space: nowrap;
    }

    .resume-profile .profile-stat-value {
        font-size: 18px;
        justify-content: center;
    }

    .resume-profile .profile-account-type {
        font-size: .85rem;
        flex-wrap: wrap;
    }

    .resume-profile .profile-account-type img {
        width: 22px;
        height: 22px;
    }

    /* Score details as a bottom sheet that always fits the viewport. */
    .resume-profile .profile-sheet.show {
        position: fixed;
        top: auto;
        bottom: 0;
        /* custom-rtl.css forces `left/right: auto !important` on every dropdown menu. */
        left: 0 !important;
        right: 0 !important;
        min-width: 0;
        max-width: none;
        width: auto;
        max-height: 80vh;
        overflow-y: auto;
        margin: 0;
        border-radius: 1rem 1rem 0 0;
        padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
        z-index: 1060;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, .25);
    }

    .resume-profile .profile-subrates li {
        grid-template-columns: 6.5rem 1fr 2.2rem;
    }
}

/* ---------- Header actions and quick actions (#477) ---------- */
.resume-profile .profile-save {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* Keep the status badge outside the button's Waves clipping while anchoring it to the control. */
.resume-profile .profile-more-control {
    position: relative;
}

.resume-profile .profile-blocked-mark {
    position: absolute;
    top: -8px;
    left: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    line-height: 1;
    background: var(--profile-card);
    border-radius: 50%;
}

.resume-profile .profile-blocked-mark .fa-ban {
    font-size: 11px;
}

/* Share and "⋯" menus: anchored to the end (left in RTL) of their button on wider screens.
   custom-rtl.css forces `left/right: auto !important` on every dropdown menu. */
.resume-profile .profile-menu-sheet {
    min-width: 0;
    padding: .5rem 0;
    border-radius: 8px;
}

@media (min-width: 768px) {
    .resume-profile .profile-menu-sheet {
        left: 0 !important;
        right: auto !important;
        width: 336px;
        max-width: calc(100vw - 2rem);
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    /* The owner's shorter action row starts at the right edge on tablets. Open its share menu
       toward the available space instead of extending beyond the right side of the viewport. */
    .resume-profile .profile-actions > [data-profile-action="edit-resume"] + .dropdown > .profile-menu-sheet {
        left: auto !important;
        right: 0 !important;
    }
}

.resume-profile .profile-menu-sheet .dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    white-space: normal;
    padding: .6rem 1rem;
    text-align: start;
    min-height: 44px;
}

.resume-profile .profile-menu-sheet .dropdown-item:focus-visible {
    outline: 2px solid var(--profile-primary);
    outline-offset: -2px;
}

.resume-profile .profile-menu-title {
    margin: 0;
    color: var(--profile-heading);
    font-size: 14px;
    font-weight: 500;
    line-height: 25.2px;
}

.resume-profile .profile-share-content {
    padding: 0 14px 7px;
}

.resume-profile .profile-menu-sheet .profile-share-copy {
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--profile-border);
    border-radius: 6px;
    background: var(--profile-primary-soft);
    color: var(--profile-primary-text);
}

.resume-profile .profile-share-copy .copy-icon {
    font-size: 18px;
}

.resume-profile .profile-share-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 7px;
}

.resume-profile .profile-share-grid .dropdown-item {
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    min-height: 72px;
    padding: 10.5px 3.5px;
    border-radius: 8px;
    font-size: 12.6px;
}

.resume-profile .profile-share-grid .fab {
    width: 26px;
    text-align: center;
    font-size: 24px;
    line-height: 1;
}

.resume-profile .profile-share-grid .dropdown-item:hover,
.resume-profile .profile-share-grid .dropdown-item:focus-visible {
    color: var(--profile-primary-text);
    background: var(--profile-primary-soft);
}

.resume-profile .profile-message-group {
    margin: 7px 14px;
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    background: var(--profile-bg);
}

.resume-profile .profile-menu-section-title {
    margin: 7px 0 3.5px;
    padding-inline: 14px;
    color: var(--profile-muted);
    font-size: 12.6px;
    font-weight: 500;
    line-height: 22.68px;
}

.resume-profile .profile-block-toggle {
    justify-content: space-between;
    gap: 10.5px;
}

.resume-profile .profile-block-label {
    min-width: 0;
    flex: 1;
}

/* Keep menuitemcheckbox semantics and existing keyboard/ARIA state; the switch is decorative. */
.resume-profile .profile-block-switch {
    position: relative;
    flex: none;
    width: 38px;
    height: 22px;
    border-radius: 20px;
    background: var(--profile-track);
    transition: background-color .15s;
}

.resume-profile .profile-block-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    inset-inline-start: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(34, 41, 47, .3);
    transition: inset-inline-start .15s;
}

.resume-profile .profile-block-toggle[aria-checked="true"] .profile-block-switch {
    background: var(--profile-primary);
}

.resume-profile .profile-block-toggle[aria-checked="true"] .profile-block-switch::after {
    inset-inline-start: 19px;
}

.resume-profile .profile-block-help {
    margin: 0;
    padding: 0 14px 7px;
    color: var(--profile-text);
    font-size: 12.6px;
    line-height: 20.16px;
    text-align: start;
}

.resume-profile .profile-menu-sheet .profile-report-action {
    color: var(--profile-danger-text);
}

.resume-profile .profile-menu-sheet .profile-report-action:hover,
.resume-profile .profile-menu-sheet .profile-report-action:focus {
    color: var(--profile-danger-text);
    background: rgba(234, 84, 85, .12);
}

.resume-profile .profile-menu-sheet .dropdown-item:disabled {
    color: var(--profile-muted);
}

.resume-profile .profile-block-toggle:disabled .profile-block-switch {
    opacity: .55;
}

.resume-profile .profile-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem .5rem;
}

.resume-profile [data-profile-quick-actions][hidden] {
    display: none !important;
}

.resume-profile .profile-tabs-bar {
    display: flex;
    align-items: center;
}

.resume-profile .profile-tabs-bar .profile-tabs {
    flex: 1;
    min-width: 0;
}

.resume-profile .profile-quick-actions-desktop {
    flex: none;
    padding-inline: .5rem .75rem;
}

@media (max-width: 991.98px) {
    .resume-profile .profile-quick-actions-desktop {
        display: none !important;
    }

    /* Room for the fixed quick-action bar at the end of the page. */
    .resume-profile:has(> .profile-quick-actions-mobile) {
        padding-bottom: max(96px, calc(var(--profile-fixed-bottom, 0px) + 80px + env(safe-area-inset-bottom)));
    }

    .resume-profile .profile-quick-actions-mobile {
        position: fixed;
        left: 0;
        right: 0;
        /* Above the site's own bottom menu, measured by resume-profile-actions.js. */
        bottom: var(--profile-fixed-bottom, 0px);
        z-index: 1030;
        display: flex;
        gap: .5rem;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--profile-card);
        border-top: 1px solid var(--profile-border);
        box-shadow: 0 -4px 18px rgba(34, 41, 47, .12);
    }

    .resume-profile .profile-quick-actions-mobile .btn {
        min-height: 40px;
    }

    .resume-profile .profile-quick-actions-mobile .btn-primary {
        flex: 1;
    }
}

@media (min-width: 992px) {
    .resume-profile .profile-quick-actions-mobile {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    /* The site launcher is outside the profile root. Keep its placement local to this page. */
    body:has(.resume-profile) #goftinoBtn {
        top: auto;
        bottom: calc(var(--profile-support-clearance, 140px) + 16px);
    }
}

/* Desktop has no bottom action bar; keep support away from the header's More control. */
@media (min-width: 992px) {
    body:has(.resume-profile) #goftinoBtn {
        top: auto;
        bottom: 24px;
    }
}

/* ==========================================================================
 * Portfolio panel and sidebar cards (#480): resume/profile/portfolio_panel.html.twig,
 * resume/profile/sidebar.html.twig, resume/coder_top_skills_row.html.twig.
 * ========================================================================== */
.resume-profile {
    --profile-danger: #ea5455;
    --profile-warning: #ff9f43;
}

/* ---------- Portfolio grid ---------- */
.resume-profile .profile-portfolio-cap {
    margin: 0 var(--profile-card-padding) var(--profile-card-padding);
    padding: 14px;
    border-radius: 8px;
    background: rgba(0, 207, 232, .14);
    color: var(--profile-heading);
}

.resume-profile .profile-portfolio-cap a {
    color: var(--profile-primary-text);
}

.resume-profile .profile-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    padding: var(--profile-card-padding);
}

.resume-profile .profile-portfolio-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.resume-profile .profile-portfolio-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--profile-track);
}

.resume-profile .profile-portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}

.resume-profile .profile-portfolio-item:hover .profile-portfolio-thumb img {
    transform: scale(1.03);
}

.resume-profile .profile-portfolio-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 16.8px;
    text-align: start;
    margin: 7px 0 3.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resume-profile .profile-portfolio-title a {
    color: var(--profile-heading);
}

.resume-profile .profile-portfolio-title a:hover,
.resume-profile .profile-portfolio-title a:focus-visible {
    color: var(--profile-primary);
}

.resume-profile .profile-portfolio-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--profile-muted);
    font-size: .9rem;
}

.resume-profile .profile-portfolio-like,
.resume-profile .profile-portfolio-views {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.resume-profile .profile-portfolio-like {
    border: 0;
    background: none;
    color: inherit;
    padding: .25rem .4rem;
    margin-inline-start: -.4rem;
    border-radius: .35rem;
    min-height: 2rem;
    cursor: pointer;
}

.resume-profile .profile-portfolio-like:hover,
.resume-profile .profile-portfolio-like[aria-pressed="true"] {
    color: var(--profile-danger-text);
}

.resume-profile .profile-portfolio-like[aria-busy="true"] {
    opacity: .6;
}

.resume-profile .profile-portfolio-like:focus-visible,
.resume-profile .profile-segmented .nav-link:focus-visible,
.resume-profile [data-profile-skills-toggle]:focus-visible,
.resume-profile [data-profile-top-skills-more]:focus-visible {
    outline: 2px solid var(--profile-primary);
    outline-offset: 2px;
}

/* ---------- Sidebar: skills ---------- */
.resume-profile .profile-skills-list[data-expanded="false"] [data-profile-skill-extra] {
    display: none;
}

/* ---------- Sidebar: performance report ---------- */
.resume-profile .profile-sidebar-muted {
    color: var(--profile-muted);
}

/* Separate the two report groups without adding a full empty row between them. */
.resume-profile .profile-report-divider {
    margin: 3.5px 0;
}

.resume-profile .profile-segmented {
    display: inline-flex;
    flex-wrap: nowrap;
    padding: 3.5px;
    gap: 0;
    border: 1px solid var(--profile-border);
    border-radius: 8px;
    background: var(--profile-bg);
}

.resume-profile .profile-segmented .nav-link {
    border: 0;
    border-radius: 6px;
    padding: 3.5px 14px;
    font-size: 14px;
    line-height: 25.2px;
    font-weight: 500;
    color: var(--profile-heading);
    background: none;
}

.resume-profile .profile-segmented .nav-link.active {
    background: var(--profile-card);
    color: var(--profile-primary-text);
    box-shadow: 0 1px 4px rgba(34, 41, 47, .12);
}

.resume-profile .profile-report-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: 10.5px 0;
    border-bottom: 1px dashed var(--profile-border);
}

.resume-profile .profile-report-row:last-child {
    border-bottom: 0;
}

.resume-profile .profile-report dt {
    display: flex;
    align-items: center;
    min-width: 0;
    font-weight: 400;
    color: var(--profile-text);
}

.resume-profile .profile-report .bullet {
    width: 8px;
    height: 8px;
    flex: none;
}

.resume-profile .profile-report dd {
    margin: 0;
    color: var(--profile-heading);
    font-weight: 700;
    text-align: end;
    min-width: 0;
    overflow-wrap: anywhere;
}

.resume-profile [data-report-figure="coder-score"] dd,
.resume-profile [data-report-figure="buyer-score"] dd {
    color: var(--profile-muted);
    font-weight: 400;
}

.resume-profile .profile-report dd strong {
    color: var(--profile-heading);
}

.resume-profile [data-profile-report-score-details] {
    padding: 10.5px 0;
    text-align: start;
    font-weight: 400;
}

.resume-profile [data-profile-report-score-details] summary {
    color: var(--profile-primary-text);
    cursor: pointer;
}

.resume-profile [data-profile-report-score-details] summary:focus-visible {
    outline: 2px solid var(--profile-primary);
    outline-offset: 2px;
}

.resume-profile [data-profile-report-score-details] .profile-subrates {
    margin-top: 10.5px;
}

/* ---------- Sidebar: top skills ---------- */
.resume-profile .profile-top-skills {
    display: grid;
    gap: 0;
}

.resume-profile .profile-top-skill {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10.5px;
    padding: 10.5px 0;
    line-height: 25.2px;
    border-bottom: 1px dashed var(--profile-border);
}

.resume-profile .profile-top-skill:last-child {
    border-bottom: 0;
}

.resume-profile .profile-top-skill-name {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--profile-heading);
    font-weight: 500;
    line-height: 25.2px;
}

.resume-profile .profile-stars {
    position: relative;
    display: inline-block;
    direction: rtl;
    unicode-bidi: isolate;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 1px;
    color: var(--profile-track);
}

.resume-profile .profile-stars::before {
    content: "★★★★★";
}

.resume-profile .profile-stars::after {
    content: "★★★★★";
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: var(--profile-stars, 0%);
    overflow: hidden;
    white-space: nowrap;
    color: var(--profile-warning);
}

.resume-profile .profile-top-skill-count {
    min-width: 34px;
    padding: 4.2px 7px;
    border: 1px solid transparent;
    border-radius: 20px;
    background: rgba(40, 199, 111, .14);
    color: var(--profile-success-text);
    font-size: 11.9px;
    line-height: 21.42px;
    font-weight: 400;
}

/* ---------- Sidebar: latest portfolio items ---------- */
.resume-profile .profile-thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
}

.resume-profile .profile-thumbs a {
    display: block;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--profile-track);
}

.resume-profile .profile-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 991.98px) {
    .resume-profile .profile-portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .resume-profile .profile-portfolio-grid {
        gap: 16px;
    }

    .resume-profile .profile-menu-sheet.show {
        padding-top: 14px;
    }

    .resume-profile .profile-menu-sheet .dropdown-item {
        min-height: 44px;
    }
}

/* --- Profile variants (#481): new-member chip, no-activity strip, empty state and checklist --- */
.resume-profile .profile-new-member {
    font-size: .8rem;
    font-weight: 500;
}

.resume-profile[data-profile-variant="no-activity"] .profile-stat-value {
    font-size: 1rem;
}

.resume-profile .profile-empty-state .fa-file-alt {
    display: block;
}

.resume-profile .profile-checklist .progress {
    height: .5rem;
}

/* --- Keyboard focus (#482) ---
 * The theme removes the focus outline from links, buttons and nav links. Every control of the page
 * gets a visible ring when focused from the keyboard (`:focus-visible`), in both themes. */
.resume-profile a:focus-visible,
.resume-profile button:focus-visible,
.resume-profile .nav-link:focus-visible,
.resume-profile [tabindex]:focus-visible {
    outline: 2px solid var(--profile-primary);
    outline-offset: 2px;
}

.dark-layout .resume-profile a:focus-visible,
.dark-layout .resume-profile button:focus-visible,
.dark-layout .resume-profile .nav-link:focus-visible,
.dark-layout .resume-profile [tabindex]:focus-visible {
    outline-color: #b7a8f8;
}

/* Inside scrolling rows (tabs, skills, chips) and menus the ring sits inside, so it is never clipped. */
.resume-profile .profile-tabs .nav-link:focus-visible,
.resume-profile .profile-skills-row a:focus-visible,
.resume-profile .profile-activity-chip:focus-visible,
.resume-profile .dropdown-item:focus-visible {
    outline-offset: -2px;
}

/* The theme's decorative shadow under the fixed site header overlaps the top of the stuck tab bar
 * on phones and swallowed taps there. This stylesheet is loaded by the profile page only. */
.header-navbar-shadow {
    pointer-events: none;
}

/* --- Sheets and popovers in both themes (#482) ---
 * Static (Popper-less) menus keep the light theme's dark text colour; use the page tokens. */
.resume-profile .profile-sheet,
.resume-profile .profile-sheet-head .h5 {
    color: var(--profile-heading);
}

.dark-layout .resume-profile .profile-sheet .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Save dialog is outside the resume root; keep its styles local to this dialog. */
#addToFavoriteModal .modal-content {
    border-radius: 8px;
}

#addToFavoriteModal .modal-title {
    font-size: 18px;
    line-height: 1.8;
}

#addToFavoriteModal .profile-favorite-person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

#addToFavoriteModal #favoriteAvatarImg {
    width: 44px;
    height: 44px;
    object-fit: cover;
    flex: none;
}

#addToFavoriteModal #favoriteAvatarH4 {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

#addToFavoriteModal .profile-favorite-choice {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    border: 1px solid var(--profile-border);
    border-radius: 6px;
    margin-bottom: 10px;
}

#addToFavoriteModal .profile-favorite-choice .form-check-input {
    position: absolute;
    inset-inline-start: 14px;
    margin: 0;
    float: none;
}

#addToFavoriteModal .profile-favorite-choice label {
    width: 100%;
    padding: 12px 14px;
    padding-inline-start: 42px;
    cursor: pointer;
    line-height: 1.6;
}

#addToFavoriteModal .profile-favorite-choice:has(:checked) {
    border-color: var(--profile-primary);
    background: var(--profile-primary-soft);
}

#addToFavoriteModal .profile-favorite-choice:focus-within {
    outline: 2px solid var(--profile-primary);
    outline-offset: 2px;
}

#addToFavoriteModal .profile-favorite-note-heading {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 7px;
    margin: 16px 0 7px;
    font-size: 12.6px;
}

#addToFavoriteModal #favorite_note {
    min-height: 88px;
    resize: vertical;
}

#addToFavoriteModal .modal-footer {
    gap: 7px;
}

#addToFavoriteModal .profile-favorite-remove {
    margin-inline-end: auto;
}

#addToFavoriteModal #favorite_error {
    font-size: 14px;
    line-height: 1.8;
}
