:root {
  --navy: #0f1c2e;
  --navy-2: #172840;
  --navy-3: #22364f;
  --ivory: #f7f4ee;
  --stone: #ece7de;
  --white: #fffdf9;
  --ink: #131a24;
  --ink-2: #3d4654;
  --muted: #6e7480;
  --line: rgba(19, 26, 36, .12);
  --line-light: rgba(247, 244, 238, .16);
  --brass: #b4925a;
  --brass-soft: #d8c39b;
  --on-navy: #eef0f3;
  --on-navy-2: #aab4c3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "PT Serif", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PT Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 4.5vw, 4rem);
  --max: 80rem;
  --header-h: 4.25rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
p, figure, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 60;
  background: var(--brass); color: var(--navy); padding: .55rem 1rem; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Неразрушающее кадрирование ----------
   Пиксели исходника не меняются. Контейнер получает пропорции прямоугольника
   (--cx, --cy, --cw, --ch — в пикселях исходника --sw × --sh), изображение
   масштабируется и сдвигается внутри, всё остальное скрыто overflow: hidden. */
.crop {
  position: relative; overflow: hidden; width: 100%;
  aspect-ratio: var(--cw) / var(--ch);
  background: var(--stone);
}
.crop img {
  position: absolute; max-width: none;
  width: calc(var(--sw) / var(--cw) * 100%);
  height: calc(var(--sh) / var(--ch) * 100%);
  left: calc(var(--cx) / var(--cw) * -100%);
  top: calc(var(--cy) / var(--ch) * -100%);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30; height: var(--header-h);
  background: rgba(15, 28, 46, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-light); color: var(--on-navy);
}
.site-header__inner {
  height: 100%; max-width: none; margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; gap: 2.5rem;
}
.mark { text-decoration: none; }
.mark__name { font: 400 1.15rem/1 var(--serif); letter-spacing: .02em; }
.nav { margin-left: auto; }
.nav-list { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--on-navy-2); padding: .4rem 0; border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
}
.nav-list a:hover, .nav-list a[aria-current="true"] { color: var(--on-navy); border-color: var(--brass); }
.badge {
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  color: var(--brass-soft); border: 1px solid rgba(216, 195, 155, .35); padding: .35rem .65rem;
}
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: clamp(36rem, calc(100svh - var(--header-h)), 54rem);
  background: var(--navy); color: var(--on-navy); overflow: hidden;
}
.hero__text {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 5.5rem) clamp(3rem, 6vw, 5rem) max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  position: relative;
}
.hero__text::after {
  content: ""; position: absolute; right: 0; top: 12%; bottom: 12%; width: 1px;
  background: linear-gradient(transparent, var(--line-light), transparent);
}
.hero__city {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem;
  font-size: .74rem; letter-spacing: .3em; text-transform: uppercase; color: var(--brass-soft);
}
.hero__city::before { content: ""; width: 2.75rem; height: 1px; background: var(--brass); }
.hero__name { line-height: 1; }
.hero__given { display: block; font-size: clamp(1.45rem, 2.6vw, 2.15rem); color: var(--on-navy-2); margin-bottom: .55rem; letter-spacing: .01em; }
.hero__family { display: block; font-size: clamp(3.2rem, 7vw, 6.4rem); letter-spacing: -.02em; color: #fff; }
.hero__role {
  margin-top: 2rem; max-width: 30rem; padding-left: 1.1rem; border-left: 2px solid var(--brass);
  font: 400 clamp(1.15rem, 1.8vw, 1.4rem)/1.4 var(--serif); color: var(--on-navy);
}
.hero__lead { margin-top: 1.1rem; max-width: 30rem; color: var(--on-navy-2); font-size: 1rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.4rem; }
.btn {
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.6rem;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  border: 1px solid transparent; transition: background .25s, color .25s, border-color .25s;
}
.btn--light { background: var(--ivory); color: var(--navy); }
.btn--light:hover { background: var(--brass-soft); }
.btn--ghost { border-color: rgba(238, 240, 243, .4); color: var(--on-navy); }
.btn--ghost:hover { border-color: var(--on-navy); background: rgba(255, 255, 255, .06); }

.flags { display: inline-flex; align-items: center; gap: .55rem; margin-top: 2.6rem; }
.flags img { height: 1.1rem; width: auto; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
.flags__label { margin-left: .4rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--on-navy-2); }
.flags--sm { margin: 0; }
.flags--sm img { height: .85rem; }

.hero__portrait { position: relative; min-height: 100%; background: var(--navy-2); }
.hero__portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 38% 22%;
}
.hero__portrait::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(15, 28, 46, .55) 0%, rgba(15, 28, 46, 0) 18%),
              linear-gradient(0deg, rgba(15, 28, 46, .35) 0%, rgba(15, 28, 46, 0) 25%);
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--stone { background: var(--stone); }
.section__head { margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem); max-width: 46rem; }
.section__num {
  display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem;
  font: 400 .78rem/1 var(--sans); letter-spacing: .24em; color: var(--brass);
}
.section__num::after { content: ""; width: 2.5rem; height: 1px; background: currentColor; opacity: .6; }
.section__head h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.08; letter-spacing: -.01em; }
.section__intro { margin-top: 1rem; color: var(--ink-2); max-width: 36rem; }
.section__head--inline { margin-bottom: 0; }

