/* Text pages (page.php), About body, and author archives (author.php) */

.trust-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.trust-header {
    padding: 8px 0 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
}

.trust-title {
    font-size: var(--fs-h1);
    line-height: 1.15;
    margin: 0 0 10px;
    color: var(--text-primary, #111827);
}

.trust-updated {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted, #6b7280);
}

.trust-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-primary, #111827);
}

.trust-body p { margin: 0 0 1.2em; }

.trust-body .trust-lead {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-secondary, #4b5563);
}

.trust-body h2 {
    font-size: var(--fs-h2);
    line-height: 1.3;
    margin: 40px 0 12px;
    color: var(--text-primary, #111827);
    scroll-margin-top: 90px;
}

.trust-body h3 {
    font-size: 19px;
    margin: 28px 0 10px;
}

.trust-body ul,
.trust-body ol {
    margin: 0 0 1.2em;
    padding-left: 1.3em;
}

.trust-body li { margin: 0 0 0.55em; }
.trust-body li::marker { color: var(--primary-color, #2550f0); }

.trust-body a {
    color: var(--primary-color, #2550f0);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

.trust-body a:hover { text-decoration-thickness: 2px; }

.trust-body code {
    font-size: 0.88em;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--bg-secondary, #eef0f3);
}

.trust-body .trust-toc {
    margin: 24px 0 8px;
    padding: 16px 20px;
    border: 1px dashed var(--border-color, rgba(0, 0, 0, 0.1));
    border-radius: var(--radius-md, 12px);
    background: var(--card-bg, #fff);
}

.trust-body .trust-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 24px;
    font-size: 15px;
}

.trust-body .trust-toc li { margin: 0 0 6px; break-inside: avoid; }
.trust-body .trust-toc a { text-decoration: none; }
.trust-body .trust-toc a:hover { text-decoration: underline; }

.trust-body .trust-meta {
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    font-size: 15px;
    color: var(--text-secondary, #4b5563);
}

/* About: shorter hero so the text below is visible */
.grid-section.about-hero-compact {
    height: clamp(420px, 62vh, 560px);
}

.about-hero-compact .grid-center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.about-hero-compact .grid-center-cta.is-secondary {
    background: transparent;
    color: var(--primary-color, #2550f0) !important;
    border: 1.5px solid var(--primary-color, #2550f0);
}

.about-hero-compact .grid-center-cta.is-secondary:hover {
    background: rgba(37, 80, 240, 0.08);
}

.about-body {
    padding-top: 40px;
}

/* ==========================================================================
   Author archive (author.php): centered profile hero + article feed
   ========================================================================== */
.author-arc {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px 64px;
}

/* Center the whole page column like the homepage / other templates.
   The site's .main-content is a flex item with margin-right:auto only, which
   left-aligns it; symmetric auto margins center it. */
@media (min-width: 1025px) {
    main.main-content.trust-main {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Breadcrumbs use the shared .w3-crumbs component (refresh.css) */

/* Profile hero: gradient cover + centered avatar and details */
.author-hero {
    position: relative;
    overflow: hidden;
    background: var(--card-bg, #fff);
    border-radius: var(--radius-lg, 16px);
    margin-bottom: 32px;
}

.author-hero-cover {
    position: relative;
    height: 76px;
    background: var(--brand-gradient, linear-gradient(135deg, #2550f0 0%, #1e40af 100%));
}
.author-hero-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 14% 140%, rgba(255, 255, 255, 0.34), transparent 55%),
        radial-gradient(circle at 86% -40%, rgba(255, 255, 255, 0.22), transparent 52%);
}

.author-hero-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 0 32px 24px;
    margin-top: -38px;
}

.author-hero-avatar {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    object-fit: contain;
    background: var(--card-bg, #fff);
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid var(--hairline, rgba(15, 23, 42, 0.06));
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}

.author-hero-kicker {
    display: inline-block;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-color, #2550f0);
}

.author-hero-name {
    font-size: var(--fs-h1);
    line-height: 1.15;
    margin: 0 0 4px;
    color: var(--text-primary, #111827);
    letter-spacing: -0.02em;
}

.author-hero-role {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.author-hero-bio {
    margin: 0 0 16px;
    max-width: 58ch;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary, #4b5563);
}

.author-hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}
.author-hero-stats li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 112px;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--surface-tint, rgba(15, 23, 42, 0.035));
}
.author-hero-stats strong {
    font-size: 18px;
    line-height: 1;
    color: var(--text-primary, #111827);
}
.author-hero-stats span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
}

.author-hero-follow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
}
.author-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary, #111827);
    background: var(--surface-tint, rgba(15, 23, 42, 0.035));
    transition: background 0.2s, color 0.2s;
}
.author-follow-btn:hover {
    background: rgba(37, 80, 240, 0.1);
    color: var(--primary-color, #2550f0);
}
.author-follow-btn--rss { background: #f97316; color: #fff; }
.author-follow-btn--rss:hover { background: #ea580c; color: #fff; }

/* Article feed */
.author-feed { min-width: 0; }

.author-arc-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    margin: 0 0 18px;
    color: var(--text-primary, #111827);
}
.author-arc-heading::before {
    content: "";
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: var(--primary-color, #2550f0);
}

.author-news {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.author-news .news-arc-card {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
}
.author-news .news-arc-img {
    height: auto;
    min-height: 160px;
    aspect-ratio: auto;
}
.author-news .news-arc-img img,
.author-news .news-arc-img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.author-news .news-arc-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    padding: 18px 22px;
}
.author-news .news-arc-title { font-size: 19px; margin: 0; }
.author-news .news-arc-excerpt { margin: 0; }
.author-news .news-arc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 6px;
}
.author-news .news-arc-read {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color, #2550f0);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}
.author-news .news-arc-card:hover .news-arc-read,
.author-news .news-arc-card:focus-visible .news-arc-read {
    opacity: 1;
    transform: none;
}

.author-arc-empty {
    color: var(--text-secondary, #4b5563);
    padding: 24px 0;
}

.news-arc-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 32px 0 0;
}
.author-arc .news-arc-pagination .page-numbers {
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary, #111827);
    font-size: 14px;
    background: var(--surface-tint, rgba(15, 23, 42, 0.035));
}
.author-arc .news-arc-pagination .page-numbers:hover {
    background: rgba(37, 80, 240, 0.1);
    color: var(--primary-color, #2550f0);
}
.author-arc .news-arc-pagination .page-numbers.current {
    background: var(--primary-color, #2450f1);
    color: #fff;
}

/* About page text stack */
.wp-site-blocks.about-main { flex-direction: column; }
.about-main > .about-body { width: 100%; box-sizing: border-box; }
.trust-main { width: 100%; max-width: 100%; box-sizing: border-box; }

/* Dark theme */
body.theme-dark .trust-body a,
body.theme-dark .trust-body li::marker,
body.theme-dark .author-hero-kicker {
    color: #8aa4ff;
}
body.theme-dark .author-follow-btn:hover {
    background: rgba(138, 164, 255, 0.14);
    color: #8aa4ff;
}
body.theme-dark .author-follow-btn--rss,
body.theme-dark .author-follow-btn--rss:hover {
    background: #f97316;
    color: #fff;
}
body.theme-dark .about-hero-compact .grid-center-cta.is-secondary {
    color: #8aa4ff !important;
    border-color: #8aa4ff;
}

@media (max-width: 640px) {
    .author-arc { padding: 4px 16px 48px; }
    .author-hero { margin-bottom: 28px; }
    .author-hero-cover,
    .author-hero-cover::after { height: 96px; }
    .author-hero-body { padding: 0 20px 26px; margin-top: -46px; }
    .author-hero-avatar { width: 88px; height: 88px; border-radius: 22px; padding: 11px; }
    .author-hero-stats li { min-width: 0; flex: 1 1 0; padding: 12px 14px; }
    .author-news .news-arc-card { grid-template-columns: 120px minmax(0, 1fr); }
    .author-news .news-arc-img { min-height: 100%; }
    .author-news .news-arc-content { padding: 12px 14px; }
    .author-news .news-arc-title { font-size: 15px; }
    .author-news .news-arc-excerpt,
    .author-news .news-arc-tags { display: none; }
    .author-news .news-arc-read { display: none; }
}
