/* ===== Kenya Ni Home Author Page ===== */
:root {
  --author-navy: #071b44;
  --author-green: #087a43;
  --author-red: #ef3439;
  --author-bg: #ffffff;
  --author-muted: #4b5563;
  --author-border: #e8edf0;
  --author-radius: 4px;
}

.author-page {
  font-family: 'Montserrat', sans-serif;
  background: var(--author-bg);
  color: var(--author-navy);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Hero ===== */
.author-hero {
  margin: 24px 0 28px;
  background: linear-gradient(135deg, #f6faf7 0%, #ffffff 100%);
  border: 1px solid var(--author-border);
  border-radius: 12px;
  padding: 28px;
}

.author-hero-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.author-hero-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #e5e7eb;
  overflow: hidden;
  flex-shrink: 0;
}

.author-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
}

.author-hero-body {
  min-width: 0;
}

.author-hero-name {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  color: var(--author-navy);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.author-hero-role {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--author-green);
  margin: 0 0 14px;
}

.author-hero-bio {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--author-muted);
  margin: 0 0 16px;
  max-width: 640px;
}

.author-hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.author-hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--author-navy);
}

.author-hero-meta-item svg {
  color: var(--author-green);
}

.author-hero-social {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--author-border);
  color: var(--author-navy);
  text-decoration: none;
  transition: all 200ms ease;
}

.author-social-link:hover {
  background: var(--author-green);
  color: var(--author-bg);
  border-color: var(--author-green);
}

/* ===== Controls / Editorial Toolbar ===== */
.author-toolbar {
  border-bottom: 1px solid var(--author-border);
  padding: 18px 0 20px;
  margin-bottom: 24px;
}

.author-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.author-toolbar-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.author-toolbar-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--author-navy);
  margin: 0;
  white-space: nowrap;
}

.author-toolbar-count {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--author-muted);
  white-space: nowrap;
}

.author-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.author-search {
  padding: 8px 12px;
  border: 1px solid var(--author-border);
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  outline: none;
  min-width: 220px;
  color: var(--author-navy);
  background: #fff;
}

.author-search:focus {
  border-color: var(--author-green);
  box-shadow: 0 0 0 3px rgba(8, 122, 67, 0.08);
}

.author-sort {
  padding: 8px 12px;
  border: 1px solid var(--author-border);
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  outline: none;
  background: #fff;
  color: var(--author-navy);
  cursor: pointer;
  white-space: nowrap;
}

/* ===== Scrollable Category Row ===== */
.author-category-row {
  position: relative;
  display: flex;
  align-items: center;
}

.author-category-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
  padding-right: 36px;
  flex-shrink: 0;
}

.author-category-scroll::-webkit-scrollbar {
  height: 8px;
}

.author-category-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.author-category-scroll::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 4px;
  border: 2px solid #f1f5f9;
}

.author-category-scroll::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.author-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--author-border);
  background: #ffffff;
  color: var(--author-navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 200ms ease;
  flex-shrink: 0;
}

.author-filter-chip:hover {
  border-color: var(--author-green);
  color: var(--author-green);
}

.author-filter-chip.is-active {
  background: var(--author-green);
  color: var(--author-bg);
  border-color: var(--author-green);
}

.author-scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--author-border);
  background: #ffffff;
  color: var(--author-navy);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: all 200ms ease;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.author-scroll-arrow:hover:not(:disabled) {
  opacity: 1;
  border-color: var(--author-green);
  color: var(--author-green);
}

.author-scroll-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.author-scroll-prev { left: -8px; }
.author-scroll-next { right: -8px; }

@media (max-width: 767px) {
  .author-scroll-arrow {
    opacity: 1;
    pointer-events: auto;
  }

  .author-category-scroll {
    padding-right: 0;
  }
}

/* ===== Layout ===== */
.author-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  padding-bottom: 48px;
}

.author-stories-header {
  margin-bottom: 20px;
}

.author-stories-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--author-navy);
  margin: 0;
}

.author-stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.author-story {
  border-top: 1px solid var(--author-border);
  padding-top: 22px;
}

.author-story:first-child {
  border-top: none;
  padding-top: 0;
}

.author-story-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.author-story-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: var(--author-radius);
  margin-bottom: 14px;
  background: #e5e7eb;
}

.author-story-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.author-story-category {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--author-green);
}

.author-story-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--author-navy);
  margin: 0;
}

.author-story-excerpt {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--author-muted);
  margin: 0;
}

.author-story-meta {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: var(--author-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.author-story-sep {
  color: var(--author-border);
}

.author-stories-empty {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: var(--author-muted);
  padding: 24px 0;
}

/* ===== Sidebar ===== */
.author-sidebar-card {
  position: sticky;
  top: 100px;
}

.author-sidebar-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--author-navy);
  margin: 0 0 14px;
}

.author-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.author-sidebar-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--author-navy);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--author-border);
  transition: color 200ms ease;
}

.author-sidebar-links a:last-child {
  border-bottom: none;
}

.author-sidebar-links a:hover {
  color: var(--author-red);
}

/* ===== Responsive ===== */
@media (max-width: 1199px) {
  .author-layout {
    grid-template-columns: 1fr;
  }
  .author-sidebar {
    display: none;
  }
  .author-stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .author-page {
    padding: 0 16px;
  }
  .author-hero {
    padding: 20px;
  }
  .author-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .author-hero-avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }
  .author-hero-meta {
    justify-content: center;
  }
  .author-hero-social {
    justify-content: center;
  }
  .author-toolbar-top {
    flex-direction: column;
    align-items: stretch;
  }
  .author-toolbar-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .author-toolbar-title {
    white-space: normal;
  }
  .author-toolbar-count {
    white-space: normal;
  }
  .author-toolbar-actions {
    width: 100%;
  }
  .author-search {
    min-width: auto;
    width: 100%;
  }
  .author-sort {
    width: 100%;
  }
  .author-category-scroll {
    padding-right: 0;
  }
  .author-stories-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .author-story {
    border-top: 1px solid var(--author-border);
    padding: 18px 0;
  }
  .author-story:first-child {
    border-top: 1px solid var(--author-border);
    padding-top: 18px;
  }
  .author-story-title {
    font-size: 18px;
  }
  .author-story-excerpt {
    font-size: 14px;
  }
}
