:root {
  --bg: #0e1110;
  --panel: #171b19;
  --line: #262c29;
  --text: #f1f4f2;
  --muted: #9aa5a0;
  --accent: #3ddc84; /* pitch green */
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.5 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h3, .brand { font-family: "Barlow Condensed", Inter, sans-serif; font-weight: 700; letter-spacing: .02em; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(14,17,16,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 26px; text-decoration: none; }
.brand span { color: var(--accent); }
#nav { display: flex; gap: 18px; flex-wrap: wrap; }
#nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
#nav a.on, #nav a:hover { color: var(--text); }

main { max-width: 1400px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 60px; }
.hero { padding: 48px 0 28px; }
.hero.small { padding-top: 28px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1; margin: 0 0 8px; text-transform: uppercase; }
.hero p { color: var(--muted); margin: 0; }
.back { display: inline-block; margin-bottom: 14px; color: var(--accent); text-decoration: none; font-weight: 500; }
.search {
  margin-top: 20px; width: 100%; max-width: 420px;
  padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit;
}
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.grid.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  display: block; text-decoration: none; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-img { aspect-ratio: 3/2; background: #000; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 14px 16px 16px; }
.card-body h3 { margin: 0; font-size: 24px; line-height: 1.1; }
.card-body p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); }

.masonry { columns: 4 260px; column-gap: 10px; }
.ph {
  display: block; width: 100%; margin: 0 0 10px; padding: 0; border: 0;
  background: var(--panel); border-radius: 6px; overflow: hidden; cursor: zoom-in;
  break-inside: avoid;
}
.ph img { width: 100%; height: 100%; display: block; object-fit: cover; transition: opacity .2s; }
.ph:hover img { opacity: .85; }

.lb {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.95);
  display: flex; align-items: center; justify-content: center;
}
.lb[hidden] { display: none; }
.lb img { max-width: 94vw; max-height: 88vh; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 48px; line-height: 1; padding: 16px; opacity: .75;
}
.lb button:hover { opacity: 1; }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 16px; color: var(--muted); font-size: 14px; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; padding: 24px 16px; }

@media (max-width: 600px) {
  .masonry { columns: 2; column-gap: 6px; }
  .ph { margin-bottom: 6px; }
  .lb-prev, .lb-next { display: none; }
}
