/* ============================================================
   Марина Азизян — персональная страница
   Лёгкий современный стиль: много воздуха, тонкая типографика,
   мягкие карточки, приглушённые серые тона.
   ============================================================ */

:root {
  --ink: #1d1c1a;
  --ink-soft: #52504c;
  --ink-faint: #a5a29c;
  --line: #e7e4df;
  --paper: #ffffff;
  --paper-2: #faf8f5;
  --wash: #f1eee9;
  --accent: #b8402e;
  --radius: 10px;
  --pad: clamp(20px, 5vw, 64px);
  --measure: 42rem;
  --serif: Georgia, 'Times New Roman', 'PT Serif', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

a { color: inherit; }

.page { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad) 0; }

/* ─── NAV ─────────────────────────────────────────── */
.top-nav {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 34px 0 26px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
}
.nav-left {
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  text-decoration: none; color: var(--ink);
}
.nav-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-link {
  font-size: 13.5px; color: var(--ink-faint); text-decoration: none;
  padding: 7px 12px; border-radius: 999px;
  transition: color .2s ease, background-color .2s ease;
}
.nav-link:hover { color: var(--ink); background: var(--wash); }
.nav-cta { border: 1px solid var(--line); color: var(--ink-soft); }
.nav-cta:hover { border-color: transparent; background: var(--wash); color: var(--ink); }

/* ─── HERO ────────────────────────────────────────── */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero-kicker {
  margin: 0 0 18px; font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-faint);
}
.hero-title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 8.5vw, 92px);
  line-height: 1.02;
  letter-spacing: -.015em;
}
.hero-sub {
  margin: 0; max-width: 38rem;
  font-size: clamp(16px, 1.7vw, 19px); line-height: 1.75; color: var(--ink-soft);
}

/* ─── FEATURED CAROUSEL ───────────────────────────── */
.featured { margin-top: clamp(40px, 6vw, 64px); }
.featured-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 14px;
}
.featured-title {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint);
}
.featured-count { font-size: 12px; color: var(--ink-faint); margin-left: auto; }

.track {
  display: flex; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-left: 4px;
  padding: 2px 2px 16px;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }

