/* ============================================================
   Author Bio Component — author-bio.css
   All styles are scoped under .ab-* to avoid conflicts with main.css
   ============================================================ */

/* ---------- Keyframes ---------- */
@keyframes ab-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}
@keyframes ab-fadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Outer wrapper ---------- */
.ab-wrapper {
    max-width: 56rem;          /* ~896px, mirrors max-w-4xl */
    margin: 0 auto 30px auto;
    padding: 1.5rem;
    background-color: #252a37;
    border-radius: 1rem;
    box-sizing: border-box;
}

/* ---------- Shared card base ---------- */
.ab-card {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    box-sizing: border-box;
}

/* ---------- Header card ---------- */
.ab-header-card {
    position: relative;
    overflow: hidden;
}

.ab-header-glow {
    position: absolute;
    top: 0; right: 0;
    width: 8rem; height: 8rem;
    background: radial-gradient(circle, rgba(96,165,250,.2) 0%, rgba(167,139,250,.2) 100%);
    border-radius: 50%;
    filter: blur(2rem);
    pointer-events: none;
}

.ab-header-inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/* Avatar */
.ab-avatar {
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.15);
}
.ab-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Name row */
.ab-header-info {
    flex: 1;
    min-width: 0;
}

.ab-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.ab-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.ab-star-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: #eab308;
    animation: ab-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.ab-role {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2563eb;
}

/* Achievement pills */
.ab-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ab-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    cursor: default;
    transition: border-color .2s, background .2s;
}
.ab-pill:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.ab-pill:hover .ab-pill__icon {
    transform: scale(1.1);
}

.ab-pill__icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    transition: transform .2s;
}
.ab-pill__icon--yellow { color: #eab308; }
.ab-pill__icon--blue   { color: #3b82f6; }
.ab-pill__icon--green  { color: #22c55e; }
.ab-pill__icon--purple { color: #a855f7; }

.ab-pill__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

/* ---------- Skills card ---------- */
.ab-skills-card {
    /* inherits .ab-card */
}

.ab-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}
.ab-section-title__icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #f97316;
    flex-shrink: 0;
}

.ab-skills {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ab-skill-item {
    cursor: pointer;
}

.ab-skill-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.ab-skill-item__name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}
.ab-skill-item__icon {
    width: 1rem;
    height: 1rem;
}

.ab-skill-item__pct {
    font-size: 0.875rem;
    font-weight: 700;
    color: #64748b;
    transition: color .2s, transform .2s;
    display: inline-block;
}
.ab-skill-item__pct--active {
    color: #2563eb;
    transform: scale(1.1);
}

.ab-skill-item__track {
    height: 0.5rem;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.ab-skill-item__bar {
    height: 100%;
    border-radius: 9999px;
    width: 0%;
    opacity: .8;
    transition: width .8s ease-out, opacity .3s;
}
.ab-skill-item__bar--active {
    opacity: 1;
}
.ab-skill-item__bar--purple { background: #a855f7; }
.ab-skill-item__bar--blue   { background: #3b82f6; }
.ab-skill-item__bar--indigo { background: #6366f1; }

/* ---------- Accordion group ---------- */
.ab-accordion-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ab-accordion {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    overflow: hidden;
    transition: box-shadow .2s;
}
.ab-accordion:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.ab-accordion__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background .2s;
}
.ab-accordion__toggle:hover {
    background: #f8fafc;
}

.ab-accordion__toggle-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ab-accordion__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    flex-shrink: 0;
}
.ab-accordion__icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #ffffff;
}

.ab-accordion__label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.ab-accordion__chevron {
    width: 1.25rem;
    height: 1.25rem;
    color: #64748b;
    flex-shrink: 0;
    transition: transform .3s ease;
}

/* Body / collapsible panel */
.ab-accordion__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

.ab-list {
    margin: 0;
    padding: 0.5rem 1.5rem 1.25rem 1.5rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ab-list__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #374151;
    font-size: 0.925rem;
    animation: ab-fadeIn .3s ease-out forwards;
}

.ab-list__dot {
    display: inline-block;
    flex-shrink: 0;
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: #3b82f6;
    margin-top: 0.45rem;
}

/* ---------- Bio section ---------- */
.ab-bio-section {
    border: 1px solid #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
}

.ab-bio-section__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(90deg, #3b82f6, #a855f7);
    border: none;
    cursor: pointer;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    transition: filter .2s;
}
.ab-bio-section__toggle:hover {
    filter: brightness(1.1);
}

.ab-bio-section__toggle-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ab-bio-section__icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}
.ab-bio-section__chevron {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    transition: transform .3s ease;
}

.ab-bio-section__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

.ab-bio-section__text {
    padding: 1rem 1.5rem 1.5rem;
    background: #ffffff;
    color: #374151;
    line-height: 1.7;
}
.ab-bio-section__text p {
    margin: 0 0 0.75rem 0;
    font-size: 16px;
    font-family: "Inter", sans-serif !important;
}
.ab-bio-section__text p:last-child {
    margin-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .ab-wrapper {
        padding: 1rem;
    }
    .ab-header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .ab-name-row {
        justify-content: center;
    }
    .ab-pills {
        justify-content: center;
    }
    .ab-name {
        font-size: 1.25rem;
    }
}