/* Main-site Prof.B treatment, scoped to the homepage preview.
 * Loaded after the shared publication layout, which flattens the original hero.
 * Keep the shared section rhythm and the bounded, reduced-motion-aware greeting.
 */
body.rv-publication .gh-home-header[data-prof-b-hero] {
    container-type: inline-size;
    isolation: isolate;
    margin-block: 0;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: .75rem;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    box-shadow: 0 12px 28px rgb(15 23 42 / 12%);
}

body.rv-publication [data-prof-b-hero]::before {
    content: "";
    display: block;
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    inline-size: 31.25rem;
    block-size: 31.25rem;
    background: radial-gradient(circle, #3b82f6, transparent 70%);
    opacity: .2;
    transform: translate(20%, -20%);
    pointer-events: none;
}

body.rv-publication [data-prof-b-hero] .gh-home-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: clamp(1.25rem, 1rem + 1dvw, 2rem);
    backdrop-filter: none;
}

body.rv-publication [data-prof-b-hero] .gh-home-title {
    margin-block: 0 .5rem;
    color: #fff;
    font-size: clamp(1.75rem, 1.25rem + 1.25dvw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.025em;
    text-shadow: 0 4px 6px rgb(0 0 0 / 20%);
}

body.rv-publication [data-prof-b-hero] .gh-home-header-highlight {
    color: #93c5fd;
    background: none;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    body.rv-publication [data-prof-b-hero] .gh-home-header-highlight {
        background: linear-gradient(90deg, #60a5fa, #c084fc);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

body.rv-publication [data-prof-b-hero] .gh-home-subtitle {
    max-inline-size: 38rem;
    margin: 0;
    color: #cbd5e1;
    font-size: clamp(1rem, .9rem + .25dvw, 1.125rem);
    font-weight: 400;
    line-height: 1.6;
}

body.rv-publication [data-prof-b-hero] .gh-home-prof-b-zone {
    margin: 0;
    padding: .5rem 0;
}

body.rv-publication [data-prof-b-hero] .prof-b-avatar {
    inline-size: 4rem;
    block-size: auto;
    aspect-ratio: 1;
    border: 3px solid rgb(147 197 253 / 45%);
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 0 24px rgb(59 130 246 / 35%), 0 0 0 4px rgb(96 165 250 / 8%);
}

body.rv-publication [data-prof-b-hero] .gh-home-prof-b-zone img {
    inline-size: 100%;
    block-size: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

body.rv-publication [data-prof-b-hero] .prof-b-label {
    margin-block-start: .625rem;
    color: #93c5fd;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-shadow: 0 0 10px rgb(59 130 246 / 40%);
}

body.rv-publication [data-prof-b-hero] .gh-home-nav {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .625rem;
    margin: 0;
}

body.rv-publication [data-prof-b-hero] .gh-home-nav-link {
    min-block-size: 2.75rem;
    padding: .625rem 1rem;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 999px;
    background: rgb(255 255 255 / 7%);
    color: #f1f5f9;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .2s, border-color .2s;
}

body.rv-publication [data-prof-b-hero] .gh-home-nav-link:hover {
    background: rgb(255 255 255 / 14%);
    border-color: rgb(147 197 253 / 55%);
    color: #fff;
    text-decoration: none;
    transform: none;
}

body.rv-publication [data-prof-b-hero] :is(.prof-b-link, .gh-home-nav-link):focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 5px;
}

/* Match the main site's text / Prof.B / shortcuts arrangement when it fits. */
@container (min-width: 64rem) {
    body.rv-publication [data-prof-b-hero] .gh-home-header-inner {
        grid-template-columns: minmax(0, 1fr) 5rem minmax(18rem, 22rem);
        gap: 1.5rem;
    }

    body.rv-publication [data-prof-b-hero] .prof-b-avatar {
        inline-size: 5rem;
    }

    body.rv-publication [data-prof-b-hero] .gh-home-nav {
        grid-column: auto;
        justify-content: flex-end;
    }
}

/* Gradient text must remain readable when the OS removes backgrounds. */
@media (forced-colors: active) {
    body.rv-publication [data-prof-b-hero] .gh-home-header-highlight {
        background: none;
        color: CanvasText;
    }
}
