body { margin: 0; font: 16px/1.45 ui-sans-serif, system-ui, sans-serif; background: #000000; color: #e8edf5; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 80px; }
h1 { font-size: 1.5rem; letter-spacing: -0.02em; }
h2 { margin-top: 40px; font-size: 1.15rem; color: #3dfaff; }
p { color: rgba(232,237,245,0.72); max-width: 62ch; }
.home { color: #3dfaff; text-decoration: none; }
.home:hover { text-decoration: underline; }
.lede { margin-bottom: 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; background: #0a0c10; border: 1px solid rgba(61,250,255,0.12);
  border-radius: 14px; color: inherit; text-decoration: none;
}
.card img, .card object, .card svg.preview {
  width: 100%; aspect-ratio: 16/9; height: auto; border-radius: 10px;
  background: #000000; object-fit: cover; display: block;
}
.card strong { font-size: 0.95rem; }
.card .mono { font: 12px/1.35 ui-monospace, monospace; color: rgba(61,250,255,0.85); }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  font: 12px/1.2 ui-monospace, monospace; padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(139,108,255,0.35); color: #e8edf5; text-decoration: none;
}
.links a:hover { border-color: #3dfaff; color: #3dfaff; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 8px; padding: 12px;
  background: #0a0c10; border-radius: 12px; border: 1px solid rgba(61,250,255,0.1);
  color: inherit; text-decoration: none;
}
.tile img { width: 100%; height: auto; border-radius: 8px; aspect-ratio: 400/240; object-fit: cover; background: #000000; }
.tile span { font: 12px/1.3 ui-monospace, monospace; word-break: break-all; color: rgba(232,237,245,0.7); }

.preview-btn {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: #000000;
  cursor: zoom-in;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  box-shadow: none;
}
.preview-btn:focus { outline: none; }
.preview-btn:focus-visible { outline: 2px solid #3dfaff; outline-offset: 3px; }
.preview-btn img {
  pointer-events: none;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  background: #000000;
  vertical-align: top;
}
.card > .preview-btn { margin: 0; }

.lightbox {
  border: 1px solid rgba(61,250,255,0.2);
  border-radius: 16px;
  padding: 0;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  background: #000000;
  color: #e8edf5;
  box-shadow: 0 24px 80px rgba(0,0,0,0.65);
}
.lightbox::backdrop { background: rgba(3, 4, 8, 0.82); backdrop-filter: blur(4px); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0; padding: 12px 14px; border-bottom: 1px solid rgba(232,237,245,0.1);
}
.lightbox-title { margin: 0; font: 13px/1.3 ui-monospace, monospace; color: #3dfaff; }
.lightbox-close {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(139,108,255,0.4);
  background: transparent; color: #e8edf5; font: 13px/1 ui-sans-serif, system-ui, sans-serif; cursor: pointer;
}
.lightbox-close:hover { border-color: #3dfaff; color: #3dfaff; }
.lightbox img {
  display: block; width: 100%; height: auto; max-height: calc(92vh - 64px);
  object-fit: contain; background: #000000; border-radius: 0 0 16px 16px;
}

/* black matte */
html { background: #000000; }
.preview-btn, .preview-btn img, .card img, .tile img, .lightbox img {
  background: #000000 !important;
}
.preview-btn {
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
}
.lightbox { background: #000000; }
.lightbox img { object-fit: contain; background: #000000 !important; }
