:root {
  --wall: #F6F3EE;
  --wall-2: #EDE8E0;
  --ink: #23201C;
  --ink-soft: #6A645B;
  --line: #DDD6CA;
  --accent: #B4532A;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --header: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1; margin: 0; }
h2 { font-size: clamp(40px, 6vw, 72px); }
a { color: inherit; }
button { font: inherit; color: inherit; }
section { padding: clamp(72px, 11vw, 144px) var(--gutter); scroll-margin-top: var(--header); }

.btn {
  display: inline-block; text-decoration: none;
  font-size: 15px; font-weight: 500; letter-spacing: .02em;
  padding: 14px 30px; border-radius: 999px;
  background: var(--ink); color: var(--wall);
  transition: background .3s, transform .3s;
}
.btn:hover { background: var(--accent); transform: translateY(-2px); }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 20; height: var(--header);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--wall) 90%, transparent);
  backdrop-filter: blur(10px);
  transition: border-color .3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.logo { font: 400 26px var(--serif); text-decoration: none; }
.nav { display: flex; gap: 32px; align-items: center; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-soft); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--ink); border: 1px solid var(--ink); padding: 7px 20px; border-radius: 999px; transition: background .2s, color .2s; }
.nav .nav-cta:hover { background: var(--ink); color: var(--wall); }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; }
.burger span { display: block; height: 1.5px; background: var(--ink); margin: 7px 8px; transition: transform .3s; }

/* Первый экран */
.hero {
  min-height: calc(100svh - var(--header));
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
  padding-top: clamp(24px, 4vw, 56px); padding-bottom: clamp(48px, 6vw, 80px);
}
.hero-kicker { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 18px; }
.hero h1 { font-size: clamp(64px, 10.5vw, 168px); font-weight: 300; letter-spacing: -.02em; line-height: .92; }
.hero-line { display: block; }
.hero-line:nth-child(2) { font-style: italic; padding-left: .5em; }
.stroke { display: block; width: min(520px, 90%); height: 28px; color: var(--accent); margin: 10px 0 28px; }
.stroke path { stroke-dasharray: 640; stroke-dashoffset: 640; animation: draw 1.4s .5s cubic-bezier(.6,0,.2,1) forwards; }
.hero-lead { max-width: 440px; color: var(--ink-soft); margin: 0 0 32px; font-size: 18px; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-art { background: none; border: 0; padding: 0; cursor: zoom-in; justify-self: center; width: 100%; max-width: min(520px, 56svh); text-align: left; }
.frame {
  display: block; padding: clamp(14px, 2.4vw, 28px);
  background: #FDFCF9;
  box-shadow: 0 1px 0 var(--line), 0 40px 80px -40px rgba(35, 32, 28, .45), 0 12px 24px -16px rgba(35, 32, 28, .25);
  transform: translateY(var(--py, 0)) rotate(-1deg);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.hero-art:hover .frame { transform: translateY(var(--py, 0)) rotate(0deg) scale(1.01); }
.canvas { display: block; aspect-ratio: 3 / 4; background-size: cover; background-position: center; }
.caption { display: block; margin-top: 18px; font-size: 14px; color: var(--ink-soft); }
.caption b { font: italic 400 20px var(--serif); color: var(--ink); margin-right: 8px; }

/* Работы */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filters button {
  font-size: 15px; color: var(--ink-soft);
  background: none; border: 0; padding: 6px 14px; cursor: pointer; position: relative;
  transition: color .3s;
}
.filters button::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.filters button[aria-selected="true"] { color: var(--ink); }
.filters button[aria-selected="true"]::after { transform: scaleX(1); }
.filters sup { font-size: 11px; margin-left: 2px; color: var(--ink-soft); }

.masonry { columns: 3 280px; column-gap: clamp(18px, 2.4vw, 36px); }
.work {
  display: block; width: 100%; break-inside: avoid;
  margin: 0 0 clamp(28px, 3.4vw, 48px);
  background: none; border: 0; padding: 0; text-align: left; cursor: zoom-in;
}
.work.is-hidden { display: none; }
.work-img {
  display: block; position: relative; overflow: hidden;
  background-size: cover; background-position: center;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), box-shadow .6s;
}
.work:hover .work-img { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(35, 32, 28, .4); }
.work-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-title { display: block; font: 400 22px/1.2 var(--serif); margin-top: 14px; }
.work-meta { display: block; font-size: 14px; color: var(--ink-soft); }

/* Цитата */
.quote { background: var(--ink); color: var(--wall); text-align: center; }
.quote p { font: italic 300 clamp(32px, 5vw, 64px)/1.15 var(--serif); margin: 0 auto; max-width: 18ch; }

/* Обо мне */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 112px); align-items: center; }
.about-photo {
  aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0;
  background: var(--wall-2); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-soft); font-size: 14px;
  background-size: cover; background-position: center;
}
.about-text h2 { margin-bottom: 28px; }
.about-text p { margin: 0 0 18px; max-width: 34em; font-size: 18px; }
.about-text .about-note { font-size: 15px; color: var(--ink-soft); font-style: italic; }

