/* Author box at end of article */
.post-author {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 12px;
  padding: 1.25rem 1.25rem;
  margin: 1.25rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.post-author__title {
  margin: 0 0 .5rem;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 800;
}
.post-author .author-chip {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: start;
  gap: 1rem 1.25rem;
}
.post-author .author-chip__avatar img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16,185,129,.15), 0 2px 10px rgba(0,0,0,.12);
}
.post-author .author-chip__name {
  font-weight: 800;
}
.post-author .author-bio { margin-top: .25rem; max-width: 75ch; }
.post-author .author-bio p { margin: .35rem 0 .75rem; }

/* Actions row under bio */
.post-author__actions { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-top: .5rem; }
.post-author__actions .social-icons .social-link { width: 34px; height: 34px; border-radius: 10px; border: 1px solid #e6ebf2; display: inline-flex; align-items: center; justify-content: center; color: var(--fg); transition: background-color 160ms ease; }
.post-author__actions .social-icons .social-link:hover, .post-author__actions .social-icons .social-link:focus-visible { background: rgba(17,191,174,.06); outline: none; }
.btn-support { display: inline-block; background: #059669; color: #fff; border: 1px solid #059669; border-radius: 10px; padding: .45rem .85rem; text-decoration: none; }
.btn-support:hover { background: #047857; border-color: #047857; }
.author-popover { position: absolute; z-index: 1200; min-width: 520px; max-width: min(520px, 92vw); animation: fadeUp .2s ease-out; }
.author-popover[hidden] { display: none; }
.author-popover__card { background: #fff; color: #111; border: 1px solid #e6ebf2; border-radius: 12px; box-shadow: 0 12px 28px rgba(0,0,0,.16); padding: 16px; }
.author-popover__card::before {
  content: '';
  position: absolute;
  top: -8px; left: 22px;
  width: 16px; height: 16px;
  background: #fff;
  border-left: 1px solid #e6ebf2;
  border-top: 1px solid #e6ebf2;
  transform: rotate(45deg);
  box-shadow: -3px -3px 10px rgba(0,0,0,.06);
}
.author-intro-heading { margin: 0 0 .25rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; }
.author-popover__head { display: grid; grid-template-columns: 60px 1fr; gap: .75rem; align-items: center; margin-bottom: .5rem; }
.author-popover__avatar img { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.author-popover__title { font-size: 1.35rem; font-weight: 800; }
.author-popover__bio { color: #374151; }
.author-popover__bio p { margin: .35rem 0 .75rem; }
.author-popover__card { cursor: default; }
.author-popover { pointer-events: auto; }
.author-popover__bio { user-select: text; }
/* Social icons row inside popover (keeps same design) */
.author-popover__socials { margin: .25rem 0 .75rem; }
.author-popover__socials .social-icons { display: flex; gap: .5rem; align-items: center; }
.author-popover__socials .social-link { width: 34px; height: 34px; border-radius: 10px; border: 1px solid #e6ebf2; display: inline-flex; align-items: center; justify-content: center; color: #111; transition: background-color 160ms ease; }
.author-popover__socials .social-link:hover, .author-popover__socials .social-link:focus-visible { background: rgba(17,191,174,.06); outline: none; }
/* Close button */
.author-popover__close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e6ebf2; background: #fff; color: #111; font-size: 20px; line-height: 30px; text-align: center; cursor: pointer; }
.author-popover__close:hover { background: rgba(17,191,174,.06); border-color: #bfeee7; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile bottom sheet variant */
.author-popover.is-mobile-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-width: none; min-width: 0; }
.author-popover.is-mobile-sheet .author-popover__card { border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.18); }

/* ===== Author page (archive) ===== */
.author-hero {
  position: relative;
  padding: 64px 0 32px;
}
.author-hero__bg {
  position: absolute; inset: 0; top: 0; height: 200px;
  background: linear-gradient(180deg, rgba(17,24,39,.06) 0%, rgba(17,24,39,0) 100%);
}
.author-hero__inner { text-align: center; position: relative; z-index: 1; }
.author-hero__avatar { display: inline-block; padding: 8px; border-radius: 50%; background: radial-gradient(80% 80% at 50% 45%, #1e2a44 0%, #0f172a 100%); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.author-hero__avatar img { width: 168px; height: 168px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(16,185,129,.18), 0 6px 22px rgba(0,0,0,.18); }
.author-hero__title { font-size: 3rem; font-weight: 900; margin: 16px 0 6px; }
.author-hero__tagline { color: #6b7280; font-weight: 600; }

.author-layout { margin-top: 8px; }
.author-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.author-bio-card { background: #fff; border: 1px solid #e6ebf2; border-radius: 12px; padding: 20px; box-shadow: 0 10px 24px rgba(0,0,0,.06); }
.author-bio-card p { margin: .5rem 0 .9rem; }
.author-section__title { font-size: 1.25rem; font-weight: 800; margin: 22px 0 12px; }

/* Latest articles */
.author-latest { display: grid; gap: 22px; }
.author-latest .author-card { display: block; }
.author-latest .author-card__media { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 24px rgba(0,0,0,.08); aspect-ratio: 16 / 9; }
.author-latest .author-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-latest .author-card__placeholder { background: #f3f4f6; width: 100%; height: 100%; }
.author-latest .author-card__title { font-size: 1.25rem; font-weight: 800; margin: 10px 4px 0; }
.author-latest .author-card__title a { color: inherit; text-decoration: none; }
.author-latest .author-card__title a:hover { text-decoration: underline; }

/* Expertise card */
.author-side { position: sticky; top: 92px; }
.author-expertise { background: #fff; border: 1px solid #e6ebf2; border-radius: 12px; padding: 18px; box-shadow: 0 10px 24px rgba(0,0,0,.06); }
.author-expertise__title { font-size: .8rem; font-weight: 800; letter-spacing: .08em; color: #374151; margin-bottom: 12px; }
.author-expertise__list { list-style: none; padding: 0; margin: 0; }
.author-expertise__list li { padding: 7px 0; border-bottom: 1px dashed #e5e7eb; position: relative; padding-left: 16px; }
.author-expertise__list li::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.author-expertise__list li:last-child { border-bottom: 0; }

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