:root {
  --bg: #0b0d10;
  --panel: #10141b;
  --text: #e8ecf2;
  --muted: #a8b2c1;
  --chip: rgba(232, 236, 242, 0.08);
  --chipActive: rgba(232, 236, 242, 0.16);
  --border: rgba(232, 236, 242, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 1700px at 10% -10%, rgba(120,160,255,0.15), transparent 60%),
              radial-gradient(1900px 1600px at 80% 0%, rgba(255,180,120,0.10), transparent 55%),
              var(--bg);
}

a { color: inherit; text-decoration: none; }
.container { width: min(1100px, calc(100% - 36px)); margin: 0 auto; }

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 13, 16, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }

.brand { display: flex; flex-direction: column; gap: 2px; }
.brand__mark { font-weight: 700; letter-spacing: 0.2px; }
.brand__sub { color: var(--muted); font-size: 12px; }

.nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.chip {
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.chip:hover { transform: translateY(-1px); background: var(--chipActive); }
.chip.is-active { background: var(--chipActive); border-color: rgba(232, 236, 242, 0.18); }

.hero { padding: 22px 0 18px; }
.hero__title { margin: 16px 0 6px; font-size: 34px; line-height: 1.15; letter-spacing: -0.3px; }
.hero__text { margin: 0 0 14px; color: var(--muted); max-width: 68ch; }
.hero__bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(16, 20, 27, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.20);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  outline: none;
}
.search::placeholder { color: rgba(168,178,193,0.8); }
.search:focus { border-color: rgba(232, 236, 242, 0.22); }

.meta { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.meta__sep { opacity: 0.7; }

.grid {
  padding: 18px 0 28px;
  columns: 1;
  column-gap: 14px;
}

@media (min-width: 640px) { .grid { columns: 2; } }
@media (min-width: 980px) { .grid { columns: 3; } }

.card {
  margin: 0 0 14px;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: zoom-in;
  box-shadow: var(--shadow);
  position: relative;
}
.card img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.01);
  transition: transform 180ms ease, opacity 180ms ease;
}
.card:hover img { transform: scale(1.03); }
.card::after {
  content: attr(data-caption);
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.40);
  border: 1px solid rgba(232,236,242,0.10);
  color: rgba(232,236,242,0.92);
  font-size: 13px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}
.card:hover::after { opacity: 1; transform: translateY(0); }

.card.is-hidden { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.86);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 50;
}
.lightbox.is-open { display: flex; }

.lightbox__content {
  margin: 0;
  width: min(980px, 100%);
  max-height: calc(100vh - 44px);
  display: grid;
  gap: 10px;
  justify-items: center;
}
.lightbox__content img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: 16px;
  border: 1px solid rgba(232,236,242,0.12);
  box-shadow: var(--shadow);
}
.lightbox__caption {
  color: rgba(232,236,242,0.9);
  font-size: 14px;
  text-align: center;
}

.lightbox__close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(232,236,242,0.16);
  background: rgba(16,20,27,0.65);
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(232,236,242,0.16);
  background: rgba(16,20,27,0.65);
  color: var(--text);
  font-size: 30px;
  cursor: pointer;
}
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

.footer {
  border-top: 1px solid var(--border);
  background: rgba(11, 13, 16, 0.7);
}
.footer__row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  color: var(--muted);
  font-size: 13px;
}
.footer__sep { opacity: 0.7; }
.footer__link { text-decoration: underline; text-underline-offset: 3px; }