/* Милена Беляева — milena-belaeva.ru
   Цвета и шрифты собраны здесь, в :root. */

:root {
  --bg: #f7f5f2;
  --ink: #1b1916;
  --ink-soft: #3f3934;
  --muted: #5e564e;
  --line: #e4ddd4;
  --accent: #6a4c3b;
  --photo: #e6e3de;
  --pad: 20px;
  --header-h: 72px;
  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: Manrope, "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (min-width: 900px) {
  :root { --pad: 48px; }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
input { font: inherit; color: inherit; }

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a { color: inherit; }

[hidden] { display: none !important; }

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

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}

.skip:focus { top: 12px; }

/* Header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 14px var(--pad) 12px;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
  background: rgba(247, 245, 242, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}

.topbar.is-scrolled { border-bottom-color: var(--line); }

.brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}

.brand__full { display: none; }

.nav {
  order: 3;
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.nav a {
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav a[aria-current="page"],
.nav a:hover { color: var(--ink); }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.lang button[aria-pressed="false"] { color: var(--muted); }

.lang__sep { color: #c9c1b7; }

@media (min-width: 900px) {
  .brand__short { display: none; }
  .brand__full { display: inline; }
  .nav {
    order: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    margin-right: 10px;
  }
}

/* Hero */

.hero {
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.hero__copy {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 22px var(--pad) 16px;
  padding-left: max(var(--pad), env(safe-area-inset-left));
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 12.4vw, 6.4rem);
  line-height: 0.84;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

@supports (font-size: 1cqi) {
  .hero__title { font-size: clamp(2.55rem, 15.2cqi, 6.6rem); }
}

.hero__title span { display: block; }

.hero__ru {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  line-height: 1.25;
  color: var(--ink-soft);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.text-link::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

.hero__media {
  position: relative;
  flex: 1 1 auto;
  min-height: 46vh;
  overflow: hidden;
  background: var(--photo);
  cursor: zoom-in;
}

.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

@media (min-width: 960px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
  }

  .hero__copy {
    justify-content: flex-end;
    padding: 48px 7vw 64px var(--pad);
  }

  .hero__media { min-height: 100%; }
  .text-link { margin-top: 36px; }
}

/* Sections */

.section { padding: 72px 0 8px; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 0 var(--pad) 18px;
  padding-left: max(var(--pad), env(safe-area-inset-left));
}

.sec-head__idx {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.sec-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
}

/* Photos */

.shot {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 0;
  background: var(--photo);
  cursor: zoom-in;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.shot picture { display: block; }

.shot img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 0.8s ease;
}

.shot:hover img,
.shot:focus-visible img { transform: scale(1.02); }

.portfolio__grid,
.portfolio__trio {
  display: grid;
  gap: 4px;
}

.portfolio__trio { margin-top: 4px; }

.portfolio__grid .shot,
.portfolio__trio .shot { aspect-ratio: 2 / 3; }

.portfolio__grid .shot img,
.portfolio__trio .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (min-width: 800px) {
  .portfolio__grid { grid-template-columns: 1fr 1fr; }
  .portfolio__trio { grid-template-columns: 1fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .section { padding: 112px 0 12px; }
  .sec-head { padding-bottom: 28px; }
}

/* About */

.about__grid {
  display: grid;
  gap: 48px;
  padding: 8px var(--pad) 0;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

.bio {
  margin: 0;
  max-width: 36em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.5vw, 1.48rem);
  line-height: 1.5;
  white-space: pre-line;
}

.experience {
  margin: 22px 0 0;
  max-width: 36em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.langs {
  margin: 22px 0 0;
  max-width: 36em;
}

.facts__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.booking { margin-top: 32px; }

.booking__list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  max-width: 28rem;
}

.booking__list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.booking__kind {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.booking__value {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  text-align: right;
}

.stats-wrap { max-width: 440px; }

.stats {
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
}

.stats > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.stats dt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.stats dd {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: right;
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 80px;
    align-items: start;
    max-width: 1180px;
  }
}

/* Footer */

.footer {
  margin-top: 88px;
  padding: 36px var(--pad) 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  padding-left: max(var(--pad), env(safe-area-inset-left));
  border-top: 1px solid var(--line);
}

.footer__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}

.footer__meta,
.footer__school {
  margin: 12px 0 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__school { margin-top: 6px; }

/* Lightbox */

.lb {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #12100e;
  color: #f7f5f2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  overscroll-behavior: contain;
}

.lb.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lb__figure {
  margin: 0;
  max-width: min(920px, calc(100vw - 28px));
  max-height: calc(100dvh - 168px);
}

.lb__img {
  display: block;
  max-width: min(920px, calc(100vw - 28px));
  max-height: calc(100dvh - 168px);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.lb__img.is-in { opacity: 1; transition: opacity 0.2s ease; }

.lb__close,
.lb__nav {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #f7f5f2;
}

.lb__close { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }

.lb__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }

.lb__count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(18px, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: rgba(247, 245, 242, 0.82);
  pointer-events: none;
}

@media (min-width: 800px) {
  .lb__figure,
  .lb__img {
    max-width: min(920px, calc(100vw - 180px));
  }
}

@media (max-width: 720px) {
  .lb__nav--prev,
  .lb__nav--next {
    top: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    transform: none;
  }
}

/* 404 */

.missing {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px var(--pad);
  gap: 8px;
}

.missing h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.missing__en {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
}

.missing .text-link { width: fit-content; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
