﻿/* ================================================================
   Authors List & Author Profile Pages
================================================================ */

/* ─── Authors Hero ──────────────────────────────────────────── */
.au-hero {
    background: linear-gradient(150deg, var(--navy-950) 0%, var(--navy-800) 60%, #0a2e1a 100%);
    padding: 3.5rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.au-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 80% 40%, rgba(var(--primary-rgb), .06), transparent);
    pointer-events: none;
}

.au-hero__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

.au-breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    color: rgba(var(--primary-rgb), .6);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.au-breadcrumb a {
    color: rgba(var(--primary-rgb), .6);
    text-decoration: none;
    transition: color .15s;
}

.au-breadcrumb a:hover { color: var(--gold-400); }
.au-breadcrumb i { font-size: .6rem; opacity: .6; }

.au-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(var(--primary-rgb), .10);
    border: 1px solid rgba(var(--primary-rgb), .22);
    color: var(--gold-400);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .28rem .75rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.au-hero__title {
    font-size: clamp(1.7rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin: 0 0 1rem;
}

.au-hero__title-accent { color: var(--gold-400); }

.au-hero__subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,.6);
    max-width: 560px;
    line-height: 1.7;
    margin: 0 0 1.75rem;
}

.au-hero__stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.au-hero__stat {
    display: flex;
    flex-direction: column;
}

.au-hero__stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold-400);
    line-height: 1;
}

.au-hero__stat-label {
    font-size: .7rem;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: .2rem;
}

.au-hero__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
}

.au-hero__wave svg { width: 100%; height: 50px; }

/* ─── Authors Main ──────────────────────────────────────────── */
.au-main {
    background: var(--gray-50);
    padding: 3rem 0 5rem;
}

.au-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ─── Authors Grid ──────────────────────────────────────────── */
.au-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* ─── Author Card ───────────────────────────────────────────── */
.au-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 2px 20px rgba(0,0,0,.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.au-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
    opacity: 0;
    transition: opacity .2s;
}

.au-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(0,0,0,.1);
    color: inherit;
}

.au-card:hover::before { opacity: 1; }

/* Avatar */
.au-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    background-image: url(''); /* reset */
    background-size: cover;
    background-position: center;
    letter-spacing: -.02em;
}

.au-card__name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--navy-800);
    margin: 0 0 .25rem;
    line-height: 1.3;
}

.au-card__title {
    font-size: .76rem;
    color: var(--gold-600);
    font-weight: 600;
    margin: 0 0 .6rem;
    line-height: 1.4;
}

.au-card__state {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    color: var(--gray-400);
    margin-bottom: .9rem;
}

.au-card__state i { font-size: .65rem; }

.au-card__bio {
    font-size: .8rem;
    color: var(--gray-500);
    line-height: 1.65;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.au-card__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-size: .75rem;
    color: var(--navy-600);
    font-weight: 600;
    border-top: 1px solid var(--gray-100);
    padding-top: .9rem;
    width: 100%;
    margin-top: auto;
}

.au-card__footer i { color: var(--gold-500); font-size: .8rem; }

.au-card__articles-count {
    font-size: .7rem;
    color: var(--gray-400);
    margin-left: auto;
}

/* ─── Author Profile Hero ───────────────────────────────────── */
.ap-hero {
    background: linear-gradient(150deg, var(--navy-950) 0%, var(--navy-800) 60%, #0a2e1a 100%);
    padding: 3.5rem 0 5.5rem;
    position: relative;
    overflow: hidden;
}

.ap-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 75% 50%, rgba(var(--primary-rgb), .07), transparent);
    pointer-events: none;
}

.ap-hero__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
    align-items: center;
}

.ap-hero__avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    border: 3px solid rgba(var(--primary-rgb), .3);
    letter-spacing: -.02em;
    background-size: cover;
    background-position: center;
}

.ap-hero__info { flex: 1; }

.ap-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    color: rgba(255,255,255,.7);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ap-hero__breadcrumb a {
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: color .15s;
}

.ap-hero__breadcrumb a:hover { color: var(--gold-400); }
.ap-hero__breadcrumb i { font-size: .6rem; opacity: .6; }

.ap-hero__name {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin: 0 0 .35rem;
}

.ap-hero__author-title {
    font-size: .9rem;
    color: var(--gold-400);
    font-weight: 600;
    margin: 0 0 .9rem;
}

.ap-hero__bio {
    font-size: .9rem;
    color: rgba(255,255,255,.6);
    line-height: 1.75;
    max-width: 560px;
    margin: 0 0 1.25rem;
}

.ap-hero__meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.ap-hero__meta-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    color: rgba(255,255,255,.4);
}

.ap-hero__meta-item i { color: var(--gold-500); font-size: .8rem; }

.ap-hero__social {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: .9rem;
}

.ap-hero__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: .5rem;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.6);
    font-size: .9rem;
    text-decoration: none;
    transition: all .15s;
    border: 1px solid rgba(255,255,255,.1);
}

.ap-hero__social-link:hover {
    background: rgba(var(--primary-rgb), .15);
    color: var(--gold-400);
    border-color: rgba(var(--primary-rgb), .3);
}

.ap-hero__wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
}

.ap-hero__wave svg { width: 100%; height: 50px; }

/* ─── Profile Layout ────────────────────────────────────────── */
.ap-main {
    background: var(--gray-50);
    padding: 3rem 0 5rem;
}

.ap-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
}

