/* ================================================================
   UPSWING AUTHOR SYSTEM
   Shared stylesheet. Loads after upswing-global.css on author archives,
   single posts, and /authors/. Consumes tokens only; never redefines them.
   Prefix: .ua-   Never restyles .c-* classes.

   Specificity note: inside .entry-content the global sheet styles links
   with ".entry-content a:not(.c-btn)" (0,2,1). Link rules for components
   that can sit in article flow are written at (0,2,1) so this later sheet
   wins without !important.

   Adapted from sections-to-build/upswing-author-system-child-theme/assets/css/upswing-author.css.
   Section 08 (article card additions) is dropped: Module 5 reuses the
   shared .c-card article card (template-parts/cards/article-card.php)
   instead of a second .ua-card component, so there's nothing here to style.

   Section 04 no longer owns the hero band itself — that's the shared
   .page-hero.page-hero--photo component in upswing-global.css (sections
   32/33), reused here per the upswing-design-handoff bundle. Section 03's
   old breadcrumb wrapper (.ua-page__crumbs) is gone for the same reason:
   the breadcrumb now renders inside the band's own .page-hero__bar.

   01 Utilities
   02 Avatar
   03 Section heads
   04 Author hero (avatar sizing + title/status color only; band chrome
      lives in upswing-global.css)
   05 Facts list, inline lists, links
   06 Full bio disclosure
   07 Topic line, filter
   08 Pagination wrapper, empty state
   09 Byline
   10 About the author
   11 Author card + directory grid
   12 Responsive
   ================================================================ */

/* 01 Utilities ---------------------------------------------------- */
.ua-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ua-sep{color:var(--text-muted)}

/* 02 Avatar -------------------------------------------------------- */
.ua-avatar{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:var(--radius-xs);background:var(--surface-tertiary)}
.ua-avatar--initials{display:flex;align-items:center;justify-content:center;font-family:var(--font-display);font-weight:var(--weight-extra);font-size:var(--text-4xl);letter-spacing:var(--tracking-tight);color:var(--text-subtle);border:1px solid var(--border-default);user-select:none}

/* 03 Page + section heads ----------------------------------------- */
.ua-section-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:var(--space-2) var(--space-6);margin-bottom:var(--space-6)}
.ua-section-head__title{font-size:var(--text-3xl);letter-spacing:var(--tracking-tight);margin:0}
.ua-section-head__count{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--text-subtle);margin:0}

/* 04 Author hero --------------------------------------------------- */
/* The band itself (breadcrumb, avatar, name, page-N label, bio) is now
   the shared dark .page-hero.page-hero--photo component (upswing-global.css
   section 32/33), rendered by template-parts/author/hero.php. This file
   only adds the one thing that band doesn't already style: the circular
   avatar size for the author archive specifically (other .page-hero--photo
   pages don't show an avatar). Loads after upswing-global.css, so this
   wins over .ua-avatar's own border-radius without needing !important. */
.page-hero__avatar{display:block;width:96px;height:96px;object-fit:cover;border-radius:50%;margin:0 auto var(--space-5)}
.page-hero--start .page-hero__avatar{margin-left:0;margin-right:0}
.page-hero__avatar.ua-avatar--initials{font-size:var(--text-2xl)}
.ua-hero__page{display:block;margin-top:var(--space-2);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-regular);letter-spacing:var(--tracking-normal);color:rgba(255,255,255,.7)}
.ua-hero__title{font-family:var(--font-display);font-size:var(--text-xl);font-weight:var(--weight-semi);color:rgba(255,255,255,.92);margin:0 0 var(--space-2)}
.ua-hero__status{font-family:var(--font-mono);font-size:var(--text-sm);color:rgba(255,255,255,.7);margin:0 0 var(--space-2)}

/* Extended profile (expertise, credentials, elsewhere links, full bio):
   shown below the band + .c-subbar, page 1 only. Reuses sections 05/06
   as-is; this just narrows the column to match the rest of the page. */
.ua-profile{padding:var(--space-10) 0}

/* 05 Facts list, inline lists, links ------------------------------ */
.ua-facts{max-width:var(--grid-narrow);border-top:1px solid var(--border-default);margin:0}
.ua-facts__row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,3fr);gap:var(--space-4);padding:var(--space-4) 0;border-bottom:1px solid var(--border-subtle)}
.ua-facts dt{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--text-subtle);padding-top:var(--space-1)}
.ua-facts dd{margin:0;color:var(--text-strong)}

