/* Author Archive Page
 * Brand: #1DB0E1 (blue), #206389 (dark-blue), #111318 (dark text), #e4e7ed (border)
 * Dark mode overrides at bottom via html.bs-dark selectors.
 */

/* ── Hero ─────────────────────────────────────── */

.bs-author-hero {
    display: flex;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    background: #1a1a1f;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.bs-author-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 96px;
    height: 96px;
}

.bs-author-initials {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.02em;
    user-select: none;
}

.bs-author-avatar {
    position: absolute;
    inset: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.15);
    display: block;
}

.bs-author-info {
    flex: 1;
    min-width: 0;
}

.bs-author-name {
    font-size: 22px !important;
    font-weight: 500 !important;
    color: #fff !important;
    margin: 0 0 .5rem !important;
    line-height: 1.2 !important;
}

.bs-author-bio {
    font-size: 13px;
    line-height: 1.6;
    color: #a8a8b3;
    margin: 0 0 .875rem;
}

.bs-author-bio a {
    color: #1DB0E1;
    text-decoration: none;
}

.bs-author-bio a:hover {
    color: #5fd3f7;
    text-decoration: underline;
}

.bs-author-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    color: #888;
    align-items: center;
}

.bs-author-stats strong {
    color: #ccc;
    font-weight: 600;
}

.bs-author-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bs-author-social-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #888;
    transition: color .15s;
}

.bs-author-social-label {
    font-size: 12px;
}

.bs-author-social-link:hover {
    color: #fff;
}

/* ── Filter bar ───────────────────────────────── */

.bs-author-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 1rem 1.5rem;
    background: #fff;
    border-bottom: .5px solid #e4e7ed;
    width: 100%;
    box-sizing: border-box;
}

.bs-filter-row1 {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.bs-author-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.bs-author-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.bs-author-search-wrap .bs-author-search-icon {
    width: 14px;
    height: 14px;
    left: 10px;
}

.bs-author-search {
    width: 100%;
    border: .5px solid #e4e7ed;
    border-radius: 8px;
    font-size: 13px;
    color: #111318;
    outline: none;
    background: #f9fafb;
    box-sizing: border-box;
}

.bs-author-filter .bs-author-search-wrap .bs-author-search {
    padding: 7px 34px 7px 38px;
}

.bs-author-search-clear {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #e4e7ed;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    color: #6b7280;
    transition: background .15s, color .15s;
}

.bs-author-search-clear.is-visible {
    display: flex;
}

.bs-author-search-clear:hover {
    background: #d1d5db;
    color: #111318;
}

.bs-author-search:focus {
    border-color: #1DB0E1;
    background: #fff;
}

.bs-author-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.bs-author-chips::-webkit-scrollbar {
    display: none;
}

.bs-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: .5px solid #e4e7ed;
    background: #fff;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, background .15s, color .15s;
}

.bs-chip:hover {
    border-color: #1DB0E1;
    color: #1DB0E1;
}

.bs-chip.is-active {
    background: #1DB0E1;
    color: #fff;
    border-color: #1DB0E1;
}

.bs-chip span {
    opacity: .6;
    font-weight: 400;
}

.bs-chip.is-active span {
    opacity: .75;
}

.bs-author-sort {
    width: 100%;
    padding: 7px 10px;
    border: .5px solid #e4e7ed;
    border-radius: 8px;
    font-size: 12px;
    color: #374151;
    background: #fff;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
}

.bs-author-sort:focus {
    border-color: #1DB0E1;
}

/* ── Featured article ─────────────────────────── */

.bs-author-featured {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: .5px solid #c7dfef;
    border-radius: 10px;
    margin: 1rem 1.5rem;
    background: #f0f8ff;
    align-items: flex-start;
}

.bs-featured-img-link {
    flex-shrink: 0;
}

.bs-featured-img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.bs-featured-body {
    flex: 1;
    min-width: 0;
}

.bs-featured-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}

.bs-featured-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #fff;
    background: #1DB0E1;
    padding: 2px 7px;
    border-radius: 4px;
}

.bs-featured-cat {
    font-size: 12px;
    color: #1DB0E1;
    text-decoration: none;
    font-weight: 500;
}

.bs-featured-cat:hover {
    text-decoration: underline;
}

.bs-featured-readtime {
    font-size: 11px;
    color: #9ca3af;
}

.bs-featured-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 .5rem !important;
    color: #111318;
}

.bs-featured-title a {
    color: inherit;
    text-decoration: none;
}

.bs-featured-title a:hover {
    color: #1DB0E1;
}

.bs-featured-excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bs-featured-date {
    font-size: 11px;
    color: #9ca3af;
}

/* ── Article grid ─────────────────────────────── */

.bs-article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 1.25rem 1.5rem;
}

.bs-article-card {
    border: .5px solid #e4e7ed;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s;
}

.bs-article-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
}

.bs-card-thumb-wrap {
    position: relative;
    height: 100px;
    overflow: hidden;
    background: #f3f4f6;
}

.bs-card-thumb-wrap--no-img {
    height: 32px;
}

