/**
 * Author profile page - full layout (desktop + mobile)
 * Loaded only when $cqAuthorPage (author.php).
 * Width: same as other pages (default .site-main from main.css).
 */

/* --- Empty state --- */
.author-empty {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
}

.author-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.25rem;
}

/* --- Hero --- */
.author-hero {
  position: relative;
  margin: 0 0 1.75rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-lg, 1.125rem);
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.12) 0%, transparent 42%),
    linear-gradient(215deg, rgba(232, 121, 249, 0.1) 0%, transparent 48%),
    var(--bg-card);
  box-shadow: var(--glow);
  overflow: hidden;
}

.author-hero__glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: min(70vw, 420px);
  height: min(70vw, 420px);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.22), transparent 68%);
  pointer-events: none;
  opacity: 0.9;
}

.author-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: flex-start;
}

.author-hero__visual {
  flex-shrink: 0;
}

.author-hero__avatar {
  width: clamp(96px, 22vw, 160px);
  height: clamp(96px, 22vw, 160px);
  border-radius: 1.15rem;
  object-fit: cover;
  border: 2px solid rgba(34, 211, 238, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 20px 48px rgba(0, 0, 0, 0.35);
}

.author-hero__avatar--fallback {
  display: grid;
  place-items: center;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.45), rgba(232, 121, 249, 0.4), rgba(251, 191, 36, 0.25));
}

.author-hero__intro {
  flex: 1;
  min-width: min(100%, 220px);
}

.author-hero__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--flare-cyan);
}

.author-hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.65rem, 4.5vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
}

.author-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 243, 240, 0.9);
}

.author-chip iconify-icon {
  font-size: 1rem;
  opacity: 0.9;
}

.author-chip--stat {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
}

.author-chip--flag {
  border-color: rgba(251, 191, 36, 0.35);
  color: rgba(254, 243, 199, 0.95);
  background: rgba(251, 191, 36, 0.1);
}

.author-chip--star {
  border-color: rgba(232, 121, 249, 0.3);
  background: rgba(232, 121, 249, 0.1);
}

.author-hero__slugline {
  display: grid;
  gap: 0.75rem;
  margin: 1.1rem 0 0;
  padding: 0;
}

.author-hero__slugline > div {
  display: grid;
  gap: 0.25rem;
}

.author-hero__slugline dt {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.author-hero__slugline dd {
  margin: 0;
}

.author-slug-code {
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  color: rgba(244, 243, 240, 0.88);
}

.author-copy-url {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.65rem !important;
  border-radius: 0.5rem !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  border: 1px solid rgba(34, 211, 238, 0.35) !important;
  background: rgba(34, 211, 238, 0.1) !important;
  color: var(--cq-link, var(--accent-cool)) !important;
  text-align: left;
}

.author-copy-url:hover {
  border-color: rgba(34, 211, 238, 0.55) !important;
  background: rgba(34, 211, 238, 0.16) !important;
}

/* --- Layout --- */
.author-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(1.15rem, 2.5vw, 1.75rem);
  align-items: start;
}

@media (max-width: 960px) {
  .author-layout {
    grid-template-columns: 1fr;
  }

  .author-layout__aside {
    order: -1;
  }
}

/* --- Panels --- */
.author-panel {
  border-radius: var(--radius-lg, 1.125rem);
  border: 1px solid var(--border);
  padding: clamp(1rem, 2.2vw, 1.35rem);
  background: var(--bg-card);
  box-shadow: var(--glow);
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
}

.author-panel--empty {
  text-align: center;
  padding: 1.5rem 1rem;
}

.author-panel__title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.author-panel__lede {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.84rem;
  line-height: 1.5;
}

.author-lede {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.58;
  color: rgba(244, 243, 240, 0.94);
}

.author-muted-block {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.author-longbio {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--border);
}

.author-longbio__label {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.author-longbio__body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(244, 243, 240, 0.88);
}

/* --- Stats --- */
.author-stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.author-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--border);
}

.author-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.author-stat:first-child {
  padding-top: 0;
}

.author-stat__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.author-stat__value {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}

.author-stat__value--sm {
  font-size: 0.92rem;
  font-weight: 600;
}

.author-panel__vote {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.author-panel__vote-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.author-panel__vote-kicker iconify-icon {
  font-size: 1rem;
  opacity: 0.9;
}

.author-panel__vote-lede {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

/* --- Facts --- */
.author-facts {
  margin: 0;
}

.author-facts__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.author-facts__row:last-of-type {
  border-bottom: none;
}

.author-facts__row dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.author-facts__row dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(244, 243, 240, 0.92);
}

.author-facts__hint {
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--muted);
}

.author-facts__empty {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
}

/* --- Social --- */
.author-social-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.author-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 243, 240, 0.92);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.author-social-btn:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.1);
  transform: translateX(2px);
}

.author-social-btn:focus-visible {
  outline: 2px solid var(--flare-cyan);
  outline-offset: 2px;
}