/* ─── Articles Panel ────────────────────────────────────────── */
.ap-articles-panel {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 2px 20px rgba(0,0,0,.05);
    overflow: hidden;
}

.ap-articles-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ap-articles-header__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.ap-articles-header__title i { color: var(--gold-500); }

.ap-articles-header__count {
    font-size: .78rem;
    color: var(--gray-400);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: .2rem .65rem;
    font-weight: 600;
}

/* Article list */
.ap-article-list { list-style: none; margin: 0; padding: 0; }

.ap-article-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--gray-50);
    transition: background .12s;
}

.ap-article-item:last-child { border-bottom: none; }
.ap-article-item:hover { background: var(--gray-50); }

.ap-article-item__num {
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 700;
    color: var(--gray-300);
    width: 22px;
    padding-top: .15rem;
    text-align: right;
}

.ap-article-item__body { flex: 1; min-width: 0; }

.ap-article-item__title {
    font-size: .88rem;
    font-weight: 600;
    color: var(--navy-700);
    text-decoration: none;
    line-height: 1.45;
    display: block;
    margin-bottom: .3rem;
    transition: color .12s;
}

.ap-article-item__title:hover { color: var(--gold-600); }

.ap-article-item__meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.ap-article-item__badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .67rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), .07);
    color: var(--navy-600);
}

.ap-article-item__badge--state {
    background: rgba(var(--primary-rgb), .1);
    color: var(--gold-700);
}

.ap-article-item__wc {
    font-size: .67rem;
    color: var(--gray-400);
    margin-left: auto;
}

/* Load more */
.ap-load-more-wrap {
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--gray-100);
}

.ap-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--navy-800);
    color: var(--white);
    font-size: .85rem;
    font-weight: 600;
    border: none;
    border-radius: .5rem;
    padding: .65rem 1.75rem;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.ap-load-more-btn:hover {
    background: var(--navy-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.ap-load-more-btn:disabled {
    opacity: .5;
    cursor: default;
    transform: none;
}

.ap-load-more-status {
    font-size: .78rem;
    color: var(--gray-400);
    margin-top: .5rem;
}

.ap-pagination {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ap-pagination__pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    flex-wrap: wrap;
}

.ap-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-width: 40px;
    height: 40px;
    padding: 0 .9rem;
    border-radius: .65rem;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--navy-700);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}

.ap-pagination__link:hover {
    border-color: rgba(var(--primary-rgb), .45);
    color: var(--gold-700);
    background: rgba(var(--primary-rgb), .08);
}

.ap-pagination__link.is-active {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: var(--white);
}

.ap-pagination__link--nav {
    min-width: auto;
}

.ap-pagination__dots {
    color: var(--gray-300);
    font-weight: 700;
    letter-spacing: .08em;
}

/* ─── Profile Sidebar ───────────────────────────────────────── */
.ap-sidebar { position: sticky; top: 90px; }

.ap-sidebar-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 20px rgba(0,0,0,.05);
    margin-bottom: 1rem;
}

.ap-sidebar-card__title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--gray-400);
    margin: 0 0 1rem;
}

/* Topic badges in sidebar */
.ap-topic-list { list-style: none; margin: 0; padding: 0; }

.ap-topic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px solid var(--gray-50);
}

.ap-topic-item:last-child { border-bottom: none; }

.ap-topic-item__name {
    font-size: .82rem;
    color: var(--navy-700);
    font-weight: 500;
}

.ap-topic-item__count {
    font-size: .7rem;
    color: var(--gray-400);
    background: var(--gray-50);
    padding: .1rem .45rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Quick nav in sidebar */
.ap-quick-links {
    background: linear-gradient(150deg, var(--navy-900), var(--navy-800));
    border-radius: 1rem;
    padding: 1.5rem;
}

.ap-quick-links__title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(var(--primary-rgb), .65);
    margin: 0 0 .9rem;
}

.ap-quick-links__list { list-style: none; margin: 0; padding: 0; }
.ap-quick-links__item { margin-bottom: .1rem; }

.ap-quick-links__item a {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    padding: .4rem .5rem;
    border-radius: .375rem;
    transition: all .15s;
}

.ap-quick-links__item a:hover {
    background: rgba(255,255,255,.05);
    color: var(--gold-400);
}

.ap-quick-links__item a i { color: var(--gold-500); font-size: .78rem; }

/* ─── Empty state ───────────────────────────────────────────── */
.au-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--gray-400);
}

.au-empty i { font-size: 2.5rem; display: block; margin-bottom: .75rem; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .au-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .au-grid { grid-template-columns: repeat(2, 1fr); }

    .ap-hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ap-hero__avatar {
        margin: 0 auto;
        width: 96px;
        height: 96px;
        font-size: 2rem;
    }

    .ap-hero__bio { max-width: 100%; }
    .ap-hero__meta { justify-content: center; }
    .ap-hero__social { justify-content: center; }

    .ap-container {
        grid-template-columns: 1fr;
    }

    .ap-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 600px) {
    .au-grid { grid-template-columns: repeat(2, 1fr); }
    .au-card { padding: 1.25rem 1rem; }
    .au-card__avatar { width: 60px; height: 60px; font-size: 1.1rem; }
    .ap-article-item { padding: .85rem 1.25rem; }
    .ap-articles-header { padding: 1rem 1.25rem; }
    .ap-pagination {
        padding: 1rem 1.25rem;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .au-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
}
