.public-profile {
    --navy: #002147;
    --accent: #625bf6;
    --accent-soft: #efedff;
    --text: #222b3a;
    --muted: #778196;
    --line: #e7eaf1;
    --success: #2f7d43;
    --verified: #7870fd;
    padding: 36px 0 70px;
    background: #f4f6fb;
    color: var(--text);
}

.public-profile a {
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.public-profile .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Hero ---------- */
.public-profile .profile-hero {
    max-width: 1180px;
    margin: auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 44px rgba(26, 35, 64, .08);
}

.public-profile .profile-cover {
    height: 260px;
    background-image: linear-gradient(125deg, rgba(0, 33, 71, .15), rgba(98, 91, 246, .15)),
    linear-gradient(135deg, #dfe8ff 0%, #b4aff4 48%, #7e78d9 100%);
    background-position: center;
    background-size: cover;
}

.public-profile .profile-identity {
    display: grid;
    grid-template-columns: 1fr 280px 1fr;
    align-items: start;
    padding: 0 48px 24px;
}

.public-profile .profile-identity > .profile-stats {
    padding-top: 34px;
}

.public-profile .profile-person {
    align-self: start;
    margin-top: -76px;
    line-height: 1.4;
    text-align: center;
}

.public-profile .profile-avatar-wrap {
    position: relative;
    width: 148px;
    height: 148px;
    margin: 0 auto 14px;
    border-radius: 50%;
    box-shadow: 0 7px 24px rgba(26, 35, 64, .22);
}

.public-profile .profile-avatar-wrap img,
.public-profile .profile-career-frame {
    display: block;
    width: 100%;
    height: 100%;
}

.public-profile .profile-avatar-wrap img {
    border-radius: 50%;
    object-fit: cover;
}

.public-profile .profile-career-frame {
    overflow: visible;
}

.public-profile .profile-career-frame__text {
    fill: #fff;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 25px;
    font-weight: 800;
}

.public-profile .profile-person h1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 0 4px;
    color: var(--text);
    font-size: 27px;
    line-height: 1.2;
}

/* Verified tick shown next to the name */
.public-profile .verified-tick {
    flex: 0 0 auto;
    color: var(--verified);
    font-size: 22px;
    line-height: 1;
    cursor: help;
}

.public-profile .profile-person p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.public-profile .profile-degree {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    max-width: 100%;
    margin-top: 12px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #4a45c7;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.public-profile .profile-degree i {
    color: var(--accent);
}

/* Stats */
.public-profile .profile-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 38px;
}

.public-profile .profile-stats > div {
    min-width: 90px;
    text-align: center;
}

.public-profile .profile-stats > div > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0 auto 7px;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 16px;
}

.public-profile .profile-stats strong,
.public-profile .profile-stats span {
    display: block;
}

.public-profile .profile-stats strong {
    overflow: hidden;
    color: var(--text);
    font-size: 18px;
    line-height: 1.25;
    text-overflow: ellipsis;
}

.public-profile .profile-stats span {
    margin-top: 3px;
    color: #9aa1af;
    font-size: 11px;
}

/* Hero footer: socials + tabs */
.public-profile .profile-hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 25px 0 40px;
    background: linear-gradient(90deg, #f1f0ff, #e5e2ff);
}

.public-profile .profile-socials {
    display: flex;
    align-items: center;
    gap: 9px;
}

.public-profile .profile-socials > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--social-border, #d9d6ff);
    border-radius: 10px;
    background: var(--social-bg, #fff) !important;
    box-shadow: 0 3px 8px rgba(61, 55, 170, .08);
    color: var(--social-color, var(--accent)) !important;
    font-size: 16px;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.public-profile .profile-socials > a:hover {
    transform: translateY(-2px);
    border-color: var(--social-color, var(--accent));
    background: var(--social-color, var(--accent)) !important;
    box-shadow: 0 8px 16px rgba(61, 55, 170, .18);
    color: #fff !important;
}

/* Light tinted buttons, brand-coloured icons */
.public-profile .social-linkedin {
    --social-bg: #e8f1fa;
    --social-border: #cfe2f4;
    --social-color: #0a66c2;
}

.public-profile .social-facebook {
    --social-bg: #e8f0fe;
    --social-border: #d0e0fc;
    --social-color: #1877f2;
}

.public-profile .social-instagram {
    --social-bg: #fdecf4;
    --social-border: #f8d3e5;
    --social-color: #d6249f;
}

.public-profile .social-twitter {
    --social-bg: #e7f5fd;
    --social-border: #cde9f9;
    --social-color: #1d9bf0;
}

.public-profile .social-email {
    --social-bg: #e6ecf4;
    --social-border: #cfd9e6;
    --social-color: var(--navy);
}

.public-profile .profile-socials .profile-resume {
    --social-bg: #fff;
    width: auto;
    gap: 6px;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 700;
}

.public-profile .profile-tabs {
    display: flex;
    align-self: stretch;
}

.public-profile .profile-tabs a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    border-bottom: 3px solid transparent;
    color: #525d70;
    font-size: 13px;
    font-weight: 600;
}

