:root {
  --bg: #0b0b0c;
  --fg: #ededed;
  --muted: #8a8a8a;
  --scar: #b3262f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--scar); }

.slideshow {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16/10;
  margin: 1.5rem auto 0;
  overflow: hidden;
  background: var(--bg);
}

.slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation-name: slideshow-fade;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}


header {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  margin: 0;
}

.scar {
  width: 60px;
  height: 2px;
  background: var(--scar);
  margin: 1.2rem auto;
}

nav {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2rem 0;
}

nav a {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

nav a.primary { font-size: 1.4rem; }
nav a.secondary { font-size: 0.85rem; color: var(--muted); }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
}

.gallery .placeholder,
.gallery figure {
  position: relative;
  aspect-ratio: 3/2;
  background: var(--bg);
  border: 1px solid #444446;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
  overflow: hidden;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
  transition: filter 0.3s ease, transform 0.4s ease;
  cursor: pointer;
}

.gallery figure:hover img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery figure:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}


.chapter {
  margin: 3rem 0;
}

.chapter h2 {
  font-weight: 300;
  letter-spacing: 0.1em;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 0.5rem;
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.back {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--muted);
}

form.gate {
  max-width: 320px;
  margin: 3rem auto;
  text-align: center;
}

form.gate input {
  width: 100%;
  padding: 0.6rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: var(--fg);
  margin: 0.5rem 0;
}

form.gate button {
  width: 100%;
  padding: 0.6rem;
  background: var(--scar);
  border: none;
  color: #fff;
  cursor: pointer;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 11, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 75vw;
  max-height: 75vh;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.lightbox .lightbox-close,
.lightbox .lightbox-prev,
.lightbox .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  line-height: 1;
}

.lightbox .lightbox-close:hover,
.lightbox .lightbox-prev:hover,
.lightbox .lightbox-next:hover {
  color: var(--scar);
}

.lightbox .lightbox-close {
  top: 0.5rem;
  right: 1rem;
}

.lightbox .lightbox-prev {
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox .lightbox-next {
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}