.src {
  display: inline-flex; align-items: center; gap: .3rem; margin-left: .4rem;
  font: 400 .74rem/1.3 var(--sans); letter-spacing: .04em; color: var(--muted);
  text-decoration: none; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.src::after { content: "↗"; font-size: .68rem; }
.src--local::after { content: "↓"; }
a.src:hover { color: var(--brass); border-color: currentColor; }

/* About */
.about__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(16rem, .8fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.profile { border-top: 1px solid var(--line); }
.profile__row {
  display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem;
  padding: 1.6rem 0; border-bottom: 1px solid var(--line);
}
.profile dt { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); padding-top: .45rem; }
.profile dd { font: 400 clamp(1.15rem, 1.8vw, 1.4rem)/1.5 var(--serif); color: var(--ink); }
.about__photo { position: sticky; top: calc(var(--header-h) + 2rem); }
.about__photo .crop { box-shadow: 0 2.5rem 4rem -2.5rem rgba(15, 28, 46, .5); }
.about__photo figcaption, .shot figcaption {
  margin-top: .75rem; font-size: .8rem; letter-spacing: .04em; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .2rem .8rem;
}

/* Work */
.work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile { background: var(--white); padding: clamp(1.75rem, 3.5vw, 2.75rem); display: flex; flex-direction: column; gap: 1rem; }
.tile__tag { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.tile__tag--status::before { content: "◦ "; }
.tile__title { font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.05; }
.tile__title--sm { font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.2; }
.tile__text { color: var(--ink-2); max-width: 34rem; }
.tile .src { margin: auto 0 0; align-self: flex-start; }
.tile--salam { background: var(--navy); color: var(--on-navy); }
.tile--salam .tile__text { color: var(--on-navy-2); }
.tile--salam .src { color: var(--on-navy-2); border-color: var(--line-light); }
.projects { list-style: none; margin: 0; padding: 0; }
.projects li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
}
.projects li:last-child { border-bottom: 0; }
.projects__name { font: 400 clamp(1.5rem, 2.6vw, 2rem)/1.15 var(--serif); }
.projects__role { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ideas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ideas li { padding: .65rem .8rem; background: var(--ivory); font-size: .9rem; line-height: 1.35; }

/* Gallery */
.gallery { columns: 3 15rem; column-gap: 1.5rem; }
.shot { break-inside: avoid; margin-bottom: 2rem; }
.shot__img { width: 100%; background: var(--stone); }
.shot .crop, .shot__img { transition: transform .6s var(--ease); }
.shot:hover .crop, .shot:hover .shot__img { transform: translateY(-3px); }
.shot__note { color: var(--brass); }

/* Media */
.section--navy { background: var(--navy); color: var(--on-navy); }
.section--navy .section__intro { color: var(--on-navy-2); }
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.video { display: flex; flex-direction: column; background: var(--navy-2); border: 1px solid var(--line-light); }
.video--lead { grid-column: 1 / -1; flex-direction: row; }
.video--lead .cover { flex: 0 0 clamp(17rem, 36%, 26rem); }
.cover {
  display: flex; flex-direction: column; gap: .85rem; min-height: 14rem;
  padding: clamp(1.4rem, 2.5vw, 2rem);
  background: linear-gradient(160deg, var(--navy-3) 0%, var(--navy-2) 70%);
  border-bottom: 1px solid var(--line-light);
}
.video--lead .cover { border-bottom: 0; border-right: 1px solid var(--line-light); }
.cover__meta { display: flex; justify-content: space-between; align-items: baseline; }
.cover__num { font: 400 clamp(2.6rem, 4.5vw, 3.6rem)/1 var(--serif); color: var(--brass-soft); }
.cover__len { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-navy-2); font-variant-numeric: tabular-nums; }
.cover__theme { font: 400 clamp(1.35rem, 2.2vw, 1.75rem)/1.15 var(--serif); color: #fff; max-width: 15ch; }
.cover__date { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--on-navy-2); }
.cover .play { margin-top: auto; }
.play {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .75rem;
  padding: .65rem 1.15rem .65rem .7rem; background: var(--ivory); color: var(--navy);
  font: 500 .82rem/1 var(--sans); letter-spacing: .04em; text-decoration: none; transition: background .25s;
}
.play:hover { background: var(--brass-soft); }
.play__icon { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--navy); position: relative; flex: none; }
.play__icon::after {
  content: ""; position: absolute; left: 56%; top: 50%; transform: translate(-50%, -50%);
  border-left: 7px solid var(--ivory); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}
