/* =============================================================
   LUDAFOX Art Gallery — image-forward skeleton theme.
   Shares the blog's token system; per-generation accents are injected at
   runtime on the artwork viewer via BlogUtil.applyGenerationTheme().
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #fff;
  --ink-soft: rgba(255, 255, 255, 0.85);
  --shadow: 0 2px 18px rgba(40, 70, 120, 0.45);
  --brush: 'Caveat Brush', cursive;
  --sans: 'Nunito', system-ui, sans-serif;
  --mono: 'Share Tech Mono', monospace;
  --accent: #2e5a9e;
  --secondary: #26d07c;
  --card: rgba(255, 255, 255, 0.96);
  --text: #1f2c44;
  --text-soft: #56657c;
  --rule: #e6eaf1;
}

body { font-family: var(--sans); color: var(--ink); min-height: 100vh; overflow-x: hidden; }
.sky { position: fixed; inset: 0; z-index: -1; background: url('/assets/brand/clouds6.webp') center/cover no-repeat fixed; }
.sky::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 40, 70, 0.22), rgba(20, 40, 70, 0.55)); }

.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 26px; }
.topbar a.mark { font-family: var(--brush); font-size: 26px; color: #fff; text-decoration: none; text-shadow: var(--shadow); }
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar nav a { font-family: var(--brush); font-size: 21px; color: var(--ink-soft); text-decoration: none; text-shadow: var(--shadow); }
.topbar nav a:hover, .topbar nav a.on { color: #fff; }

main { max-width: 1100px; margin: 0 auto; padding: 6px 20px 70px; }
.page-title { font-family: var(--brush); font-size: clamp(46px, 9vw, 84px); text-align: center; text-shadow: var(--shadow); }
.page-sub { text-align: center; color: var(--ink-soft); font-weight: 600; text-shadow: var(--shadow); margin-bottom: 18px; }
.section-h { font-family: var(--brush); font-size: 34px; color: #fff; text-shadow: var(--shadow); margin: 22px 0 12px; display: flex; justify-content: space-between; align-items: baseline; }

.controls { display: flex; gap: 10px; justify-content: center; margin-bottom: 18px; }
.btn { font-family: var(--mono); font-size: 12px; color: #fff; text-decoration: none; background: var(--accent); border: 0; border-radius: 8px; padding: 9px 16px; cursor: pointer; box-shadow: var(--shadow); }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.4); }

/* featured strip */
.fstrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.fstrip a { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: #dde4ee; box-shadow: 0 4px 16px rgba(20,40,70,0.3); }
.fstrip img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.fstrip a:hover img { transform: scale(1.05); }

/* collections grid */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.ccard { display: block; background: var(--card); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--text); box-shadow: 0 6px 22px rgba(20,40,70,0.3); transition: transform .12s; }
.ccard:hover { transform: translateY(-3px); }
.ccard .cover { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #dde4ee; display: block; }
.ccard .body { padding: 14px 16px 18px; }
.ccard h3 { font-family: var(--brush); font-size: 28px; line-height: 1; margin-bottom: 4px; }
.ccard .desc { color: var(--text-soft); font-size: .92rem; }
.ccard .count { font-family: var(--mono); font-size: 11px; color: #7c8aa0; margin-top: 8px; }

.muted { color: var(--ink-soft); font-family: var(--mono); font-size: 13px; padding: 16px; text-align: center; text-shadow: var(--shadow); }

/* collection page */
.chero { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 16px; box-shadow: 0 8px 30px rgba(20,40,70,0.4); }
.chero img { width: 100%; max-height: 320px; object-fit: cover; display: block; background: #dde4ee; }
.chero .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 24px 18px; background: linear-gradient(transparent, rgba(10,20,40,0.8)); }
.chero h1 { font-family: var(--brush); font-size: clamp(38px, 7vw, 64px); line-height: 1; }
.chero p { color: var(--ink-soft); max-width: 640px; }

/* long-scroll artworks */
.works { display: flex; flex-direction: column; gap: 26px; }
.work { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 6px 22px rgba(20,40,70,0.3); }
.work a.img { display: block; }
.work img { width: 100%; object-fit: contain; max-height: 78vh; display: block; background: #11161f; }
.work .meta { padding: 12px 18px 16px; color: var(--text); }
.work .meta h3 { font-family: var(--brush); font-size: 26px; line-height: 1.05; }
.work .meta .cap { color: var(--text-soft); }
.work .meta .sub { font-family: var(--mono); font-size: 11px; color: #7c8aa0; margin-top: 4px; }

/* viewer */
.viewer { background: #0e1320; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 50px rgba(0,0,0,0.5); }
.viewer .stage { display: flex; align-items: center; justify-content: center; background: #0a0e17; min-height: 40vh; }
.viewer .stage img { max-width: 100%; max-height: 82vh; object-fit: contain; display: block; }
.viewer .info { padding: 20px 24px 26px; color: #e8edf6; }
.viewer .info h1 { font-family: var(--brush); font-size: clamp(34px, 6vw, 54px); line-height: 1; }
.viewer .info .cap { color: #b9c4d6; font-size: 1.1rem; margin: 4px 0 10px; }
.viewer .info .desc { color: #cdd6e4; line-height: 1.7; max-width: 680px; }
.viewer .info .meta { font-family: var(--mono); font-size: 12px; color: #8b97ac; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.viewer .related { margin-top: 16px; }
.viewer .related a { color: var(--secondary); font-weight: 700; text-decoration: none; }
.viewer .related a:hover { text-decoration: underline; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.pager a, .pager span { flex: 1; background: var(--card); color: var(--text); text-decoration: none; border-radius: 10px; padding: 12px 16px; box-shadow: 0 4px 14px rgba(20,40,70,0.25); }
.pager a.next { text-align: right; }
.pager .dir { font-family: var(--mono); font-size: 11px; color: #7c8aa0; text-transform: uppercase; }
.pager .t { font-weight: 700; }
.backlink { display: inline-block; margin-top: 18px; color: #fff; font-family: var(--mono); font-size: 12px; text-shadow: var(--shadow); text-decoration: none; }
.backlink:hover { text-decoration: underline; }

/* site footer — Wiki/Guestbook, then smaller social links */
.site-foot { max-width: 1100px; margin: 50px auto 0; padding: 24px 20px 30px; text-align: center; border-top: 1px solid rgba(255,255,255,0.25); }
.site-foot .foot-links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.site-foot .foot-links a { font-family: var(--brush); font-size: 22px; color: #fff; text-decoration: none; text-shadow: var(--shadow); }
.site-foot .foot-links a:hover { text-decoration: underline; }
.site-foot .foot-socials { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.site-foot .foot-socials a { font-family: var(--mono); font-size: 11px; letter-spacing: .4px; color: var(--ink-soft); text-decoration: none; text-shadow: var(--shadow); }
.site-foot .foot-socials a:hover { color: #fff; }

@media (max-width: 540px) {
  .topbar { padding: 12px 16px; }
  .pager { flex-direction: column; }
}