.ua-inline-list{display:flex;flex-wrap:wrap;gap:var(--space-1) 0;margin:0;padding:0;list-style:none}
.ua-inline-list > li{margin:0;list-style:none}
.ua-inline-list > li:not(:last-child)::after{content:"·";margin:0 var(--space-3);color:var(--text-muted)}
.ua-inline-list--chips{gap:var(--space-2)}
.ua-inline-list--chips > li:not(:last-child)::after{content:none;margin:0}
.ua-inline-list--chips a.c-chip{text-decoration:none}
.ua-stack-list{margin:0;padding:0;list-style:none}
.ua-stack-list > li{margin:0 0 var(--space-1);list-style:none}

.ua-links{display:flex;flex-wrap:wrap;gap:0 var(--space-5);margin:0;padding:0;list-style:none}
.ua-links > li{margin:0;list-style:none}
.ua-links a.ua-link{display:inline-flex;align-items:center;min-height:calc(var(--space-10) + var(--space-1));margin:calc(-1 * var(--space-3)) 0;color:var(--text-strong);font-weight:var(--weight-medium);text-decoration:underline;text-decoration-color:var(--border-strong);text-underline-offset:4px;transition:color var(--duration-fast) var(--ease-out),text-decoration-color var(--duration-fast) var(--ease-out)}
.ua-links a.ua-link:hover{color:var(--color-primary-500);text-decoration-color:currentColor}

/* 06 Full bio disclosure ------------------------------------------ */
.ua-fullbio{max-width:var(--grid-narrow);margin-top:var(--space-6)}
.ua-fullbio__label{margin:0 0 var(--space-3);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-regular);letter-spacing:var(--tracking-normal);color:var(--text-subtle)}
/* Facts (expertise, credentials, links) on the left, full bio always open on the right. */
@media(min-width:900px){
  .ua-profile--split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:var(--space-12);align-items:start}
  .ua-profile--split .ua-facts{max-width:none}
  .ua-profile--split .ua-facts__row{grid-template-columns:1fr;gap:var(--space-1)}
  .ua-profile--split .ua-fullbio{max-width:none;margin-top:0}
}
.ua-fullbio__body{padding-top:var(--space-4);font-size:var(--text-base)}

/* 07 Topic line, filter ------------------------------------------ */
.ua-writes{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2) var(--space-4);padding:var(--space-4) 0;margin-bottom:var(--space-8);border-top:1px solid var(--border-subtle);border-bottom:1px solid var(--border-subtle);color:var(--text-default)}
.ua-writes__label{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--text-subtle);margin:0}

.ua-filter{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-4) var(--space-8);padding:var(--space-4) 0;margin-bottom:var(--space-8);border-top:1px solid var(--border-subtle);border-bottom:1px solid var(--border-subtle)}
.ua-filter__topics{min-width:0;flex:1 1 auto}
.ua-filter__list{display:flex;flex-wrap:wrap;gap:var(--space-2);margin:0;padding:0;list-style:none}
.ua-filter__list > li{margin:0;list-style:none}
.ua-filter__list a{text-decoration:none}
.ua-chip-count{font-family:var(--font-mono);font-size:var(--text-xs);opacity:.7}

/* 08 Pagination wrapper, empty state ------------------------------ */
.ua-pagination{display:flex;justify-content:center;margin-top:var(--space-12)}
.ua-pagination .c-pagination{flex-wrap:wrap;justify-content:center}
.ua-pagination a.c-pagination__item{text-decoration:none}
.ua-empty{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-4);padding:var(--space-12) 0;color:var(--text-default)}

/* 09 Byline -------------------------------------------------------- */
.ua-byline{display:flex;align-items:center;gap:var(--space-3);margin:var(--space-4) 0 var(--space-6)}
.ua-byline a.ua-byline__avatar{display:block;flex:none;width:var(--space-10);text-decoration:none}
.ua-byline .ua-avatar--initials{font-size:var(--text-xs)}
.ua-byline__text{display:flex;flex-wrap:wrap;align-items:center;gap:0 var(--space-2);margin:0;font-size:var(--text-sm);line-height:var(--leading-normal);color:var(--text-subtle)}
.ua-byline a.ua-byline__name{color:var(--text-strong);font-weight:var(--weight-semi);text-decoration:none}
.ua-byline a.ua-byline__name:hover{color:var(--color-primary-500);text-decoration:underline;text-underline-offset:3px}
.ua-byline time{font-variant-numeric:tabular-nums}

