*{margin:0;padding:0;box-sizing:border-box}

:root{
  --pad:clamp(16px,4vw,48px);
  --gap:clamp(12px,2vh,20px);
  --neon:#39ff14;   /* only used when there's no photo; otherwise set per photo from NEON_PALETTE (config.php) */
}

html{height:100%}

body{
  min-height:100vh;min-height:100svh;
  display:grid;grid-template-columns:minmax(0,1fr);place-items:center;
  padding:var(--pad);
  /* Fallback gradient, shown if the blurred background is missing */
  background:var(--c2,#1a1a1a);
  background:linear-gradient(180deg,var(--c1,#1a1a1a) 0%,var(--c2,#1a1a1a) 50%,var(--c3,#1a1a1a) 100%) fixed;
  font:15px/1.4 system-ui,-apple-system,sans-serif;
}

/* Blurred, enlarged copy of the photo as background; app.js stacks a new layer on top to crossfade */
.bg{
  position:fixed;inset:-15%;z-index:-1;
  background:center/cover no-repeat;
  filter:blur(48px) saturate(1.25) brightness(.9);
  transition:opacity 1s ease;
}

main{
  width:100%;
  display:flex;flex-direction:column;align-items:center;gap:var(--gap);
  --chrome:calc(2*1.4em + 2*var(--gap) + 4rem + 1em);   /* room for heading + link + photo margins */
}

h1,.links a{
  font:inherit;font-weight:600;letter-spacing:.14em;
  color:var(--neon);
  transition:color .8s ease;
}

/* Heading spread across the full width (max 2000px): equal gaps between the letters */
h1{
  width:min(100%,2000px);
  display:flex;justify-content:space-between;
  letter-spacing:0;
  white-space:pre;   /* keeps the space spans from collapsing to zero width */
}

main img{
  display:block;width:auto;height:auto;
  margin-block:2rem;
  max-width:min(1000px,100%);
  max-height:calc(100vh - 2*var(--pad) - var(--chrome));
  max-height:calc(100svh - 2*var(--pad) - var(--chrome));
  box-shadow:0 12px 48px rgb(0 0 0/.22);
}

/* Fade-in, on page load and on every shuffle; only when JS is available,
   so the photo stays visible without it */
.js main img{opacity:0;transition:opacity 1.1s ease;cursor:pointer}
.js main img.in{opacity:1}

/* Thin neon bar along the top that fills up until the next photo appears */
.progress{
  position:fixed;top:0;left:0;z-index:1;
  width:100%;height:2px;
  background:var(--neon);
  transform:scaleX(0);transform-origin:left;
  pointer-events:none;
  transition:background-color .8s ease;
}
.progress.run{animation:progress 10s linear forwards}   /* duration is set from config by app.js */
.progress.paused{animation-play-state:paused}
@keyframes progress{to{transform:scaleX(1)}}

.links{display:flex;gap:2em}
.links a{text-decoration:none;text-underline-offset:.3em}
.links a:hover,.links a:focus-visible{text-decoration:underline;outline:none}

@media (prefers-reduced-motion:reduce){
  .js main img{transition:none}
}
