/* Персональное досье бойца — wiki + character card */

.lib-page--dossier {
  --fighter-accent: var(--legend-accent, #9a7b4f);
  --fighter-panel: rgba(22, 24, 32, .94);
  --fighter-glow: rgba(154, 123, 79, .2);
  --fighter-page: #141820;
  --fighter-page-alt: #1a2030;
  scroll-padding-top: 88px;
  background:
    radial-gradient(circle at 12% 0%, rgba(154, 123, 79, .09), transparent 38rem),
    radial-gradient(circle at 88% 100%, rgba(90, 110, 150, .07), transparent 34rem),
    linear-gradient(180deg, var(--fighter-page-alt) 0%, var(--fighter-page) 100%);
}

.lib-page--dossier.lib-page--greco,
.lib-page--dossier.lib-page--karelin {
  --legend-accent: #b8925a;
  --fighter-glow: rgba(184, 146, 90, .24);
  --fighter-page: #161922;
  --fighter-page-alt: #1c2230;
}

.lib-page--dossier.lib-page--judo { --legend-accent: #c9a84a; }

.lib-page--dossier.lib-page--uta-abe {
  --legend-accent: #d4a855;
  --fighter-glow: rgba(200, 130, 150, .2);
  --fighter-page: #181620;
  --fighter-page-alt: #201828;
}
.lib-page--dossier.lib-page--bjj { --legend-accent: #c45a5a; }
.lib-page--dossier.lib-page--sumo { --legend-accent: #8b7355; }
.lib-page--dossier.lib-page--wrestling { --legend-accent: #1f9d72; }
.lib-page--dossier.lib-page--sambo { --legend-accent: #c4384a; }

.fighter-dossier {
  padding-bottom: 48px;
}

/* ——— Hero grid ——— */
.fighter-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 440px) minmax(260px, 320px);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--line);
}

.fighter-hero__col--identity {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fighter-panel {
  padding: 18px 20px;
  border: 1px solid rgba(212, 162, 74, .16);
  background: rgba(255, 255, 255, .035);
  text-decoration: none;
  color: inherit;
}

a.fighter-panel--link {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}

a.fighter-panel--link:hover {
  border-color: rgba(212, 162, 74, .42);
  background: rgba(212, 162, 74, .07);
  transform: translateY(-1px);
}

a.fighter-panel--link:focus-visible {
  outline: 2px solid var(--fighter-accent);
  outline-offset: 2px;
}

.fighter-panel__cta {
  display: block;
  margin-top: auto;
  padding-top: 10px;
  flex-shrink: 0;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fighter-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.fighter-panel--link:hover .fighter-panel__cta {
  color: var(--gold-light);
}

.fighter-panel--intro {
  padding: 0;
  border: 0;
  background: transparent;
}

.fighter-panel h3 {
  margin: 0 0 8px;
  font: 600 .78rem/1.2 "Oswald", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fighter-accent);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.fighter-panel p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.55;
  color: #c9bfb0;
}

.fighter-panel__rows {
  display: grid;
  gap: 0;
}

.fighter-panel__row {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: .8rem;
}

.fighter-panel__row:last-child { border-bottom: 0; }

.fighter-panel__row span:first-child {
  font: 600 .85rem/1.2 "Oswald", sans-serif;
  color: var(--gold-light);
}

.fighter-panel__row span:last-child {
  text-align: right;
  color: #d6ccbb;
  font-weight: 500;
}

.fighter-panel__row--silver span:last-child { color: #a8b0bc; }

.fighter-hero__extras {
  display: grid;
  gap: 14px;
}

.fighter-hero__label {
  margin: 0 0 14px;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fighter-accent);
}

.fighter-hero h1 {
  margin: 0;
  font: 700 clamp(2.2rem, 5.5vw, 3.6rem)/1 "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: -.02em;
}

.fighter-hero__native {
  margin: 8px 0 0;
  font-size: .95rem;
  color: var(--muted);
  letter-spacing: .06em;
}

.fighter-hero__tagline {
  margin: 14px 0 0;
  font: 500 1rem/1.3 "Oswald", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.fighter-hero__lead {
  margin: 18px 0 0;
  max-width: 46ch;
  line-height: 1.78;
  color: #d6ccbb;
  font-size: .95rem;
}

.fighter-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 460px;
  margin-top: 0;
  border: 1px solid rgba(212, 162, 74, .18);
  background: rgba(255, 255, 255, .03);
}

.fighter-stat {
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.fighter-stat:last-child { border-right: 0; }

.fighter-stat strong {
  display: block;
  font: 600 clamp(1.4rem, 3vw, 1.85rem)/1 "Oswald", sans-serif;
  color: var(--gold-light);
}

.fighter-stat span {
  display: block;
  margin-top: 6px;
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.35;
}

.fighter-stat--visits.is-zero strong {
  opacity: .55;
}

/* ——— Specimen stage (как у персонажей) ——— */
.fighter-specimen {
  margin: 0;
  align-self: start;
}

.fighter-specimen__stage {
  position: relative;
  min-height: clamp(560px, 74vh, 860px);
  padding: 10px 8px;
  border: 1px solid rgba(212, 162, 74, .2);
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 42% at 50% 94%, rgba(12, 14, 20, .45), transparent 72%),
    radial-gradient(ellipse 85% 55% at 50% 38%, var(--fighter-glow), transparent 68%),
    linear-gradient(165deg, #2a3140 0%, #222836 48%, #1a2030 100%);
}

/* Сцена греко-римской — тёплый бронзово-синий, без фото */
.fighter-specimen__stage--greco {
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    radial-gradient(ellipse 68% 38% at 50% 96%, rgba(8, 10, 16, .55), transparent 74%),
    radial-gradient(circle at 50% 28%, rgba(200, 160, 90, .16), transparent 52%),
    linear-gradient(160deg, #303848 0%, #283040 42%, #1e2534 100%);
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
}

/* Сцена — женские досье: тёплый plum/rose (все дисциплины) */
.fighter-specimen__stage--female {
  background:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px),
    radial-gradient(ellipse 68% 38% at 50% 96%, rgba(10, 6, 14, .52), transparent 74%),
    radial-gradient(circle at 50% 28%, rgba(210, 130, 150, .15), transparent 52%),
    linear-gradient(160deg, #3a2838 0%, #322838 42%, #261e30 100%);
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
}

.fighter-specimen__stage--female .fighter-specimen__ring {
  border-color: rgba(220, 160, 170, .24);
  box-shadow:
    0 0 0 36px rgba(200, 130, 150, .05),
    0 0 0 72px rgba(200, 130, 150, .03);
}

.fighter-specimen__stage--female .fighter-specimen__label {
  color: rgba(220, 170, 180, .48);
}

.fighter-specimen__stage--female .fighter-specimen__scan {
  background: linear-gradient(90deg, transparent, #e8b8c4, transparent);
  box-shadow:
    0 0 18px rgba(210, 140, 160, .7),
    0 0 42px rgba(210, 140, 160, .22);
}

/* Сцена дзюдо — мужские досье */
.fighter-specimen__stage--judo:not(.fighter-specimen__stage--female) {
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    radial-gradient(ellipse 68% 38% at 50% 96%, rgba(8, 10, 16, .55), transparent 74%),
    radial-gradient(circle at 50% 28%, rgba(201, 168, 74, .14), transparent 52%),
    linear-gradient(160deg, #2e2830 0%, #282430 42%, #1e1a28 100%);
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
}

.fighter-specimen__stage--bjj:not(.fighter-specimen__stage--female) {
  background:
    radial-gradient(ellipse 68% 38% at 50% 96%, rgba(8, 6, 6, .55), transparent 74%),
    radial-gradient(circle at 50% 28%, rgba(196, 90, 90, .14), transparent 52%),
    linear-gradient(160deg, #302428 0%, #281e22 42%, #1e181c 100%);
}

.fighter-specimen__stage--sumo:not(.fighter-specimen__stage--female) {
  background:
    radial-gradient(ellipse 68% 38% at 50% 96%, rgba(10, 8, 6, .55), transparent 74%),
    radial-gradient(circle at 50% 28%, rgba(139, 115, 85, .16), transparent 52%),
    linear-gradient(160deg, #2a2620 0%, #242018 42%, #1a1814 100%);
}

.fighter-specimen__stage--wrestling:not(.fighter-specimen__stage--female) {
  background:
    radial-gradient(ellipse 68% 38% at 50% 96%, rgba(6, 12, 10, .55), transparent 74%),
    radial-gradient(circle at 50% 28%, rgba(31, 157, 114, .14), transparent 52%),
    linear-gradient(160deg, #1e2824 0%, #1a2420 42%, #141c18 100%);
}

.fighter-specimen__stage--sambo:not(.fighter-specimen__stage--female) {
  background:
    radial-gradient(ellipse 68% 38% at 50% 96%, rgba(12, 6, 8, .55), transparent 74%),
    radial-gradient(circle at 50% 28%, rgba(196, 56, 74, .14), transparent 52%),
    linear-gradient(160deg, #2a1e22 0%, #241820 42%, #1a1216 100%);
}

.fighter-specimen__spot {
  position: absolute;
  z-index: 1;
  width: 46%;
  height: 72%;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 40%, rgba(10, 12, 18, .72) 0%, transparent 68%);
  pointer-events: none;
}

.fighter-specimen__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 24, 32, .35) 0%, transparent 28%);
  pointer-events: none;
}

.fighter-specimen__ring {
  position: absolute;
  z-index: 1;
  width: min(400px, 74%);
  aspect-ratio: 1;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(212, 162, 74, .22);
  border-radius: 50%;
  box-shadow:
    0 0 0 36px rgba(212, 162, 74, .04),
    0 0 0 72px rgba(212, 162, 74, .025);
  pointer-events: none;
}

.fighter-specimen__label {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 14px;
  writing-mode: vertical-rl;
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(212, 162, 74, .45);
}

.fighter-specimen__scan {
  position: absolute;
  z-index: 4;
  left: 8%;
  right: 8%;
  top: 12%;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light, #f0cf8b), transparent);
  box-shadow:
    0 0 18px rgba(212, 162, 74, .75),
    0 0 42px rgba(212, 162, 74, .25);
  opacity: .55;
  pointer-events: none;
  animation: fighter-scan 5s ease-in-out infinite;
}

.fighter-specimen__scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -28px;
  height: 56px;
  background: linear-gradient(180deg, transparent, rgba(212, 162, 74, .07), transparent);
  pointer-events: none;
}

@keyframes fighter-scan {
  0%, 100% { top: 10%; opacity: .22; }
  50% { top: 86%; opacity: .72; }
}

.fighter-specimen img {
  position: absolute;
  z-index: 3;
  inset: 6px 4px 4px;
  width: calc(100% - 8px);
  height: calc(100% - 10px);
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 28px 36px rgba(0, 0, 0, .65));
}

/* ——— Wiki infobox ——— */
.fighter-infobox-shell {
  position: relative;
  align-self: start;
}

.fighter-infobox {
  border: 1px solid rgba(212, 162, 74, .28);
  background:
    linear-gradient(165deg, rgba(36, 32, 28, .96) 0%, rgba(24, 28, 38, .96) 100%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(212, 162, 74, .1);
  overflow: hidden;
}

.fighter-infobox__expand {
  display: block;
  width: 100%;
  margin-top: 0;
  padding: 11px 14px;
  border: 1px solid rgba(212, 162, 74, .35);
  border-top: 0;
  background: rgba(18, 22, 30, .95);
  color: var(--gold-light);
  font: 600 .68rem/1 "Oswald", sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.fighter-infobox__expand:hover {
  background: rgba(212, 162, 74, .12);
}

.fighter-infobox-shell.has-overflow:not(.is-expanded)::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 42px;
  height: 64px;
  background: linear-gradient(0deg, rgba(24, 28, 38, .98) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.fighter-infobox__banner {
  position: relative;
  border-bottom: 1px solid rgba(212, 162, 74, .2);
}

.fighter-infobox__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: top center;
  filter: saturate(.88) contrast(1.04);
}

.fighter-infobox__banner-text {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 16px 14px;
  background: linear-gradient(0deg, rgba(4, 5, 8, .96) 0%, transparent 100%);
}

.fighter-infobox__banner-text strong {
  display: block;
  font: 700 1.05rem/1.15 "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold-light);
}

.fighter-infobox__banner-text span {
  display: block;
  margin-top: 5px;
  font-size: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fighter-accent);
}

.fighter-infobox__badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(212, 162, 74, .15);
  border-bottom: 1px solid rgba(212, 162, 74, .2);
}

.fighter-infobox__badge {
  padding: 12px 8px;
  text-align: center;
  background: rgba(28, 32, 42, .88);
}

.fighter-infobox__badge strong {
  display: block;
  font: 700 1.35rem/1 "Oswald", sans-serif;
  color: #e8c878;
}

.fighter-infobox__badge span {
  display: block;
  margin-top: 4px;
  font-size: .52rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}

.fighter-infobox__list {
  margin: 0;
  padding: 6px 16px 14px;
}

.fighter-infobox__row {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.fighter-infobox__row:last-child { border-bottom: 0; }

.fighter-infobox__row dt {
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(180, 172, 158, .75);
}

.fighter-infobox__row dd {
  margin: 0;
  text-align: right;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.45;
  color: #ece4d6;
}

/* ——— Body ——— */
.fighter-body {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  padding: 48px 0 24px;
  align-items: start;
}

.fighter-toc {
  position: sticky;
  top: 88px;
  padding: 20px 18px;
  border: 1px solid rgba(212, 162, 74, .15);
  background: rgba(255, 255, 255, .04);
}

.fighter-toc__title {
  margin: 0 0 12px;
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fighter-accent);
}

.fighter-toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: .82rem;
  line-height: 1.7;
  color: var(--muted);
}

.fighter-toc a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: color .2s;
}
.fighter-toc a:hover {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.fighter-article {
  max-width: 68ch;
}

.fighter-section {
  margin-bottom: 40px;
  scroll-margin-top: 88px;
}

.fighter-section h2 {
  margin: 0 0 16px;
  font: 600 clamp(1.35rem, 3vw, 1.75rem)/1.2 "Oswald", sans-serif;
  text-transform: uppercase;
  color: var(--gold-light);
  letter-spacing: .02em;
}

.fighter-section p {
  margin: 0 0 14px;
  line-height: 1.85;
  color: #d6ccbb;
  font-size: .96rem;
}
.fighter-section p:last-child { margin-bottom: 0; }

.fighter-medals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.fighter-medal {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  align-items: baseline;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}

.fighter-medal::before {
  content: "●";
  font-size: .75rem;
  color: #d4a24a;
}
.fighter-medal--silver::before { color: #a8b0bc; }

.fighter-medal__event {
  grid-column: 2;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.fighter-medal__detail {
  grid-column: 2;
  font-weight: 600;
  font-size: .92rem;
  margin-top: -6px;
}

.fighter-records {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.85;
  color: #d6ccbb;
}
.fighter-records li { margin-bottom: 8px; }

.fighter-section--scrolls .legend-scrolls { margin-top: 4px; }

/* ——— Ноутбук: высота от фото в полный рост ——— */
@media (min-width: 1024px) {
  .fighter-hero {
    align-items: start;
  }

  .fighter-hero__col--identity {
    min-height: var(--fighter-stage-h, auto);
    max-height: var(--fighter-stage-h, none);
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
  }

  .fighter-hero__extras {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-auto-rows: 1fr;
    gap: 8px;
  }

  .fighter-hero__extras .fighter-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 16px;
    overflow: hidden;
  }

  .fighter-hero__extras .fighter-panel h3 {
    margin-bottom: 6px;
    font-size: .72rem;
  }

  .fighter-hero__extras .fighter-panel p {
    font-size: .78rem;
    line-height: 1.45;
  }

  .fighter-hero__extras .fighter-panel__row {
    padding: 5px 0;
    font-size: .76rem;
  }

  .fighter-hero__extras .fighter-panel__row span:first-child {
    font-size: .8rem;
  }

  .fighter-panel--intro .fighter-hero__lead {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .fighter-stats {
    max-width: none;
    flex-shrink: 0;
  }

  .fighter-panel--intro {
    flex-shrink: 0;
  }

  .fighter-specimen__stage {
    height: auto;
    min-height: clamp(560px, 74vh, 860px);
  }

  .fighter-infobox-shell:not(.is-expanded) {
    max-height: var(--fighter-stage-h, none);
    display: flex;
    flex-direction: column;
  }

  .fighter-infobox-shell:not(.is-expanded) .fighter-infobox {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .fighter-infobox-shell.is-expanded {
    max-height: none;
  }

  .fighter-infobox-shell.is-expanded .fighter-infobox {
    overflow: visible;
  }

  .fighter-infobox-shell.is-expanded::before {
    display: none;
  }
}

/* ——— Responsive ——— */
@media (max-width: 1023px) {
  .fighter-hero {
    grid-template-columns: 1fr 1fr;
  }
  .fighter-specimen {
    order: 2;
  }
  .fighter-infobox {
    grid-column: 1 / -1;
    max-width: 420px;
  }
  .fighter-stats {
    max-width: none;
  }
}

@media (max-width: 1023px) and (min-width: 721px) {
  .fighter-hero__extras {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .fighter-hero {
    grid-template-columns: 1fr;
  }
  .fighter-infobox {
    order: -1;
    max-width: none;
  }
  .fighter-specimen__stage {
    min-height: clamp(480px, 62vh, 640px);
  }
  .fighter-stats {
    max-width: none;
  }
  .fighter-body {
    grid-template-columns: 1fr;
  }
  .fighter-toc {
    position: static;
  }
}

@media (max-width: 420px) {
  .fighter-stats,
  .fighter-infobox__badges {
    grid-template-columns: 1fr;
  }
  .fighter-stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .fighter-stat:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fighter-specimen__scan {
    animation: none;
    top: 50%;
    opacity: .35;
  }
}
