:root {
  --bg: #10131a;
  --panel: #171b24;
  --line: #262c39;
  --text: #e7ebf3;
  --muted: #93a0b5;
  --accent: #4f9dff;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: 14px 22px;
  background: rgba(16,19,26,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .back { color: var(--muted); font-size: 14px; white-space: nowrap; }
.topbar .back:hover { color: var(--text); }
.titles h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: .2px; }
.titles h1 .unset { color: var(--muted); font-weight: 400; font-size: 15px; }
.titles .sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  padding: 18px 22px 60px;
}
.cell {
  display: block; position: relative;
  aspect-ratio: 3 / 2;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
}
.cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease, opacity .3s ease;
}
.cell:hover img { transform: scale(1.04); }

/* Vertical (portrait) photos: taller cells so they display upright, not cropped */
.grid--vertical { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid--vertical .cell { aspect-ratio: 2 / 3; cursor: zoom-in; }

/* Divider between the horizontal grid and the vertical section */
.section-sep {
  display: flex; align-items: center;
  margin: 26px 22px 4px;
  color: var(--muted); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
}
.section-sep span { padding-right: 14px; }
.section-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* Index page cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  padding: 22px;
}
.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .cover { aspect-ratio: 3 / 2; background: #0b0d12; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .meta { padding: 12px 14px; }
.card .meta h2 { margin: 0; font-size: 16px; font-weight: 600; }
.card .meta h2 .unset { color: var(--muted); font-weight: 400; font-size: 14px; }
.card .meta p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.page-head { padding: 26px 22px 4px; }
.page-head h1 { margin: 0; font-size: 24px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(6,8,12,.94);
  display: flex; align-items: center; justify-content: center;
}
.lb[hidden] { display: none; }
.lb-img {
  max-width: 92vw; max-height: 84vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.lb button {
  position: absolute; background: rgba(255,255,255,.08);
  color: #fff; border: none; cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.lb button:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 18px; right: 20px; width: 42px; height: 42px; font-size: 26px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 34px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-bar {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  background: rgba(0,0,0,.5); padding: 8px 16px; border-radius: 999px;
  font-size: 13px; color: var(--muted);
}
.lb-download { color: var(--accent); }

@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; padding: 12px; }
  .lb-prev, .lb-next { width: 40px; height: 40px; font-size: 26px; }
}

/* --- added with the admin dashboard --- */
.titles { min-width: 0; }
.titles .notes { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 70ch; }
.topbar .pager { margin-left: auto; display: flex; gap: 14px; white-space: nowrap; }
.topbar .pager a { font-size: 14px; }
.page-head .admin-link { margin-top: 10px; font-size: 14px; }
.empty { padding: 40px 22px; color: var(--muted); }
