/* fractal.batjorge.com static pages, on top of /assets/bj.css (batjorge.com style) */
.brand .logo.cv { background: none; }
.brand .logo canvas { width: 100%; height: 100%; display: block; }
.topbar .btn-icon { display: inline-grid; place-items: center; text-decoration: none; }

/* stream heading */
.stream-head { margin: .5rem 0 1.25rem; }
.stream-head .kicker { font-size: .72rem; font-weight: 800; letter-spacing: .12rem; text-transform: uppercase; color: var(--sb-primary); }
.stream-head h1 { color: var(--sb-strong); font-weight: 800; margin: .2rem 0 .3rem; }
.stream-head .sub { color: var(--sb-muted); margin: 0; }

/* gallery wall */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.tile { display: block; text-decoration: none; color: inherit; }
.tile .img { display: block; aspect-ratio: 1; border-radius: .5rem; overflow: hidden; background: var(--sb-card-head); border: 1px solid var(--sb-border); }
.tile .img { position: relative; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.tile:hover img, .tile:focus-visible img, .tile:hover video { transform: scale(1.05); }
.tile .badge-media { position: absolute; right: .5rem; bottom: .5rem; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; font-size: 1.1rem; }
.tile .noimg.yt { flex-direction: column; color: #ff4d4d; } .tile .noimg.yt small { color: var(--sb-muted); font-size: .7rem; }
.tile .noimg { display: grid; place-items: center; height: 100%; font-size: 2rem; color: var(--sb-muted); }
.tile .t { display: block; font-weight: 700; font-size: .9rem; color: var(--sb-strong); margin-top: .45rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .d { display: block; font-size: .72rem; color: var(--sb-muted); font-family: var(--mono); }

/* pager */
.pager { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin: 2rem 0 1rem; }
.pager .pg { padding: .35rem .7rem; border-radius: .4rem; border: 1px solid var(--sb-border); background: var(--sb-card); color: var(--sb-text); text-decoration: none; font-weight: 700; font-size: .85rem; }
.pager a.pg:hover { border-color: var(--sb-primary); color: var(--sb-primary); }
.pager .cur { background: var(--sb-primary); border-color: var(--sb-primary); color: #0f1712; }
.pager .gap { padding: .35rem .2rem; color: var(--sb-muted); }

/* post */
.post { max-width: 72rem; margin: 0 auto; }
.post-head h1 { color: var(--sb-strong); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: .25rem 0 .35rem; }
.post-head .meta { color: var(--sb-muted); font-size: .85rem; font-weight: 600; margin-bottom: 1.25rem; }
.post-head .meta a { color: var(--sb-muted); text-decoration: none; }
.post-head .meta a:hover { color: var(--sb-primary); }
.post-body { color: var(--sb-text); }
.post-body img, .post-body video { max-width: 100%; max-height: 86vh; width: auto; height: auto; border-radius: .5rem; box-shadow: var(--sb-shadow); display: block; margin: 0 auto 1rem; }
.post-body figure a { display: block; }
.post-body figure { margin: 0 0 1rem; }
.post-body figcaption { color: var(--sb-muted); font-size: .8rem; text-align: center; margin-top: .4rem; }
.post-body iframe { max-width: 100%; aspect-ratio: 16 / 9; height: auto; width: 100%; border: 0; border-radius: .5rem; }
.post-body p { max-width: 46rem; margin-left: auto; margin-right: auto; }
.post-body .wp-block-gallery, .post-body .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.license { text-align: center; color: var(--sb-muted); font-size: .82rem; margin: .5rem 0 1rem; }
.license a { color: var(--sb-muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: 1.5rem; }
.chips .chip { text-decoration: none; font-size: .75rem; }
.chips .chip:hover { border-color: var(--sb-primary); color: var(--sb-primary); }
.postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0 2rem; }
.postnav a { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1px solid var(--sb-border); border-radius: .5rem; background: var(--sb-card); text-decoration: none; color: var(--sb-strong); font-weight: 700; min-width: 0; }
.postnav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postnav a small { display: block; color: var(--sb-muted); font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .05rem; }
.postnav .older { justify-content: flex-end; text-align: right; }
.postnav a:hover { border-color: var(--sb-primary); }
.comments { max-width: 46rem; margin: 0 auto 2rem; }
.comments h2 { color: var(--sb-strong); font-weight: 800; }
.cmt { border-left: 3px solid var(--sb-border); padding: .3rem 0 .3rem .8rem; margin-bottom: .8rem; font-size: .9rem; }
.cmt .who { font-weight: 700; color: var(--sb-strong); font-size: .85rem; }
.cmt .when { color: var(--sb-muted); font-weight: 400; font-family: var(--mono); font-size: .72rem; margin-left: .3rem; }
.page-article .post-body { max-width: 46rem; margin: 0 auto; }
@media (max-width: 575.98px) { .wall { grid-template-columns: repeat(2, 1fr); gap: .6rem; } .postnav { grid-template-columns: 1fr; } }

/* top bar buttons that need JavaScript stay hidden without it */
.topbar .btn-icon[hidden] { display: none; }
.topbar button.btn-icon { cursor: pointer; }

/* page slider (replaces the row of page numbers when JavaScript runs) */
.pager.has-slider { flex-wrap: nowrap; align-items: center; gap: .8rem; }
.pager.has-slider .pg:not([rel]), .pager.has-slider .gap { display: none; }
.pager.has-slider .pg[rel] { white-space: nowrap; }
.pgslide { flex: 1 1 18rem; max-width: 40rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.pgslide input[type=range] { width: 100%; accent-color: var(--sb-primary); cursor: pointer; }
.pgslide .lbl { font-family: var(--mono); font-size: .8rem; color: var(--sb-strong); }
.pgslide .ends { display: flex; justify-content: space-between; width: 100%; font-size: .68rem; color: var(--sb-muted); text-transform: uppercase; letter-spacing: .05rem; }

/* fullscreen slideshow */
body.ss-open { overflow: hidden; }
.ss { position: fixed; inset: 0; z-index: 2000; background: #000; color: #fff; }
.ss-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ss-img, .ss-vid { max-width: 100%; max-height: 100%; object-fit: contain; transition: opacity .6s ease; }
.ss-img.loading { opacity: 0; }
.ss-cap { position: absolute; left: 1.25rem; bottom: 4.5rem; color: #fff; text-decoration: none; text-shadow: 0 1px 4px #000; opacity: 0; transition: opacity .8s ease; max-width: calc(100% - 2.5rem); }
.ss-cap.on { opacity: .92; }
.ss-cap b { font-weight: 800; font-size: 1.1rem; }
.ss-cap span { font-family: var(--mono); font-size: .8rem; opacity: .75; margin-left: .5rem; }
.ss-bar { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; align-items: center; gap: .2rem;
  background: rgba(18, 18, 18, .72); padding: .3rem .45rem; border-radius: 2rem; transition: opacity .4s ease; }
.ss-bar button { background: transparent; color: #fff; border: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%; font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; }
.ss-bar button:hover, .ss-bar button:focus-visible { background: rgba(255, 255, 255, .14); outline: none; }
.ss-bar button[aria-pressed="true"] { color: var(--sb-primary); }
.ss-bar select { background: #222; color: #fff; border: 1px solid #444; border-radius: 1rem; padding: .2rem .4rem; font-size: .8rem; margin: 0 .2rem; }
.ss.idle { cursor: none; }
.ss.idle .ss-bar { opacity: 0; }
@media (max-width: 575.98px) { .ss-bar button { width: 2.1rem; height: 2.1rem; } .ss-bar select { display: none; } .pager.has-slider { gap: .4rem; } }
.pager.pager-top { margin: 0 0 1.25rem; }

/* one-line heading for categories, tags and months */
.stream-head.compact { margin: .25rem 0 .75rem; }
.stream-head.compact h1 { font-size: 1.35rem; margin: 0; }
.stream-head .count { font-size: .82rem; font-weight: 600; color: var(--sb-muted); margin-left: .35rem; }

/* one screen, no scrolling: as many tiles as fit (set by fractal.js; without JavaScript the normal pages) */
.pager[hidden] { display: none !important; }
html.fit, html.fit body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.fit body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
html.fit body > main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-bottom: .4rem; }
html.fit .wall { flex: 1 1 auto; min-height: 0; overflow: hidden; align-content: start; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
html.fit .wall .tile .img { aspect-ratio: auto; height: var(--ih, 200px); }
html.fit body > footer { flex: 0 0 auto; flex-wrap: nowrap !important; gap: .3rem 1.2rem !important; padding-top: .3rem !important; padding-bottom: .3rem !important;
  font-size: .72rem; white-space: nowrap; overflow: hidden; }
html.fit body > footer span { overflow: hidden; text-overflow: ellipsis; }
.fitbar { display: flex; align-items: center; gap: .8rem; margin: 0 0 .7rem; }
.fitbar[hidden] { display: none; }
.fitbar .pg { padding: .35rem .7rem; border-radius: .4rem; border: 1px solid var(--sb-border); background: var(--sb-card); color: var(--sb-text);
  font-weight: 700; font-size: .85rem; white-space: nowrap; cursor: pointer; }
.fitbar .pg:hover:not(:disabled) { border-color: var(--sb-primary); color: var(--sb-primary); }
.fitbar .pg:disabled { opacity: .35; cursor: default; }
.fitbar .pgslide { flex: 1 1 auto; max-width: none; }
@media (max-width: 575.98px) { .fitbar { gap: .4rem; } .fitbar .pg { padding: .3rem .5rem; font-size: 0; } .fitbar .pg i { font-size: 1rem; } html.fit body > footer span:not(:nth-child(2)) { display: none; } }

/* placeholders while pictures load (fractal.js sets html.js; without it pictures show as usual) */
@keyframes bj-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
html.js .tile .img:not(.done), html.js .post-body img.ld {
  background: linear-gradient(100deg, var(--sb-card-head) 35%, var(--sb-border) 50%, var(--sb-card-head) 65%) var(--sb-card-head);
  background-size: 200% 100%; animation: bj-shimmer 1.3s linear infinite; }
html.js .post-body img.ld { min-height: 6rem; }
html.js .tile img, html.js .tile video { opacity: 0; transition: opacity .45s ease, transform .4s ease; }
html.js .tile img.loaded, html.js .tile video.loaded { opacity: 1; }
@keyframes bj-spin { to { transform: rotate(360deg); } }
.ss-spin { display: none; position: absolute; left: 50%; top: 50%; width: 2.6rem; height: 2.6rem; margin: -1.3rem 0 0 -1.3rem;
  border: 3px solid rgba(255, 255, 255, .18); border-top-color: var(--sb-primary); border-radius: 50%; animation: bj-spin .9s linear infinite; }
.ss-img.loading ~ .ss-spin { display: block; }
@media (prefers-reduced-motion: reduce) {
  html.js .tile .img:not(.done), html.js .post-body img.ld { animation: none; background: var(--sb-card-head); }
  .ss-spin { animation-duration: 2.5s; }
}
