/* Author links are shared by the feed and both generations of article layouts. */
a.author-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  vertical-align: middle;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}
a.author-link:hover { text-decoration: underline; text-underline-offset: 4px; }
a.author-link:focus-visible, .author-card:focus-visible {
  outline: 2px solid var(--a1, #6e7bff);
  outline-offset: 5px;
  border-radius: 8px;
}
a.author-link img {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 38%;
}
.blog-meta a.author-link { color: var(--muted); font-size: 12.5px; }
.blog-meta a.author-link span { color: inherit; letter-spacing: normal; text-transform: none; }
.hero .meta a.author-link { margin: 0 4px; }
.hero .meta a.author-link img { width: 40px; height: 40px; flex-basis: 40px; }
.authors-nav { display: inline-block; margin-top: 20px; color: var(--a2); text-underline-offset: 5px; }
.author-profile { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 40px; align-items: center; }
.author-portrait { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; object-position: 50% 38%; border: 3px solid var(--line2); }
.author-profile h1 { font-size: clamp(28px, 4vw, 46px); margin: 14px 0 18px; }
.author-profile .lead { font-size: 18px; }
.author-count { margin-top: 20px; color: var(--muted); }
.author-materials-title { font-family: var(--display); font-size: 24px; margin: 0; }
.author-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.author-card { display: flex; align-items: flex-start; gap: 24px; padding: 32px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); color: var(--ink); text-decoration: none; }
.author-card:hover { border-color: var(--a1); }
.author-card img { width: 96px; height: 96px; flex: 0 0 96px; border-radius: 50%; object-fit: cover; object-position: 50% 38%; }
.author-card h2 { font-family: var(--display); font-size: 20px; line-height: 1.4; margin: 0 0 12px; }
.author-card p { color: var(--muted); margin: 0 0 16px; }
.author-card .author-card-count { color: var(--a2); margin: 0; }
@media (max-width: 900px) { .author-directory { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .author-profile { grid-template-columns: 1fr; gap: 24px; }
  .author-portrait { width: 112px; height: 112px; }
  .author-card { padding: 24px; gap: 18px; }
  .author-card img { width: 64px; height: 64px; flex-basis: 64px; }
  .author-card h2 { font-size: 17px; }
}
/* Frame the portrait in CSS; keep the downloaded Telegram originals intact. */
a.author-link .author-avatar { display: block; flex: 0 0 32px; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; }
a.author-link .author-avatar img { border-radius: 0; transform: scale(1.8); transform-origin: 50% 35%; }
.hero .meta a.author-link .author-avatar { width: 40px; height: 40px; flex-basis: 40px; }
.author-portrait { display: block; overflow: hidden; }
.author-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.6); transform-origin: 50% 35%; }
.author-card-photo { display: block; width: 96px; height: 96px; flex: 0 0 96px; overflow: hidden; border-radius: 50%; }
.author-card-photo img { display: block; border-radius: 0; transform: scale(1.8); transform-origin: 50% 35%; }
/* This portrait has the face near the top of the original frame. */
.author-avatar img[src$="dmitry-borozdin.jpg"],
.author-portrait img[src$="dmitry-borozdin.jpg"],
.author-card-photo img[src$="dmitry-borozdin.jpg"] { transform-origin: 50% 0; }
/* The Telegram avatar is already tightly framed. */
a.author-link .author-avatar img[src$="ilyas-salikhov.jpg"],
.author-portrait img[src$="ilyas-salikhov.jpg"],
.author-card-photo img[src$="ilyas-salikhov.jpg"] { transform: none; object-position: center; }
@media (max-width: 600px) { .author-card-photo { width: 64px; height: 64px; flex-basis: 64px; } }

/* Frame the supplied square portrait without changing the original. */
a.author-link .author-avatar img[src$="viktor-bondarenko.jpg"],
.author-portrait img[src$="viktor-bondarenko.jpg"],
.author-card-photo img[src$="viktor-bondarenko.jpg"] { transform: scale(1.35); transform-origin: 52% 30%; object-position: center; }
