/* Bio VS light (v1079): /biovs and /biovs-bio */
:root {
    --bl-bg: #fafaf8;
    --bl-surface: #ffffff;
    --bl-ink: #0f1222;
    --bl-text: #3d4456;
    --bl-muted: #6b7285;
    --bl-line: #e8e9ee;
    --bl-radius: 18px;
    --bl-shadow: 0 1px 2px rgba(15, 18, 34, 0.04), 0 8px 24px -12px rgba(15, 18, 34, 0.12);
    --bl-shadow-hover: 0 2px 4px rgba(15, 18, 34, 0.05), 0 18px 36px -16px rgba(15, 18, 34, 0.22);
    --bl-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bl-font-head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --bio-accent: #5b3df5;
    --bio-accent-soft: #efecfe;
    --bio-accent-line: #d6cffd;
    --bio-secondary: #7000ff;
    --bio-secondary-soft: #e2ccff;
    --bio-accent-glow: #c9bffb;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.bio-light {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bl-bg);
    color: var(--bl-text);
    font-family: var(--bl-font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body.bio-light.bio-profile-open {
    overflow: hidden;
}

.bio-light a {
    color: inherit;
    text-decoration: none;
}

.bio-light .icon-svg {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bio-light :focus-visible {
    outline: 2px solid var(--bio-accent);
    outline-offset: 3px;
}

.bl-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(600px 360px at 12% -8%, var(--bio-accent-glow), transparent 70%),
        radial-gradient(520px 340px at 100% 0%, var(--bio-secondary-soft), transparent 70%);
    opacity: 0.55;
}

.bl-wrap {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 16px 16px 40px;
}

/* ---------- Top bar ---------- */
.bl-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.bl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px 0 12px;
    border: 1px solid var(--bl-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--bl-ink);
    font: 600 13px/1 var(--bl-font);
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bl-chip:hover {
    border-color: var(--bio-accent-line);
    color: var(--bio-accent);
}

.bl-chip:active {
    transform: scale(0.97);
}

.bl-chip--icon {
    width: 38px;
    padding: 0;
    justify-content: center;
    font-size: 15px;
}

/* ---------- Hero ---------- */
.bl-hero {
    position: relative;
    padding: 0 20px 22px;
    border: 1px solid var(--bl-line);
    border-radius: 24px;
    background: var(--bl-surface);
    box-shadow: var(--bl-shadow);
    text-align: center;
    overflow: hidden;
}

.bl-cover {
    position: relative;
    height: 116px;
    margin: 0 -20px;
    background: linear-gradient(120deg, var(--bio-cover-a, var(--bio-accent-soft)), var(--bio-cover-b, var(--bio-secondary-soft)));
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.bl-cover[style*='background-image'] .bl-cover-orb {
    display: none;
}

.bl-cover-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.7;
}

.bl-cover-orb--a {
    width: 180px;
    height: 180px;
    top: -70px;
    left: -30px;
    background: radial-gradient(circle, var(--bio-accent-glow), transparent 70%);
    animation: blFloat 9s ease-in-out infinite;
}

.bl-cover-orb--b {
    width: 220px;
    height: 220px;
    right: -60px;
    bottom: -120px;
    background: radial-gradient(circle, var(--bio-secondary-soft), transparent 70%);
    animation: blFloat 11s ease-in-out infinite reverse;
}

.bl-avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    margin: -48px auto 12px;
    padding: 0;
    border: 4px solid var(--bl-surface);
    border-radius: 50%;
    background: var(--bl-surface);
    box-shadow: 0 10px 30px -12px rgba(15, 18, 34, 0.35);
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease;
}

.bl-avatar:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 16px 34px -14px rgba(15, 18, 34, 0.45), 0 0 0 4px var(--bio-accent-soft);
}

.bl-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    background: var(--bl-surface);
    padding: 10px;
}

.bl-avatar-initial {
    color: var(--bio-accent);
    font: 800 30px/1 var(--bl-font-head);
}

.bl-avatar-badge {
    position: absolute;
    right: 0;
    bottom: 2px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 3px solid var(--bl-surface);
    border-radius: 50%;
    background: var(--bio-accent);
    color: #fff;
    font-size: 11px;
}

.bl-hero h1 {
    margin: 0;
    color: var(--bl-ink);
    font: 800 clamp(22px, 5.6vw, 26px)/1.15 var(--bl-font-head);
    letter-spacing: -0.02em;
}

.bl-headline {
    margin: 6px auto 0;
    max-width: 34ch;
    color: var(--bl-text);
    font-size: 15px;
    font-weight: 500;
}

.bl-about {
    margin: 10px auto 0;
    max-width: 40ch;
    color: var(--bl-muted);
    font-size: 14px;
}

