@font-face {
  font-family: "Arial";
  format("opentype");
  font-style: italic;
  font-weight: bold;
}

html {
  background-color: #1a1a1a;
}

body {
  padding: 0;
  margin: 0;
  text-align: center;
  font-family: "Arial";
  font-style: italic;
  color: #ededed;
  overflow-x: hidden;
}

a {
  color: #d3d3d3;
  text-decoration: none;
}
a:hover {
  color: #ffffff;
}

.site-title {
  font-size: 26px;
  margin-bottom: 10px;
}

.site-title a {
  color: #ededed;
  text-decoration: none;
  text-shadow:
    0 0 10px rgba(255,255,255,0.25),
    0 0 20px rgba(255,255,255,0.15);
}

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  font-size: 15px;
  text-transform: lowercase;
  color: #d3d3d3;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

/* Active page underline */
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.6);
}

/* Mobile */
@media (max-width: 600px) {
  .site-title {
    font-size: 22px;
  }

  .nav-links {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* logo */
.logo img {
  width: 200px;
  height: auto;
  display: block;
}

/* top nav */
.topnav {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(120, 120, 120, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 25px rgba(255, 255, 255, 0.08);
  padding: 16px 30px;
  position: relative;
  z-index: 1000;
}

/* nav images */
.nav-links img {
  width: 120px;
  height: auto;
  transition: 0.3s ease;
}
.nav-links img:hover {
  filter: brightness(1.3);
}

/* particles */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  filter: blur(1px);
  animation: drift 18s linear infinite;
  opacity: 0.4;
}

@keyframes drift {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(-200px) translateY(40px); }
}

/* Gallery */
.gallery-title {
  margin: 30px 0 10px;
  letter-spacing: 2px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid img {
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.gallery-grid figcaption {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.85;
}

/* Viewer overlay */
.viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 2000;
  overflow: hidden;
}

.viewer.active {
  opacity: 1;
  pointer-events: auto;
}

/* Grain */
.viewer::after {
  content: "";
  position: absolute;
  inset: -50%;
  background-image: repeating-radial-gradient(
    circle,
    rgba(255,255,255,0.05) 0px,
    rgba(0,0,0,0.05) 1px
  );
  opacity: 0.15;
  animation: grain 1.5s steps(6) infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes grain {
  0% { transform: translate(0,0); }
  50% { transform: translate(-5%,5%); }
  100% { transform: translate(0,0); }
}

.viewer > * {
  position: relative;
  z-index: 2;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 22px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.35);
  color: white;
  cursor: pointer;
  border-radius: 10px;
  padding: 6px 10px;
  backdrop-filter: blur(4px);
}

/* Nav buttons */
.viewer-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2500;
}

.viewer-nav button {
  pointer-events: auto;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  font-size: 28px;
  padding: 10px 16px;
  border-radius: 50%;
  cursor: pointer;
  margin: 0 18px;
  backdrop-filter: blur(4px);
  transition: 0.25s ease;
}

.viewer-nav button:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.08);
}

/* Image container */
.viewer-image-wrap {
  position: relative;
  max-height: 72vh;
  overflow: hidden;
  margin-bottom: 14px;
}

.viewer-image-wrap img {
  max-width: 90vw;
  max-height: 72vh;
  border-radius: 14px;

  opacity: 0;
  transform: scale(0.95);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.viewer.active .viewer-image-wrap img {
  opacity: 1;
  transform: scale(1);
}

/* Slide animation helpers */
.slide-in-right {
  transform: translateX(40px);
  opacity: 0;
}
.slide-in-left {
  transform: translateX(-40px);
  opacity: 0;
}
.slide-active {
  transform: translateX(0);
  opacity: 1;
}

/* Caption */
.viewer-caption {
  font-size: 14px;
  opacity: 0.95;
  max-width: 80vw;
}

/* Mobile */
@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 14px;
  }

  .viewer-nav button {
    font-size: 22px;
    padding: 8px 12px;
    margin: 0 10px;
  }
}