/* ============================================================
   AuthorSEO Pro — Frontend Styles
   Premium Author Bio Card — EEAT Optimized
   ============================================================ */

:root {
    --as-accent:    #1a56db;
    --as-radius:    16px;
    --as-avatar:    96px;
    /* Derived tokens — override via Settings, not here */
    --as-accent-10: color-mix(in srgb, var(--as-accent) 10%, transparent);
    --as-accent-20: color-mix(in srgb, var(--as-accent) 20%, transparent);
    --as-accent-60: color-mix(in srgb, var(--as-accent) 60%, transparent);
}

/* ── WRAPPER ────────────────────────────────── */
.authorseo-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 3rem 0 2rem;
    line-height: 1.6;
    color: #1a1a2e;
}

/* ── DIVIDER ────────────────────────────────── */
.as-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.as-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d1d5db, transparent);
}
.as-divider-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #6b7280;
    white-space: nowrap;
}
.as-divider-label svg { color: var(--as-accent); }

/* ── CARD BASE ──────────────────────────────── */
.as-card {
    border-radius: var(--as-radius);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

/* Elevated (default) */
.authorseo-style-elevated .as-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.06),
        0 8px 32px rgba(0,0,0,0.08),
        0 0 0 1px rgba(0,0,0,0.02);
}
.authorseo-style-elevated .as-card:hover {
    box-shadow:
        0 2px 6px rgba(0,0,0,0.08),
        0 16px 48px rgba(0,0,0,0.12),
        0 0 0 1px rgba(0,0,0,0.03);
}

/* Minimal */
.authorseo-style-minimal .as-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-top: 3px solid var(--as-accent);
    border-radius: 0;
    padding-top: 24px;
}

