:root {
  color-scheme: dark;
  --bg: #0b0d13;
  --surface: #11141c;
  --line: #262b37;
  --text: #f4f6fb;
  --muted: #8f97a8;
  --accent: #4d74ff;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 16% -10%, rgba(77, 116, 255, .12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

.page-shell {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 96px) clamp(18px, 4vw, 64px) 72px;
}

.hero {
  padding-bottom: clamp(28px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .12em;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  font-weight: 520;
  letter-spacing: -.055em;
  line-height: .96;
}

.intro {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.7;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  padding-top: clamp(28px, 4vw, 56px);
}

.gallery-item {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: zoom-in;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  border-color: #424a5c;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.gallery-item:focus-visible,
.close-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  background: #0c0f16;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  font-size: 12px;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(4, 5, 8, .96);
  color: var(--text);
}

.lightbox::backdrop { background: rgba(0, 0, 0, .88); }

.lightbox[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.lightbox-stage {
  overflow: auto;
  padding: 64px 24px 24px;
  text-align: center;
  overscroll-behavior: contain;
}

.lightbox-stage img {
  display: inline-block;
  width: auto;
  max-width: min(1800px, 100%);
  height: auto;
  vertical-align: top;
}

.close-button {
  position: fixed;
  z-index: 2;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0 0 4px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(17, 20, 28, .86);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.lightbox-hint {
  margin: 0;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  background: rgba(11, 13, 19, .92);
}

body:has(.lightbox[open]) { overflow: hidden; }

@media (max-width: 1100px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .page-shell { padding-bottom: 40px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .gallery-item { border-radius: 11px; }
  .lightbox-stage { padding: 60px 10px 16px; }
  .lightbox-stage img { max-width: none; width: 1400px; }
}

@media (max-width: 430px) {
  .gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item { transition: none; }
}
