/* =============================================================
   PP Author — author page + inline author card (article footer)
   Loaded AFTER pp-courses.css (design system).
   ============================================================= */

/* =====================================================
   AUTHOR HERO (dark band with back link)
   ===================================================== */
.author-hero {
  position: relative;
  background: var(--deep-1);
  padding: 140px 0 24px;
  overflow: hidden;
}
.author-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(167,139,250,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.author-hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(124,58,237,0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(20,184,166,0.08) 0%, transparent 40%);
}
.author-hero__inner {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
}
.author-hero__back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(167,139,250,0.16);
  border: 1px solid rgba(167,139,250,0.28);
  color: var(--text-light, #fff);
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.author-hero__back:hover {
  background: rgba(167,139,250,0.28);
  border-color: rgba(167,139,250,0.45);
}
.author-hero__back svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* =====================================================
   AUTHOR PROFILE (centered, warm-bg)
   ===================================================== */
.author-profile {
  background: var(--warm-bg);
  padding: 56px 0 64px;
}
.author-profile__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: start;
  text-align: left;
}
.author-profile__avatar {
  width: 140px; height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  background: var(--warm-bg-2, #F3EDE6);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.author-profile__text {
  min-width: 0;
}
.author-profile__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.author-profile__avatar--fallback::after {
  content: attr(data-initials);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--accent);
}
.author-profile__name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.2;
  color: var(--text-dark); letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.author-profile__role {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 20px;
}
.author-profile__bio {
  font-size: 1rem; line-height: 1.7;
  color: var(--text-dark-70);
  margin: 0 0 24px;
}
.author-profile__linkedin {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #0A66C2;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 24px;
  transition: background 0.2s;
}
.author-profile__linkedin:hover { background: #0853a0; }
.author-profile__linkedin svg {
  width: 18px; height: 18px;
  fill: currentColor;
}
.author-profile__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; padding: 0; margin: 0;
}
.author-profile__tag {
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(124,58,237,0.08);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid rgba(124,58,237,0.15);
}

/* =====================================================
   AUTHOR ARTICLES GRID
   ===================================================== */
.author-articles {
  background: var(--warm-bg-2, #F3EDE6);
  padding: 64px 0 96px;
}
.author-articles__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem); line-height: 1.25;
  color: var(--text-dark);
  margin: 0 0 32px;
  text-align: left;
  max-width: 1100px;
  padding: 0 24px;
  margin-left: auto; margin-right: auto;
}
.author-articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.author-article-card {
  background: #fff;
  border: 1px solid var(--warm-border, #E8E0D8);
  border-radius: var(--radius-lg, 20px);
  overflow: hidden;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.author-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  border-color: var(--accent, #7C3AED);
}
.author-article-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--warm-bg);
}
.author-article-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.author-article-card__body {
  padding: 22px 24px 24px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.author-article-card__category {
  font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent);
}
.author-article-card__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; line-height: 1.3;
  color: var(--text-dark);
  margin: 0;
}
.author-article-card__meta {
  font-size: 0.78rem; color: var(--text-dark-50, rgba(26,16,56,0.5));
  margin-top: auto;
  display: flex; align-items: center; gap: 12px;
  padding-top: 6px;
}
.author-article-card__meta-item {
  display: inline-flex; align-items: center; gap: 4px;
}
.author-article-card__meta-item svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* =====================================================
   AUTHOR CARD (inline at article footer)
   ===================================================== */
.author-card {
  max-width: 740px;
  margin: 3rem auto 0;
  padding: 0 24px;
}
.author-card__link {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--warm-border, #E8E0D8);
  border-radius: var(--radius-md, 12px);
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.author-card__link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.author-card__avatar {
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--warm-bg-2, #F3EDE6);
  display: flex; align-items: center; justify-content: center;
}
.author-card__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-card__avatar--fallback::after {
  content: attr(data-initials);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
}
.author-card__text {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.author-card__label {
  font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dark-50, rgba(26,16,56,0.5));
}
.author-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-dark);
}
.author-card__role {
  font-size: 0.85rem;
  color: var(--text-dark-70);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
  .author-hero { padding: 120px 0 20px; }
  .author-profile { padding: 44px 0 52px; }
  .author-profile__inner {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: start;
  }
  .author-profile__avatar { width: 110px; height: 110px; }
  .author-articles { padding: 48px 0 72px; }
  .author-articles__grid { grid-template-columns: 1fr; }
  .author-card__link { padding: 16px; }
  .author-card__avatar { width: 48px; height: 48px; }
}
