/* ==========================================================================
   Authors: страница автора /authors/{slug}/ — bankinfo/author-profile.
   Использует токены и компоненты base.css / articles.css / pages.css
   (.container, .h2, .tile, .info-card, .post-card, .link-more, .label…).
   ========================================================================== */

.author-page {
  display: block;
}

/* -------- Хлебные крошки -------- */
.author-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding-top: clamp(1rem, 2vw, 1.5rem);
  font-size: 0.8125rem;
  color: var(--c-muted);
}

.author-crumbs a {
  transition: color .2s;
}

.author-crumbs a:hover {
  color: var(--c-blue);
}

.author-crumbs [aria-current] {
  color: var(--c-text);
  font-weight: 600;
}

/* -------- Шапка автора -------- */
.author-hero {
  padding-block: clamp(1rem, 2.4vw, 1.75rem) clamp(1.75rem, 3.4vw, 2.75rem);
}

.author-hero__grid {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) 20rem;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
}

.author-hero__photo {
  overflow: hidden;
  min-height: 22.5rem;
  background: var(--c-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.author-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-hero__photo-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--c-blue);
}

.author-hero__photo-fallback::before {
  width: 4rem;
  height: 4rem;
}

.author-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.3125rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--c-blue);
  background: var(--c-soft);
  border-radius: 62.4375rem;
}

.author-hero__name {
  margin: 0 0 0.375rem;
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.02em;
}

.author-hero__job {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--c-blue);
}

.author-hero__spec {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--c-muted);
}

.author-hero__bio {
  max-width: 62ch;
  margin: 0 0 1.375rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
}

.author-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.author-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: var(--c-blue);
  border-radius: var(--radius);
  transition: background-color .2s;
}

.author-btn:hover {
  background: var(--c-blue-hover);
}

.author-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-social a {
  display: grid;
  place-items: center;
  width: 2.375rem;
  height: 2.375rem;
  color: var(--c-navy);
  background: var(--c-soft-2);
  border-radius: 50%;
  transition: background-color .2s, color .2s;
}

.author-social a:hover {
  color: #fff;
  background: var(--c-blue);
}

.author-social svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* -------- Цитата и факты (правая колонка шапки) -------- */
.author-hero__aside {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.author-quote {
  position: relative;
  margin: 0;
  padding: 1.375rem 1.375rem 1.125rem;
  background: var(--c-navy);
  border-radius: var(--radius-lg);
}

.author-quote__mark {
  display: block;
  margin-bottom: 0.375rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.875rem;
  line-height: .5;
  color: var(--c-blue);
}

.author-quote p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.45;
  font-weight: 500;
  color: #fff;
}

.author-quote cite {
  display: block;
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  font-style: normal;
  color: rgba(255, 255, 255, .6);
}

.author-facts {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 0;
  padding: 1.25rem;
  background: #fff;
  border: 0.0625rem solid var(--c-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.author-facts li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--c-text);
}

.author-facts__icon {
  flex: none;
  width: 1.625rem;
  height: 1.625rem;
  margin-top: 0.0625rem;
  color: var(--c-blue);
}

.author-facts__icon::before {
  width: 1.625rem;
  height: 1.625rem;
}

/* -------- Основная сетка: контент + сайдбар -------- */
.author-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-bottom: clamp(3rem, 6vw, 5.25rem);
}

.author-section {
  padding-top: var(--section-gap);
}

.author-section__intro {
  max-width: 70ch;
  margin: 0.625rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--c-muted);
}

.author-section .section-head {
  margin-bottom: 0;
}

.author-pub-title {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
}

.author-section .articles__list {
  margin-top: 1.25rem;
}

.author-section .info-grid {
  margin-top: 1.25rem;
  gap: 0.875rem;
}

.author-section .info-card {
  background: var(--c-soft-2);
  border-color: transparent;
  box-shadow: none;
}

.post-card--placeholder .post-card__title,
.post-card--placeholder .post-card__cat {
  pointer-events: none;
}

/* -------- Профессиональный опыт -------- */
.author-timeline {
  margin-top: 1.5rem;
}

.author-timeline__scale {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.author-timeline__year {
  flex: none;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--c-muted);
}

.author-timeline__track {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  height: 0.625rem;
}

.author-timeline__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0.125rem;
  background: var(--c-line);
  transform: translateY(-50%);
}

.author-timeline__dot {
  position: relative;
  width: 0.625rem;
  height: 0.625rem;
  background: var(--c-blue);
  border: 0.125rem solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0.0625rem var(--c-line);
}

.author-timeline__stops {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.125rem;
}

.author-timeline__stop h3 {
  margin: 0 0 0.375rem;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}

