/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Courier New', monospace;
  background-color: #000000;
  color: #ffffff;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 2rem;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 100;
  border-bottom: 1px solid rgba(139, 0, 0, 0.3);
}

header h1 {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
  background: linear-gradient(45deg, #ff6b6b, #feca57);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav a {
  margin-left: 2rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 5px 0;
  color: #e8e8e8;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff6b6b;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a:hover {
  color: #ff6b6b;
  text-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
}
.hero img {
  width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0;
  filter: blur(15px);
  transform: scale(0.98); /* start slightly smaller */
  animation: heroZoomIn 4.5s ease forwards;

  /* Make images unclickable / unselectable */
  user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}
@keyframes heroZoomIn {
  0% {
    opacity: 0;
    filter: blur(15px);
    transform: scale(0.98); /* slightly zoomed out at start */
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1); /* zooms in to normal size */
  }
}
.hero-caption {
  position: absolute;
  bottom: 1.1rem;
  left: 1.1rem;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 2.5s ease, transform 2.5s ease;
  max-width: 80%; /* prevent full-width takeover */
  word-wrap: break-word;
}
.hero-caption.show {
  opacity: 1;
  transform: translateY(0);
}

/* Categories */
.categories {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: #000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  opacity: 0;
  transition: opacity 2s ease;
  flex-wrap: wrap; /* allow wrapping */
}
.categories.show {
  opacity: 1;
}
.categories button {
  font-family: 'Courier New', monospace;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border: 2px solid rgba(139, 0, 0, 0.4);
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(20, 20, 20, 0.9));
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  white-space: nowrap; /* prevent word splitting */
  min-width: fit-content;
  max-width: 100%;
  flex: 1 1 auto;
}
.categories button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.1), transparent);
  transition: left 0.5s ease;
}
.categories button:hover::before {
  left: 100%;
}
.categories button.active,
.categories button:hover {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.25), rgba(255, 107, 107, 0.15));
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 0, 0, 0.25);
  text-shadow: 0 0 4px rgba(255, 107, 107, 0.4);
}

/* Masonry Grid */
.gallery {
  padding: 0.75rem;
  column-count: 3;
  column-gap: 0.75rem;
  opacity: 0;
  transition: opacity 2.5s ease;
}
.gallery.show {
  opacity: 1;
}
.gallery img {
  width: 100%;
  margin-bottom: 0.75rem;
  display: block;
  transition: transform 0.3s, opacity 0.3s;
  cursor: default;

  /* Make images unclickable / unselectable */
  user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}
.gallery img:hover {
  transform: scale(1.02);
}

/* Staggered animation for gallery images */
.gallery img:nth-child(3n+1) {
  animation: fadeInUp 0.8s ease 0.2s both;
}
.gallery img:nth-child(3n+2) {
  animation: fadeInUp 0.8s ease 0.4s both;
}
.gallery img:nth-child(3n+3) {
  animation: fadeInUp 0.8s ease 0.6s both;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .gallery {
    column-count: 2;
  }
}
@media (max-width: 600px) {
  .gallery {
    column-count: 1;
  }
  .hero-caption {
    position: static; /* remove absolute positioning */
    display: block;
    margin: 1rem auto;
    text-align: center;
    max-width: 90%;
  }
}
footer {
    background-color: #000;
    width: 100%;
    padding: 10px 0;
    text-align: center;
    margin-top: auto; /* Push the footer to the bottom */
    font-size: 0.9rem;
    color: #888;
}
.hidden-link {
  text-align: center;
  opacity: 0;
}
