.author-page {
    background: #fff;
    margin: 40px 0;
}

body:has(.author-page) main,
body:has(.author-page) header {
    background: #fff;
}

body:has(.author-page) .menu-navigacziya-po-sajtu-container a {
    color: var(--black);
}

body:has(.author-page) .header .logo {
    display: block;
    height: 35px;
}

/* --- Профиль --- */

.author-page__profile {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding-bottom: 48px;
    border-bottom: 1px solid #eee;
    margin-bottom: 48px;
}

.author-page__avatar-wrap {
    flex-shrink: 0;
}

.author-page__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #eee;
}

.author-page__info {
    flex: 1;
}

.author-page__name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 10px;
    line-height: 1.2;
}

.author-page__stats {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.author-page__stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: #888;
}

.author-page__stat svg {
    opacity: 0.6;
    flex-shrink: 0;
}

.author-page__bio {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #444;
    margin: 0 0 18px;
    max-width: 600px;
}

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

.author-page__social {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    background: #f3f3f3;
    color: var(--black) !important;
    border: 1px solid #e0e0e0;
    transition: opacity 0.2s, background 0.2s;
}

.author-page__social:hover {
    opacity: 0.8;
}

.author-page__social--vk {
    background: #0077ff;
    color: #fff !important;
    border-color: #0077ff;
}

.author-page__social--tg {
    background: #29a8eb;
    color: #fff !important;
    border-color: #29a8eb;
}

/* --- Список статей --- */

.author-page__posts-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 24px;
}

.author-page__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.author-page__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--black) !important;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.author-page__card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.author-page__card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
}

.author-page__card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.author-page__card:hover .author-page__card-thumb img {
    transform: scale(1.03);
}

.author-page__card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1;
}

.author-page__card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.author-page__card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #000;
    margin: 0;
}

.author-page__card-excerpt {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.author-page__card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* --- Пагинация --- */

.author-page__pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.author-page__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    background: #f3f3f3;
    color: var(--black) !important;
    border: 1px solid #e0e0e0;
    transition: background 0.2s, color 0.2s;
}

.author-page__pagination .page-numbers.current,
.author-page__pagination .page-numbers:hover {
    background: var(--black);
    color: #fff !important;
    border-color: var(--black);
}

/* --- Пусто --- */

.author-page__empty {
    color: #888;
    font-size: 0.95rem;
    text-align: center;
    padding: 60px 0;
}

/* --- Адаптив --- */

@media (max-width: 900px) {
    .author-page__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .author-page__profile {
        flex-direction: column;
        gap: 20px;
    }

    .author-page__name {
        font-size: 1.4rem;
    }

    .author-page__grid {
        grid-template-columns: 1fr;
    }
}