.video__body { padding: clamp(1.4rem, 2.5vw, 2.2rem); display: flex; flex-direction: column; gap: .7rem; }
.section--navy .tile__tag { color: var(--brass-soft); }
.video__title { font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.22; color: #fff; }
.video__text { color: var(--on-navy-2); }
.chapters__label { margin-top: .6rem; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--on-navy-2); }
.chapters { list-style: none; margin: 0; padding: 0; }
.chapters a {
  display: grid; grid-template-columns: 3.4rem 1fr; gap: .5rem; padding: .65rem 0;
  border-top: 1px solid var(--line-light); text-decoration: none; font-size: .94rem;
}
.chapters a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.chapters time { font-variant-numeric: tabular-nums; color: var(--brass-soft); }

/* Sources */
.section--sources { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.sources { display: grid; grid-template-columns: minmax(12rem, 1fr) 2.4fr; gap: 2rem; align-items: start; }
.sources .section__head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.sources__list { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; color: var(--ink-2); font-size: .94rem; }
.sources__list a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.sources__list a:hover { color: var(--brass); }

/* Footer */
.site-footer { background: var(--navy); color: var(--on-navy); padding: 2.6rem 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem; }
.site-footer__name { font: 400 1.2rem/1.3 var(--serif); }
.site-footer__role { font-size: .85rem; color: var(--on-navy-2); margin-top: .25rem; }
.site-footer__side { display: flex; flex-direction: column; align-items: flex-end; gap: .7rem; }
.site-footer__preview { font-size: .76rem; color: var(--on-navy-2); }

/* ---------- Motion (только без prefers-reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__text > * { animation: rise .9s var(--ease) both; }
  .hero__text > :nth-child(2) { animation-delay: .08s; }
  .hero__text > :nth-child(3) { animation-delay: .18s; }
  .hero__text > :nth-child(4) { animation-delay: .26s; }
  .hero__text > :nth-child(5) { animation-delay: .34s; }
  .hero__text > :nth-child(6) { animation-delay: .42s; }
  .hero__portrait img { animation: settle 1.8s var(--ease) both; }
  .motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .motion .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 34rem; }
  .hero__text { padding-left: var(--pad); }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { position: static; max-width: 26rem; }
  .video--lead { flex-direction: column; }
  .video--lead .cover { flex: none; border-right: 0; border-bottom: 1px solid var(--line-light); }
  .cover { min-height: 0; }
}
@media (max-width: 760px) {
  :root { --header-h: 3.75rem; }
  .site-header__inner { gap: 1rem; }
  .badge { margin-left: auto; font-size: .58rem; }
  .nav { order: 3; margin-left: 0; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; background: none; border: 1px solid var(--line-light); cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    display: block; width: 1.1rem; height: 1.5px; background: var(--on-navy); position: relative;
  }
  .nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bar::before { top: -6px; }
  .nav-toggle__bar::after { top: 6px; }
  .nav-list {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--navy); border-bottom: 1px solid var(--line-light);
    padding: .4rem var(--pad) 1.2rem;
  }
  .nav-list.is-open { display: flex; }
  .nav-list a { display: block; padding: .95rem 0; font-size: .82rem; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__portrait { order: -1; aspect-ratio: 4 / 4.4; min-height: 0; }
  .hero__portrait img { object-position: 45% 18%; }
  .hero__portrait::after { background: linear-gradient(0deg, rgba(15, 28, 46, .9) 0%, rgba(15, 28, 46, 0) 35%); }
  .hero__text { padding: 1.5rem var(--pad) 3.5rem; margin-top: -3.5rem; z-index: 1; }
  .hero__text::after { display: none; }
  .hero__city { margin-bottom: 1.25rem; }

  .profile__row { grid-template-columns: 1fr; gap: .4rem; padding: 1.3rem 0; }
  .profile dt { padding-top: 0; }
  .work { grid-template-columns: 1fr; }
  .ideas { grid-template-columns: 1fr; }
  .gallery { columns: 2 9rem; column-gap: 1rem; }
  .shot { margin-bottom: 1.4rem; }
  .videos { grid-template-columns: 1fr; }
  .sources { grid-template-columns: 1fr; gap: 1.2rem; }
  .site-footer__side { align-items: flex-start; }
}
