:root {
  --bg: #faf8f5;
  --ink: #1c1a17;
  --ink-soft: #5c574f;
  --line: #e3ddd3;
  --accent: #8a7b63;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  margin: 0;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

header.site-header {
  border-bottom: 1px solid var(--line);
  padding: 40px 0 24px;
}

header.site-header h1 {
  font-size: 32px;
  letter-spacing: 0.02em;
}

header.site-header .subtitle {
  color: var(--ink-soft);
  font-size: 15px;
  margin-top: 6px;
}

nav.site-nav {
  margin-top: 20px;
  display: flex;
  gap: 24px;
}

nav.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
}

main {
  padding: 48px 0 80px;
}

section {
  margin-bottom: 64px;
}

section h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.painting-card {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
}

.painting-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: #eee;
}

.painting-card .caption {
  margin-top: 10px;
}

.painting-card .caption .title {
  font-size: 15px;
}

.painting-card .caption .meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.empty-state {
  color: var(--ink-soft);
  font-size: 15px;
  border: 1px dashed var(--line);
  padding: 32px;
  text-align: center;
}

.about-text {
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 16px;
}

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 10;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
}

.lightbox .lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
}

.lightbox .lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
