:root {
  --bg: #f7f8fb;
  --ink: #151821;
  --muted: #616a7d;
  --panel: rgba(255, 255, 255, 0.78);
  --line: rgba(21, 24, 33, 0.12);
  --blue: #1346a0;
  --blue-deep: #0a2256;
  --red: #c82535;
  --gold: #d7a84b;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(13, 29, 69, 0.16);
  --radius: 8px;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 18%, rgba(19, 70, 160, 0.18), transparent 26rem),
    radial-gradient(circle at 86% 12%, rgba(200, 37, 53, 0.14), transparent 24rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 38%, #eef2f8 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(19, 70, 160, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 70, 160, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 72%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 46px rgba(13, 29, 69, 0.12);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  transition: transform 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 52px rgba(13, 29, 69, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--red));
  box-shadow: 0 14px 30px rgba(19, 70, 160, 0.24);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 12px 14px;
  border-radius: 8px;
  color: #263044;
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--blue);
  background: rgba(19, 70, 160, 0.08);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(19, 70, 160, 0.08);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--ink);
  transition: transform 220ms ease, opacity 220ms ease;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0;
}

.hero {
  position: relative;
  display: grid;
  min-height: 92vh;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding-top: 148px;
}

.hero-bg {
  position: absolute;
  inset: 92px -8vw 8%;
  z-index: -1;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.64) 46%, rgba(255, 255, 255, 0.18) 100%),
    linear-gradient(135deg, rgba(19, 70, 160, 0.2), rgba(200, 37, 53, 0.18)),
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Moscow%20Kremlin%20from%20Bolshoy%20Kamenny%20Bridge.jpg") center / cover;
  box-shadow: var(--shadow);
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.52) 0 33%, rgba(19, 70, 160, 0.24) 33% 66%, rgba(200, 37, 53, 0.26) 66% 100%);
  mix-blend-mode: soft-light;
  animation: sweep 7s ease-in-out infinite alternate;
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 7.8vw, 6.7rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.05rem, 4.4vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 32px;
  color: #344057;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--red));
  box-shadow: 0 18px 38px rgba(19, 70, 160, 0.22);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(21, 24, 33, 0.12);
}

.hero-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.portrait-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(19, 70, 160, 0.16), rgba(200, 37, 53, 0.14));
}

.portrait-wrap img,
.gallery-item img,
.lightbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-wrap::after {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(10, 34, 86, 0.44));
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.fact-grid div {
  min-width: 0;
  padding: 18px 12px;
  text-align: center;
}

.fact-grid div + div {
  border-left: 1px solid var(--line);
}

.fact-grid span {
  display: block;
  color: var(--blue);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 900;
}

.fact-grid p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.ticker {
  overflow: hidden;
  border-block: 1px solid rgba(19, 70, 160, 0.12);
  background: rgba(255, 255, 255, 0.56);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 40px;
  padding: 18px 0;
  color: #263044;
  font-weight: 900;
  animation: marquee 28s linear infinite;
}

.ticker-track span {
  position: relative;
  padding-left: 28px;
  white-space: nowrap;
}

.ticker-track span::before {
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  content: "";
  background: linear-gradient(135deg, var(--blue), var(--red));
  transform: translateY(-50%);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.bio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 360px);
  gap: 28px;
  align-items: stretch;
}

.bio-text {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 46px rgba(13, 29, 69, 0.09);
  backdrop-filter: blur(16px);
}

.bio-text p {
  color: #38435a;
  font-size: 1.04rem;
  line-height: 1.86;
}

.bio-text p:last-child {
  margin-bottom: 0;
}

.bio-stats {
  display: grid;
  gap: 16px;
}

.stat {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-deep), var(--blue) 52%, var(--red));
  box-shadow: 0 20px 46px rgba(13, 29, 69, 0.14);
}

.stat span {
  display: block;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 950;
  line-height: 1;
}

.stat p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.timeline-item {
  position: relative;
  min-height: 190px;
  padding: 28px;
  border: 1px solid rgba(21, 24, 33, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 44px rgba(13, 29, 69, 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.timeline-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(13, 29, 69, 0.14);
}

.timeline-item time {
  display: inline-flex;
  min-width: 74px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 8px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--red));
}

.timeline-item p,
.merit-card p,
.quote-panel p {
  color: #445069;
  line-height: 1.72;
}

.merits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.merit-card {
  min-height: 290px;
  padding: 26px;
  border: 1px solid rgba(21, 24, 33, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(13, 29, 69, 0.08);
}

.merit-icon {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 36px;
  border-radius: 8px;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 950;
  background: linear-gradient(135deg, var(--blue), var(--gold));
}

.gallery {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-auto-rows: 250px;
  gap: 18px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #dfe6f1;
  box-shadow: 0 22px 52px rgba(13, 29, 69, 0.14);
  cursor: pointer;
}

.gallery-item:first-child {
  grid-row: span 2;
}

.gallery-item::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 44%, rgba(10, 34, 86, 0.76));
}

.gallery-item img {
  transform: scale(1.02);
  transition: transform 480ms ease, filter 480ms ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  filter: saturate(1.12) contrast(1.04);
  transform: scale(1.08);
}

.gallery-item span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  color: var(--white);
  font-size: 1.08rem;
  font-weight: 900;
  text-align: left;
}

.quote-section {
  padding-top: 48px;
}

.quote-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 7vw, 72px);
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(10, 34, 86, 0.94), rgba(19, 70, 160, 0.9) 48%, rgba(200, 37, 53, 0.9)),
    url("https://commons.wikimedia.org/wiki/Special:FilePath/Grand%20Kremlin%20Palace%20St%20Andrew%20Hall.jpg") center / cover;
  box-shadow: var(--shadow);
}

.quote-panel .eyebrow,
.quote-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.quote-panel h2 {
  max-width: 760px;
  margin-bottom: 20px;
}

.quote-panel p:last-child {
  max-width: 720px;
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 34px 0 48px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: var(--blue);
  font-weight: 800;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(8, 15, 32, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  width: min(900px, 92vw);
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.lightbox p {
  margin: 16px 0 0;
  color: var(--white);
  font-weight: 800;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 22px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes sweep {
  from {
    opacity: 0.52;
    transform: translateX(-3%);
  }

  to {
    opacity: 0.9;
    transform: translateX(3%);
  }
}

@media (max-width: 980px) {
  .hero,
  .bio-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 138px;
  }

  .hero-card {
    width: min(460px, 100%);
  }

  .merits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 64px;
  }

  .site-header {
    top: 10px;
    width: min(100% - 20px, 1120px);
    padding: 0 10px 0 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    display: grid;
    width: 100%;
    gap: 4px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 46px rgba(13, 29, 69, 0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav a {
    width: 100%;
    padding: 14px;
  }

  .section {
    width: min(100% - 24px, 1120px);
    padding: 72px 0;
  }

  .hero {
    padding-top: 118px;
  }

  h1 {
    font-size: clamp(2.55rem, 16vw, 4.5rem);
  }

  h2 {
    font-size: clamp(1.95rem, 10vw, 3rem);
  }

  .hero-copy,
  .bio-text p {
    font-size: 1rem;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .fact-grid div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .timeline,
  .merits-grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    min-height: auto;
  }

  .gallery {
    grid-auto-rows: 230px;
  }

  .gallery-item:first-child {
    grid-row: span 1;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
