* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  color: #222;
}

.site-header {
  text-align: center;
  padding: 40px 20px 20px;
}

.site-header h1 {
  margin-bottom: 8px;
  font-size: 2.2rem;
}

.site-header p {
  margin: 0;
  color: #666;
}

main {
  padding: 20px;
}

/* Masonry layout */
.masonry {
  column-count: 6;
  column-gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}


.photo-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.photo-card img {
  width: 100%;
  display: block;
}

.photo-info {
  padding: 12px 14px 16px;
}

.photo-info h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.photo-info p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Detail page */
.detail-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px;
}

.back-button {
  margin-bottom: 20px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #222;
  color: white;
  cursor: pointer;
  font-size: 0.95rem;
}

.back-button:hover {
  opacity: 0.9;
}

.detail-card {
  background: white;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.detail-image {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  margin-bottom: 20px;
  border-radius: 10px;
  background: #eee;
}

.detail-card h1 {
  margin-top: 0;
}

.detail-card p {
  color: #555;
  line-height: 1.6;
}

.plain-photo {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
  .masonry {
    column-count: 2;
  }
}

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