/* Author photo, the compact "About the author" box (articles) and the author note (Resources index).
   Owner: WP-F (resources and articles). Tokens only, no raw colours. */

/* Author photo: <picture class="avatar avatar-photo"> in the byline, the author box and the Resources note.
   .avatar (site.css) sets the size and the circle; this crops the photo to it. The photo is decorative
   (alt="") because the name is printed right next to it every time. */
.avatar-photo { overflow: hidden; background: var(--card-2); border-color: var(--line); }
.avatar-photo img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* LinkedIn and Discord buttons (author box and Resources note). Below 480 they read "LinkedIn" and "Discord"
   on one row; the aria-labels keep the full wording. */
.author-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
/* Touch widths: 40px tall buttons */
@media (max-width: 1023px) { .author-links .btn { min-height: 40px; } }
@media (max-width: 479px) {
  .author-links { flex-wrap: nowrap; }
  .author-links .btn { flex: 0 0 auto; }
  .lbl-long { display: none; }
}

/* About the author (articles): a head row (photo, eyebrow, name, role), the bio, one row of buttons */
.author-box {
  display: block;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.author-box-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.author-box-head > div { min-width: 0; }
.author-box .avatar { width: 48px; height: 48px; flex: none; }
.author-box-title { margin: 0 0 2px; color: var(--accent-text); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; }
.author-box-name { color: var(--ink); font-size: 16.5px; font-weight: 600; line-height: 1.3; }
.author-box-role { color: var(--muted); font-size: 13px; line-height: 1.4; }
.author-box-bio { max-width: 62ch; margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
@media (min-width: 768px) {
  .author-box { padding: 24px; } /* same as the article CTA box above it (article.css) */
  .author-box-role { font-size: 13.5px; }
  .author-box-bio { font-size: 16px; }
}

/* Resources index: a note from the author under the headline. Below 768: no card, a small photo row,
   paragraph 1, then paragraphs 2 and 3 behind "More about me" (with JS only; the text stays in the page).
   From 768: a card with all three paragraphs and no toggle. */
.res-note {
  display: grid;
  grid-template-areas: "person" "body" "links";
  gap: 20px;
  margin-top: clamp(24px, 3.5vw, 40px);
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-frame);
  background: var(--surface);
}
.res-note-person { grid-area: person; display: flex; align-items: center; gap: 12px; min-width: 0; }
.res-note-person > div { min-width: 0; }
.res-note-body { grid-area: body; display: grid; gap: 12px; align-content: center; }
.res-note-more { display: grid; gap: 12px; }
.res-note .author-links { grid-area: links; margin-top: 0; }
.res-note-body p { margin: 0; max-width: 64ch; color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.res-note-body .res-note-hi { color: var(--ink); font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; line-height: 1.5; letter-spacing: -.005em; }
.res-note-toggle { display: none; }
@media (max-width: 767px) {
  .res-note { gap: 12px; margin-top: 18px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .res-note-person .avatar { width: 40px; height: 40px; }
  .res-note-body { gap: 10px; }
  .res-note-body .res-note-hi { font-size: 17px; line-height: 1.5; }
  html.js .res-note:not(.is-open) .res-note-more { display: none; }
  html.js .res-note-toggle { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; margin-block: -6px; padding: 0; }
}
@media (min-width: 1024px) {
  .res-note {
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "person body" "links body";
    column-gap: 32px; row-gap: 20px;
  }
  .res-note-body { padding-left: 36px; border-left: 1px solid var(--line-soft); }
  .res-note-person { flex-direction: column; align-items: flex-start; gap: 14px; }
  .res-note-person .avatar { width: 64px; height: 64px; }
  .res-note .author-links { display: grid; gap: 8px; align-content: start; }
  .res-note .author-links .btn { justify-content: flex-start; }
}
