:root {
  --black: #111;
  --gray: #666;
  --border: #ddd;
  --max-width: 1400px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--black);
  background: #fff;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 20px;
}

.logo img {
  height: 50px;
  display: block;
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  font-size: 18px;
}

nav.site-nav a {
  border-bottom: 1px solid transparent;
}

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

/* Gallery grid */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 10px 40px 60px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.grid-item {
  display: block;
  min-width: 0;
  aspect-ratio: 1 / 1;
  background: #000;
  padding: 10%;
  transition: opacity 0.2s ease;
}

.grid-item:hover {
  opacity: 0.85;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 10px 20px 40px;
  }
  header.site-header {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  header.site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .logo img {
    height: 36px;
  }
  nav.site-nav ul {
    font-size: 16px;
  }
}

/* Detail page */

.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 20px 40px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  align-items: start;
}

.detail-image {
  min-width: 0;
  background: #000;
  padding: 8%;
  aspect-ratio: 1 / 1;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-info .artist {
  font-size: 18px;
  margin: 0 0 24px;
}

.detail-info .meta {
  margin-bottom: 24px;
  line-height: 1.6;
}

.detail-info .meta .title-line {
  font-weight: 600;
}

.detail-info .description {
  line-height: 1.7;
  margin-bottom: 40px;
  text-align: justify;
}

.detail-info .buy {
  text-align: center;
  font-size: 22px;
  margin: 40px 0 20px;
}

.detail-info .buy a {
  border-bottom: 1px solid var(--black);
}

.detail-info .further {
  text-align: center;
  font-size: 15px;
  color: var(--gray);
}

.back-link {
  display: inline-block;
  margin: 20px 40px 0;
  font-size: 14px;
  color: var(--gray);
}

@media (max-width: 800px) {
  .detail {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* About page */

.about {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 40px 80px;
}

.about h1 {
  text-align: center;
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 40px;
}

.about section {
  margin-bottom: 40px;
  line-height: 1.7;
}

.about section h2 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray);
  margin-bottom: 10px;
}