.public-profile .profile-tabs a:hover,
.public-profile .profile-tabs a.active {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Layout ---------- */
.public-profile .profile-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    max-width: 1180px;
    margin: 24px auto 0;
}

.public-profile .profile-introduction,
.public-profile .profile-details {
    display: grid;
    align-content: start;
    gap: 24px;
    margin: 0;
    padding: 0;
    background: transparent;
}

.public-profile .profile-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(26, 35, 64, .05);
}

.public-profile .profile-introduction .profile-panel {
    padding: 24px;
}

.public-profile .profile-panel h2 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
}

/* Introduction list */
.public-profile .introduction-list {
    display: grid;
    gap: 15px;
    margin: 0;
}

.public-profile .introduction-list > div {
    display: grid;
    gap: 3px;
}

.public-profile .introduction-list dt {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.public-profile .introduction-list dd {
    margin: 0 0 0 37px;
    overflow-wrap: anywhere;
    color: var(--text);
    font-weight: 600;
}

.public-profile .introduction-list a {
    color: var(--accent);
}

.public-profile .introduction-list dt i,
.public-profile .explore-panel a > i:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
}

/* Explore panel */
.public-profile .explore-panel {
    display: grid;
}

.public-profile .explore-panel h2 {
    margin-bottom: 7px;
}

.public-profile .explore-panel a {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    padding: 11px 8px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 600;
}

.public-profile .explore-panel a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ---------- Detail sections ---------- */
.public-profile .detail-section {
    margin: 0;
    padding: 24px;
    scroll-margin-top: 90px;
}

.public-profile .detail-section header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.public-profile .detail-section header small {
    display: block;
    margin-bottom: 2px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.public-profile .section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 18px;
}

.public-profile .profile-bio {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.public-profile .profile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--line);
}

.public-profile .profile-facts > div {
    min-width: 0;
    padding: 15px 17px;
    background: #fff;
}

.public-profile .profile-facts small,
.public-profile .profile-facts strong {
    display: block;
}

.public-profile .profile-facts small {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
}

.public-profile .profile-facts strong {
    overflow-wrap: anywhere;
    color: var(--text);
}

/* Education */
.public-profile .education-highlight {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border: 1px solid #dedbff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f7ff, #fff);
}

.public-profile .education-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7e78d9, var(--accent));
    box-shadow: 0 8px 18px rgba(98, 91, 246, .3);
    color: #fff;
    font-size: 22px;
}

.public-profile .education-highlight h3 {
    margin: 0 0 3px;
    font-size: 17px;
    line-height: 1.3;
}

.public-profile .education-highlight p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.public-profile .education-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.public-profile .education-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.public-profile .education-tile {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.public-profile .education-tile:hover {
    transform: translateY(-2px);
    border-color: #c5c1ff;
    box-shadow: 0 8px 18px rgba(26, 35, 64, .06);
}

.public-profile .education-tile__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 11px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 16px;
}

.public-profile .education-tile > div {
    min-width: 0;
}

.public-profile .education-tile small {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
}

.public-profile .education-tile strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 15px;
}

/* Career */
.public-profile .career-highlight {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fbfbfe;
}

.public-profile .career-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 12px;
    background: var(--navy);
    color: #fff;
    font-size: 20px;
}

.public-profile .career-highlight h3 {
    margin: 0 0 3px;
    font-size: 17px;
}

.public-profile .career-highlight p {
    margin: 0;
    color: var(--muted);
}

.public-profile .career-pill {
    margin-left: auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #e8f5ec;
    color: var(--success);
    font-size: 11px;
    font-weight: 800;
}

.public-profile .career-pill--hiring {
    background: var(--accent-soft);
    color: var(--accent);
}

