/*
 * Author Page Styles (2026 design)
 */

/* Override .site-content wrapper for full-width hero */
body.author .site-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

/* Hero */
.author-hero {
    background: linear-gradient(180deg, #F0FDFA 0%, #FFFFFF 100%);
    padding: 2.5rem 0 2.25rem;
    position: relative;
    overflow: hidden;
}

.author-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(13, 148, 136, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(8, 145, 178, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.author-hero-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.author-avatar-large { flex-shrink: 0; }

.author-avatar-large img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-md);
    object-fit: cover;
    display: block;
}

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

.author-hero-name {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.author-hero-title {
    font-size: 1rem;
    color: var(--primary-color);
    margin: 0 0 0.75rem;
    font-weight: 600;
}

.author-hero-bio {
    font-size: 0.93rem;
    line-height: 1.65;
    color: var(--text-gray);
    margin: 0 0 0.75rem;
}

.author-hero-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.6rem;
}

.author-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.author-stat svg { opacity: 0.6; }

/* Social Links */
.author-social-links { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.author-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    transition: all 0.2s ease;
}

.author-social-link:hover {
    background: var(--primary-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.author-social-link svg { display: block; width: 15px; height: 15px; }

/* Bio */
.author-bio-section {
    padding: 1rem 0;
    background: #fff;
}

.author-bio-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 0.6rem;
    line-height: 1.3;
}

.author-bio-content h2:first-child { margin-top: 0; }

.author-bio-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 0.4rem;
    line-height: 1.3;
}

.author-bio-content p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-gray);
    margin: 0 0 1rem;
}

.author-bio-content ul,
.author-bio-content ol {
    margin: 0 0 1rem 1.25rem;
    color: var(--text-gray);
    line-height: 1.75;
}

.author-bio-content li { margin-bottom: 0.25rem; }

.author-bio-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.author-bio-content a:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-color);
}

.author-bio-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Articles */
.author-articles-section { padding: 2rem 0 4rem; background: #fff; }

.author-articles-heading {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
}

.author-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Article Card */
.author-article-card {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.author-article-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.author-article-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.author-article-image {
    width: 140px;
    height: 95px;
    overflow: hidden;
    background: var(--bg-light);
    flex-shrink: 0;
}

.author-article-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background: rgba(236, 254, 255, 0.4);
}

.author-article-placeholder svg { opacity: 0.3; }

.author-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-article-body {
    padding: 0.75rem 1rem;
    flex: 1;
    min-width: 0;
}

.author-article-category {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 0.15rem;
}

.author-article-title {
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.author-article-card:hover .author-article-title { color: var(--primary-color); }

.author-article-meta {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem 0.6rem;
}

.author-article-date-published,
.author-article-date-updated {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.author-article-date-published::before,
.author-article-date-updated::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    flex-shrink: 0;
}

.author-article-date-published::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

.author-article-date-updated::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'%3E%3C/polyline%3E%3Cpath d='M20.49 15a9 9 0 1 1-2.12-9.36L23 10'%3E%3C/path%3E%3C/svg%3E");
}

/* Load More */
.author-load-more-wrap { text-align: center; margin-top: 2rem; }

.author-load-more-btn {
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--bg-white);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.author-load-more-btn:hover { background: var(--primary-bg); }
.author-load-more-btn:disabled { opacity: 0.6; cursor: wait; }

.author-no-articles {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 0;
}

/* Tablet */
@media (max-width: 900px) {
    .author-hero-inner { gap: 1.5rem; }
    .author-avatar-large img { width: 100px; height: 100px; }
    .author-hero-name { font-size: 1.5rem; }
    .author-articles-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 600px) {
    .author-hero { padding: 1.5rem 0; }

    .author-hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .author-avatar-large img { width: 90px; height: 90px; }
    .author-hero-name { font-size: 1.35rem; }
    .author-hero-meta { justify-content: center; }
    .author-social-links { justify-content: center; }
    .author-bio-section { padding: 1.5rem 0 0.5rem; }
    .author-bio-content p { font-size: 0.95rem; }
    .author-articles-section { padding: 1.5rem 0 2.5rem; }
    .author-articles-grid { gap: 0.6rem; }
    .author-article-image { width: 110px; height: 75px; }
}

/* Dark theme ownership */
:root[data-theme="dark"] body.author .author-hero {
    background: linear-gradient(180deg, #152328 0%, #111C20 58%, var(--bg-white) 100%) !important;
}

:root[data-theme="dark"] body.author .author-hero::before {
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(34, 198, 174, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(37, 99, 235, 0.1) 0%, transparent 70%) !important;
}

:root[data-theme="dark"] body.author .author-bio-section,
:root[data-theme="dark"] body.author .author-articles-section {
    background: transparent !important;
}

:root[data-theme="dark"] body.author .author-social-link {
    background: #1A2428 !important;
    border-color: #2F4047 !important;
    color: #A8B8B2 !important;
}

:root[data-theme="dark"] body.author .author-social-link:hover {
    background: rgba(34, 198, 174, 0.14) !important;
    border-color: rgba(34, 198, 174, 0.45) !important;
    color: #E7ECE9 !important;
}

:root[data-theme="dark"] body.author .author-article-card {
    background: #1A2428 !important;
    border-color: #2F4047 !important;
}

:root[data-theme="dark"] body.author .author-article-card:hover {
    border-color: rgba(34, 198, 174, 0.52) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26) !important;
}

:root[data-theme="dark"] body.author .author-article-image {
    background: #131E22 !important;
}

:root[data-theme="dark"] body.author .author-article-placeholder {
    background: #162328 !important;
    color: #8EA09A !important;
}

:root[data-theme="dark"] body.author .author-hero-name,
:root[data-theme="dark"] body.author .author-articles-heading,
:root[data-theme="dark"] body.author .author-article-title,
:root[data-theme="dark"] body.author .author-bio-content h2,
:root[data-theme="dark"] body.author .author-bio-content h3 {
    color: #E7ECE9 !important;
}

:root[data-theme="dark"] body.author .author-hero-bio,
:root[data-theme="dark"] body.author .author-bio-content p,
:root[data-theme="dark"] body.author .author-bio-content ul,
:root[data-theme="dark"] body.author .author-bio-content ol {
    color: #C2CEC9 !important;
}

:root[data-theme="dark"] body.author .author-stat,
:root[data-theme="dark"] body.author .author-article-meta,
:root[data-theme="dark"] body.author .author-no-articles {
    color: #9CB0AA !important;
}

:root[data-theme="dark"] body.author .author-load-more-btn {
    background: #1A2428 !important;
    border-color: #2F4047 !important;
    color: #CFE0DA !important;
}

:root[data-theme="dark"] body.author .author-load-more-btn:hover {
    background: rgba(34, 198, 174, 0.14) !important;
    border-color: rgba(34, 198, 174, 0.45) !important;
    color: #EAF7F2 !important;
}
