/* =====================================================
   PUBLIC AUTHOR PROFILE
   ===================================================== */

.author-profile .author-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;

  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.author-profile .author-profile-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-profile .author-profile-info {
  width: 100%;
  max-width: 850px;
}

.author-profile .author-profile-info h1 {
  margin: 0 0 8px;
}

.author-profile .author-profile-role {
  color: var(--primary);
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 10px;
}

.author-profile .author-profile-bio {
  color: var(--gray);
  margin: 0;
  line-height: 1.8;
  font-size: 15px;
}

.author-profile .author-profile-social {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* =====================================================
   PUBLIC AUTHORS DIRECTORY
   /en/author
   ===================================================== */

.authors-section {
  padding: 10px 0 50px;
}

.authors-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.authors-section__header h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
  color: var(--dark);
}

.authors-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 12px;
  border-radius: 999px;

  background: rgba(108, 92, 231, 0.08);
  border: 1px solid rgba(108, 92, 231, 0.15);

  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}


/* =====================================================
   AUTHOR GRID
   ===================================================== */

.authors-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(280px, 1fr)
  );
  gap: 22px;
  align-items: stretch;
}


/* =====================================================
   AUTHOR CARD
   ===================================================== */

.author-card {
  position: relative;

  display: flex;
  flex-direction: column;

  min-height: 100%;

  background:
    linear-gradient(
      180deg,
      rgba(108, 92, 231, 0.025) 0%,
      var(--white) 34%
    );

  border: 1px solid var(--light-gray);
  border-radius: var(--radius);

  box-shadow: var(--shadow);

  overflow: hidden;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.author-card:hover {
  transform: translateY(-5px);

  border-color: rgba(108, 92, 231, 0.25);

  box-shadow:
    0 12px 35px rgba(26, 26, 46, 0.12);
}


/* =====================================================
   AUTHOR CARD TOP ACCENT
   ===================================================== */

.author-card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 4px;

  background:
    linear-gradient(
      90deg,
      var(--primary),
      #a855f7
    );

  opacity: 0.9;
}


/* =====================================================
   AUTHOR CARD MEDIA
   ===================================================== */

.author-card__media {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 150px;

  padding: 28px 20px 18px;

  background:
    radial-gradient(
      circle at center,
      rgba(108, 92, 231, 0.10) 0%,
      rgba(108, 92, 231, 0.035) 42%,
      transparent 72%
    );
}


/* Author avatar */

.author-card__avatar {
  width: 104px;
  height: 104px;

  display: block;

  border-radius: 50%;

  object-fit: cover;
  object-position: center;

  border: 4px solid var(--white);

  box-shadow:
    0 4px 18px rgba(26, 26, 46, 0.15);

  background: var(--bg);

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.author-card:hover .author-card__avatar {
  transform: scale(1.04);

  box-shadow:
    0 7px 24px rgba(108, 92, 231, 0.22);
}


/* =====================================================
   AUTHOR CARD BODY
   ===================================================== */

.author-card__body {
  display: flex;
  flex-direction: column;

  flex: 1;

  padding: 0 20px 20px;
}

.author-card__body h2 {
  margin: 0 0 6px;

  font-size: 20px;
  line-height: 1.3;

  text-align: center;
}

.author-card__body h2 a {
  color: var(--dark);

  font-weight: 700;

  text-decoration: none;

  transition: color 0.2s ease;
}

.author-card__body h2 a:hover {
  color: var(--primary);
  text-decoration: none;
}


/* =====================================================
   AUTHOR ROLE
   ===================================================== */

.author-card__role {
  align-self: center;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 12px;

  padding: 4px 10px;

  border-radius: 999px;

  background: rgba(108, 92, 231, 0.08);

  color: var(--primary);

  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;

  text-align: center;
}


/* =====================================================
   AUTHOR BIO
   ===================================================== */

.author-card__body p {
  margin: 0 0 18px;

  color: var(--gray);

  font-size: 14px;
  line-height: 1.7;

  text-align: center;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;

  overflow: hidden;
}


/* =====================================================
   AUTHOR CARD BUTTON
   ===================================================== */

.author-card__body .btn {
  width: 100%;

  margin-top: auto;
}

.author-card__body .btn--primary {
  box-shadow:
    0 4px 12px rgba(108, 92, 231, 0.18);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.author-card__body .btn--primary:hover {
  transform: translateY(-1px);

  box-shadow:
    0 7px 18px rgba(108, 92, 231, 0.25);
}


/* =====================================================
   AUTHORS PAGE HEADER
   ===================================================== */

.page-header {
  padding: 34px 0 28px;
}

.page-header h1 {
  margin: 0 0 10px;

  font-size: 34px;
  line-height: 1.2;

  color: var(--dark);
}

.page-description {
  max-width: 760px;

  margin: 0;

  color: var(--gray);

  font-size: 16px;
  line-height: 1.75;
}


/* =====================================================
   EMPTY AUTHORS STATE
   ===================================================== */

.authors-grid > .muted {
  grid-column: 1 / -1;

  padding: 40px 20px;

  background: var(--white);

  border: 1px dashed var(--light-gray);
  border-radius: var(--radius);

  color: var(--gray);

  text-align: center;
}


/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {

  .authors-section {
    padding-bottom: 35px;
  }

  .authors-section__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .authors-section__header h2 {
    font-size: 23px;
  }

  .authors-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .author-card__media {
    min-height: 135px;
    padding-top: 24px;
  }

  .author-card__avatar {
    width: 92px;
    height: 92px;
  }

  .page-header {
    padding: 26px 0 22px;
  }

  .page-header h1 {
    font-size: 29px;
  }

  .page-description {
    font-size: 15px;
  }
}


@media (min-width: 769px) and (max-width: 1050px) {

  .authors-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}


@media (min-width: 1200px) {

  .authors-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}
