/* ==========================================================================
   Author Bio Profile Card  —  author-bio.css
   Designed to match the Yavasa purple brand theme (light page background)
   Place at: wp-content/themes/graceful-opus/css/author-bio.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables — Yavasa brand palette
   -------------------------------------------------------------------------- */
:root {
    --ab-brand:       #6b21a8;   /* Yavasa deep purple                  */
    --ab-brand-mid:   #7c3aed;   /* mid purple                          */
    --ab-brand-light: #a855f7;   /* light purple                        */
    --ab-accent:      #7c3aed;   /* accent (buttons, icons, bars)       */

    --ab-page-bg:     #f5f3ff;   /* very light lavender page wash       */
    --ab-card-bg:     #ffffff;   /* card surface — clean white          */
    --ab-card-alt:    #faf8ff;   /* alternate card (slightly tinted)    */
    --ab-border:      #e9d5ff;   /* soft purple border                  */
    --ab-border-dark: #c4b5fd;   /* stronger border for emphasis        */

    --ab-text:        #1e1b4b;   /* near-black indigo — very readable   */
    --ab-text-mid:    #4c1d95;   /* medium purple text                  */
    --ab-muted:       #6b7280;   /* neutral grey for secondary text     */

    --ab-radius:      1rem;
    --ab-radius-sm:   0.625rem;
    --ab-transition:  0.25s ease;

    /* skill bar colours — vivid against white */
    --ab-purple:  #7c3aed;
    --ab-blue:    #2563eb;
    --ab-indigo:  #4f46e5;
    --ab-green:   #059669;
}

/* --------------------------------------------------------------------------
   Page wrapper — light lavender wash that sits naturally on white sites
   -------------------------------------------------------------------------- */
.ab-page-wrap {
    background: var(--ab-page-bg);
    min-height: 100vh;
    padding: 2.5rem 1rem 3rem;
}

.ab-wrapper {
    max-width: 740px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ab-text);
}

/* --------------------------------------------------------------------------
   Base card
   -------------------------------------------------------------------------- */
.ab-card {
    background: var(--ab-card-bg);
    border: 1px solid var(--ab-border);
    border-radius: var(--ab-radius);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(109,40,217,.08), 0 4px 16px rgba(109,40,217,.06);
}

/* --------------------------------------------------------------------------
   Header card — purple gradient banner at top
   -------------------------------------------------------------------------- */
.ab-header-card {
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 60%, #f3e8ff 100%);
    border-top: 3px solid var(--ab-brand-mid);
}

.ab-header-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(124,58,237,.12) 0%, transparent 70%);
    pointer-events: none;
}

.ab-header-inner {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Avatar */
.ab-avatar { flex-shrink: 0; }
.ab-avatar__img {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50%;
    border: 3px solid var(--ab-brand-mid);
    box-shadow: 0 0 0 4px rgba(124,58,237,.15);
    object-fit: cover;
    display: block;
}

/* Name row */
.ab-header-info { flex: 1; min-width: 0; }
.ab-name-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.ab-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ab-brand);
    line-height: 1.2;
}
.ab-star-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: #d97706;
    flex-shrink: 0;
}
.ab-role {
    margin: .3rem 0 .8rem;
    font-size: .9rem;
    color: var(--ab-text-mid);
    font-weight: 500;
}

