/* ─── /DUMP page ─────────────────────────────────────────────────────────── */

:root {
  --dump-bg:           #1A1816;
  --dump-surface:      #242220;
  --dump-surface-2:    #2E2B28;
  --dump-surface-3:    #383431;
  --dump-text:         #EDE9E3;
  --dump-text-2:       #9A9490;
  --dump-text-3:       #635F5B;
  --dump-border:       rgba(237, 233, 227, 0.08);
  --dump-border-2:     rgba(237, 233, 227, 0.15);
  --dump-accent:       #7A9BAD;
  --dump-accent-dim:   rgba(122, 155, 173, 0.15);

  --type-photo:        #C8965A;
  --type-video:        #C86A5A;
  --type-model:        #7A9BAD;
  --type-print:        #9A8ABD;
  --type-code:         #6AAD8A;
  --type-document:     #ADA06A;
  --type-furniture:    #C8B08A;
  --type-tool:         #9AADBD;
  --type-illustration: #AD8ABD;
  --type-craft:        #B89A7A;
  --type-decor:        #ADB87A;
  --type-woodworking:  #C4884A;
  --type-metalworking: #6A8FA0;
}

/* ── Page shell ────────────────────────────────────────────────────────── */

body.dump-page {
  background: var(--dump-bg);
}

body.dump-page .site-header {
  position: sticky;
  top: 0;
  background: var(--bg-a);
  color: var(--warm-black);
  box-shadow: 0 2px 8px rgba(30,28,26,0.06);
  padding: 16px var(--pad-x);
}

body.dump-page .site-header .header-name { color: var(--blue-header); }

.dump-wrapper {
  background: var(--dump-bg);
  min-height: calc(100vh - 60px);
  color: var(--dump-text);
}

/* ── Subheader ─────────────────────────────────────────────────────────── */

.dump-subheader {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px var(--pad-x) 16px calc(var(--pad-x) + 48px);
}

.dump-page-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--dump-text);
}

.dump-subheader-rule {
  border: none;
  border-top: 1px solid var(--dump-border);
  margin: 0;
}

.dump-count {
  font-size: 0.75rem;
  color: var(--dump-text-3);
}

/* ── Filter pills ──────────────────────────────────────────────────────── */

.dump-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 14px var(--pad-x);
  border-bottom: 1px solid var(--dump-border);
}

.dump-filters:empty {
  display: none;
}

.dump-filter-pill {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--pill-color);
  background: transparent;
  color: var(--pill-color);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dump-filter-pill:hover {
  background: color-mix(in srgb, var(--pill-color) 15%, transparent);
}

.dump-filter-pill.active {
  background: var(--pill-color);
  color: #1A1816;
}

/* ── Layout: grid + preview side by side ──────────────────────────────── */

.dump-layout {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 120px);
}

/* ── Asset grid ────────────────────────────────────────────────────────── */

.dump-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 24px;
  align-content: start;
  min-width: 0;
}

.dump-grid.preview-open {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Empty state */
.dump-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--dump-text-3);
  font-size: 0.85rem;
  line-height: 1.7;
}

.dump-empty-title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--dump-text-2);
  margin-bottom: 8px;
}

/* ── Asset tile ────────────────────────────────────────────────────────── */

.dump-tile {
  background: var(--dump-surface);
  border: 1px solid var(--dump-border);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
}

.dump-tile:hover {
  background: var(--dump-surface-2);
  border-color: var(--dump-border-2);
  box-shadow: 0 0 0 1px var(--dump-border-2);
}

.dump-tile.active {
  border-color: var(--dump-accent);
  background: var(--dump-surface-2);
}

.dump-tile-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.dump-tile-thumb:not(:has(img)) {
  background: #504540;
}

.dump-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dump-tile-icon {
  width: 36px;
  height: 36px;
  opacity: 0.5;
}

.dump-tile-body {
  padding: 8px 10px 10px;
  flex: 1;
  min-width: 0;
}

.dump-tile-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--dump-text);
  margin-bottom: 4px;
  line-height: 1.4;
}

.dump-tile-types {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 2px;
}

.dump-tile-type {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--dump-surface-3);
}

/* ── Preview pane ──────────────────────────────────────────────────────── */

