/*
Theme Name: Scatter
Description: A photographer's collage theme. Photos are scattered down the page at different sizes and positions on a warm grey ground. The bio paragraph is fixed to the bottom of the screen and the menu is fixed top right. Click a photo for a white viewer with round arrow buttons.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scatter
*/

:root {
  --ink: #7a4916;
  --page-bg: #eeebe7;
  --fs: 15px;
  --pad: 14px;
  --bio-h: 80px;
  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lb-open { overflow: hidden; }
body { margin: 0; background: var(--page-bg); color: var(--ink); font: 700 var(--fs)/1.04 var(--display); font-stretch: 112%; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--page-bg); padding: 8px 14px; z-index: 200; }
.skip:focus { top: 12px; }

/* ---------- Menu: fixed, right aligned, stacked ---------- */
.sc-nav { position: fixed; top: var(--pad); right: var(--pad); z-index: 40; text-align: right; }
.sc-nav ul { list-style: none; margin: 0; padding: 0; }
.sc-nav a { display: block; }
.sc-nav .current-menu-item > a, .sc-nav .current_page_item > a, .sc-nav .current-cat > a, .sc-nav .current > a { text-decoration: underline; text-underline-offset: 2px; }
.nav-bottom .sc-nav { top: auto; bottom: var(--pad); }
.sc-nav .sub-menu { margin-top: .15em; opacity: .8; }

/* ---------- Bio paragraph: fixed to the bottom of the screen ---------- */
.sc-bio { position: fixed; left: var(--pad); right: var(--pad); bottom: var(--pad); z-index: 40; max-width: 1100px; margin: 0; pointer-events: none; }
.sc-bio a { pointer-events: auto; text-decoration: underline; text-underline-offset: 2px; }
.sc-bio__name { display: inline-block; margin-right: 6.5em; }
.nav-bottom .sc-bio { right: calc(var(--pad) + 9em); }
.bio-backed .sc-bio { left: 0; right: 0; max-width: none; padding: 12px var(--pad) var(--pad); bottom: 0; background: var(--page-bg); pointer-events: auto; }
.bio-backed.nav-bottom .sc-bio { right: 0; padding-right: calc(var(--pad) + 9em); }
.bio-end .sc-bio { position: static; max-width: 1100px; padding: 90px var(--pad) var(--pad); background: none; }

/* ---------- Scattered collage ---------- */
.sc-main { padding: 64px var(--pad) calc(var(--bio-h) + 40px); min-height: 100vh; }
.bio-end .sc-main { padding-bottom: 0; min-height: 0; }
.sc-row { display: flex; flex-wrap: wrap; align-items: flex-start; margin-bottom: var(--mb, 80px); }
.sc-item { display: block; width: calc(var(--w) * 1%); margin-top: var(--dy, 0px); cursor: zoom-in; }
.sc-item img { display: block; width: 100%; height: auto; }
.sc-empty { color: var(--ink); }
.pagination { padding-top: 10px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.page-numbers.current { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Text pages (CV and posts) ---------- */
.sc-text { max-width: 900px; padding: 64px var(--pad) calc(var(--bio-h) + 40px); }
.bio-end .sc-text { padding-bottom: 0; }
.sc-text h1 { font-size: 1em; margin: 0 0 1.4em; }
.entry-content { font-weight: 700; line-height: 1.12; overflow-wrap: break-word; }
.entry-content > * { margin-top: 0; margin-bottom: 1em; }
.entry-content img { display: block; height: auto; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content figure { margin-left: 0; margin-right: 0; }
figcaption { margin-top: 6px; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.post-navigation { margin-top: 2em; }
.post-navigation .nav-links { justify-content: space-between; }

/* ---------- Viewer: white, centered photo, round buttons ---------- */
.lb { position: fixed; inset: 0; z-index: 90; background: #fff; }
.lb[hidden] { display: none; }
.lb__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px 72px; }
.lb__img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb__btn { position: absolute; z-index: 2; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb__btn:hover { background: rgba(0, 0, 0, .34); }
.lb__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb__x { top: 14px; right: 18px; }
.lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 700px) {
  :root { --fs: 13px; --pad: 12px; }
  .sc-main { padding-top: 56px; }
  .sc-item { width: max(30%, min(100%, calc(var(--w) * 2.4%))); margin-top: calc(var(--dy, 0px) * .5); }
  .sc-row { margin-bottom: calc(var(--mb, 80px) * .6); }
  .sc-bio__name { margin-right: 3em; }
  .nav-bottom .sc-bio { right: var(--pad); bottom: calc(var(--pad) + 6em); }
  .lb__stage { padding: 14px 10px; }
}