/* Dark */
.authorseo-style-dark .as-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    color: #e2e8f0;
}
.authorseo-style-dark .as-bio-text,
.authorseo-style-dark .as-org,
.authorseo-style-dark .as-credentials      { color: #94a3b8; }
.authorseo-style-dark .as-name             { color: #f1f5f9; }
.authorseo-style-dark .as-stats            { background: #1e293b; border-color: #334155; }
.authorseo-style-dark .as-stat strong      { color: #f1f5f9; }
.authorseo-style-dark .as-stat span        { color: #64748b; }
.authorseo-style-dark .as-social-link      { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.authorseo-style-dark .as-social-link:hover { background: var(--as-accent); border-color: var(--as-accent); color: #fff; }
.authorseo-style-dark .as-footer          { background: #0a0f1e; border-color: #1e293b; }
.authorseo-style-dark .as-updated         { color: #475569; }
.authorseo-style-dark .as-tag             { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); color: #94a3b8; }
.authorseo-style-dark .as-quote           { border-color: var(--as-accent); background: rgba(255,255,255,0.04); }
.authorseo-style-dark .as-quote p         { color: #cbd5e1; }

/* Bordered */
.authorseo-style-bordered .as-card {
    background: #ffffff;
    border: 2px solid var(--as-accent);
    box-shadow: 4px 4px 0 var(--as-accent-20);
}

/* ── QUOTE / TAGLINE ────────────────────────── */
.as-quote {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--as-accent-10);
    border-left: 3px solid var(--as-accent);
}
.as-quote-mark {
    font-family: Georgia, serif;
    font-size: 48px;
    line-height: 1;
    color: var(--as-accent-60);
    flex-shrink: 0;
    margin-top: -8px;
}
.as-quote p {
    margin: 0;
    font-size: 14px;
    font-style: italic;
    font-weight: 500;
    color: #374151;
    line-height: 1.6;
}

/* ── MAIN LAYOUT ────────────────────────────── */
.as-main {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 24px;
}

/* ── AVATAR ─────────────────────────────────── */
.as-avatar-col {
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.as-avatar-ring {
    position: relative;
    width: calc(var(--as-avatar) + 6px);
    height: calc(var(--as-avatar) + 6px);
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--as-accent), var(--as-accent-60));
    flex-shrink: 0;
}
.as-avatar {
    width: var(--as-avatar);
    height: var(--as-avatar);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #f3f4f6;
    border: 3px solid #fff;
}
.as-verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--as-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ── CONTENT ────────────────────────────────── */
.as-content { flex: 1; min-width: 0; }

/* Header row */
.as-header { margin-bottom: 12px; }
.as-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.as-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    line-height: 1.2;
    letter-spacing: -0.3px;
}
a.as-name:hover { color: var(--as-accent); }
.as-job-title {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--as-accent);
    background: var(--as-accent-10);
    border: 1px solid var(--as-accent-20);
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
    line-height: 1.5;
}
.as-org {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 6px;
}
.as-org svg { color: #9ca3af; flex-shrink: 0; }
.as-credentials {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    margin: 0 0 4px;
}
.as-credentials svg { flex-shrink: 0; }

/* Bio text */
.as-bio-text {
    font-size: 14px;
    line-height: 1.75;
    color: #4b5563;
    margin: 0 0 14px;
}

/* Expertise tags */
.as-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.as-tag {
    font-size: 11.5px;
    font-weight: 600;
    color: #1e40af;
    background: rgba(30,64,175,0.07);
    border: 1px solid rgba(30,64,175,0.15);
    padding: 4px 11px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    transition: background 0.15s, border-color 0.15s;
}
.as-tag:hover {
    background: rgba(30,64,175,0.12);
    border-color: rgba(30,64,175,0.25);
}

/* Key stats */
.as-stats {
    display: flex;
    gap: 0;
    margin-bottom: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.as-stat {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-right: 1px solid #e5e7eb;
}
.as-stat:last-child { border-right: none; }
.as-stat strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.as-stat span {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Social links */
.as-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.as-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.18s ease;
    white-space: nowrap;
    line-height: 1;
}
.as-social-link:hover {
    background: var(--as-accent);
    color: #ffffff;
    border-color: var(--as-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--as-accent-20);
    text-decoration: none;
}
.as-social-link svg { flex-shrink: 0; }
.as-link-archive {
    border-color: var(--as-accent-20);
    color: var(--as-accent);
    background: var(--as-accent-10);
}

/* ── FOOTER BAR ─────────────────────────────── */
.as-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 24px;
    background: #f9fafb;
    border-top: 1px solid #f0f0f0;
}
.as-eeat-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.as-eeat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 5px;
    line-height: 1;
}
.as-eeat-ex  { background: rgba(107,114,128,0.1); color: #374151; border: 1px solid rgba(107,114,128,0.2); }
.as-eeat-ex2 { background: rgba(234,88,12,0.08);  color: #c2410c; border: 1px solid rgba(234,88,12,0.2); }
.as-eeat-a   { background: rgba(26,86,219,0.08);  color: #1e40af; border: 1px solid rgba(26,86,219,0.2); }
.as-eeat-t   { background: rgba(5,150,105,0.08);  color: #065f46; border: 1px solid rgba(5,150,105,0.2); }
.as-updated {
    font-size: 11px;
    color: #9ca3af;
    font-style: normal;
}

/* ── RESPONSIVE ─────────────────────────────── */
@media ( max-width: 600px ) {
    .as-main { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
    .as-avatar-col { flex-direction: row; align-items: center; }
    .as-name { font-size: 1.1rem; }
    .as-stats { flex-wrap: wrap; }
    .as-stat { min-width: 80px; }
    .as-footer { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 20px; }
    .as-eeat-row { gap: 4px; }
}

/* ── ENTER ANIMATION ────────────────────────── */
@media ( prefers-reduced-motion: no-preference ) {
    .authorseo-wrap {
        animation: as-fade-in 0.4s ease both;
    }
    @keyframes as-fade-in {
        from { opacity: 0; transform: translateY(12px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .as-social-link { will-change: transform; }
    .as-avatar-ring { transition: box-shadow 0.3s ease; }
    .authorseo-wrap:hover .as-avatar-ring {
        box-shadow: 0 0 0 4px var(--as-accent-10);
    }
}

/* ── SYSTEM DARK MODE ───────────────────────── */
@media ( prefers-color-scheme: dark ) {
    .authorseo-style-elevated .as-card            { background: #1e293b; border-color: #334155; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
    .authorseo-style-elevated .as-name            { color: #f1f5f9; }
    .authorseo-style-elevated .as-bio-text        { color: #94a3b8; }
    .authorseo-style-elevated .as-org,
    .authorseo-style-elevated .as-credentials     { color: #64748b; }
    .authorseo-style-elevated .as-stats           { background: #0f172a; border-color: #334155; }
    .authorseo-style-elevated .as-stat strong     { color: #f1f5f9; }
    .authorseo-style-elevated .as-social-link     { background: #0f172a; border-color: #334155; color: #e2e8f0; }
    .authorseo-style-elevated .as-footer          { background: #0f172a; border-color: #1e293b; }
    .authorseo-style-elevated .as-divider-line    { background: linear-gradient(90deg, transparent, #334155, transparent); }
}