.dump-preview {
  width: 720px;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  overflow-x: hidden;
  border-left: 1px solid var(--dump-border);
  background: var(--dump-surface);
  display: none;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  align-self: stretch;
}

.dump-preview.open {
  display: block;
}

.dump-preview-close {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  padding: 12px 14px;
  background: var(--dump-surface);
  border-bottom: 1px solid var(--dump-border);
  z-index: 1;
  cursor: pointer;
  color: var(--dump-text-2);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  transition: color 0.15s;
  border: none;
  outline: none;
}

.dump-preview-close:hover { color: var(--dump-text); }

.dump-preview-media {
  width: 100%;
  background: var(--dump-bg);
}

.dump-img-wrap {
  aspect-ratio: 1 / 1;
  margin: 16px 100px;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.dump-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.dump-preview-media video {
  width: calc(100% - 32px);
  margin: 16px auto 0;
  display: block;
  border-radius: 8px;
}

.dump-preview-media .dump-preview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.dump-preview-media .dump-preview-icon svg {
  width: 56px;
  height: 56px;
  opacity: 0.25;
}

/* Lightbox */
#dump-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20,18,16,0.93);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

#dump-lightbox.open { display: flex; }

#dump-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

#dump-lightbox.single .dump-lb-arrow { display: none; }

.dump-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 8px;
  z-index: 1;
  transition: color 0.2s;
}

.dump-lb-arrow:hover { color: rgba(255,255,255,0.85); }
.dump-lb-prev { left: 8px; }
.dump-lb-next { right: 8px; }
.dump-lb-arrow svg { width: 32px; height: 32px; display: block; }

/* Slideshow */
.dump-slideshow {
  position: relative;
  overflow: hidden;
  /* clip sliding images to the pane width */
}

.dump-slide-img {
  /* Lives inside .dump-img-wrap — sizing handled there */
}

.dump-slide-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  background: linear-gradient(transparent, rgba(26,24,22,0.7));
}

.dump-slide-btn {
  background: rgba(36,34,32,0.8);
  border: 1px solid var(--dump-border-2);
  color: var(--dump-text);
  font-size: 1.4rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.dump-slide-btn:hover {
  background: rgba(58,54,50,0.9);
}

.dump-slide-count {
  font-size: 0.72rem;
  color: var(--dump-text-2);
  min-width: 40px;
  text-align: center;
}

.dump-preview-info {
  padding: 18px 20px 32px;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.dump-preview-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dump-text);
  margin-bottom: 6px;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.dump-preview-type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.dump-preview-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
}

.dump-preview-date {
  font-size: 0.75rem;
  color: var(--dump-text-3);
}

.dump-preview-desc {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--dump-text-2);
  margin-bottom: 16px;
}

.dump-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 18px;
}

.dump-preview-tag {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--dump-surface-3);
  color: var(--dump-text-2);
  border: 1px solid var(--dump-border);
}

.dump-preview-divider {
  border: none;
  border-top: 1px solid var(--dump-border);
  margin: 16px 0;
}

.dump-preview-meta-label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dump-text-3);
  margin-bottom: 4px;
}

.dump-preview-meta-value {
  font-size: 0.8rem;
  color: var(--dump-text-2);
  margin-bottom: 12px;
}

/* Code block */
.dump-code-block {
  background: var(--dump-bg);
  border: 1px solid var(--dump-border);
  border-radius: 6px;
  padding: 14px;
  overflow-x: auto;
  margin-top: 14px;
}

.dump-code-block pre {
  margin: 0;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--dump-text-2);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Action buttons */
.dump-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.dump-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
  border: none;
}

.dump-btn:hover { opacity: 0.8; }

.dump-btn-primary {
  background: var(--dump-accent);
  color: #fff;
}

.dump-btn-secondary {
  background: var(--dump-surface-3);
  color: var(--dump-text);
  border: 1px solid var(--dump-border-2);
}

/* ── Footer on dump page ───────────────────────────────────────────────── */

.dump-page .site-footer {
  background: var(--dump-bg);
  border-top: 1px solid var(--dump-border);
  color: var(--dump-text-3);
}

/* ── Mobile ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .dump-subheader { flex-wrap: wrap; gap: 8px; }

  .dump-preview {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    overflow-y: auto;
  }

  .dump-grid { padding: 12px; gap: 8px; }
  .dump-grid.preview-open { pointer-events: none; }
}
