:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
}

body {
  margin: 0;
  background: #11110f;
  color: #fff;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

audio {
  max-width: 100%;
}

.site-header {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 1rem;
}

/* Главная собрана как настенный коллаж из независимых фотографий, линий и текста. */
.home-page { overflow: hidden; }
.home-scene {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background: #11110f url('/assets/media/images/sunlight-shadow.jpg') center 48% / cover no-repeat;
}
.home-scene::before {
  position: absolute;
  z-index: -1;
  content: '';
  inset: 0;
  background: linear-gradient(90deg, #080908a8, #17171548 48%, #090a09b0), #08090865;
}
.wall-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wall-lines path {
  fill: none;
  stroke: #f2f0e8;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: .9;
}
.portrait {
  position: relative;
  width: min(53vw, 670px);
  min-height: 100svh;
  padding: clamp(2.4rem, 8vh, 5.5rem) clamp(1rem, 3.8vw, 3rem) 2rem;
  background: #07090888;
  box-shadow: 0 0 42px #0008;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.portrait-sides { position: absolute; z-index: -1; inset: 0 -72px; display: flex; justify-content: space-between; overflow: hidden; }
.side-photo { width: 72px; height: 100%; object-fit: cover; filter: brightness(.66) saturate(.75); }
.side-photo-left { object-position: 28% center; }
.side-photo-right { object-position: 73% center; }
.intro { position: relative; z-index: 1; text-align: center; font-size: clamp(1.2rem, 2.4vw, 2rem); line-height: 1.15; text-shadow: 0 1px 3px #000; }
.intro h1, .intro p { margin: 0 0 .65rem; font-weight: 400; }
.intro h1 { font-size: 1.15em; }
.intro span { background: #050505e8; padding: 0 .18em .04em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.home-nav { display: flex; flex-direction: column; align-items: flex-start; gap: .08em; margin: 1.4rem 0 1.25rem; text-align: left; }
.home-nav button { border: 0; padding: 0; color: inherit; background: none; font: inherit; line-height: 1.1; text-align: left; cursor: pointer; }
.home-nav button span { box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.home-nav button:hover span, .home-nav button:focus-visible span { color: #fff; background: #292621; }
.home-nav button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.artwork { position: relative; z-index: 1; width: 100%; flex: 1; min-height: 0; margin: 0; display: grid; place-items: center; overflow: hidden; background: #182023; }
.artwork img { width: 100%; height: 100%; position: absolute; inset: 0; max-width: none; object-fit: cover; object-position: center 49%; transform: scale(1.52); filter: saturate(1.15) contrast(1.04) brightness(1.06); }
.page-layer { position: fixed; z-index: 5; inset: 0; overflow: auto; padding: clamp(1rem, 5vw, 4rem); background: #11110ff2; backdrop-filter: blur(5px); }
.page-layer[hidden] { display: none; }
.layer-close { position: fixed; z-index: 1; top: 1rem; right: 1.3rem; border: 0; color: white; background: transparent; font: 3rem/1 Arial, sans-serif; cursor: pointer; }
.layer-close:focus-visible { outline: 2px solid white; }
.layer-content { width: min(46rem, 100%); min-height: 100%; margin: auto; padding: 10vh 1rem; font-size: clamp(1.15rem, 2.3vw, 1.7rem); line-height: 1.28; }
.layer-content p { margin: 0 0 1.1em; }
.layer-content a { color: #fff; text-decoration-color: #d6d6d0; text-underline-offset: .14em; }
.layer-content a:hover, .layer-content a:focus-visible { color: #f3ce69; }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-header [aria-current='page'] {
  text-decoration-thickness: 2px;
}

main:not(.not-found) {
  min-height: calc(100dvh - 4rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-150%);
  background: #fff;
  color: #000;
  padding: .5rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.not-found {
  padding: 1rem;
}

@media (max-width: 480px) {
  .home-page { overflow: auto; }
  .home-scene { min-height: 100svh; }
  .wall-lines { opacity: .75; }
  .portrait { width: min(78vw, 460px); min-height: 100svh; padding: 2rem .9rem 1rem; }
  .portrait-sides { inset-inline: -28px; }
  .side-photo { width: 28px; }
  .intro { font-size: clamp(1.08rem, 5vw, 1.45rem); }
  .home-nav { margin: 1rem 0 .8rem; }
  .artwork { min-height: 48svh; }
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: .75rem;
  }
}

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