/* ===========================================================================
   Connect 2026 - Author Profile
   ---------------------------------------------------------------------------
   "connect 2026 - author profile.pdf", one artboard. MEASURED from its vector
   data, 1pt = 2.4px, content box starting at x=36.0pt:

     title "Author Profile"      17.67pt SemiBold navy   = My Profile's hero title
     photo circle                36.5 -> 143.2pt         = 256px
     name line                   11.0pt Medium            cyan / italic grey / SemiBold navy
     rule under the name         157.5 -> 406.4pt, 0.5pt  = 597px, navy
     "Biography"                 11.0pt Medium cyan
     biography                   7.55pt Medium grey, 10.05pt step = body copy
     contributions box           490.8 -> 559.3 x 163.5 -> 228.2pt = 164 x 155px,
                                 cyan at 30% (= --cn-panel-blue)
       label                     7.38pt cyan    number 35.23pt Medium navy
     Follow / Share pills        25px under the box, 13px apart, centred on it
     rule under the hero         full width, 0.5pt navy, 55px under the photo
     "Browse by type:"           36px under that rule
     rows                        type 6.94pt + title 10pt Medium navy, rule between

   Everything that already has a component uses it - the rows, the chips, the
   pills and the name line are the site's own and are not restyled here.
   =========================================================================== */

/* The page title - same size and weight as My Profile's "Welcome Back",
   which the boards also set at 17.7pt SemiBold. See profile.css for the ramp. */
.cn-author-page__title {
  margin: 0;
  padding-top: var(--cn-space-12);
  color: var(--cn-navy);
  font-size: clamp(34.5px, calc(14.81px + 1.9231vw), 42.5px);
  font-weight: var(--cn-fw-semibold);
  line-height: var(--cn-lh-tight);
}

/* ---------------------------------------------------------------- hero -- */
.cn-author-hero {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr) 164px;
  column-gap: 34px;                      /* photo 143.2pt -> text 157.5pt */
  align-items: start;
  margin-top: var(--cn-space-10);
  padding-bottom: 55px;                  /* photo bottom 270.7pt -> rule 293.7pt */
  border-bottom: 1px solid var(--cn-border-strong);
}

.cn-author-hero__avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 256px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--cn-radius-pill);
  background: var(--cn-navy);
}
.cn-author-hero__initials {
  font-size: var(--cn-text-rank);
  font-weight: var(--cn-fw-semibold);
  line-height: 1;
  color: var(--cn-ink-invert);
  user-select: none;
}
.cn-author-hero__avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: var(--cn-radius-pill);
  object-fit: cover;
  background: var(--cn-band-grey);
}

/* The text column stops where the board's biography wraps (463.5pt), so a
   long bio never runs up against the contributions box. */
.cn-author-hero__body {
  max-width: 734px;
  padding-top: var(--cn-space-4);       /* circle top 164pt -> name 171pt */
  padding-right: var(--cn-space-8);
}

/* .cn-author already gives the three weights and colours; this is only the
   board's larger size and the rule underneath. */
.cn-author-hero__name {
  max-width: 597px;
  margin: 0;
  padding-bottom: 22px;                  /* name 183pt -> rule 192.2pt */
  border-bottom: 1px solid var(--cn-border-strong);
  font-size: var(--cn-text-h3);
  font-weight: var(--cn-fw-medium);
  line-height: var(--cn-lh-tight);
}

.cn-author-hero__bio-head {
  margin: 14px 0 var(--cn-space-2);      /* rule 192.2pt -> "Biography" 198pt */
  color: var(--cn-cyan);
  font-size: var(--cn-text-h3);
  font-weight: var(--cn-fw-medium);
  line-height: var(--cn-lh-tight);
}

.cn-author-hero__bio {
  margin: 0 0 var(--cn-space-3);
  color: var(--cn-ink-muted);
  font-size: var(--cn-text-body);
  font-weight: var(--cn-fw-medium);
  line-height: var(--cn-lh-body);
}

/* The fold: six lines, then "Read full biography". The checkbox is kept in
   the tab order (not display:none) so the toggle works from the keyboard; its
   focus ring is drawn on the label, which is what a sighted user sees. */
