:root {
  color-scheme: dark;
  --page: #141218;
  --panel: #1d1922;
  --line: #302936;
  --text: #f7f1f8;
  --muted: #beb3c3;
  --accent: #c6a9fb;
  font-family: "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--text); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .46; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: .75rem; left: 1rem; z-index: 4; padding: .8rem 1rem; background: var(--page); transform: translateY(-180%); }
.skip:focus { transform: none; }

.header { position: relative; z-index: 2; background: var(--page); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.23rem; font-weight: 780; letter-spacing: -.055em; white-space: nowrap; }
.brand img { flex: 0 0 auto; }
.brand-accent { color: var(--accent); margin-inline-start: .13em; }
nav { display: flex; gap: clamp(1rem, 3.2vw, 2.8rem); }
nav a, .footer a:not(.brand) { color: var(--muted); font-size: .92rem; font-weight: 600; }
nav a:hover, .footer a:hover { color: var(--accent); }

.hero { position: relative; isolation: isolate; overflow: clip; background: radial-gradient(ellipse at 74% 44%, #332442 0%, #21192b 38%, transparent 70%), var(--page); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; min-height: 520px; gap: 1.25rem; padding-block: 3rem; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--accent); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88rem; font-weight: 650; letter-spacing: .14em; line-height: 1.45; text-transform: uppercase; }
.hero .eyebrow { display: flex; align-items: center; gap: .7rem; }
.pulse { width: .56rem; height: .56rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px #c6a9fb75; }
.hero h1 { margin-top: 1.05rem; font-size: clamp(4.5rem, 7.7vw, 7.2rem); letter-spacing: -.066em; line-height: .92; font-weight: 780; }
.hero h1 em { font-style: normal; color: var(--accent); }
.intro { margin-top: 1.65rem; max-width: 30rem; line-height: 1.65; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.18rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.85rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: .7rem 1.12rem; border: 1px solid transparent; border-radius: .65rem; font-size: .92rem; font-weight: 720; line-height: 1.3; }
.button svg { width: 19px; height: 19px; }
.primary { color: #181222; background: var(--accent); }
.primary:hover { background: #e0cbff; }
.ghost { color: var(--text); border-color: #51425c; background: #201928; }
.ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

.hero-visual { position: relative; z-index: 0; height: clamp(295px, 33vw, 420px); }
.hero-visual::before { content: ""; position: absolute; inset: 9% -8% 7% 0; background: radial-gradient(ellipse, #ae72f02e, transparent 70%); pointer-events: none; }
.snapshot { position: absolute; display: block; background: #292331; padding: .53rem .53rem 0; border: 1px solid #6c597a; border-radius: .65rem; box-shadow: 0 25px 55px #08061194; transition: translate .18s ease, box-shadow .18s ease; }
.snapshot:hover { translate: 0 -4px; box-shadow: 0 28px 55px #090611bb; }
.snapshot img { width: 100%; height: auto; aspect-ratio: 1.45; object-fit: cover; border-radius: .26rem; background: var(--panel); }
.snapshot figcaption { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .65rem .15rem .72rem; color: #eee3fb; font: 650 .77rem/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .04em; }
.snapshot figcaption time { color: #cab9d3; white-space: nowrap; }
.snapshot-main { width: 79%; top: 4%; left: 6%; transform: rotate(-5deg); z-index: 1; }
.snapshot-side { width: 48%; right: 0; bottom: 1%; transform: rotate(9deg); z-index: 2; }

.archive-section { padding-block: 3.3rem 4.65rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-head h2, .story h2, .album-head h1, .prose h1 { font-size: clamp(2.55rem, 5vw, 4.05rem); font-weight: 780; line-height: 1.02; letter-spacing: -.055em; margin-top: .55rem; }
.stats, .result-count { color: var(--muted); font-size: .94rem; line-height: 1.55; }
.section-head .stats { padding-bottom: .28rem; text-align: right; }
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; border-block: 1px solid var(--line); padding-block: 1rem; }
.pills, .filter-tools { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { min-height: 40px; padding: .43rem .82rem; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); background: var(--panel); font-size: .91rem; font-weight: 650; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #181222; }
.search, .year { position: relative; min-width: 0; }
.search svg { width: 17px; height: 17px; position: absolute; top: 50%; left: .75rem; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input, .year select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: .53rem; background: var(--panel); color: var(--text); font-size: .91rem; }
.search input { width: 13.3rem; padding: .5rem .65rem .5rem 2.25rem; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.year select { appearance: none; padding: .5rem 2rem .5rem .75rem; cursor: pointer; }
.year::after { content: ""; position: absolute; right: .85rem; top: calc(50% - 5px); width: 8px; height: 8px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.result-count { margin-block: 1rem; min-height: 1.5em; }
.album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; }
.album-card { overflow: hidden; display: flex; flex-direction: column; min-width: 0; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: .85rem; }
.album-card:hover { border-color: #846b9c; }
.cover { position: relative; aspect-ratio: 1.66; overflow: hidden; background: #2a2433; }
.cover img, .photo img { width: 100%; height: 100%; object-fit: cover; }
.cover img { transition: transform .24s ease; }
.album-card:hover .cover img { transform: scale(1.035); }
.tag { position: absolute; left: .8rem; bottom: .7rem; padding: .34rem .6rem; border: 1px solid #f4e3ff34; border-radius: .38rem; background: #19131fe8; color: #ecddfb; font-size: .8rem; font-weight: 650; }
.card-text { display: flex; align-items: end; justify-content: space-between; gap: .5rem; padding: .88rem 1rem 1rem; }
.card-text h3 { font-size: 1.18rem; font-weight: 730; letter-spacing: -.025em; }
.card-text p { margin-top: .32rem; color: var(--muted); font-size: .87rem; }
.card-text .card-count { flex: 0 0 auto; white-space: nowrap; }
.more { display: flex; margin: 1.65rem auto 0; }
.back { display: inline-flex; color: var(--accent); text-decoration: underline; text-underline-offset: .3em; font-weight: 650; margin-bottom: 1.8rem; }
.album-head { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.album-head .stats { margin-top: .6rem; }
.photo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.photo { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); }
.photo:hover { border-color: var(--accent); }

.story { background: #1b1621; border-block: 1px solid var(--line); padding-block: 4.4rem; }
.story-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.story-copy, .prose p { max-width: 41rem; color: var(--muted); font-size: 1.075rem; line-height: 1.7; }
.story-copy p + p { margin-top: 1rem; }
.footer { background: var(--page); }
.footer-inner { min-height: 92px; }
.prose { padding-block: 4.5rem; min-height: 65vh; }
.prose .eyebrow { color: var(--accent); }
.prose p { margin-top: 1rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose a:not(.button) { color: var(--accent); text-decoration: underline; text-underline-offset: .14em; overflow-wrap: anywhere; }
.prose .button { margin-top: 1.3rem; }

.viewer { width: min(1080px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 0; border: 1px solid #51425c; border-radius: 1rem; background: #19151f; color: var(--text); }
.viewer::backdrop { background: #09070be8; }
.viewer-inner { padding: clamp(.65rem, 2.2vw, 1.4rem); }
.viewer-head, .viewer-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.viewer-head h2 { font-size: clamp(1.1rem, 3.7vw, 1.65rem); line-height: 1.15; }
.viewer-head p, .viewer-foot { color: var(--muted); margin-top: .35rem; font-size: .86rem; }
.viewer-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(.3rem, 1.2vw, .9rem); margin-block: .85rem; }
.viewer-stage figure { position: relative; display: grid; place-items: center; min-height: 8rem; background: #0e0b12; border-radius: .4rem; }
.viewer-stage img { width: 100%; height: min(63vh, 690px); object-fit: contain; }
.viewer-stage figure p { padding: .6rem; text-align: center; }
.icon { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #51425c; border-radius: .5rem; background: #241d2c; color: var(--text); font-size: 1.65rem; line-height: 1; }
.icon:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.viewer-foot a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
#photo-id { overflow-wrap: anywhere; }

@media (max-width: 1040px) {
  .wrap { width: calc(100% - 64px); }
  .hero-inner { min-height: 495px; }
  .hero h1 { font-size: clamp(4rem, 8.9vw, 5.65rem); }
  .card-text { display: block; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .hero-inner { padding-block: 3.25rem 1rem; grid-template-columns: 1fr; gap: 1.4rem; }
  .hero h1 { font-size: clamp(3.9rem, 12.5vw, 6rem); }
  .hero-visual { width: min(100%, 520px); margin-inline: auto; height: clamp(255px, 72vw, 390px); }
  .snapshot-main { width: 74%; left: 5%; top: 7%; }
  .snapshot-side { bottom: 8%; right: 4%; width: 45%; }
  .section-head { align-items: start; flex-direction: column; gap: .55rem; margin-bottom: 1.2rem; }
  .section-head .stats { text-align: left; }
  .archive-section, .story { padding-block: 3rem; }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
  .story-inner { grid-template-columns: 1fr; gap: 1.1rem; }
}

@media (max-width: 440px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 66px; gap: .6rem; }
  .header .brand img { width: 33px; height: 33px; }
  .header .brand { gap: .35rem; font-size: 1.08rem; }
  nav { gap: .75rem; }
  nav a { font-size: .83rem; }
  .hero h1 { font-size: clamp(3.2rem, 13.4vw, 4.3rem); }
  .hero-actions .button { padding-inline: .8rem; }
  .snapshot figcaption { font-size: .67rem; }
  .filter-tools { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .card-text { padding: .62rem .68rem .7rem; }
  .card-text h3 { font-size: 1.02rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: .6rem; padding-block: 1.25rem; }
  .viewer { width: calc(100% - 12px); }
  .viewer-stage { grid-template-columns: 1fr 1fr; }
  .viewer-stage figure { grid-area: 1 / 1 / 2 / 3; }
  .viewer-stage img { height: min(55vh, 500px); }
  .viewer-stage .next { justify-self: end; }
  .viewer-foot { gap: .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
