/* author.html — author profile + article grid */

.author-page {
  --author-ochre: #d68931;
  --author-tab-inactive: #7a869a;
  --author-muted: #8a9096;
  --author-stat-label: #8a9096;

  /* Article cards (match design spec) */
  --author-card-border: #d1d1d1;
  --author-card-border-active: #a0c4ff;
  --author-card-radius: 12px;
  --author-card-body-pad: 20px;
  --author-card-gap: 8px;
  --author-card-title: #000000;
  --author-card-muted: #999999;
  --author-badge-bg: #e6f0ff;
  --author-badge-fg: #5b8fb9;
}

.author-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem 2rem;
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #d8d8d8;
}

.author-profile__avatar {
  width: clamp(5.5rem, 12vw, 7.5rem);
  height: clamp(5.5rem, 12vw, 7.5rem);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-profile__text {
  flex: 1 1 12rem;
  min-width: 0;
}

.author-profile__name {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 3.5vw, 2.125rem);
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: -0.02em;
}

.author-profile__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--author-muted);
  font-weight: 400;
}

.author-profile__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 2.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.author-profile__stats > li {
  margin: 0;
}

.author-profile__stat-label {
  color: var(--author-stat-label);
  font-weight: 400;
}

.author-profile__stat-value {
  font-weight: 700;
  color: #0a0a0a;
}

.author-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.75rem;
}

.author-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.author-tabs > li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.author-tab {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--author-tab-inactive);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.25;
}

.author-tab:hover {
  color: #627088;
}

.author-tab:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.author-tab--active {
  background: var(--author-ochre);
  color: #fff;
  font-weight: 700;
}

.author-tab--active:hover {
  color: #fff;
  filter: brightness(1.05);
}

/* Custom filter dropdown — panel floats below trigger (toolbar row height unchanged) */
.author-dd {
  position: relative;
  min-width: 11.5rem;
}

.author-dd__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #333;
  background-color: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  line-height: 1.5;
  box-shadow: none;
}

.author-dd__trigger:focus-visible {
  border-color: #b8b8b8;
  outline: 0;
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.2);
}

.author-dd__chevron {
  flex-shrink: 0;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.author-dd--open .author-dd__chevron {
  transform: rotate(180deg);
}

.author-dd__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(3, 19, 35, 0.12);
}

.author-dd__panel li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.author-dd__option {
  display: block;
  width: 100%;
  padding: 0.45rem 0.85rem;
  border: 0;
  background: transparent;
  font-size: 0.9375rem;
  color: #333;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.author-dd__option:hover,
.author-dd__option:focus-visible {
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
  outline: none;
}

.author-article-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .author-article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .author-article-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.35rem;
  }
}

.author-article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--author-card-border);
  border-radius: var(--author-card-radius);
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s ease;
}

.author-article-card:hover {
  border-color: #c4c4c4;
}

.author-article-card--active {
  border-color: var(--author-card-border-active);
}

.author-article-card--active:hover {
  border-color: #92b8f5;
}

.author-article-card__media {
  position: relative;
  margin: 0;
  background: #eee;
}

.author-article-card__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.author-read-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--author-badge-fg);
  background: var(--author-badge-bg);
  line-height: 1.2;
  white-space: nowrap;
}

.author-read-badge svg {
  flex-shrink: 0;
  color: var(--author-badge-fg);
}

.author-article-card__body {
  padding: var(--author-card-body-pad);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.author-article-card__title {
  margin: 0 0 var(--author-card-gap);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--author-card-title);
  line-height: 1.35;
}

.author-article-card__date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: var(--author-card-gap);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--author-card-muted);
}

.author-article-card__date svg {
  flex-shrink: 0;
  color: var(--author-card-muted);
}

.author-article-card__desc {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--author-card-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