.cn-author-hero__more-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.cn-author-hero__bio-text--folded {
  max-height: calc(var(--cn-text-body) * var(--cn-lh-body) * 6);
  overflow: hidden;
}
.cn-author-hero__more-toggle:checked + .cn-author-hero__bio-text--folded {
  max-height: none;
}
.cn-author-hero__more {
  display: inline-block;
  margin-top: var(--cn-space-2);
  color: var(--cn-cyan);
  font-size: var(--cn-text-label);
  font-weight: var(--cn-fw-medium);
  text-decoration: underline;
  cursor: pointer;
}
.cn-author-hero__more-close { display: none; }
.cn-author-hero__more-toggle:checked ~ .cn-author-hero__more .cn-author-hero__more-open { display: none; }
.cn-author-hero__more-toggle:checked ~ .cn-author-hero__more .cn-author-hero__more-close { display: inline; }
.cn-author-hero__more-toggle:focus-visible ~ .cn-author-hero__more {
  outline: 2px solid var(--cn-cyan);
  outline-offset: 2px;
}
/* The LinkedIn link sits on its own line under the fold control. */
.cn-author-hero__body .cn-author__linkedin {
  display: block;
  width: fit-content;
  margin-top: var(--cn-space-2);
}

/* ------------------------------------------------- count + pills ------ */
.cn-author-hero__side {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cn-author-hero__count {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 164px;
  min-height: 155px;
  margin: 0;
  padding: var(--cn-space-3);
  background: var(--cn-panel-blue);
  text-align: center;
}
.cn-author-hero__count-label {
  max-width: 7em;                        /* breaks as the board does: "Number of / contributions" */
  color: var(--cn-cyan);
  font-size: var(--cn-text-meta);
  font-weight: var(--cn-fw-medium);
  line-height: var(--cn-lh-tight);
}
.cn-author-hero__count-num {
  margin-top: var(--cn-space-1);
  color: var(--cn-navy);
  font-size: clamp(56px, calc(22.15px + 4.3269vw), 84.5px);
  font-weight: var(--cn-fw-medium);
  line-height: 1;
}

/* The reader pill row, stacked under the box as the board draws it.
   REVERSED because actionBar always renders Share before Follow - the readers'
   order - and this board puts Follow first. Reversing the two here keeps the
   shared tag's order untouched for the ten readers that use it. */
.cn-author-hero__side .cn-actions {
  flex-direction: column-reverse;
  align-items: center;
  gap: 13px;                             /* 252.7pt -> 258.0pt */
  margin: 25px 0 0;                      /* box 228.2pt -> pill 238.5pt */
  padding: 0;
}

/* --------------------------------------------------- filter + list ---- */
/* My Profile Saved's filter row, at this board's spacing. */
.cn-author-filter {
  margin: var(--cn-space-8) 0 var(--cn-space-5);
}
.cn-author-filter .cn-chips__label {
  margin: 0 0 var(--cn-space-3);
  font-size: var(--cn-text-meta);
}
.cn-author-filter .cn-chips__list {
  flex-wrap: wrap;
  gap: var(--cn-space-2) 20px;
}

.cn-author-list {
  margin-top: var(--cn-space-5);
}

.cn-author-page__more {
  margin: var(--cn-space-8) 0 var(--cn-space-12);
}

/* ========================================================== RESPONSIVE == */
/* Tablet: the count and pills leave the right edge and sit under the text,
   side by side, so the biography keeps a readable width. */
@media (max-width: 1279px) {
  .cn-author-hero {
    grid-template-columns: 200px minmax(0, 1fr);
    row-gap: var(--cn-space-6);
  }
  .cn-author-hero__avatar-wrap { width: 200px; }
  .cn-author-hero__body { padding-right: 0; }
  .cn-author-hero__side {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--cn-space-6);
  }
  .cn-author-hero__side .cn-actions { margin: 0; flex-direction: row-reverse; }
}

/* Mobile: one column - photo, words, then the count and pills. */
@media (max-width: 767px) {
  .cn-author-hero {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: var(--cn-space-10);
  }
  .cn-author-hero__avatar-wrap { width: 160px; }
  .cn-author-hero__body { padding-top: 0; }
  .cn-author-hero__side { grid-column: 1; }
  .cn-author-hero__count { width: 140px; min-height: 130px; }
}
