/* ===================================================================
 * Shared author hovercard.
 * Used by the post byline (blog/post.html, TT-BLOG-REDO-02) and the index
 * sidebar avatars (blog/index.html, TT-BLOG-REDO-03). Extracted here per
 * tt-blog-redo-03-index.md decision 4 rather than duplicated -- it
 * originally lived only in blog-post-minimal.css.
 *
 * Contract: the trigger element (whatever wraps the avatar) carries
 * `.author-hover`; the popup itself is `.author-pop` with the
 * `.author-pop-*` content classes below. Relies on the `--blog-*` tokens
 * and the sitewide `--text-color`/`--border-color`/`--font-heebo` vars,
 * which are already declared by whichever of blog.css / blog-post-
 * minimal.css the including page also loads -- not redeclared here.
 * ------------------------------------------------------------------- */

.author-hover {
    position: relative;
    display: inline-flex;
}

.author-pop {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: -0.6rem;
    width: min(400px, 88vw);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--blog-bg-cream);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
    opacity: 0;
    transform: scale(0.55);
    transform-origin: 1.3rem -0.8rem;
    pointer-events: none;
    z-index: 60;
    transition: opacity 0.16s ease, transform 0.22s cubic-bezier(.2, .8, .3, 1.15);
}
/* Invisible bridge covering the gap between the trigger and the card. Without
   it the pointer leaves `.author-hover` mid-travel and the card closes before
   you can reach "More posts by ...". It's a child of `.author-pop`, so
   hovering it still counts as hovering `.author-hover`. */
.author-pop::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -0.8rem;
    height: 0.8rem;
}
.author-hover:hover .author-pop,
.author-hover:focus-within .author-pop {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
    .author-pop { transition: opacity 0.16s ease; transform: none; }
    .author-hover:hover .author-pop,
    .author-hover:focus-within .author-pop { transform: none; }
}
.author-pop-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.author-pop-body { font-size: 0.83rem; }
.author-pop-kicker {
    display: block;
    font-family: var(--font-heebo, sans-serif);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blog-accent-orange);
}
.author-pop-name {
    display: block;
    font-family: var(--blog-title-font);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--blog-primary-color);
    margin: 0.1rem 0 0.3rem;
}
.author-pop-role {
    font-family: 'Playwrite RO', cursive;
    font-weight: 300;
    font-size: 0.72rem;
    color: #6b7280;
    margin-left: 0.5rem;
}
.author-pop-bio {
    display: block;
    margin: 0;
    font-family: var(--blog-body-font);
    font-size: 0.83rem;
    line-height: 1.55;
    color: var(--text-color);
}
.author-pop-more {
    display: inline-block;
    margin-top: 0.45rem;
    font-family: var(--font-heebo, sans-serif);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--blog-accent-color);
    text-decoration: none;
}
.author-pop-more:hover { text-decoration: underline; }