/* 10 About the author --------------------------------------------- */
.ua-about{margin:var(--space-12) 0;padding:var(--space-8);background:var(--surface-secondary);border:1px solid var(--border-default);border-radius:var(--radius-xs)}
.ua-about .ua-about__label{margin:0 0 var(--space-5);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-regular);letter-spacing:var(--tracking-normal);color:var(--text-subtle)}
.ua-about__person{display:grid;grid-template-columns:var(--space-24) minmax(0,1fr);gap:var(--space-6);align-items:start}
.ua-about__person + .ua-about__person{margin-top:var(--space-8);padding-top:var(--space-8);border-top:1px solid var(--border-default)}
.ua-about .ua-avatar--initials{font-size:var(--text-2xl)}
.ua-about .ua-about__name{margin:0;font-family:var(--font-display);font-size:var(--text-2xl);font-weight:var(--weight-bold);line-height:var(--leading-tight)}
.ua-about a.ua-link{color:var(--text-strong);text-decoration:none}
.ua-about .ua-about__name a.ua-link:hover{color:var(--color-primary-500)}
.ua-about .ua-about__title{margin:var(--space-1) 0 0;font-size:var(--text-sm);color:var(--text-subtle)}
.ua-about .ua-about__bio{margin-top:var(--space-4);font-size:var(--text-base);line-height:var(--leading-relaxed);color:var(--text-default)}
.ua-about .ua-about__bio p{margin:0 0 var(--space-3)}
.ua-about a.ua-about__more{display:inline-flex;align-items:center;min-height:calc(var(--space-10) + var(--space-1));font-family:var(--font-display);font-size:var(--text-sm);font-weight:var(--weight-semi);color:var(--color-primary-500)}
.ua-about a.ua-about__more:hover{color:var(--color-primary-700);text-decoration:underline;text-underline-offset:3px}

/* 11 Author card + directory grid --------------------------------- */
.ua-author-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--grid-gutter)}
.ua-author-card{position:relative;display:flex;flex-direction:column;gap:var(--space-1);padding:var(--space-4);background:var(--surface-primary);border:1px solid var(--border-default);border-radius:var(--radius-xs);transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}
.ua-author-card:hover{border-color:var(--border-strong);box-shadow:var(--shadow-md)}
.ua-author-card__photo{margin-bottom:var(--space-3)}
.ua-author-card .ua-author-card__name{margin:0;font-size:var(--text-xl);letter-spacing:var(--tracking-tight)}
.ua-author-card a.ua-author-card__link{color:var(--text-strong);text-decoration:none}
.ua-author-card a.ua-author-card__link::after{content:"";position:absolute;inset:0}
.ua-author-card:hover a.ua-author-card__link{color:var(--color-primary-500)}
.ua-author-card a.ua-author-card__link:focus-visible{outline:none}
.ua-author-card:has(a.ua-author-card__link:focus-visible){outline:2px solid var(--color-primary-500);outline-offset:2px}
.ua-author-card .ua-author-card__title{margin:0;font-size:var(--text-sm);color:var(--text-default)}
.ua-author-card .ua-author-card__meta{margin:0;font-size:var(--text-sm);color:var(--text-subtle)}
.ua-author-card__cta{margin-top:auto;padding-top:var(--space-3);font-family:var(--font-display);font-size:var(--text-sm);font-weight:var(--weight-semi);color:var(--color-primary-500)}

/* 12 Responsive ---------------------------------------------------- */
@media (max-width:1024px){
  .ua-author-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:640px){
  .ua-facts__row{grid-template-columns:1fr;gap:var(--space-1)}
  .ua-filter__list{flex-wrap:nowrap;overflow-x:auto;padding-bottom:var(--space-2);scrollbar-width:thin}
  .ua-filter__list > li{flex:none}
  .ua-author-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ua-about{padding:var(--space-5)}
  .ua-about__person{grid-template-columns:var(--space-16) minmax(0,1fr);gap:var(--space-4)}
}
@media (prefers-reduced-motion:reduce){
  .ua-author-card{transition:none}
}
