/* ============================================================
   AUTHOR.CSS — Author Page Layout & Component Styles
   AI Tools Magic Design System Extension
   ============================================================ */

/* ─── Page Container & Wrappers ───────────────────────────── */


.author-section {
  margin-bottom: var(--space-16);
}

/* ─── 1. HERO AUTHOR SECTION ──────────────────────────────── */
.author-hero {
  background: #ffffff;
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-12) 0;
  margin-bottom: var(--space-10);
}

.author-hero__card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  background: #ffffff;
  border: 1px solid #e8ecf0;
  border-radius: 16px;
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .author-hero__card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-6);
    gap: var(--space-6);
  }
}

.author-hero__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.author-hero__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.author-hero__details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.author-hero__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (max-width: 768px) {
  .author-hero__header-row {
    justify-content: center;
    flex-direction: column;
  }
}

.author-hero__name {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.author-hero__designation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 9999px;
  width: fit-content;
}

@media (max-width: 768px) {
  .author-hero__designation {
    margin: 0 auto;
  }
}

.author-hero__badge-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
}

.author-hero__bio-short {
  font-size: 1.025rem;
  color: #4b5563;
  line-height: 1.6;
  margin: 0;
  max-width: 720px;
}

/* Social Icons */
.author-hero__socials {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .author-hero__socials {
    justify-content: center;
  }
}

.author-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  transition: all 0.2s ease;
}

.author-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.author-social-link:hover {
  background: var(--color-primary);
  color: #111827;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(253, 206, 4, 0.35);
}

/* ─── 2. AUTHOR STATS ─────────────────────────────────────── */
.author-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: var(--space-12);
}

@media (max-width: 900px) {
  .author-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .author-stats-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e8ecf0;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.stat-card__value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-card__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ─── 3. AUTHOR BIO ───────────────────────────────────────── */
.author-bio-card {
  background: #ffffff;
  border: 1px solid #e8ecf0;
  border-radius: 16px;
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-12);
}

.author-bio-card__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #111827;
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.author-bio-card__content p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #374151;
  margin-bottom: var(--space-4);
}

.author-bio-card__content p:last-child {
  margin-bottom: 0;
}

/* ─── 4. AUTHOR EXPERTISE ─────────────────────────────────── */
.author-expertise-card {
  background: #ffffff;
  border: 1px solid #e8ecf0;
  border-radius: 16px;
  padding: var(--space-6) var(--space-8);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-12);
}

.author-expertise__title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #111827;
  margin-bottom: var(--space-4);
}

.author-expertise__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.expertise-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 9999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: default;
}

.expertise-chip:hover {
  background: #fdce04;
  color: #111827;
  border-color: #fdce04;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(253, 206, 4, 0.3);
}

/* ─── 5. ARTICLES BY AUTHOR (4-COLUMN GRID) ──────────────── */
.author-articles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.author-articles-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #111827;
  margin: 0;
}

/* Override default 3-col grid to 4-col for author pages */
.author-articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: var(--space-10);
}

@media (max-width: 1200px) {
  .author-articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .author-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .author-articles-grid {
    grid-template-columns: 1fr;
  }
}

/* Article Card Enhancements */
.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e8ecf0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  border-color: #cbd5e1;
}

.featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fdce04;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

/* ─── 6. PAGINATION ───────────────────────────────────────── */
.author-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
  margin-bottom: var(--space-16);
}

.author-pagination .pagination-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  font-weight: 700;
}

.author-pagination .pagination-btn:hover:not(:disabled):not(.active) {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #ffffff;
}

/* ─── 7. CTA BANNER SECTION ───────────────────────────────── */
.author-cta-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: var(--space-12) var(--space-8);
  color: #ffffff;
  text-align: center;
  margin-bottom: var(--space-16);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.author-cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(253, 206, 4, 0.15) 0%, rgba(253, 206, 4, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.author-cta-banner__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.author-cta-banner__subtitle {
  font-size: var(--text-lg);
  color: #94a3b8;
  max-width: 540px;
  margin: 0 auto var(--space-8);
}

.btn-brand-yellow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(253, 206, 4, 0.35);
}

.btn-brand-yellow:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(253, 206, 4, 0.5);
  color: #ffffff;
}

/* ─── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}