/* How can I help */
.public-profile .help-content {
    display: flex;
    gap: 16px;
    padding: 20px;
    border: 1px solid #dedbff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f7ff, #fff);
}

.public-profile .help-content p {
    margin: 0;
    color: #505b70;
    font-size: 15px;
    line-height: 1.75;
}

.public-profile .help-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
}

/* Resume */
.public-profile .resume-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-color: transparent;
    background: linear-gradient(120deg, #002147, #073967);
    color: #fff;
}

.public-profile .resume-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    color: #ffb32c;
    font-size: 23px;
}

.public-profile .resume-copy {
    min-width: 0;
    flex: 1;
}

.public-profile .resume-copy small {
    display: block;
    margin-bottom: 2px;
    color: #aebdd0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.public-profile .resume-copy h2 {
    color: #fff;
}

.public-profile .resume-copy p {
    margin: 4px 0 0;
    color: #d2dbe7;
}

.public-profile .resume-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 10px;
    background: #ffb32c;
    color: var(--navy);
    font-weight: 800;
    white-space: nowrap;
}

.public-profile .resume-download:hover {
    background: #fff;
    color: var(--navy);
}

/* Activity */
.public-profile .activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.public-profile .activity-card {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.public-profile .activity-card:hover {
    border-color: #c5c1ff;
    box-shadow: 0 8px 18px rgba(26, 35, 64, .06);
}

.public-profile .activity-card span {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.public-profile .activity-card small {
    color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .public-profile .profile-identity {
        grid-template-columns: 1fr 240px 1fr;
        padding: 0 20px;
    }

    .public-profile .profile-stats {
        gap: 16px;
    }

    .public-profile .profile-stats > div {
        min-width: 70px;
    }

    .public-profile .profile-stats strong {
        font-size: 15px;
    }

    .public-profile .profile-hero-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 20px 0;
    }

    .public-profile .profile-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .public-profile .profile-tabs a {
        min-height: 44px;
        white-space: nowrap;
    }

    .public-profile .profile-layout {
        grid-template-columns: 290px minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .public-profile {
        padding: 20px 0 45px;
    }

    .public-profile .profile-cover {
        height: 160px;
    }

    .public-profile .profile-identity {
        display: flex;
        flex-direction: column;
        padding: 0 18px 20px;
    }

    .public-profile .profile-person {
        order: 1;
    }

    .public-profile .profile-person h1 {
        font-size: 24px;
    }

    .public-profile .profile-identity > .profile-stats {
        padding-top: 16px;
    }

    .public-profile .profile-stats {
        order: 2;
        width: 100%;
        margin-top: 18px;
        padding-top: 16px;
        border-top: 1px solid var(--line);
    }

    .public-profile .profile-stats + .profile-stats {
        margin-top: 12px;
        padding-top: 0;
        border-top: 0;
    }

    .public-profile .profile-stats > div {
        flex: 1;
    }

    .public-profile .profile-hero-footer {
        padding-right: 16px;
        padding-left: 16px;
    }

    .public-profile .profile-tabs a {
        padding: 0 12px;
    }

    .public-profile .profile-layout {
        grid-template-columns: 1fr;
    }

    .public-profile .profile-introduction {
        order: 1;
    }

    .public-profile .profile-details {
        order: 2;
    }

    .public-profile .profile-facts,
    .public-profile .education-grid,
    .public-profile .activity-grid {
        grid-template-columns: 1fr;
    }

    .public-profile .career-highlight,
    .public-profile .education-highlight {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .public-profile .career-pill,
    .public-profile .education-pill {
        margin-left: 69px;
    }
}

@media (max-width: 600px) {
    .public-profile .resume-section {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .public-profile .resume-download {
        width: 100%;
        justify-content: center;
    }

    .public-profile .help-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 420px) {
    .public-profile .profile-cover {
        height: 135px;
    }

    .public-profile .profile-avatar-wrap {
        width: 124px;
        height: 124px;
    }

    .public-profile .profile-person {
        margin-top: -62px;
    }

    .public-profile .profile-stats {
        gap: 5px;
    }

    .public-profile .profile-stats strong {
        font-size: 14px;
    }

    .public-profile .profile-socials {
        flex-wrap: wrap;
    }

    .public-profile .profile-tabs a {
        font-size: 12px;
    }

    .public-profile .profile-introduction .profile-panel,
    .public-profile .detail-section {
        padding: 19px;
    }
}
