/* -------------------------------------------------------------------------
   Author profile card — shown at the top of author-filtered views (page 1)
   ------------------------------------------------------------------------- */
.author-profile {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* When the profile follows an article, space it below the content
   the same way the article body is spaced from its header */
#article-view .author-profile {
    margin-top: 2rem;
    margin-bottom: 0;
}

/* Circular avatar — hidden when no avatar frontmatter field is set */
.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--color-border);
}

.author-profile-body {
    flex: 1;
    min-width: 0;
}

.author-profile-name {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    overflow-wrap: break-word;
}

/* Rendered bio markdown — keep margins tight inside the card */
.author-profile-bio {
    font-size: 0.95rem;
    color: var(--color-text-soft);
    line-height: 1.6;
}

.author-profile-bio p {
    margin: 0 0 0.5em;
}

.author-profile-bio p:last-child {
    margin-bottom: 0;
}

/* Social links row */
.author-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.author-social a {
    display: inline-block;
    padding: 0.2em 0.7em;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-tag-bg);
    color: var(--color-text-soft);
    font-size: 0.82rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.author-social a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

@media (max-width: 640px) {
    .author-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 1.25rem 1rem;
    }

    .author-social {
        justify-content: center;
    }
}
