/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  line-height: 1.7;
  color: #2a2a2a;
  background-color: #fafaf8;
  font-size: 16px;
  letter-spacing: 0.01em;
}

/* Header and navigation */
header {
  background-color: #ffffff;
  border-bottom: 1px solid #e8e8e6;
  padding: 2.5rem 3rem;
  margin-bottom: 3rem;
}

header h1 a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

header h1 a:hover {
  opacity: 0.6;
}

/* Main content */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

/* Home page */
.home h1 {
  margin-bottom: 1rem;
  font-size: 3rem;
  font-weight: 200;
  letter-spacing: 0.02em;
  color: #1a1a1a;
}

.home > p {
  margin-bottom: 3rem;
  color: #5a5a5a;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.gallery-list {
  display: grid;
  gap: 2.5rem;
}

.gallery-preview-link {
  text-decoration: none;
  display: block;
}

.gallery-preview {
  background: white;
  padding: 2.5rem;
  border: 1px solid #e8e8e6;
  transition: border-color 0.3s ease;
  cursor: pointer;
}

.gallery-preview-link:hover .gallery-preview {
  border-color: #c0c0be;
}

.gallery-preview h2 {
  margin-bottom: 0.8rem;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: #1a1a1a;
  transition: opacity 0.3s ease;
}

.gallery-preview-link:hover .gallery-preview h2 {
  opacity: 0.6;
}

.gallery-preview p {
  font-weight: 300;
  color: #5a5a5a;
  line-height: 1.8;
}

/* Contact section */
.contact-section {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid #e8e8e6;
  text-align: center;
}

.contact-section h2 {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.contact-section p {
  font-weight: 300;
  color: #5a5a5a;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.contact-email a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e8e8e6;
  padding-bottom: 2px;
  transition: border-color 0.3s ease, opacity 0.3s ease;
}

.contact-email a:hover {
  opacity: 0.6;
  border-bottom-color: #c0c0be;
}

/* Gallery page */
.gallery-page h1 {
  margin-bottom: 1rem;
  font-size: 3rem;
  font-weight: 200;
  letter-spacing: 0.02em;
  color: #1a1a1a;
}

.gallery-description {
  color: #5a5a5a;
  margin-bottom: 3rem;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.8;
}

/* Gallery grid - responsive masonry-style layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.gallery-item {
  background: white;
  overflow: hidden;
  border: 1px solid #e8e8e6;
  transition: border-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  border-color: #c0c0be;
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease;
  padding: 1rem;
  background: white;
}

.gallery-item:hover img {
  opacity: 0.95;
}

.image-caption {
  padding: 1.2rem;
  font-size: 0.95rem;
  font-weight: 300;
  color: #5a5a5a;
  background: white;
  letter-spacing: 0.02em;
  text-align: center;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
}

#lightbox-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

/* Footer */
footer {
  background-color: #ffffff;
  border-top: 1px solid #e8e8e6;
  padding: 3rem;
  text-align: center;
  margin-top: 5rem;
  color: #5a5a5a;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-item img {
    height: 250px;
  }

  header {
    padding: 2rem 1.5rem;
  }

  header h1 a {
    font-size: 1.4rem;
  }

  main {
    padding: 0 1.5rem 1.5rem;
  }

  .home h1,
  .gallery-page h1 {
    font-size: 2rem;
  }

  .home > p,
  .gallery-description {
    font-size: 1rem;
  }

  .gallery-preview {
    padding: 1.5rem;
  }

  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}