.bl-about a {
    color: var(--bio-accent) !important;
    font-weight: 600;
    white-space: nowrap;
}

.bl-about a:hover {
    text-decoration: underline !important;
}

.bl-quick {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.bl-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--bl-line);
    border-radius: 12px;
    background: var(--bl-surface);
    color: var(--bl-ink);
    font: 600 13px/1 var(--bl-font);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bl-quick-btn svg {
    color: var(--bio-accent);
}

.bl-quick-btn:hover {
    border-color: var(--bio-accent-line);
    background: var(--bio-accent-soft);
}

.bl-quick-btn:active {
    transform: scale(0.97);
}

.bio-light .bl-quick-btn--primary {
    border-color: var(--bio-accent);
    background: var(--bio-accent);
    color: #fff;
}

.bio-light .bl-quick-btn--primary svg {
    color: #fff;
}

.bl-quick-btn--primary:hover {
    border-color: var(--bio-accent);
    background: var(--bio-accent);
    filter: brightness(1.08);
}

/* ---------- Sections ---------- */
.bl-main {
    display: grid;
    gap: 22px;
    margin-top: 22px;
}

.bl-section-title {
    margin: 0 4px 10px;
    color: var(--bl-muted);
    font: 700 12px/1 var(--bl-font);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bl-empty {
    margin: 0;
    padding: 18px;
    border: 1px dashed var(--bl-line);
    border-radius: var(--bl-radius);
    color: var(--bl-muted);
    font-size: 14px;
    text-align: center;
}

.bl-links {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bl-link,
.bl-share-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 12px 14px 12px 12px;
    border: 1px solid var(--bl-line);
    border-radius: var(--bl-radius);
    background: var(--bl-surface);
    box-shadow: var(--bl-shadow);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.bl-link:hover,
.bl-share-card:hover {
    transform: translateY(-2px);
    border-color: var(--item-soft, var(--bio-accent-line));
    box-shadow: var(--bl-shadow-hover);
}

.bl-link:active,
.bl-share-card:active {
    transform: scale(0.985);
}

.bl-link-icon,
.bl-share-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--item-soft, var(--bio-accent-soft));
    color: var(--item, var(--bio-accent));
    font-size: 20px;
    transition: transform 0.2s ease;
}

.bl-link:hover .bl-link-icon {
    transform: rotate(-6deg) scale(1.05);
}

.bl-link-body {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
    text-align: left;
}

.bl-link-body strong {
    color: var(--bl-ink);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.25;
}

.bl-link-body span {
    overflow: hidden;
    color: var(--bl-muted);
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-link-arrow {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--bl-muted);
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bl-link:hover .bl-link-arrow,
.bl-share-card:hover .bl-link-arrow {
    background: var(--item, var(--bio-accent));
    color: #fff;
    transform: translateX(2px);
}

.bl-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 10px;
}

.bl-tile {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 16px 8px 14px;
    border: 1px solid var(--bl-line);
    border-radius: var(--bl-radius);
    background: var(--bl-surface);
    box-shadow: var(--bl-shadow);
    text-align: center;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.bl-tile:hover {
    transform: translateY(-3px);
    border-color: var(--item-soft);
    box-shadow: var(--bl-shadow-hover);
}

.bl-tile:active {
    transform: scale(0.97);
}

.bl-tile-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--item-soft);
    color: var(--item);
    font-size: 19px;
}

.bl-tile-label {
    max-width: 100%;
    overflow: hidden;
    color: var(--bl-ink);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-share-card {
    --item: #1da851;
    --item-soft: #e3f6ea;
    background: linear-gradient(120deg, #ffffff 40%, #f1fbf4);
}

/* ---------- Footer ---------- */
.bl-footer {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-top: 32px;
    color: var(--bl-muted);
    font-size: 12px;
}

.bl-footer a {
    color: var(--bl-ink) !important;
    font-weight: 600;
}

.bl-footer a:hover {
    color: var(--bio-accent) !important;
}

/* ---------- Profile sheet ---------- */
.bio-profile-layer {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bio-profile-layer[hidden] {
    display: none;
}

.bio-profile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 34, 0.36);
    opacity: 0;
    transition: opacity 0.26s ease;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.bio-profile-sheet {
    position: relative;
    width: min(100%, 520px);
    max-height: 86vh;
    overflow-y: auto;
    padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: var(--bl-surface);
    box-shadow: 0 -20px 50px -20px rgba(15, 18, 34, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bio-profile-layer.is-visible .bio-profile-backdrop {
    opacity: 1;
}

.bio-profile-layer.is-visible .bio-profile-sheet {
    transform: none;
}

.bio-profile-grip {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 4px;
    background: var(--bl-line);
}

.bio-profile-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.bio-profile-kicker {
    color: var(--bio-accent);
    font: 700 11px/1 var(--bl-font);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bio-profile-sheet-head h2 {
    margin: 6px 0 2px;
    color: var(--bl-ink);
    font: 800 20px/1.2 var(--bl-font-head);
}

.bio-profile-sheet-head p {
    margin: 0;
    color: var(--bl-muted);
    font-size: 13px;
}

.bio-profile-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--bl-line);
    border-radius: 50%;
    background: var(--bl-surface);
    color: var(--bl-ink);
    font-size: 15px;
    cursor: pointer;
}

.bio-profile-actions {
    display: grid;
    gap: 8px;
}

.bio-profile-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--bl-line);
    border-radius: 14px;
    background: var(--bl-surface);
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

a.bio-profile-action:hover {
    border-color: var(--bio-accent-line);
    background: var(--bio-accent-soft);
}

.bio-profile-action--disabled {
    opacity: 0.5;
}

.bio-profile-action-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bio-accent-soft);
    color: var(--bio-accent);
    font-size: 17px;
}

