html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: Manrope, Arial, sans-serif;
  background: white;
  color: #111;
  overflow-x: hidden;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 48px;
  text-align: left;
}

h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}

.home-link {
  text-decoration: none;
  color: inherit;
}

.home-link:hover {
  opacity: 0.7;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  margin: 0;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #9a9a9a;
  transition: color 0.2s ease;
  line-height: 1;
}

nav a.active {
  color: #111;
}

nav a:hover {
  color: #111;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 30px;
}

.folder {
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.folder img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.45s ease, transform 0.6s ease;
}

.folder img.loaded {
  opacity: 1;
  transform: scale(1);
}

.folder:hover img.loaded {
  opacity: 0.76;
  transform: scale(1.01);
}

.folder-title {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.35;
  color: #222;
}

.folder-date {
  font-size: 12px;
  color: #a0a0a0;
  margin-top: 5px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  text-decoration: none;
  color: #111;
  font-size: 14px;
}

.gallery-heading {
  margin-bottom: 18px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.gallery-title {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 5px;
  color: #222;
}

.gallery-subtitle {
  font-size: 13px;
  color: #a0a0a0;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: pointer;
  background: #efefef;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.45s ease, transform 0.6s ease;
}

.thumb img.loaded {
  opacity: 1;
  transform: scale(1);
}

.thumb:hover img.loaded {
  opacity: 0.84;
  transform: scale(1.01);
}

@media (max-width: 1000px) {
  .thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .thumb-grid {
    grid-template-columns: 1fr;
  }
}
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.975);
  z-index: 1000;
  padding: 22px;
}

.lightbox.open {
  display: flex;
  flex-direction: column;
}

.lightbox-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
  font-size: 14px;
}

.lightbox-close,
.lightbox-arrow {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
}

.lightbox-close {
  font-size: 20px;
  color: #111;
}

.lightbox-arrow {
  font-size: 36px;
}

.lightbox-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.lightbox-content {
  flex: 1;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 60px;
  align-items: center;
  gap: 10px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.lightbox-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 75vh;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-image.loaded {
  opacity: 1;
}

.lightbox-image.fade-out {
  opacity: 0;
}

.bottom-meta {
  margin-top: 80px;
}

.back-to-top {
  display: inline-block;
  margin-bottom: 14px;
  color: #8d8d8d;
  font-size: 13px;
  text-decoration: none;
}

.back-to-top:hover {
  color: #111;
  text-decoration: underline;
}

.full-divider {
  width: 100vw;
  height: 1px;
  background: #e6e6e6;
  margin-left: calc(-50vw + 50%);
  margin-top: 12px;
  margin-bottom: 28px;
}

.footer {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: #a5a5a5;
}

.footer-right {
  display: flex;
  gap: 20px;
}

.contact-link {
  text-decoration: none;
  color: inherit;
}

.contact-link:hover {
  text-decoration: underline;
}

@media (max-width: 1000px) {
  .thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 36px;
  }

  nav {
    justify-content: flex-start;
    gap: 18px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .thumb-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-content {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .lightbox-arrow {
    font-size: 28px;
  }
}
