* {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Georgia', serif;
  background: #eaeaea;
  color: #2c2c2c;
  min-height: 100vh;
  padding-top: 64px;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #eaeaea;
  z-index: 800;
  padding: 18px 2rem;
  transition: padding 0.2s ease;
}

nav span {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.05em;
}

nav.scrolled {
  padding: 10px 2rem;
}

.gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.gallery img {
  width: var(--thumb-w);
  height: var(--thumb-h);
  object-fit: contain;
  display: block;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.visible {
  display: block;
  opacity: 1;
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 95vw;
  max-height: 95vh;
}

.modal.visible {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 1010;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  line-height: 1;
}

.close-btn:hover {
  background: #e8e8e8;
  transform: scale(1.1);
}

.matte {
  background: #fff;
  padding: min(var(--matte-v, 2.5rem), 5vw) min(var(--matte-h, 2.5rem), 5vw);
}

.matte img {
  display: block;
  width: min(var(--focus-w), 80vw);
  height: min(var(--focus-h), 70vh);
  object-fit: contain;
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.5);
}

.matte-info {
  text-align: center;
  padding-top: 1.25rem;
}

.matte-info h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.05em;
}

.matte-info p {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.35rem;
  line-height: 1.4;
}

.matte-info span {
  display: inline-block;
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.4rem;
  letter-spacing: 0.1em;
}
