header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 1rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  z-index: 1000;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  color: #00008B;
  text-decoration: none;
}

nav ul {
  list-style-type: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: #00008B;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover {
  color: #4169E1;
}

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: middle;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.home-icon {
  display: none;
}

.home-icon svg {
  width: 24px;
  height: 24px;
  stroke: white;
}

.logo,
.nav-link {
  color: white;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Roboto', sans-serif;
  background: radial-gradient(ellipse 100% 100% at 50% 100%, #333333, #000000);
  color: white;
  overflow: hidden;
}

.gallery-page header {
  background-color: transparent;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.gallery-page .logo,
.gallery-page .nav-link,
.gallery-page .hamburger {
  color: white;
}

main {
  height: calc(100vh - 80px);
  overflow-y: auto;
  margin-top: 80px;
  padding: 20px;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

#gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, auto);
  gap: 20px;
  justify-content: center;
  max-width: calc(6 * 320px + 5 * 20px); /* 2020px */
  margin: 0 auto;
}

.gallery-item-wrapper {
  width: 100%;
  max-width: 320px;
}

.gallery-item {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid white;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: calc(100% - 160px);
  object-fit: contain;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 40px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  -webkit-user-select: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

@media screen and (max-width: 2020px) {
  #gallery-grid {
      grid-template-columns: repeat(6, auto);
  }
}

@media screen and (max-width: 1028px) {
  header {
    padding: 1rem 2rem;
  }

  .home-icon {
    display: block;
  }

  .nav-list {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    flex-direction: column;
    align-items: flex-end;
    padding: 1rem 2rem;
    box-sizing: border-box;
  }

  .nav-list.show {
    display: flex;
  }

  .nav-list li {
    width: auto;
    text-align: right;
  }

  .nav-link {
    padding: 0.5rem 0;
  }

}

@media screen and (max-width: 768px) {
  #gallery-grid {
      grid-template-columns: repeat(3, auto);
  }
}
