:root {
  --bg-0: #050814; --bg-1: #0a1130; --bg-2: #141a45;
  --glow-a: rgba(124, 92, 255, .22); --glow-b: rgba(40, 70, 200, .24);
  --text: #f5f7ff; --muted: #9aa3c7; --faint: #6d7590;
  --surface: rgba(255, 255, 255, .035); --line: rgba(190, 200, 235, .16); --line-strong: #aeb6cc;
  --accent: #a78bfa; --silver: linear-gradient(135deg, #f4f6fb, #aeb6cc 55%, #8f98b5);
}
:root[data-theme="light"] {
  --bg-0: #f6f7fc; --bg-1: #eceffa; --bg-2: #e3e7f7;
  --glow-a: rgba(124, 92, 255, .14); --glow-b: rgba(80, 120, 230, .14);
  --text: #12162e; --muted: #4f5778; --faint: #7a82a3;
  --surface: rgba(255, 255, 255, .7); --line: rgba(60, 70, 120, .16); --line-strong: #8a93b5;
  --accent: #5b3fd6; --silver: linear-gradient(135deg, #ffffff, #c4cade 55%, #98a1c0);
}
* { box-sizing: border-box; margin: 0; }
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
  min-height: 100vh; color: var(--text); line-height: 1.55;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(60rem 40rem at 85% -10%, var(--glow-a), transparent 60%),
    radial-gradient(50rem 40rem at -10% 110%, var(--glow-b), transparent 60%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 55%, var(--bg-2));
  background-attachment: fixed;
}
.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

header.top { padding: 14px 0; border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand i { min-width: 34px; height: 28px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; font-style: normal;
  font-size: 12px; font-weight: 700; color: #0a1130; background: var(--silver); }
nav { display: flex; align-items: center; gap: 14px; font-size: .9rem; color: var(--muted); }
nav a { text-decoration: none; }
nav a:hover { color: var(--text); }
#theme { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 1.1rem; }
#theme:hover { color: var(--text); border-color: var(--line-strong); }

.hero { padding: clamp(48px, 10vh, 100px) 0 36px; }
.eyebrow { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
h1 { font-size: clamp(2.4rem, 8vw, 4rem); letter-spacing: -.03em; line-height: 1.04; margin: 10px 0 14px;
  background: linear-gradient(180deg, var(--text), var(--line-strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { max-width: 52ch; color: var(--muted); font-size: 1.08rem; }
.count { margin-top: 10px; font-size: .85rem; color: var(--faint); }

.grid { list-style: none; padding: 0; margin: 8px 0 24px; display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.frame { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; transition: border-color .3s, box-shadow .3s; }
a.frame { cursor: zoom-in; }
a.frame:hover, a.frame:focus-visible { border-color: var(--line-strong); box-shadow: 0 10px 34px rgba(124, 92, 255, .2); }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
a.frame:hover img { transform: scale(1.025); }
.held .frame { color: var(--faint); font-size: .85rem; letter-spacing: .04em; border-style: dashed; background: transparent; }
.cap { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 10px 2px 0; font-size: .85rem; }
.cap .day { font-weight: 600; }
.cap time { color: var(--faint); }
.cap strong { flex-basis: 100%; font-weight: 500; color: var(--muted); }

footer { padding: 28px 0 48px; border-top: 1px solid var(--line); color: var(--faint); font-size: .82rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* gentle reveal; only enabled once JS has marked the page */
.js [data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity .9s ease, transform .9s ease; }
.js [data-reveal].in { opacity: 1; transform: none; }

dialog { border: 0; padding: 0; background: transparent; color: #f5f7ff; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
dialog::backdrop { background: rgba(3, 5, 14, .92); }
dialog[open] { display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 20px; gap: 12px; }
dialog figure { display: grid; gap: 10px; justify-items: center; max-width: 100%; max-height: 100%; min-height: 0; }
dialog img { max-width: min(96vw, 1400px); max-height: 78vh; width: auto; height: auto; border-radius: 8px; }
dialog figcaption { display: flex; flex-direction: column; align-items: center; font-size: .9rem; color: #c9cfe8; text-align: center; }
dialog figcaption span { color: #8f98b5; font-size: .8rem; }
.lb-ctrl { display: flex; gap: 12px; }
.lb-ctrl button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(190,200,235,.3); background: rgba(255,255,255,.06); color: #f5f7ff; font-size: 1.3rem; cursor: pointer; }
.lb-ctrl button:hover { border-color: #aeb6cc; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .frame img, .frame { transition: none; }
  a.frame:hover img { transform: none; }
}