.bs-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bs-card-cat {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #1DB0E1;
    padding: 2px 7px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

.bs-article-card .bs-card-cat,
.bs-article-card .bs-card-cat:visited,
.bs-article-card .bs-card-cat:hover {
    color: #fff;
}

.bs-card-thumb-wrap--no-img .bs-card-cat {
    position: static;
    display: inline-block;
    margin: 8px 0 0 8px;
    background: #e5f5fb;
    color: #1DB0E1;
}

.bs-card-body {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bs-card-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #111318;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: .4rem;
}

.bs-card-title:hover {
    color: #1DB0E1;
}

.bs-card-excerpt {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 auto;
    padding-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bs-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
    padding-top: .5rem;
    border-top: .5px solid #f3f4f6;
    margin-top: auto;
}

/* ── Load more ────────────────────────────────── */

.bs-load-more-wrap {
    text-align: center;
    padding: 1.5rem;
    border-top: .5px solid #e4e7ed;
}

.bs-load-caption {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 .75rem;
}

.bs-load-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #1DB0E1;
    color: #fff;
    border: none;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}

.bs-load-more:hover {
    background: #1a9ecb;
}

.bs-load-more:disabled {
    opacity: .6;
    cursor: default;
}

.bs-load-more-icon {
    transition: transform .4s;
}

.bs-load-more.is-loading .bs-load-more-icon {
    animation: bs-spin .6s linear infinite;
}

@keyframes bs-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.bs-load-progress {
    height: 4px;
    max-width: 200px;
    background: #e4e7ed;
    margin: .875rem auto 0;
    border-radius: 2px;
    overflow: hidden;
}

.bs-load-progress-fill {
    height: 100%;
    background: #1DB0E1;
    border-radius: 2px;
    transition: width .35s ease;
}

.bs-author-end-state {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

.bs-author-end-state a {
    color: #1DB0E1;
    text-decoration: none;
}

.bs-author-end-state a:hover {
    text-decoration: underline;
}

/* ── Responsive ───────────────────────────────── */

@media (max-width: 640px) {
    .bs-author-hero {
        gap: 1rem;
        padding: 1.25rem 1rem;
        align-items: center;
    }

    .bs-author-avatar-wrap {
        width: 72px;
        height: 72px;
        flex-shrink: 0;
    }

    .bs-author-avatar {
        width: 72px;
        height: 72px;
    }

    .bs-author-name {
        font-size: 18px !important;
    }

    .bs-author-filter {
        padding: .875rem 1rem;
    }

    .bs-author-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .bs-filter-row1 {
        grid-template-columns: 1fr;
    }

    .bs-author-sort {
        width: 100%;
    }

    .bs-author-featured {
        flex-direction: column;
        margin: .75rem 1rem;
    }

    .bs-featured-img {
        width: 100%;
        height: 160px;
    }

    .bs-article-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .bs-article-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Dark mode ────────────────────────────────── */

html.bs-dark .bs-author-filter {
    background: #1c1c30;
    border-bottom-color: #2d2d48;
}

html.bs-dark .bs-author-search {
    background: #141422;
    border-color: #2d2d48;
    color: #e4e4ed;
}

html.bs-dark .bs-author-search:focus {
    border-color: #5fa8e0;
    background: #1c1c30;
}

html.bs-dark .bs-author-search-icon {
    color: #6e6e88;
}

html.bs-dark .bs-author-search-clear {
    background: #2d2d48;
    color: #a8a8be;
}

html.bs-dark .bs-author-search-clear:hover {
    background: #3d3d5c;
    color: #e4e4ed;
}

html.bs-dark .bs-chip {
    background: #1c1c30;
    border-color: #2d2d48;
    color: #a8a8be;
}

html.bs-dark .bs-chip:hover {
    border-color: #5fa8e0;
    color: #5fa8e0;
}

html.bs-dark .bs-chip.is-active {
    background: #1a3a5c;
    border-color: #5fa8e0;
    color: #93c5fd;
}

html.bs-dark .bs-author-sort {
    background: #1c1c30;
    border-color: #2d2d48;
    color: #a8a8be;
}

html.bs-dark .bs-author-featured {
    background: #141e2e;
    border-color: #1e3a5f;
}

html.bs-dark .bs-featured-title {
    color: #e4e4ed;
}

html.bs-dark .bs-featured-title a {
    color: #e4e4ed;
}

html.bs-dark .bs-featured-title a:hover {
    color: #5fa8e0;
}

html.bs-dark .bs-featured-excerpt {
    color: #a8a8be;
}

html.bs-dark .bs-featured-readtime,
html.bs-dark .bs-featured-date {
    color: #6e6e88;
}

html.bs-dark .bs-article-card {
    background: #1c1c30;
    border-color: #2d2d48;
}

html.bs-dark .bs-article-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,.3);
}

html.bs-dark .bs-card-thumb-wrap {
    background: #141422;
}

html.bs-dark .bs-card-title {
    color: #e4e4ed;
}

html.bs-dark .bs-card-title:hover {
    color: #5fa8e0;
}

html.bs-dark .bs-card-excerpt {
    color: #a8a8be;
}

html.bs-dark .bs-card-meta {
    color: #6e6e88;
    border-top-color: #252540;
}

html.bs-dark .bs-card-thumb-wrap--no-img .bs-card-cat {
    background: #1a3a5c;
    color: #93c5fd;
}

html.bs-dark .bs-load-more-wrap {
    border-top-color: #2d2d48;
}

html.bs-dark .bs-load-caption {
    color: #6e6e88;
}

html.bs-dark .bs-load-progress {
    background: #2d2d48;
}

html.bs-dark .bs-author-end-state {
    color: #6e6e88;
}
