
:root {
  --bg: #f7f6f3;
  --bg-alt: #ffffff;
  --fg: #202020;
  --muted: #8a8a8a;
  --accent: #d29a3a;
  --border: #e0e0e0;
  --shadow-soft: 0 18px 40px rgba(15, 12, 5, 0.08);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(222, 210, 189, 0.32), transparent 55%),
    var(--bg);
  color: var(--fg);
  font-family: var(--font-main);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
  border-bottom: 1px solid rgba(220, 220, 220, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-size: 18px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.nav-link {
  padding: 4px 0;
  color: var(--muted);
}

.nav-link.is-active {
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
}

main {
  padding-bottom: 64px;
}

.hero {
  padding: 64px 0 40px;
}

.hero-inner {
  max-width: 640px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 500;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.gallery-section {
  padding: 16px 0 32px;
}

.section-heading h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 500;
}

.section-heading p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.gallery-grid {
  column-count: 3;
  column-gap: 18px;
}

@media (max-width: 900px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    column-count: 1;
  }
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  border-radius: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.gallery-thumb {
  background: var(--bg);
  padding: 0;
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-meta {
  padding: 10px 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
  background: var(--bg-alt);
}

.gallery-meta h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
}

.gallery-meta p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(220, 220, 220, 0.9);
  padding: 18px 0 24px;
  font-size: 12px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.painting-section {
  padding: 48px 0 40px;
}

.painting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
}

.painting-image-el {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.painting-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.painting-lightbox.is-open {
  display: flex;
}

.painting-lightbox-inner {
  width: 100vw;
  height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.painting-lightbox-inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.painting-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.painting-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.painting-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 500;
}

.painting-meta {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--muted);
  display: none;
}

.painting-poem {
  margin-bottom: 24px;
  font-size: 14px;
  white-space: pre-line;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, #f6cf7d, #e4a84a);
  color: #3a2a12;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.button-primary:hover {
  filter: brightness(1.04);
}

.contacts-section {
  padding: 48px 0 40px;
}

.contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 32px;
}

.contacts-layout h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 26px;
  font-weight: 500;
}

.contacts-layout p {
  margin-top: 0;
  color: var(--muted);
  font-size: 14px;
}

.contacts-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  font-size: 14px;
}

.contacts-list li + li {
  margin-top: 6px;
}

.contacts-list span {
  color: var(--muted);
  margin-right: 4px;
}

.contact-form {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  box-shadow: var(--shadow-soft);
  padding: 20px 18px 18px;
  font-size: 14px;
}

.contact-form h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 500;
}

.contact-form label {
  display: block;
  margin-bottom: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
  background: #ffffff;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  margin-top: 10px;
}

.form-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.contacts-photo-wrapper {
  margin-top: 20px;
  text-align: center;
}

.contacts-photo {
  max-width: 320px;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 768px) {
  .header-inner {
    padding: 10px 0;
  }

  .hero {
    padding-top: 40px;
  }

  .painting-layout,
  .contacts-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