.card {
  flex: 0 0 auto; scroll-snap-align: start;
  width: clamp(230px, 30vw, 340px);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0 12px;
  cursor: zoom-in;
  transition: border-color .3s ease;
}
.card:hover { border-color: #ddd8d1; }
.card .thumb {
  width: 100%; height: 210px; overflow: hidden;
  border-radius: calc(var(--radius) - 1px);
  background: var(--wash);
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .cap {
  margin: 10px 14px 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft);
}

.track-foot { display: flex; align-items: center; gap: 10px; }
.zone {
  appearance: none; border: 1px solid var(--line); background: var(--paper);
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--ink-soft); font-size: 15px; line-height: 1; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.zone:hover { background: var(--wash); color: var(--ink); }
.dots { display: flex; gap: 6px; margin: 0 auto; }
.dot {
  width: 22px; height: 22px; padding: 0; border: none; background: transparent;
  cursor: pointer; border-radius: 50%;
  background-image: radial-gradient(circle 3px at center, #ddd8d1 99%, transparent 100%);
  transition: background-image .25s ease, transform .25s ease;
}
.dot.on { background-image: radial-gradient(circle 3.5px at center, var(--ink-soft) 99%, transparent 100%); }

/* ─── SECTION LABELS ──────────────────────────────── */
/* переходы по шапке не прячут заголовок под прилипающей панелью */
section[id] { scroll-margin-top: 112px; }

.section-label {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 22px;
}

/* ─── ABOUT ───────────────────────────────────────── */
.about {
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--line);
}
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 48px); align-items: start;
}
.about-portrait {
  margin: 0; position: sticky; top: 96px;
  cursor: zoom-in; border-radius: var(--radius);
}
.about-portrait img {
  width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--wash);
  transition: border-color .3s ease;
}
.about-portrait:hover img, .about-portrait:focus-visible img { border-color: #ddd8d1; }
.about-portrait:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.about-portrait figcaption { margin-top: 10px; font-size: 12.5px; color: var(--ink-faint); }
.zoom-hint {
  display: block; margin-top: 2px; font-size: 12px; color: var(--ink-faint);
  opacity: 0; transition: opacity .25s ease;
}
.about-portrait:hover .zoom-hint, .about-portrait:focus-visible .zoom-hint { opacity: .85; }
.about-body { max-width: 40rem; }
.lead {
  margin: 0; font-family: var(--serif);
  font-size: clamp(19px, 2.4vw, 24px); line-height: 1.6; color: var(--ink);
}
.more { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .6s cubic-bezier(.4,0,.2,1), opacity .4s ease; }
.more.open { max-height: 3000px; opacity: 1; }
.more p { margin: 20px 0 0; color: var(--ink-soft); }
.more .note { color: var(--ink-faint); font-size: 15px; }
.read-more-btn {
  appearance: none; border: none; background: none; padding: 0;
  margin-top: 22px; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease;
}
.read-more-btn:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ─── QUOTE ───────────────────────────────────────── */
.quote {
  padding: clamp(36px, 5vw, 60px) 0;
  border-top: 1px solid var(--line);
}
.quote blockquote {
  margin: 0; max-width: 34rem;
  font-family: var(--serif); font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.45; color: var(--ink); letter-spacing: -.005em;
}
.quote .mark { color: var(--accent); }
.quote cite {
  display: block; margin-top: 18px; font-style: normal;
  font-size: 13px; letter-spacing: .04em; color: var(--ink-faint);
}

/* ─── WORKS ───────────────────────────────────────── */
.works { padding: clamp(30px, 5vw, 56px) 0 0; border-top: 1px solid var(--line); }
.work-section { padding: clamp(26px, 4vw, 44px) 0; border-bottom: 1px solid var(--line); }
.work-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.work-title {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(23px, 3vw, 33px); line-height: 1.2; letter-spacing: -.01em;
}
.work-meta { font-size: 13px; color: var(--ink-faint); margin-left: auto; }
.work-desc { margin: 12px 0 22px; max-width: 44rem; color: var(--ink-soft); font-size: 16px; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.grid .card { width: auto; }
.grid .card .thumb { height: 190px; }
.grid-cta {
  appearance: none; border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 9px 18px; margin-top: 16px;
  font: inherit; font-size: 13.5px; color: var(--ink-soft); cursor: pointer;
  transition: background-color .2s ease, transform .2s ease, color .2s ease;
}
.grid-cta:hover { background: var(--wash); color: var(--ink); }

/* ─── HISTORY & NEWS LENTAS ───────────────────────── */
.history, .news { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.timeline { max-width: 46rem; }
.t-row {
  display: grid; grid-template-columns: 10ch 1fr; gap: clamp(14px, 3vw, 34px);
  padding: 15px 0; border-top: 1px solid var(--line);
}
.timeline .t-row:first-child { border-top: none; padding-top: 0; }
.t-year {
  font-size: 13px; color: var(--ink-faint); letter-spacing: .03em;
  font-variant-numeric: tabular-nums; padding-top: 5px; white-space: nowrap;
}
.t-row p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.t-row b { font-weight: 500; color: var(--ink); }
.t-row a { color: var(--ink); text-decoration: none; border-bottom: 1px solid #ddd8d1; }
.t-row a:hover { border-color: var(--ink-soft); }

.albums { margin-top: 44px; }
.album-row {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.album {
  display: block; text-decoration: none; color: var(--ink-soft);
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 0 14px;
  transition: border-color .3s ease;
}
.album:hover { border-color: #ddd8d1; }
.album-cover { display: block; height: 150px; overflow: hidden; border-radius: calc(var(--radius) - 1px); background: var(--wash); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album b { display: block; margin: 11px 14px 3px; font-weight: 500; font-size: 15px; color: var(--ink); line-height: 1.4; }
.album span { display: block; margin: 0 14px; font-size: 12.5px; color: var(--ink-faint); }

.press { margin-top: 44px; max-width: 44rem; }
.press-title {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 12px;
}
.press-links { display: flex; flex-direction: column; }
.press-links a {
  text-decoration: none; color: var(--ink-soft); font-size: 15px;
  padding: 9px 12px; margin: 0 -12px; border-radius: 12px;
  transition: background-color .3s ease, color .3s ease;
}
.press-links a:hover { background: var(--wash); color: var(--ink); }

/* ─── CONTACTS ────────────────────────────────────── */
.contacts { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.contacts-lead { margin: 0 0 20px; max-width: 34rem; color: var(--ink-soft); }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-stat {
  text-decoration: none; font-size: 14px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 20px;
  transition: background-color .2s ease, transform .2s ease, color .2s ease, border-color .2s ease;
}
.social-stat:hover { background: var(--wash); border-color: transparent; color: var(--ink); }
.contacts-note { margin: 22px 0 0; font-size: 14px; color: var(--ink-faint); }

/* ─── FOOTER ──────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 34px; font-size: 12.5px; color: var(--ink-faint);
}
.footer-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.footer-center { text-align: center; }
.footer-right { display: flex; gap: 16px; justify-content: flex-end; }
.footer-link { text-decoration: none; color: var(--ink-faint); transition: color .2s ease; }
.footer-link:hover { color: var(--ink); }

/* ─── LIGHTBOX ────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(250,248,245,.97);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: clamp(16px, 4vw, 48px);
  opacity: 0; transition: opacity .28s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.show { opacity: 1; }
.lb-body { margin: 0; max-width: min(1100px, 92vw); text-align: center; }
.lb-body img {
  max-width: 100%; max-height: 74vh; width: auto; margin: 0 auto;
  border-radius: 10px; box-shadow: 0 24px 60px rgba(30,28,26,.16);
}
.lb-body figcaption { margin-top: 16px; }
.lb-caption { display: block; font-family: var(--serif); font-size: 17px; color: var(--ink); }
.lb-credit { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-faint); }
.lb-close {
  position: absolute; top: 18px; right: 20px;
  appearance: none; border: none; background: none; cursor: pointer;
  font-size: 30px; line-height: 1; color: var(--ink-soft);
  transition: color .2s ease;
}
.lb-close:hover { color: var(--ink); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  appearance: none; border: 1px solid var(--line); background: var(--paper);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  font-size: 17px; color: var(--ink-soft);
  transition: background-color .2s ease, transform .2s ease;
}
.lb-nav:hover { background: var(--wash); transform: translateY(-50%) scale(1.03); }
.lb-nav.left { left: 18px; }
.lb-nav.right { right: 18px; }

/* ─── REVEAL ON SCROLL (progressive: контент виден, JS добавляет .pre) ─── */
.reveal.pre { opacity: 0; transform: translateY(8px); }
.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.pre { opacity: 1; transform: none; transition: none; }
}

/* ─── RESPONSIVE ──────────────────────────────────── */

/* портрет в «О себе» уходит наверх, текст занимает всю ширину */
@media (max-width: 1080px) {
  .about-grid { grid-template-columns: 1fr; gap: 22px; }
  .about-portrait { position: static; max-width: 460px; }
  .zoom-hint { opacity: .7; }
  .about-body { max-width: none; }
}

@media (max-width: 860px) {
  .top-nav { gap: 10px 14px; padding: 14px 0 12px; }
  .nav-left { font-size: 14px; }
  .nav-right { gap: 2px; }
  .nav-link { white-space: nowrap; padding: 7px 11px; font-size: 13px; }
  /* мобильная шапка плотная: под полупрозрачной не просвечивает текст */
  .top-nav { background: #fff; backdrop-filter: none; }
  section[id] { scroll-margin-top: 86px; }
  .work-meta { margin-left: 0; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-right { justify-content: center; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .grid .card .thumb { height: 160px; }
}

/* очень узкий экран: ссылки в одну строку и прокручиваются по горизонтали */
@media (max-width: 360px) {
  .nav-right { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; touch-action: pan-x; min-width: 0; }
  .nav-right::-webkit-scrollbar { display: none; }
  .nav-link { padding: 8px 9px; font-size: 12.5px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .page { padding: 0 18px; }
  /* имя дублируется в герое, а «Связаться» — в конце страницы: в шапке только разделы */
  .nav-link { padding: 8px 11px; font-size: 13px; min-height: 44px;
    display: inline-flex; align-items: center; }
  .nav-left, .nav-link.nav-cta { display: none; }
  .hero { padding: 40px 0 34px; }

  .card { width: 80vw; }
  .card .thumb { height: 200px; }
  .card .cap { font-size: 13px; }

  /* две колонки и подписи в две строки в галереях */
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid .card .thumb { height: 146px; }
  .grid .card .cap {
    display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
    font-size: 12.5px; line-height: 1.4;
  }

  /* крупные зоны нажатия */
  .zone { width: 40px; height: 40px; font-size: 16px; }
  .dots { gap: 0; }
  .album-row { grid-template-columns: 1fr 1fr; }
  .album-cover { height: 128px; }

  /* лайтбокс: кнопки вниз, чтобы не закрывать картину */
  .lb-body img { max-height: 52vh; }
  .lb-nav { top: auto; bottom: 16px; transform: none; width: 42px; height: 42px; }
  .lb-nav:hover { transform: scale(1.03); }
  .lb-nav.left { left: 14px; }
  .lb-nav.right { right: 14px; }
  .lb-close { top: 10px; right: 12px; font-size: 26px; }
  .lb-body figcaption { padding-bottom: 56px; }
  .lb-caption { font-size: 15px; }

  .work-section { padding: 24px 0; }
  .work-desc { font-size: 15px; }
  /* ленты: год отдельной строкой над текстом */
  .t-row { grid-template-columns: 1fr; gap: 4px; }

  .read-more-btn { padding: 10px 12px; margin-left: -12px; }
  .press-links a, .contacts-note { font-size: 14.5px; }
}
