/* author/author.css - Author pages */

.au-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  color: #1f2937;
}

.au-breadcrumb { margin-bottom: 16px; }

/* ---------- Hero ---------- */
.au-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f0f6ff 0%, #ffffff 70%);
  border: 1px solid #dbe7ff;
  border-radius: 16px;
}

.au-avatar {
  flex: none;
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .25);
  background: #fff;
}

.au-avatar-logo { object-fit: contain; padding: 6px; }
.au-avatar-sm { width: 84px; height: 84px; border-width: 3px; }

.au-eyebrow {
  margin: 0 0 4px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2563eb;
}

.au-hero h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.25;
  color: #0f172a;
}

.au-short { margin: 0 0 12px; font-size: 16px; line-height: 1.6; color: #475569; }

.au-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: #475569;
}

.au-stats strong { color: #0f172a; }

/* ---------- Cross-author button ---------- */
.au-switch { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 8px; }

.au-switch-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  background: linear-gradient(135deg, #0b2a6f, #2563eb);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .3);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.au-switch-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(37, 99, 235, .4); }

.au-switch-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg);
  animation: au-shine 3.5s infinite;
}

@keyframes au-shine { 0% { left: -60%; } 60%, 100% { left: 130%; } }

.au-switch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255, 255, 255, .18);
  border-radius: 50%;
}

.au-switch-icon svg { width: 22px; height: 22px; fill: #fff; }

.au-switch-text { display: flex; flex-direction: column; font-weight: 700; font-size: 15px; line-height: 1.25; }
.au-switch-text small { font-weight: 500; font-size: 11.5px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }

.au-switch-count {
  min-width: 26px;
  padding: 2px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  color: #0b2a6f;
  border-radius: 999px;
}

.au-switch-arrow { font-size: 20px; transition: transform .2s; }
.au-switch-btn:hover .au-switch-arrow { transform: translateX(4px); }

/* ---------- Articles grid ---------- */
.au-articles { margin-top: 26px; }
.au-articles > h2, .au-about > h2 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  font-size: 22px;
  border-bottom: 3px solid #e5e7eb;
}

.au-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.au-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.au-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, .12); }

.au-card-img { display: block; aspect-ratio: 16 / 9; background: #f3f4f6; overflow: hidden; }
.au-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.au-card-img-empty { display: flex; align-items: center; justify-content: center; }
.au-card-img-empty img { width: 40%; height: auto; object-fit: contain; opacity: .5; }

.au-card-body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 14px 16px 16px; }

.au-card-title { margin: 0; font-size: 17px; line-height: 1.35; }
.au-card-title a { color: #111827; text-decoration: none; }
.au-card-title a:hover { color: #2563eb; }

.au-card-desc { margin: 0; font-size: 14px; line-height: 1.55; color: #4b5563; }

.au-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 12.5px;
  color: #6b7280;
}

.au-readmore { font-weight: 600; font-size: 13px; color: #2563eb; text-decoration: none; }
.au-readmore:hover { text-decoration: underline; }

.au-empty { padding: 24px; background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 10px; color: #6b7280; }

/* ---------- Pagination ---------- */
.au-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 8px; }

.au-pager a, .au-pager-current {
  min-width: 38px;
  padding: 8px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  text-decoration: none;
  color: #1f2937;
  background: #fff;
}

.au-pager a:hover { border-color: #2563eb; color: #2563eb; }
.au-pager-current { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ---------- About ---------- */
.au-about { margin-top: 36px; padding: 22px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 14px; }
.au-about p { line-height: 1.7; margin: 0 0 12px; }
.au-topics-label { font-weight: 700; margin-top: 14px !important; }
.au-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.au-topics li { padding: 5px 12px; font-size: 13px; background: #e0ecff; color: #1e3a8a; border-radius: 999px; }

/* ---------- Authors index ---------- */
.au-index-head h1 { font-size: 28px; margin: 0 0 8px; }
.au-index-head p { margin: 0 0 20px; color: #475569; line-height: 1.6; }
.au-authors { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.au-author-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
}

.au-author-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .12); }
.au-author-card h2 { margin: 0 0 2px; font-size: 19px; color: #0f172a; }
.au-author-card p { margin: 4px 0; font-size: 14px; line-height: 1.55; color: #475569; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .au-hero { flex-direction: column; text-align: center; padding: 20px 16px; }
  .au-stats { justify-content: center; }
  .au-hero h1 { font-size: 23px; }
  .au-switch-btn { width: 100%; box-sizing: border-box; }
  .au-switch-text { flex: 1; }
  .au-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .au-switch-btn::after { animation: none; }
}
