:root{
  --bg-red: #b90303;        /* deep red background */
  --hover-glow: rgba(255, 0, 0, 0.6); /* red glow on hover */
  --text-on-red: #fff;
  --container-max: 1200px;
  --gap: 16px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg-red);
  color: var(--text-on-red);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.page-header {
  text-align: center;
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.page-header p {
  margin: 0;
  opacity: 0.9;
}

/* Masonry layout using CSS columns (keeps original aspect ratios, no cropping) */
.gallery {
  column-width: 320px;       /* browser will make as many columns as fit */
  column-gap: var(--gap);
}

.item {
  break-inside: avoid;
  margin: 0 0 var(--gap);
  position: relative;
  border-radius: 12px;
  overflow: hidden;          /* keeps hover glow neat around rounded corners */
  background: rgba(255,255,255,0.04);
}

.item img {
  display: block;
  width: 100%;               /* respects original aspect ratio automatically */
  height: auto;              /* never crop thumbnails */
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  cursor: zoom-in;
}

/* Hover glow */
.item:hover img,
.item:focus-within img {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px var(--hover-glow);
  filter: saturate(1.05);
}

/* Footer */
.page-footer {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.back-btn {
  appearance: none;
  border: none;
  padding: 12px 20px;
  background: #301717;
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}
.back-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(219, 172, 172, 0.3); }
.back-btn:active { transform: translateY(0); opacity: 0.9; }

/* --- Focus Hover Mode (no lightbox) --- */
.gallery {
  position: relative;
}

/* When a photo is focused, blur/dim all others */
.gallery.focus-mode .item:not(.is-active) {
  filter: blur(4px) brightness(0.7);
  transition: filter 180ms ease;
}

