/* ==========================================================================
   About the author (partials/author-box.hbs)
   Same card language as the newsletter box (newsletter.css): square edges,
   corner brackets, Geist / Geist Mono, teal ink, green accents.
   ========================================================================== */

.mx-author-box {
    --bf-corner-color: #9ca3af;
    position: relative;
    width: min(var(--content-width, 720px), calc(100% - 2 * var(--gap, 20px)));
    margin: 72px auto 0;
    padding: 32px 40px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--bf-border, #e5e7eb);
    font-family: var(--bf-sans, "Geist", system-ui, sans-serif);
    text-align: left;
}

/* The newsletter card sits right under it */
.mx-author-box + .mx-newsletter {
    margin-top: 24px;
}

.mx-author-box p {
    margin: 0;
}

.mx-author-box-tag {
    font-family: var(--bf-mono, "Geist Mono", ui-monospace, monospace);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bf-primary-corner, #177b62);
}

.mx-author {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
}

.mx-author + .mx-author {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--bf-border, #e5e7eb);
}

.mx-author-avatar {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 50%;
    background: #f3f4f6;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.mx-author-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mx-author-avatar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9ca3af;
}

.mx-author-avatar-icon svg {
    width: 28px;
    height: 28px;
}

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

.mx-author-box .mx-author-name {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.mx-author-name a {
    color: #0a3d4a;
    text-decoration: none;
}

.mx-author-name a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mx-author-box .mx-author-bio {
    margin-top: 8px;
    max-width: 560px;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
}

/* Profile links */

.mx-author-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.mx-author-links li {
    margin: 0;
    padding: 0;
}

.mx-author-link {
    --bf-corner-color: var(--bf-secondary-corner, #e0e0e0);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    font-family: var(--bf-mono, "Geist Mono", ui-monospace, monospace);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: #282828;
    text-decoration: none;
    background: var(--bf-secondary, #f5f5f5);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mx-author-link:hover {
    color: #0a3d4a;
    background: var(--bf-secondary-hover, #f0f0f0);
}

.mx-author-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.mx-author-more {
    margin-left: auto !important;
}

/* No profile links: keep "All articles" on the left instead of stranded on the right */
.mx-author-more:first-child {
    margin-left: 0 !important;
}

.mx-author-more a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    font-family: var(--bf-mono, "Geist Mono", ui-monospace, monospace);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    color: var(--bf-primary-corner, #177b62);
    text-decoration: none;
}

.mx-author-more a:hover {
    color: #0a3d4a;
}

.mx-author-more svg {
    width: 14px;
    height: 14px;
    transition: transform 0.15s ease;
}

.mx-author-more a:hover svg {
    transform: translateX(2px);
}

.mx-author-link:focus-visible,
.mx-author-more a:focus-visible,
.mx-author-name a:focus-visible {
    outline: 2px solid #0a3d4a;
    outline-offset: 2px;
}

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

@media (max-width: 600px) {
    .mx-author-box {
        margin-top: 56px;
        padding: 24px 20px;
    }

    .mx-author {
        gap: 14px;
    }

    .mx-author-avatar {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
    }

    .mx-author-more {
        margin-left: 0 !important;
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mx-author-link,
    .mx-author-more svg {
        transition: none;
    }
}