.bio-profile-action-copy {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: 1px;
}

.bio-profile-action-copy strong {
    color: var(--bl-ink);
    font-size: 14px;
    font-weight: 650;
}

.bio-profile-action-copy span {
    overflow: hidden;
    color: var(--bl-muted);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bio-profile-action-arrow {
    color: var(--bl-muted);
    font-size: 13px;
}

/* ---------- Toast ---------- */
.bl-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 60;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--bl-ink);
    color: #fff;
    font: 600 13px/1.2 var(--bl-font);
    box-shadow: 0 12px 30px -10px rgba(15, 18, 34, 0.5);
    transform: translate(-50%, 12px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bl-toast.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* ---------- Detail page (/biovs-bio) ---------- */
.bl-detail .bl-hero {
    padding-bottom: 26px;
}

.bl-detail-kicker {
    display: inline-block;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bio-accent-soft);
    color: var(--bio-accent);
    font: 700 11px/1 var(--bl-font);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bl-article {
    padding: 22px 22px 6px;
    border: 1px solid var(--bl-line);
    border-radius: 24px;
    background: var(--bl-surface);
    box-shadow: var(--bl-shadow);
}

.bl-article h2 {
    margin: 0 0 12px;
    color: var(--bl-ink);
    font: 800 18px/1.25 var(--bl-font-head);
}

.bl-article p {
    margin: 0 0 16px;
    color: var(--bl-text);
    font-size: 15.5px;
    line-height: 1.7;
}

.bl-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bl-detail-actions .bl-quick-btn {
    justify-content: center;
    height: 46px;
}

/* ---------- Motion ---------- */
.bl-reveal {
    animation: blReveal 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bl-main > .bl-reveal:nth-child(1) { animation-delay: 0.08s; }
.bl-main > .bl-reveal:nth-child(2) { animation-delay: 0.16s; }
.bl-main > .bl-reveal:nth-child(3) { animation-delay: 0.24s; }

.bl-links li {
    animation: blReveal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bl-links li:nth-child(1) { animation-delay: 0.12s; }
.bl-links li:nth-child(2) { animation-delay: 0.17s; }
.bl-links li:nth-child(3) { animation-delay: 0.22s; }
.bl-links li:nth-child(4) { animation-delay: 0.27s; }
.bl-links li:nth-child(5) { animation-delay: 0.32s; }
.bl-links li:nth-child(n + 6) { animation-delay: 0.36s; }

@keyframes blReveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes blFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(18px, 10px); }
}

@media (prefers-reduced-motion: reduce) {
    .bl-reveal,
    .bl-links li,
    .bl-cover-orb {
        animation: none !important;
    }

    .bio-light *,
    .bio-light *::before,
    .bio-light *::after {
        transition-duration: 0.01ms !important;
    }
}

@media (min-width: 560px) {
    .bl-wrap {
        padding-top: 28px;
    }

    .bl-cover {
        height: 136px;
    }

    .bio-profile-layer {
        align-items: center;
    }

    .bio-profile-sheet {
        border-radius: 24px;
        transform: translateY(16px) scale(0.98);
        opacity: 0;
        transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
    }

    .bio-profile-layer.is-visible .bio-profile-sheet {
        opacity: 1;
    }

    .bio-profile-grip {
        display: none;
    }
}

@media (max-width: 360px) {
    .bl-quick-btn span {
        display: none;
    }

    .bl-quick-btn {
        width: 44px;
        padding: 0;
        justify-content: center;
    }
}

.bl-share-card .bl-link-body span {
    white-space: normal;
}
