/*
 * Author page (author.php): hero and posts section. Cards, grid and
 * pagination come from post-card.css.
 *
 * Loaded only on is_author() (see inc/authors.php). Same token set as
 * single-post.css; no new Tailwind utilities.
 */

body.author {
  background-color: var(--color-quartz-20);
}

.author-posts {
  background-color: var(--color-ice-20);
  padding: var(--spacing-2xl) clamp(16px, 5.2vw, 100px);
}

/* ─────────────────────────────────────────────────────────
 * Hero
 * ───────────────────────────────────────────────────────── */

.author-hero {
  align-items: center;
  display: grid;
  gap: 48px;
  margin-inline: auto;
  max-width: calc(1427px + 2 * clamp(16px, 5.2vw, 100px));
  padding: 40px clamp(16px, 5.2vw, 100px) var(--spacing-2xl);
}

@media (min-width: 1024px) {
  .author-hero {
    grid-template-columns: minmax(0, 549px) minmax(0, 696px);
    justify-content: space-between;
    /* The desktop .page-header (navbar.css) sits in the flow above <main>. */
    padding-bottom: 120px;
    padding-top: calc(203px - (var(--nav-top) * 2 + var(--nav-pill-h)));
  }

  .author-hero--no-photo {
    grid-template-columns: minmax(0, 549px);
  }
}

.author-hero__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.author-hero__role {
  color: var(--color-blue-50);
  font-size: var(--text-base);
  line-height: 24px;
  text-transform: uppercase;
}

.author-hero__name {
  color: var(--color-navy-80);
  font-size: var(--text-4xl);
  font-weight: 500;
  line-height: var(--text-4xl--line-height);
}

.author-hero__bio {
  font-size: var(--text-lg);
  line-height: 28px;
  margin-top: 8px;
}

.author-hero__bio p + p {
  margin-top: 1em;
}

/* LinkedIn link under the bio (Yoast "URL profilo LinkedIn", only if set). */
.author-hero__social {
  margin-top: 8px;
}

.author-hero__social-link {
  align-items: center;
  color: var(--color-blue-50);
  display: inline-flex;
  font-size: var(--text-base);
  font-weight: 600;
  gap: 8px;
  line-height: 24px;
  transition: color 0.2s ease;
}

.author-hero__social-link:hover,
.author-hero__social-link:focus-visible {
  color: var(--color-navy-80);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.author-hero__social-icon {
  background-color: currentColor;
  flex-shrink: 0;
  height: 24px;
  -webkit-mask: url("../icons/linkedin.svg") center / contain no-repeat;
  mask: url("../icons/linkedin.svg") center / contain no-repeat;
  width: 24px;
}

/* Photo with the "pixel" frame: four square notches (side = 205/1392 of the
   width, 205/1154 of the height), cut with clip-path so any photo works. */
.author-hero__media {
  aspect-ratio: 696 / 577;
  clip-path: polygon(
    14.727% 0, 70.546% 0, 70.546% 17.764%, 85.273% 17.764%, 85.273% 0,
    100% 0, 100% 17.764%, 85.273% 17.764%, 85.273% 35.529%, 100% 35.529%,
    100% 100%, 14.727% 100%, 14.727% 82.236%, 0 82.236%, 0 17.764%,
    14.727% 17.764%
  );
  margin: 0;
  width: 100%;
}

.author-hero__image {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

@media (max-width: 768px) {
  .author-hero__name {
    font-size: var(--text-3xl);
    line-height: var(--text-3xl--line-height);
  }
}
