:root {
  --bg: #11110f;
  --bg-soft: #191813;
  --paper: #f4efe5;
  --paper-2: #e8dcc7;
  --ink: #f7f2e8;
  --muted: #a9a196;
  --line: rgba(244, 239, 229, 0.16);
  --accent: #c69b58;
  --accent-2: #9f7440;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --max: 1240px;
  --font-display: "Georgia", "Times New Roman", serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

button {
  font-family: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(198, 155, 88, 0.07) 0 1px, transparent 1px 100%) 0 0 / 88px 88px,
    radial-gradient(circle at 72% 18%, rgba(198, 155, 88, 0.14), transparent 26rem),
    var(--bg);
}

.topbar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: block;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
}

.language-switcher {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 22px;
}

.topnav {
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.topnav a {
  text-decoration: none;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--ink);
}

.language-switcher {
  flex-direction: column;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  background: rgba(17, 17, 15, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.language-switcher button,
.year-rail button,
.slider-controls button,
.lightbox-image-trigger,
.lightbox-close,
.lightbox-nav {
  cursor: pointer;
  border: 0;
  color: inherit;
  background: transparent;
}

.language-switcher button {
  min-width: 42px;
  height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.language-switcher button.is-active {
  background: var(--paper);
  color: #171511;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 0.9fr);
  align-items: end;
  gap: clamp(32px, 6vw, 90px);
  width: min(var(--max), calc(100% - 32px));
  min-height: calc(100vh - 150px);
  margin: 0 auto 52px;
  padding: 42px 0 48px;
}

.hero-copy {
  padding-bottom: 8vh;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(68px, 11vw, 168px);
  font-weight: 400;
  line-height: 0.88;
}

html[data-artasif-lang="ru"] .hero h1 {
  font-size: clamp(58px, 9.35vw, 143px);
}

.hero p {
  max-width: 520px;
  margin: 0 0 34px;
  color: var(--paper-2);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.42;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-portrait {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 18px;
  opacity: 0.9;
  box-shadow: var(--shadow);
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 16px;
  z-index: 1;
  border: 1px solid rgba(244, 239, 229, 0.5);
  pointer-events: none;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(0.96);
}

.works-section,
.about-section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.works-section {
  padding: 72px 0 112px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.55fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 42px;
}

.section-heading h2,
.about-section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 76px);
  font-weight: 400;
  line-height: 1;
}

.section-heading p,
.about-section p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.year-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 0 22px;
  scrollbar-width: thin;
}

.year-rail button {
  flex: 0 0 auto;
  min-width: 84px;
  height: 48px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.year-rail button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #171511;
}

.year-panel {
  display: none;
  padding-top: 18px;
}

.year-panel.is-active {
  display: block;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.panel-topline h3 {
  margin: 0;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
}

.slider-controls {
  display: flex;
  gap: 8px;
}

.slider-controls button,
.lightbox-nav,
.lightbox-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
}

.slider-controls svg,
.lightbox-nav svg,
.lightbox-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 31%);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  padding: 0 0 24px;
  scrollbar-width: thin;
}

.work-card {
  scroll-snap-align: start;
}

.work-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.work-image {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.work-button:hover .work-image img,
.work-button:focus-visible .work-image img {
  transform: scale(1.045);
}

.work-meta {
  display: grid;
  gap: 7px;
  padding: 16px 0 0;
}

.work-meta strong {
  min-height: 42px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.08;
}

.work-meta span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 0.75fr);
  gap: clamp(30px, 6vw, 86px);
  align-items: center;
  padding: 86px 0 112px;
  border-top: 1px solid var(--line);
}

.about-section figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 16px;
  opacity: 0.88;
  background: rgba(244, 239, 229, 0.035);
}

.about-section img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.88) contrast(0.96);
}

.about-section h2 {
  margin-bottom: 22px;
}

.about-copy,
.about-copy p {
  max-width: 780px;
  color: var(--paper-2);
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.76;
}

.about-copy p {
  margin: 0 0 18px;
}

.about-copy * {
  color: inherit !important;
  font-family: var(--font-body) !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.about-copy strong,
.about-copy b {
  color: var(--paper) !important;
  font-weight: 700;
}

.about-copy i,
.about-copy em {
  font-family: var(--font-display) !important;
  font-style: italic;
}

.about-copy img {
  display: none;
}

.empty-state {
  color: var(--muted);
}

.lightbox[hidden],
.lightbox-fullscreen[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 28px;
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  padding: 22px;
  background: #12110f;
  box-shadow: var(--shadow);
}

.lightbox-image-trigger {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  background: #0a0a09;
  cursor: zoom-in;
}

.lightbox-image-trigger img {
  width: 100%;
  height: min(78vh, 760px);
  object-fit: contain;
  display: block;
}

.lightbox-dialog aside {
  align-self: end;
  padding: 12px 12px 18px 0;
}

.lightbox-dialog aside span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.lightbox-dialog h3 {
  margin: 12px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 400;
  line-height: 1;
}

.lightbox-dialog p {
  margin: 0;
  color: var(--paper-2);
  line-height: 1.7;
}

.work-facts {
  padding-top: 18px;
  color: var(--muted) !important;
  font-size: 13px;
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  background: rgba(18, 17, 15, 0.76);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  background: rgba(18, 17, 15, 0.76);
  transform: translateY(-50%);
}

.lightbox-nav.prev {
  left: 14px;
}

.lightbox-nav.next {
  right: 14px;
}

.lightbox-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 26px;
}

.lightbox-fullscreen-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(10px);
}

.lightbox-fullscreen > img {
  position: relative;
  z-index: 1;
  max-width: calc(100vw - 52px);
  max-height: calc(100vh - 52px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.5);
}

.fullscreen-close {
  top: 22px;
  right: 22px;
}

@media (max-width: 900px) {
  .topbar {
    right: 14px;
    bottom: 14px;
  }

  .topnav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .section-heading,
  .about-section,
  .lightbox-dialog {
    grid-template-columns: 1fr;
  }

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

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-portrait {
    min-height: 420px;
  }

  .about-section figure {
    width: min(360px, 82vw);
    max-height: 520px;
    justify-self: center;
    aspect-ratio: 4 / 5;
  }

  .about-section img {
    object-fit: contain;
  }

  .art-slider {
    grid-auto-columns: minmax(238px, 72%);
  }

  .lightbox-dialog {
    overflow: auto;
  }

  .lightbox-dialog aside {
    padding: 0 4px 6px;
  }
}

@media (max-width: 560px) {
  .site-shell {
    background:
      radial-gradient(circle at 70% 10%, rgba(198, 155, 88, 0.12), transparent 18rem),
      var(--bg);
  }

  .topbar {
    display: block !important;
    width: auto !important;
    max-width: none;
  }

  .language-switcher {
    max-width: none;
  }

  .language-switcher button {
    min-width: 40px;
    height: 36px;
  }

  .hero h1 {
    font-size: 62px;
  }

  html[data-artasif-lang="ru"] .hero h1 {
    font-size: 53px;
  }

  .hero-portrait {
    min-height: 360px;
  }

  .about-section figure {
    width: min(300px, 78vw);
    max-height: 420px;
    margin-bottom: 6px;
  }

  .works-section,
  .about-section {
    padding-top: 64px;
    padding-bottom: 76px;
  }

  .year-rail button {
    min-width: 72px;
  }

  .art-slider {
    grid-auto-columns: 84%;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox-dialog {
    padding: 12px;
  }

  .lightbox-fullscreen {
    padding: 12px;
  }

  .lightbox-fullscreen > img {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
}

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