/*
 * Contributors
 *
 * 1. Article cards: the card is a div with a stretched title link, so the author
 *    can be a second link (links cannot nest).
 * 2. Article byline and author box link to the contributor page.
 * 3. The contributor page (author.php), /contributors/{slug}/.
 *
 * Brand tokens: navy #04132d, green #96ff94, grey #f1f3f4.
 */

/* ------------------------------------------------------------------ */
/* 1. Article cards                                                    */
/* ------------------------------------------------------------------ */

.card--article {
  position: relative;
  isolation: isolate;
}

.card--article .card-link {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

/* The title link covers the whole card. */
.card--article .card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card--article .card-link:focus-visible {
  outline: none;
}

.card--article .card-link:focus-visible::after {
  outline: 2px solid #04132d;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Author link and name sit above the stretched link. */
.card--article .author-link,
.card--article .author-name {
  position: relative;
  z-index: 2;
}

.card--article .inner-content .inner-image {
  flex-shrink: 0;
}

.card--article .inner-content .inner-text .name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
}

.card--article .author-name {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.card--article .author-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card--article .author-contributions {
  color: #1e2737;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  opacity: 0.65;
  white-space: nowrap;
}

/* Lifetime views line (contributor page cards) */
.card--article .article-views {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #1e2737;
  font-family: "roc-grotesk", sans-serif;
  font-size: 14px;
  line-height: 1.43;
}

.card--article .article-views svg {
  flex: 0 0 auto;
  opacity: 0.6;
}

/* ------------------------------------------------------------------ */
/* 2. Article page                                                     */
/* ------------------------------------------------------------------ */

/* Byline in the dark banner */
.banner-inside-5 .person-information a.image-content {
  display: block;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
}

.banner-inside-5 .person-information a.image-content img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 100%;
}

.banner-inside-5 .person-information .text-content h2 a.person-name-link {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.banner-inside-5 .person-information .text-content h2 a.person-name-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.banner-inside-5 .person-information .text-content h2 .person-contributions {
  margin-left: 10px;
  color: #aeb8c8;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

/* Author box at the bottom of the article */
.three-col-default--blog .inner-content a.person-introduce--link {
  display: flex;
  color: inherit;
  text-decoration: none;
}

.person-introduce--link .image-content img {
  display: block;
  object-fit: cover;
}

.person-introduce--link:hover .name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.person-introduce__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-bottom: 1px;
  border-bottom: 2px solid #96ff94;
  color: #04132d;
  font-family: "roc-grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.person-introduce__cta span {
  transition: transform 0.2s;
}

.person-introduce--link:hover .person-introduce__cta span,
.person-introduce--link:focus-visible .person-introduce__cta span {
  transform: translateX(3px);
}

/* ------------------------------------------------------------------ */
/* 3. Contributor page                                                 */
/* ------------------------------------------------------------------ */

.contributor-hero .inner-text {
  margin: 24px auto 56px;
}

.contributor-profile {
  display: flex;
  align-items: center;
  gap: 56px;
}

.contributor-avatar {
  flex: 0 0 176px;
  width: 176px;
  height: 176px;
  overflow: hidden;
  border-radius: 50%;
  background: #1d2b41;
  box-shadow: 0 0 0 4px #96ff94;
}

.contributor-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contributor-details {
  flex: 1;
  min-width: 0;
}

.contributor-hero .contributor-details h1 {
  margin-bottom: 18px;
}

.contributor-hero .contributor-bio {
  max-width: 680px;
  margin: 0 0 20px;
  color: #aeb8c8;
  font-family: "Inter", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
}

.contributor-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 48px;
  margin: 28px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  list-style: none;
}

.contributor-stats li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contributor-stats strong {
  display: block;
  color: #fff;
  font-family: "roc-grotesk", sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.6px;
}

.contributor-stats span {
  display: block;
  margin-top: 8px;
  color: #aeb8c8;
  font-family: "roc-grotesk", sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

/* "Writes about" sits with the name and bio, apart from the metrics. */
.contributor-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
}

.contributor-topics__label {
  margin-right: 4px;
  color: #aeb8c8;
  font-family: "roc-grotesk", sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

.contributor-topics em {
  padding: 4px 14px 5px;
  border-radius: 16px;
  background: rgba(150, 255, 148, 0.14);
  color: #96ff94;
  font-family: "roc-grotesk", sans-serif;
  font-size: 14px;
  font-style: normal;
  line-height: 1.43;
}

/* Articles */
.filter-cards.contributor-articles {
  margin: 24px 0 120px;
}

.contributor-articles__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 32px;
}

.contributor-articles__head h2 {
  margin: 0;
  color: #04132d;
  font-family: "roc-grotesk", sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.2px;
}

.contributor-articles__head p {
  margin: 0;
  color: #53585f;
  font-family: "roc-grotesk", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.contributor-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-top: 23px;
  border-top: 1px solid #c0c4ca;
}

.contributor-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 4px;
  color: #1e2737;
  font-family: "roc-grotesk", sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.contributor-pagination a.page-numbers:hover {
  background-color: #d7dade;
}

.contributor-pagination .page-numbers.current {
  background-color: #05ff00;
}

.contributor-pagination .page-numbers.dots {
  pointer-events: none;
}

@media (max-width: 991.98px) {
  .contributor-profile {
    gap: 36px;
  }

  .contributor-avatar {
    flex-basis: 140px;
    width: 140px;
    height: 140px;
  }

  .filter-cards.contributor-articles {
    margin-bottom: 80px;
  }

  .contributor-articles__head h2 {
    font-size: 34px;
  }
}

@media (max-width: 767.98px) {
  .contributor-hero .inner-text {
    margin: 8px auto 40px;
  }

  .contributor-profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .contributor-avatar {
    flex-basis: 112px;
    width: 112px;
    height: 112px;
    box-shadow: 0 0 0 3px #96ff94;
  }

  .contributor-hero .contributor-bio {
    font-size: 16px;
  }

  .contributor-stats {
    gap: 20px 32px;
  }

  .contributor-stats strong {
    font-size: 28px;
  }

  .filter-cards.contributor-articles {
    margin-bottom: 60px;
  }
}
