/* ===========================================================================
 * author_profile.css — E-E-A-T author profile header + authors index grid.
 * Loaded only on /authors/ and /authors/{alias}/ (linked via page_headers in
 * author.php / authors.php), so it never weighs on article or homepage loads.
 * ======================================================================== */

.author-profile {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}

.author-profile__top {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.author-profile__photo {
    flex: 0 0 auto;
    margin: 0;
}

.author-profile__photo img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background: #f2f2f2;
}

/* --- Author avatar (real photo OR initials placeholder) ----------------- */
/* Rendered by inc/author_avatar.inc.php. Size comes from inline width/height
   so one class serves every context (grid 64px, profile 140px, …). */
.author-ava {
    border-radius: 50%;
    object-fit: cover;
    background: #e9ecef;
    flex: 0 0 auto;
    vertical-align: middle;
}

.author-ava--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .02em;
    overflow: hidden;
}

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

.author-profile__name {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
}

.author-profile__meta {
    margin: 0 0 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.author-profile__jobtitle {
    font-size: 15px;
    color: #555;
    font-weight: 600;
}

.author-profile__badge {
    display: inline-block;
    font-size: 11px;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 700;
}

.author-profile__badge--staff {
    background: #fdeaea;
    color: #87080e;
}

.author-profile__badge--freelance {
    background: #eef1f5;
    color: #4a5568;
}

.author-profile__oneliner {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.5;
    color: #222;
}

.author-profile__social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.author-profile__social-link {
    display: inline-block;
    font-size: 13px;
    line-height: 1;
    padding: 7px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: border-color .15s, color .15s;
    cursor: pointer;
}

.author-profile__social-link:hover {
    border-color: #87080e;
    color: #87080e;
}

.author-profile__body {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.author-profile__block {
    margin-bottom: 18px;
}

.author-profile__block:last-child {
    margin-bottom: 0;
}

.author-profile__block-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #87080e;
}

.author-profile__block p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.author-profile__bio p {
    font-size: 16px;
    color: #222;
}

.author-profile__chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.author-profile__chip {
    font-size: 13px;
    line-height: 1;
    padding: 6px 11px;
    background: #f4f5f7;
    border-radius: 999px;
    color: #333;
}

.author-profile__education ul {
    margin: 0;
    padding-left: 18px;
}

.author-profile__education li {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.author-profile__disclosures {
    background: #fafafa;
    border-left: 3px solid #d9d9d9;
    padding: 12px 14px;
    border-radius: 0 6px 6px 0;
}

.author-profile__disclosures p {
    font-size: 14px;
    color: #555;
}

/* --- Authors index (/authors/) grid ------------------------------------- */

.authors-index__intro {
    margin-bottom: 24px;
}

.authors-index__intro h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
}

.authors-index__intro p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.authors-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.authors-grid__card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, border-color .15s;
}

.authors-grid__card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}

.authors-grid__photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    background: #f2f2f2;
}

.authors-grid__name {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.authors-grid__title {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.3;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 560px) {
    .author-profile {
        padding: 18px;
    }

    .author-profile__top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-profile__photo img {
        width: 110px;
        height: 110px;
    }

    .author-profile__meta,
    .author-profile__social {
        justify-content: center;
    }

    .author-profile__name {
        font-size: 24px;
    }
}
