:root {
  --bg: #0b0b0c;
  --fg: #f5f5f7;
  --muted: #a1a1aa;
  --accent: #e94560;
  --card: #1a1a1d;
  --card-hover: #26262b;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(0,0,0,.4);
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  --font-body: 'Manrope', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.5;
}

/* Animated top backdrop (pattern + glow, fades to black over ~1000px) */
.top-backdrop {
  position: fixed; inset: 0 0 auto 0; height: 1000px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 30% 0%, rgba(233,69,96,.20), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(255,255,255,.08), transparent 65%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 2px, transparent 2px 8px);
  background-size: 120% 120%, 120% 120%, auto;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
          mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
  animation: backdrop-pan 30s linear infinite;
}
@keyframes backdrop-pan {
  0%   { background-position:   0% 0%, 100% 0%,   0  0; }
  100% { background-position: 100% 0%,   0% 0%, 100px 60px; }
}

/* Header */
.site-header { padding: 32px 20px 16px; max-width: 1400px; margin: 0 auto; }
.main-title { text-align: center; font-family: var(--font-display); font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 800; margin: 0 0 28px; letter-spacing: -0.5px; }
.hero-section { display: grid; gap: clamp(16px,3vw,28px); background: linear-gradient(145deg, #111113, #18181b); border-radius: var(--radius); padding: clamp(16px,2.5vw,24px); box-shadow: var(--shadow); align-items: start; }
@media (min-width: 860px){ .hero-section { grid-template-columns: 1fr 1fr; } }
.hero-image { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); outline: 1px solid rgba(255,255,255,.06); }
.event-text { color: var(--fg); display: grid; gap: 8px; font-family: var(--font-body); }
.event-text h2 { margin: 8px 0 6px; font-size: clamp(1.2rem,2.2vw,1.6rem); font-weight: 800; color: var(--fg); font-family: var(--font-display); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; color: var(--muted); }
.glass { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: clamp(12px,2.2vw,18px); backdrop-filter: blur(6px); box-shadow: var(--shadow); }

/* Main */
main { max-width: 1400px; margin: 0 auto; padding: 20px 20px 80px; }
.gallery-title { text-align: center; font-family: var(--font-display); font-size: clamp(1.6rem,2.2vw,1.9rem); margin: 48px 0 28px; font-weight: 800; }

/* Responsive Grid */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); transform: translateY(8px); opacity: .001; transition: transform .45s ease, background .25s ease, opacity .6s ease; }
.card.in { transform: translateY(0); opacity: 1; }
.card:hover { transform: translateY(-4px); background: var(--card-hover); }
.card img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.card.portrait img { aspect-ratio: 2/3; }
.card.landscape img { aspect-ratio: 16/9; }
.card:hover img { transform: scale(1.03); }
.card .overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0)); color: #fff; font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }
.card:hover .overlay { opacity: 1; transform: translateY(0); }
.card .title { font-weight: 600; font-family: var(--font-display); }
.card .meta { opacity: .85; font-size: 12px; }
.card .meta a { color: #fff; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,.4); }
.card .meta a:hover { opacity: .9; }

.sentinel { height: 1px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; display: none; place-items: center; background: rgba(0,0,0,.95); z-index: 1000; padding: 28px; }
.lightbox[aria-hidden="false"] { display: grid; }
.lb-figure { max-width: 96vw; max-height: 90vh; margin: 0; position: relative; }
#lbImg { max-width: 96vw; max-height: 76vh; width: auto; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.lb-caption { margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--fg); }
.lb-title { font-weight: 700; font-family: var(--font-display); }
.lb-meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; align-items: baseline; }
.lb-twitter { color: var(--accent); text-decoration: none; }
.lb-original { color: var(--muted); text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,.25); }
.lb-close { position: fixed; top: 14px; right: 16px; background: transparent; color: #fff; border: 0; font-size: 32px; cursor: pointer; line-height: 1; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.15); color: #fff; font-size: 28px; width: 44px; height: 52px; border-radius: 8px; cursor: pointer; backdrop-filter: blur(4px); }
.lb-prev { left: 14px; } .lb-next { right: 14px; } .lb-nav:hover { background: rgba(255,255,255,.08); }

/* Focus visible */
button:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Film grain overlay */
body::after {
content: "";
position: fixed;
inset: 0;
background-image: url('data:image/svg+xml;utf8,');
background-repeat: repeat;
pointer-events: none;
z-index: 1;
}

/* Gallery placard header style */
.main-title {
text-align: center;
font-family: var(--font-display);
font-size: clamp(2.4rem, 4vw, 3.4rem);
font-weight: 800;
margin: 0 0 28px;
letter-spacing: 0.12em;
background: linear-gradient(90deg, var(--accent), #ff7a85);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-transform: uppercase;
}

/* Ensure grain sits above backdrop but below content */
.top-backdrop { z-index: -2; }
body::after { z-index: -1; }

/* Link style override */
a {
color: #fff;
text-decoration: none;
}
a:hover {
color: var(--accent);
text-decoration: underline;
}