.author-timeline__stop p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--c-muted);
}

/* -------- Подход к управлению капиталом -------- */
.author-approach {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.25rem 0;
  margin-top: 1.75rem;
}

.author-approach__step {
  display: flex;
  flex: 1 1 8.75rem;
  min-width: 8.75rem;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-align: center;
}

.author-approach__badge {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.25rem;
  color: var(--c-blue);
  background: var(--c-soft);
  border: 0.0625rem solid #d7e6fb;
  border-radius: 50%;
}

.author-approach__badge svg {
  width: 1.375rem;
  height: 1.375rem;
}

.author-approach__label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-navy);
}

.author-approach__text {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--c-muted);
}

.author-approach__arrow {
  flex: none;
  align-self: center;
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 0.875rem;
  color: var(--c-line);
}

.author-approach__arrow::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask: var(--ic-arrow) center / contain no-repeat;
  mask: var(--ic-arrow) center / contain no-repeat;
}

/* -------- Сайдбар -------- */
.author-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: var(--section-gap);
}

.author-panel {
  padding: 1.25rem;
  background: #fff;
  border: 0.0625rem solid var(--c-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.author-panel__title {
  margin: 0 0 0.875rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.author-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.author-topics li {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-navy);
  background: var(--c-soft-2);
  border-radius: 62.4375rem;
}

.author-media {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 0 0.875rem;
}

.author-media li + li {
  padding-top: 0.75rem;
  border-top: 0.0625rem solid var(--c-line);
}

.author-media a {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.author-media__name {
  font-size: 0.875rem;
  font-weight: 700;
  transition: color .2s;
}

.author-media a:hover .author-media__name {
  color: var(--c-blue);
}

.author-media__label {
  font-size: 0.75rem;
  color: var(--c-muted);
}

.author-profiles {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin: 0;
}

.author-profiles li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-profiles__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  color: var(--c-blue);
  background: var(--c-soft);
  border-radius: 50%;
}

.author-profiles__icon svg {
  width: 1rem;
  height: 1rem;
}

.author-profiles__icon .ic::before {
  width: 1rem;
  height: 1rem;
}

.author-profiles a {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 0;
}

.author-profiles__label {
  font-size: 0.875rem;
  font-weight: 600;
  transition: color .2s;
}

.author-profiles a:hover .author-profiles__label {
  color: var(--c-blue);
}

.author-profiles__handle {
  overflow: hidden;
  font-size: 0.75rem;
  color: var(--c-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -------- Подписка (компактная карточка) -------- */
.author-subscribe {
  padding: 1.25rem;
  background: var(--c-soft);
  border-radius: var(--radius-lg);
}

.author-subscribe p {
  margin: 0 0 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--c-navy);
}

.author-subscribe__form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.author-subscribe__input {
  height: 2.625rem;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  background: #fff;
  border: 0.0625rem solid var(--c-field-line);
  border-radius: var(--radius);
}

.author-subscribe__input.is-invalid {
  border-color: var(--c-down);
}

.author-subscribe__btn {
  height: 2.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--c-blue);
  border: 0;
  border-radius: var(--radius);
  transition: background-color .2s;
}

.author-subscribe__btn:hover {
  background: var(--c-blue-hover);
}

.author-subscribe .subscribe__msg {
  margin: 0;
  font-size: 0.75rem;
  color: var(--c-up);
}

.author-subscribe .subscribe__msg.is-error {
  color: var(--c-down);
}

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 1100px) {
  .author-hero__grid {
    grid-template-columns: 12.5rem minmax(0, 1fr) 17.5rem;
  }
}

@media (max-width: 900px) {
  .author-hero__grid {
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: start;
  }

  .author-hero__photo {
    aspect-ratio: .85;
    min-height: 0;
  }

  .author-hero__aside {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .author-quote,
  .author-facts {
    flex: 1 1 16.25rem;
  }

  .author-layout {
    grid-template-columns: 1fr;
  }

  .author-sidebar {
    padding-top: 0;
    margin-top: var(--section-gap);
  }
}

@media (max-width: 640px) {
  .author-timeline__scale {
    display: none;
  }

  .author-timeline__stops {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .author-hero__grid {
    grid-template-columns: 1fr;
  }

  .author-hero__photo {
    max-width: 12.5rem;
  }

  .author-hero__aside {
    flex-direction: column;
  }

  .author-approach {
    flex-direction: column;
    align-items: stretch;
  }

  .author-approach__step {
    flex-direction: row;
    text-align: left;
  }

  .author-approach__badge {
    margin-bottom: 0;
  }

  .author-approach__arrow {
    display: none;
  }
}
