/* Страница художников (artists.html, js/artists-page.js). Фон, шапка, вкладки с поиском и
   панель фильтров — общие с галереей (gallery.css, gallery-filter.css); здесь только сетка
   карточек: квадратный портрет без фильтров, имя (имя курсивом), страна и город, число работ.
   Две темы: цвета берутся из --color-text */

.artists-page .gallery-intro__text { max-width: 680px; }

/* раскладка та же, что у галереи; панель по умолчанию скрыта, воронка её открывает */
.artists-page .gallery-layout { padding-top: 64px; }

.artist-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 72px 40px;
  min-width: 0;
}
.gallery-layout:not(.is-filters-hidden) .artist-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.artist-card {
  display: block;
  color: var(--color-text);
  text-align: center;
  text-decoration: none;
  transition: opacity 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.artist-card[hidden] { display: none; }
.artist-card.is-entering { animation: galleryCardIn 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* наведённая карточка остаётся яркой, остальные притухают — как в галерее */
.artist-grid:hover .artist-card:not(:hover) { opacity: 0.55; }

.artist-card__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
}
.artist-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.artist-card:hover .artist-card__photo img { transform: scale(1.06); }

.artist-card__name {
  margin-top: 32px;
  font-family: "Cormorant Garamond", "Baskerville Display PT", "Baskerville Old Face", Baskerville, Georgia, serif;
  font-weight: 400;
  font-size: clamp(26px, 2.1vw, 40px);
  line-height: 1.15;
}
.artist-card__name em { font-style: italic; }

.artist-card__meta {
  margin-top: 12px;
  font-family: "Questrial", sans-serif;
  font-size: clamp(14px, 1vw, 18px);
  opacity: 0.7;
}
.artist-card__count {
  margin-top: 14px;
  font-family: "Questrial", sans-serif;
  font-size: clamp(15px, 1.15vw, 22px);
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .artist-grid,
  .gallery-layout:not(.is-filters-hidden) .artist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 20px; }
}

/* ---------- экран художника (js/work-view.js: buildArtist) ----------
   Макет 1920×1080: портрет по центру (снизу растворяется в фон), имя налезает на его низ,
   «(Uzbekistan, город)», биография в две колонки с буквицей, ниже — все работы художника.
   Контейнер — общий .work (глайд-переход, оверлей), поэтому размеры в vw от макета 1920 */
.aview__inner { align-items: center; padding-bottom: clamp(100px, 9vw, 170px); }
.aview__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: clamp(0px, 0.4vw, 12px);
}
.aview__photo {
  width: clamp(220px, 24.7vw, 520px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 56%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 56%, transparent 100%);
}
.aview__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aview__ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 38%, rgba(237, 111, 18, 0.22), rgba(0, 0, 0, 0.78) 72%), #0b0f10;
}
.aview__ph span { font-family: "Cormorant Garamond", "Baskerville Display PT", Baskerville, Georgia, serif; font-size: 7vw; color: rgba(255, 255, 255, 0.82); }

.aview__name {
  position: relative;
  margin-top: calc(-1 * clamp(40px, 4.4vw, 90px));
  font-family: "Cormorant Garamond", "Baskerville Display PT", "Baskerville Old Face", Baskerville, Georgia, serif;
  font-weight: 400;
  font-size: clamp(44px, 6.4vw, 124px);
  line-height: 1;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
}
.aview__name em { font-style: italic; }
.aview__place {
  margin-top: clamp(14px, 1.5vw, 30px);
  font-size: clamp(16px, 1.6vw, 30px);
  color: var(--soft);
}

.aview__bio {
  width: min(100%, 57.5vw);
  margin-top: clamp(40px, 4.4vw, 86px);
  columns: 2;
  column-gap: clamp(32px, 3vw, 58px);
  font-size: clamp(14px, 1.05vw, 20px);
  line-height: 1.65;
}
.aview__bio p { margin: 0 0 1em; }
.aview__bio p:first-child::first-letter {
  float: left;
  margin: 0.04em 0.12em 0 0;
  font-family: "Cormorant Garamond", "Baskerville Display PT", "Baskerville Old Face", Baskerville, Georgia, serif;
  font-size: 4.3em;
  line-height: 0.8;
}

.aview__works { width: 100%; margin-top: clamp(80px, 8vw, 160px); }
.aview__label {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin-bottom: clamp(36px, 3.6vw, 70px);
  font-size: clamp(13px, 1.15vw, 22px);
  letter-spacing: 0.02em;
  color: var(--soft);
}
.aview__label span { font-size: 0.8em; }
/* карточки работ — те же .gallery-card, что в галерее (размеры и наведение из style.css / gallery-filter.css);
   четыре в ряд, неполный последний ряд (и одна-две работы) встаёт по центру */
.aview__grid.gallery-grid {
  --gap: clamp(20px, 2.1vw, 40px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(48px, 4.4vw, 84px) var(--gap);
  padding: 0;
}
.aview__grid .gallery-card {
  flex: 0 0 calc((100% - 3 * var(--gap)) / 4);
  min-width: 0;
}
.aview__grid .gallery-card.is-sold .gallery-card__price {
  letter-spacing: 0.22em;
  color: var(--color-accent);
}

@media (max-width: 900px) {
  .aview__bio { columns: 1; width: 100%; }
  .aview__grid .gallery-card { flex-basis: calc((100% - var(--gap)) / 2); }
}
