/* author-page.css — "about writer" author archive (Figma node 1823-1699).
   Bio card (text right-aligned on the left, portrait on the right) + 3-col
   article grid of the author's posts. Loaded with tokens/base/header. */

.author-page {
    background: #fff;
    padding: 150px 0 70px;          /* clear the fixed 110px header */
}
.author-page__inner {
    width: min(1353px, calc(100% - 48px));
    margin: 0 auto;
}

/* ===== Bio card ===== */
.author-bio {
    display: flex;
    flex-direction: row;            /* RTL: first child (photo) → right, text → left */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 552px;
}
.author-bio__photo {
    flex: 0 0 689px;
    max-width: 51%;
    align-self: stretch;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.author-bio__text {
    flex: 1 1 auto;
    padding: 48px 48px 40px;
    text-align: right;
    direction: rtl;
}
.author-bio__name {
    font-family: var(--ff-he);
    font-weight: 400;
    font-size: 46px;
    line-height: 48px;
    color: #151515;
    margin: 0 0 14px;
}
.author-bio__count {
    font-family: var(--ff-he);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    color: #818181;
    margin: 0 0 22px;
}
.author-bio__sub {
    font-family: var(--ff-he);
    font-weight: 600;
    font-size: 24px;
    line-height: 28px;
    color: #151515;
    margin: 0 0 14px;
}
.author-bio__desc p {
    font-family: var(--ff-he);
    font-weight: 400;
    font-size: 20px;
    line-height: 28px;
    color: #151515;
    margin: 0 0 12px;
}
.author-bio__desc p:last-child { margin-bottom: 0; }

/* ===== Articles grid ===== */
.author-articles {
    margin-top: 48px;
}
.author-articles__title {
    font-family: var(--ff-he);
    font-weight: 700;
    font-size: 30px;
    color: #151515;
    text-align: right;
    margin: 0 0 24px;
}
.author-articles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.author-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
    text-align: right;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.author-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}
.author-card__imgwrap {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.author-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.author-card__body {
    padding: 22px 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
}
.author-card__title {
    font-family: var(--ff-he);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.35;
    color: #151515;
    margin: 0;
}
.author-card__title a { color: inherit; text-decoration: none; }
.author-card__title a:hover { color: var(--c-gold-flat); }
.author-card__excerpt {
    font-family: var(--ff-he);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #6b6b6b;
    margin: 0;
}
.author-card__more {
    margin-top: auto;
    font-family: var(--ff-he);
    font-weight: 600;
    font-size: 16px;
    color: var(--c-gold-flat);
    text-decoration: none;
}

/* ===== Pagination ===== */
.author-articles__pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;            /* keep arrows + numbers on the same line */
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.author-articles__pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 42px;
    height: 42px;
    margin: 0;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-family: var(--ff-he);
    font-size: 16px;
    line-height: 1;
    color: #151515;
    text-decoration: none;
    vertical-align: middle;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.author-articles__pager .page-numbers.dots {
    border-color: transparent;
}
.author-articles__pager .page-numbers:hover { background: #f3f3f3; }
.author-articles__pager .page-numbers.current {
    background: var(--c-gold-flat);
    border-color: var(--c-gold-flat);
    color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .author-page { padding: 120px 0 48px; }
    .author-bio {
        flex-direction: column;
        min-height: 0;
    }
    .author-bio__photo {
        flex: none;
        max-width: 100%;
        width: 100%;
        height: 360px;
        order: -1;                  /* photo on top on mobile */
    }
    .author-bio__text { padding: 28px 20px 30px; }
    .author-bio__name { font-size: 32px; line-height: 1.2; }
    .author-bio__sub { font-size: 20px; }
    .author-bio__desc p { font-size: 16px; line-height: 1.6; }

    .author-articles__grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .author-articles__title { font-size: 24px; }
}
@media (max-width: 600px) {
    .author-articles__grid { grid-template-columns: 1fr; }
}
