/* ============================================================
   Регби — Моя Жизнь  ·  version 2
   Monochrome editorial: black ink, white paper, grey halftones.
   Old sports-newspaper character. Photos in grayscale,
   colour returns on hover.
   Fonts: Oswald (headlines), Golos Text (body), PT Mono (dates).
   ============================================================ */

:root {
  --paper: #f7f6f3;
  --white: #ffffff;
  --ink: #111110;
  --grey80: #333331;
  --grey60: #5c5c58;
  --grey40: #9b9b95;
  --grey20: #d8d7d1;
  --grey10: #ebeae5;
  --rule: #111110;
  --shadow: 0 12px 32px rgba(17, 17, 16, 0.16);
  --sans: "Golos Text", "Helvetica Neue", Arial, sans-serif;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --mono: "PT Mono", "Courier New", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ink);
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- header / masthead ---------- */

.siteHeader {
  border-bottom: 3px double var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.headerInner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.siteMark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.siteMark span {
  font-weight: 400;
  color: var(--grey60);
}

.mainNav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.mainNav a {
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--grey60);
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}

.mainNav a:hover {
  color: var(--ink);
  border-bottom-color: var(--grey40);
}

.mainNav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.navToggle {
  display: none;
  background: var(--ink);
  border: none;
  padding: 0.45rem 0.9rem;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  cursor: pointer;
}

@media (max-width: 880px) {
  .navToggle {
    display: block;
  }
  .mainNav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 3px double var(--rule);
    box-shadow: var(--shadow);
  }
  .mainNav.isOpen {
    display: block;
  }
  .mainNav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .mainNav a {
    display: block;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid var(--grey20);
  }
}

/* ---------- shared layout ---------- */

.pageWrap {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.pageTitleBlock {
  text-align: center;
  padding: 3.8rem 0 2.2rem;
}

.pageEyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--grey60);
  margin-bottom: 1rem;
}

.pageTitle {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.pageLede {
  max-width: 640px;
  margin: 1.3rem auto 0;
  color: var(--grey60);
  font-size: 0.98rem;
}

.ruleOrnament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.7rem auto 0;
  color: var(--ink);
}

.ruleOrnament::before,
.ruleOrnament::after {
  content: "";
  height: 2px;
  width: 110px;
  background: var(--ink);
}

.ruleOrnament svg {
  width: 24px;
  height: 15px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
}

/* ---------- hero (home) ---------- */

.hero {
  max-width: 1150px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.heroText .pageEyebrow {
  margin-bottom: 1.3rem;
}

.heroName {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 1.4rem;
}

.heroName em {
  font-style: normal;
  font-weight: 400;
  color: var(--grey40);
}

.heroYears {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 0.45rem 1.1rem;
  margin-bottom: 2rem;
}

.heroWelcome {
  font-size: 1.06rem;
  color: var(--grey80);
  border-left: 4px solid var(--ink);
  padding-left: 1.4rem;
}

.heroPortrait {
  position: relative;
  justify-self: center;
}

.heroPortrait img {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--ink);
  outline: 8px solid var(--white);
  outline-offset: -9px;
  box-shadow: var(--shadow);
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.5s;
}

.heroPortrait:hover img {
  filter: grayscale(0) contrast(1);
}

.heroPortrait::after {
  content: "";
  position: absolute;
  inset: 16px -16px -16px 16px;
  border: 2px solid var(--grey20);
  z-index: -1;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .heroWelcome {
    text-align: left;
  }
}

/* page-load reveal */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 0.8s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
}

.reveal:nth-child(2) { animation-delay: 0.12s; }
.reveal:nth-child(3) { animation-delay: 0.24s; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- biography ---------- */

.bioSection {
  background: var(--ink);
  color: var(--paper);
  padding: 3.8rem 0;
  margin-top: 1.5rem;
}

.bioGrid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3.5rem;
  align-items: start;
}

.bioHeading {
  font-family: var(--display);
  font-weight: 500;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--paper);
  max-width: 220px;
  line-height: 1.15;
  border-top: 4px solid var(--paper);
  padding-top: 1rem;
}