.author-social-btn iconify-icon {
  font-size: 1.05rem;
  color: var(--flare-cyan);
  opacity: 0.95;
}

/* --- Aside nav --- */
.author-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.author-nav-links__a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cq-link, var(--accent-cool));
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.author-nav-links__a:hover {
  background: rgba(34, 211, 238, 0.1);
  color: var(--cq-link-hover, #a5ecff);
}

.author-nav-links__a:focus-visible {
  outline: 2px solid var(--flare-cyan);
  outline-offset: 2px;
}

.author-nav-links__a iconify-icon {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* --- Quotes section --- */
.author-quotes__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.author-quotes__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  letter-spacing: -0.02em;
  color: var(--text);
}

.author-quotes__meta {
  margin: 0;
  font-size: 0.82rem;
}

.author-quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}

.author-quote-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
  padding: 1.05rem 1.1rem;
  border-radius: var(--radius-lg, 1.125rem);
  border: 1px solid var(--border);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, transparent 45%),
    rgba(12, 14, 22, 0.88);
  box-shadow: var(--glow);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.28s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.author-quote-card:hover {
  border-color: rgba(34, 211, 238, 0.32);
  box-shadow:
    var(--glow),
    0 0 36px rgba(34, 211, 238, 0.1);
  transform: translateY(-3px);
}

.author-quote-card__textlink {
  display: block;
  flex: 1;
  color: inherit;
  text-decoration: none;
  border-radius: 0.35rem;
  outline-offset: 3px;
}

.author-quote-card__textlink:focus-visible {
  outline: 2px solid var(--flare-cyan);
}

.author-quote-card__textlink:hover .author-quote-card__text {
  color: var(--cq-link, var(--accent-cool));
}

.author-quote-card__text {
  margin: 0;
  flex: 1;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.45;
  color: rgba(244, 243, 240, 0.96);
}

.author-quote-card__foot {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
  min-width: 0;
  width: 100%;
}

.author-quote-card__byline {
  margin: 0 !important;
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

.author-quote-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cq-link, var(--accent-cool));
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid transparent;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.author-quote-card__cta:hover {
  color: var(--cq-link-hover, #a5ecff);
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.25);
}

.author-quote-card__cta:focus-visible {
  outline: 2px solid var(--flare-cyan);
  outline-offset: 2px;
}

.author-quotes__pagination {
  margin-top: 1.25rem;
}

/* ========== Light theme ========== */
html[data-theme="light"] .author-hero {
  background:
    linear-gradient(145deg, rgba(13, 148, 136, 0.08) 0%, transparent 45%),
    linear-gradient(215deg, rgba(147, 51, 234, 0.06) 0%, transparent 50%),
    var(--bg-card);
  box-shadow:
    0 16px 48px rgba(20, 18, 26, 0.08),
    0 0 0 1px rgba(20, 18, 26, 0.05);
}

html[data-theme="light"] .author-hero__avatar {
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: 0 16px 40px rgba(20, 18, 26, 0.1);
}

html[data-theme="light"] .author-chip {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border-color: rgba(20, 18, 26, 0.1);
}

html[data-theme="light"] .author-chip--stat {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.25);
}

html[data-theme="light"] .author-slug-code {
  background: rgba(20, 18, 26, 0.04);
  color: var(--text);
  border-color: rgba(20, 18, 26, 0.1);
}

html[data-theme="light"] .author-panel {
  border: none;
  background: #ffffff;
  box-shadow:
    0 12px 40px rgba(20, 18, 26, 0.06),
    0 0 0 1px rgba(20, 18, 26, 0.04);
}

html[data-theme="light"] .author-lede {
  color: rgba(20, 18, 26, 0.92);
}

html[data-theme="light"] .author-longbio__body {
  color: rgba(20, 18, 26, 0.86);
}

html[data-theme="light"] .author-quote-card {
  border: none;
  background: #ffffff;
  box-shadow:
    0 12px 40px rgba(20, 18, 26, 0.06),
    0 0 0 1px rgba(20, 18, 26, 0.04);
}

html[data-theme="light"] .author-quote-card__text {
  color: #1f1c2e;
}

html[data-theme="light"] .author-quote-card:hover {
  box-shadow:
    0 20px 56px rgba(20, 18, 26, 0.1),
    0 0 0 1px rgba(13, 148, 136, 0.15);
}

html[data-theme="light"] .author-facts__row dd {
  color: rgba(20, 18, 26, 0.92);
}

html[data-theme="light"] .author-social-btn {
  background: rgba(13, 148, 136, 0.06);
  border-color: rgba(20, 18, 26, 0.08);
  color: var(--text);
}

html[data-theme="light"] .author-social-btn:hover {
  background: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.35);
}

html[data-theme="light"] .author-copy-url {
  border-color: rgba(13, 148, 136, 0.35) !important;
  background: rgba(13, 148, 136, 0.1) !important;
  color: #0f766e !important;
}