/* Выставки */
.exhibitions { padding-top: 0; }
.exhibitions h2 { margin-bottom: 32px; }
.exh-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.exh-list li {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr); gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline;
  transition: padding .3s;
}
.exh-list li:hover { padding-left: 12px; }
.exh-year { font: italic 400 24px var(--serif); color: var(--accent); }
.exh-title { font: 400 24px/1.25 var(--serif); }
.exh-place { color: var(--ink-soft); font-size: 15px; }

/* Контакты */
.contact { background: var(--wall-2); text-align: center; }
.contact h2 { font-size: clamp(48px, 8vw, 112px); font-weight: 300; font-style: italic; margin-bottom: 20px; }
.contact > p { color: var(--ink-soft); max-width: 520px; margin: 0 auto 40px; font-size: 18px; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.socials a {
  text-decoration: none; font-size: 16px; font-weight: 500;
  border: 1px solid var(--ink); padding: 14px 28px; border-radius: 999px;
  transition: background .25s, color .25s, transform .25s;
}
.socials a:hover { background: var(--ink); color: var(--wall); transform: translateY(-2px); }
.socials-empty { font-size: 15px; color: var(--ink-soft); font-style: italic; }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 24px var(--gutter); font-size: 13px; color: var(--ink-soft);
}

/* Просмотр картины */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(24, 22, 19, .94);
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center;
  padding: 24px; animation: fade .3s;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0 auto; display: grid; justify-items: center; }
.lb-img { width: min(80vw, 1000px); height: 76vh; background-size: contain; background-repeat: no-repeat; background-position: center; }
.lightbox figcaption { color: var(--wall); margin-top: 18px; text-align: center; }
.lightbox figcaption b { display: block; font: italic 400 28px var(--serif); }
.lightbox figcaption span { color: #B9B2A6; font-size: 14px; }
.lb-btn { background: none; border: 0; color: var(--wall); font-size: 28px; cursor: pointer; width: 56px; height: 56px; border-radius: 50%; transition: background .2s; }
.lb-btn:hover { background: rgba(255,255,255,.08); }
.lb-close { position: absolute; top: 14px; right: 18px; font-size: 38px; }
@keyframes fade { from { opacity: 0; } }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 800px) {
  .burger { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 20px;
    padding: 24px var(--gutter) 32px; background: var(--wall); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .25s;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { font-size: 20px; }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-art { max-width: 420px; }
  .masonry { columns: 2; column-gap: 14px; }
  .work-title { font-size: 18px; }
  .work-meta { font-size: 13px; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 340px; }
  .exh-list li { grid-template-columns: 64px minmax(0, 1fr); gap: 4px 16px; }
  .exh-place { grid-column: 2; }
  .lightbox { grid-template-columns: 1fr 1fr; padding: 16px; }
  .lightbox figure { grid-column: 1 / -1; grid-row: 1; }
  .lb-img { width: 92vw; height: 66vh; }
  .lb-prev { justify-self: start; }
  .lb-next { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .stroke path { stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; }
}