/* Pills */
.ab-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.ab-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #f5f3ff;
    border: 1px solid var(--ab-border-dark);
    border-radius: 999px;
    padding: .28rem .7rem;
    font-size: .75rem;
    color: var(--ab-text-mid);
    font-weight: 500;
}
.ab-pill:hover {
    background: var(--ab-brand-mid);
    color: #fff;
    border-color: var(--ab-brand-mid);
    transition: all var(--ab-transition);
}
.ab-pill:hover .ab-pill__icon { color: #fff !important; }

.ab-pill__icon { width: .85rem; height: .85rem; flex-shrink: 0; }
.ab-pill__icon--yellow { color: #d97706; }
.ab-pill__icon--blue   { color: #2563eb; }
.ab-pill__icon--green  { color: #059669; }
.ab-pill__icon--purple { color: var(--ab-brand-mid); }

/* --------------------------------------------------------------------------
   Skills card
   -------------------------------------------------------------------------- */
.ab-skills-card {
    background: var(--ab-card-alt);
}

.ab-section-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ab-brand);
    margin: 0 0 1.1rem;
}
.ab-section-title__icon {
    width: 1rem;
    height: 1rem;
    color: var(--ab-brand-mid);
}

.ab-skills { display: flex; flex-direction: column; gap: .6rem; }

/* Skill item */
.ab-skill-item {
    padding: .55rem .7rem;
    border-radius: var(--ab-radius-sm);
    border: 1px solid transparent;
    cursor: default;
    transition: background var(--ab-transition), border-color var(--ab-transition),
                box-shadow var(--ab-transition);
}
.ab-skill-item:hover {
    background: #f5f3ff;
    border-color: var(--ab-border-dark);
    box-shadow: 0 2px 8px rgba(124,58,237,.1);
}
.ab-skill-item:hover .ab-skill-item__name  { color: var(--ab-brand-mid); }
.ab-skill-item:hover .ab-skill-item__pct   { color: var(--ab-brand); font-weight: 600; }
.ab-skill-item:hover .ab-skill-item__track { background: #ddd6fe; }

.ab-skill-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .4rem;
}
.ab-skill-item__name {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ab-text);
    transition: color var(--ab-transition);
}
.ab-skill-item__icon {
    width: .9rem;
    height: .9rem;
    color: var(--ab-brand-mid);
}
.ab-skill-item__pct {
    font-size: .8rem;
    font-weight: 500;
    color: var(--ab-muted);
    transition: color var(--ab-transition), font-weight var(--ab-transition);
}
.ab-skill-item__track {
    height: 7px;
    background: #ede9fe;
    border-radius: 999px;
    overflow: hidden;
    transition: background var(--ab-transition);
}
.ab-skill-item__bar {
    height: 100%;
    border-radius: 999px;
    transition: width .85s cubic-bezier(.4,0,.2,1);
}
.ab-skill-item__bar--purple { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.ab-skill-item__bar--blue   { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.ab-skill-item__bar--indigo { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.ab-skill-item__bar--green  { background: linear-gradient(90deg, #059669, #34d399); }

/* --------------------------------------------------------------------------
   Accordion group
   -------------------------------------------------------------------------- */
.ab-accordion-group { display: flex; flex-direction: column; gap: .5rem; }

.ab-accordion {
    background: var(--ab-card-bg);
    border: 1px solid var(--ab-border);
    border-radius: var(--ab-radius-sm);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(109,40,217,.05);
    transition: box-shadow var(--ab-transition), border-color var(--ab-transition);
}
.ab-accordion:hover {
    border-color: var(--ab-border-dark);
    box-shadow: 0 2px 10px rgba(109,40,217,.1);
}

.ab-accordion__toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: .9rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    color: var(--ab-text);
    text-align: left;
    transition: background var(--ab-transition);
}
.ab-accordion__toggle:hover { background: #faf5ff; }

.ab-accordion.is-open { border-color: var(--ab-brand-mid); }
.ab-accordion.is-open .ab-accordion__toggle { background: #f5f3ff; }

.ab-accordion__toggle-left { display: flex; align-items: center; gap: .65rem; }
.ab-accordion__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: #ede9fe;
    border-radius: .4rem;
    flex-shrink: 0;
    transition: background var(--ab-transition);
}
.ab-accordion.is-open .ab-accordion__icon-wrap { background: var(--ab-brand-mid); }
.ab-accordion.is-open .ab-accordion__icon      { color: #fff; }

.ab-accordion__icon { width: .9rem; height: .9rem; color: var(--ab-brand-mid); }
.ab-accordion__label { font-size: .875rem; font-weight: 600; color: var(--ab-text); }

.ab-accordion__chevron {
    width: 1rem;
    height: 1rem;
    color: var(--ab-muted);
    flex-shrink: 0;
    transition: transform var(--ab-transition), color var(--ab-transition);
}
.ab-accordion.is-open .ab-accordion__chevron {
    transform: rotate(180deg);
    color: var(--ab-brand-mid);
}

/* Accordion body */
.ab-accordion__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
    padding: 0 1.1rem;
    border-top: 0px solid var(--ab-border);
}
.ab-accordion.is-open .ab-accordion__body {
    max-height: 600px;
    padding: .5rem 1.1rem 1rem;
    border-top: 1px solid var(--ab-border);
}

/* List inside accordion */
.ab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.ab-list__item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .85rem;
    color: var(--ab-muted);
    line-height: 1.55;
}
.ab-list__dot {
    margin-top: .42rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ab-brand-mid);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Biography section
   -------------------------------------------------------------------------- */
.ab-bio-section {
    background: var(--ab-card-bg);
    border: 1px solid var(--ab-border);
    border-radius: var(--ab-radius-sm);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(109,40,217,.05);
    transition: box-shadow var(--ab-transition), border-color var(--ab-transition);
}
.ab-bio-section:hover {
    border-color: var(--ab-border-dark);
    box-shadow: 0 2px 10px rgba(109,40,217,.1);
}
.ab-bio-section.is-open { border-color: var(--ab-brand-mid); }

.ab-bio-section__toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: .9rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    color: var(--ab-text);
    text-align: left;
    transition: background var(--ab-transition);
}
.ab-bio-section__toggle:hover   { background: #faf5ff; }
.ab-bio-section.is-open .ab-bio-section__toggle { background: #f5f3ff; }

.ab-bio-section__toggle-left {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ab-text);
}
.ab-bio-section__icon { width: 1rem; height: 1rem; color: var(--ab-brand-mid); }
.ab-bio-section__chevron {
    width: 1rem;
    height: 1rem;
    color: var(--ab-muted);
    flex-shrink: 0;
    transition: transform var(--ab-transition), color var(--ab-transition);
}
.ab-bio-section.is-open .ab-bio-section__chevron {
    transform: rotate(180deg);
    color: var(--ab-brand-mid);
}

.ab-bio-section__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, padding .4s ease;
    padding: 0 1.1rem;
}
.ab-bio-section.is-open .ab-bio-section__body {
    max-height: 600px;
    padding: .5rem 1.1rem 1.25rem;
    border-top: 1px solid var(--ab-border);
}

.ab-bio-section__text p {
    font-size: .875rem;
    color: var(--ab-muted);
    line-height: 1.75;
    margin: 0 0 .75rem;
}
.ab-bio-section__text p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .ab-header-inner  { flex-direction: column; align-items: center; text-align: center; }
    .ab-pills         { justify-content: center; }
    .ab-name-row      { justify-content: center; }
    .ab-card          { padding: 1.25rem; }
}