.bioList {
  list-style: none;
}

.bioList li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--grey80);
}

.bioList li:last-child {
  border-bottom: none;
}

.bioTerm {
  font-family: var(--mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--grey40);
  padding-top: 0.25rem;
}

@media (max-width: 880px) {
  .bioGrid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .bioList li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

/* ---------- chapters (home gallery links) ---------- */

.chaptersSection {
  padding: 4.2rem 0;
}

.chaptersHeading {
  text-align: center;
  font-family: var(--display);
  font-weight: 500;
  font-size: 2.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.chapterGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  margin-top: 2.5rem;
}

.chapterCard {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 0.65rem 0.65rem 1.1rem;
  transition: transform 0.25s cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 0.25s;
}

.chapterCard:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
}

.chapterCard img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.45s;
}

.chapterCard:hover img {
  filter: grayscale(0) contrast(1);
}

.chapterYear {
  position: absolute;
  top: 1.05rem;
  left: 1.05rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  padding: 0.28rem 0.65rem;
}

.chapterCard h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.95rem 0.4rem 0.1rem;
  color: var(--ink);
}

.chapterCard p {
  margin: 0 0.4rem;
  font-size: 0.86rem;
  color: var(--grey60);
}

/* ---------- gallery pages ---------- */

.galleryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.8rem;
  padding-bottom: 4.5rem;
}

.photoCard {
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 0.6rem;
  cursor: zoom-in;
  transition: transform 0.25s cubic-bezier(0.22, 0.8, 0.3, 1), box-shadow 0.25s;
}

.photoCard:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
}

.photoCard img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.45s;
}

.photoCard:hover img {
  filter: grayscale(0) contrast(1);
}

.photoCard figcaption {
  font-size: 0.84rem;
  color: var(--grey60);
  padding: 0.75rem 0.3rem 0.25rem;
  line-height: 1.5;
}

.photoCard.isTall img {
  aspect-ratio: 3 / 4;
}

.galleryNote {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--grey60);
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 11, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2.5rem;
}

.lightbox.isOpen {
  display: flex;
}

.lightboxFigure {
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.lightboxFigure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border: 5px solid var(--white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightboxCaption {
  color: var(--grey20);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.lightboxClose,
.lightboxPrev,
.lightboxNext {
  position: fixed;
  background: none;
  border: 1px solid rgba(247, 246, 243, 0.45);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.4rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.lightboxClose:hover,
.lightboxPrev:hover,
.lightboxNext:hover {
  background: var(--paper);
  color: var(--ink);
}

.lightboxClose {
  top: 1.2rem;
  right: 1.2rem;
}

.lightboxPrev {
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightboxNext {
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .lightboxPrev,
  .lightboxNext {
    top: auto;
    bottom: 1.2rem;
    transform: none;
  }
  .lightboxPrev {
    left: 25%;
  }
  .lightboxNext {
    right: 25%;
  }
}

/* ---------- content pages (materials / contacts) ---------- */

.contentNarrow {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 5rem;
  text-align: center;
}

.contentNarrow p {
  margin-bottom: 1.4rem;
}

.buttonLink {
  display: inline-block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.9rem 2.4rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.buttonLink:hover {
  background: var(--paper);
  color: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

/* ---------- footer ---------- */

.siteFooter {
  border-top: 3px double var(--rule);
  background: var(--ink);
  color: var(--grey20);
  margin-top: 2rem;
}

.footerInner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 2.2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footerMark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper);
}

.footerMark span {
  font-weight: 400;
  color: var(--grey40);
}

.siteFooter p {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

/* ---------- telegram ---------- */

.telegramLink {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.telegramLink svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.footerTelegram {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--grey20);
  text-decoration: none;
  border: 1px solid var(--grey40);
  padding: 0.45rem 0.9rem;
  transition: color 0.2s, border-color 0.2s;
}

.footerTelegram:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.footerTelegram svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}
