/* Oleh Bolyuk — site stylesheet. Built on the Classical design-system tokens
   (../_ds/classical-.../styles.css) plus the interaction classes drafted in
   the design canvas (Oleh Bolyuk Site.dc.html). */

/* — 2026 redesign: cooler, quieter re-tune of the Classical tokens (see
   ref/Oleh Bolyuk Landing.html) — off-white ground, near-black ink, a single
   neutral gray standing in for what used to be the ink-blue accent, soft
   rounded corners instead of square-cut ones, and a serif reserved for a
   few editorial accents (hero statement, publication titles, the contact
   email) against a system-font sans everywhere else. Overriding the tokens
   here — rather than editing the _ds bundle — keeps this a site-specific
   layer on top of the shared design system. */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;1,6..72,300&display=swap');

:root {
  --color-bg: #ffffff;
  --color-surface: #f7f7f8;
  --color-text: #111111;
  --color-divider: #ececee;
  --color-accent: #6b7280;
  --color-accent-700: #000000;
  --color-accent-300: #9ca3af;

  --font-heading: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 14px;
}

body { margin: 0; }

/* — serif accent: reserved for the hero statement, publication titles and
   the contact email — everything else stays in the system sans. — */
.ob-serif { font-family: var(--font-serif); font-weight: 300; }

/* — a catalogue plate now sits in a softly rounded frame rather than a
   square-cut one; the hairline border from the base .plate class is subtle
   enough at the new lighter divider tone to read as an edge, not a box. — */
.plate { border-radius: var(--radius-lg); }
.ob-justtile.plate { border-radius: var(--radius-md); }

/* — visually hidden but still readable by screen readers and search-engine
   crawlers: for image captions that add SEO/accessibility context without
   cluttering the visual layout. — */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

a { color: var(--color-accent); }
a:hover { color: var(--color-accent-700); }

.ob-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* — captions (used across stat blocks / meta labels; not shipped in
   styles.css so defined here) — */
.ob-cap {
  font-family: var(--font-mono);
  font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}

/* — nav: plain text, no chrome — a link just darkens on hover, the current
   page just reads black; no underline, no tracked caps. — */
.ob-nav a { color: inherit; text-decoration: none; padding-bottom: 0; border-bottom: none; transition: color .25s; }
.ob-nav a:hover, .ob-nav a[aria-current="page"] { color: var(--color-text); border-bottom-color: transparent; }

/* — image interactions — quiet: a catalogue plate doesn't lift off the
   page or brighten on hover, it just enlarges very slightly. — */
.ob-grow { overflow: hidden; display: block; }
.ob-grow img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.ob-grow:hover img { transform: scale(1.025); }

/* — index / row hovers — */
.ob-idx { transition: background .35s, padding-left .35s; }
.ob-idx:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); padding-left: 20px; }
.ob-idx:hover .ob-arrow { opacity: 1; transform: translateX(0); }
.ob-arrow { opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s; }
.ob-link { color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-divider); transition: border-color .3s; }
.ob-link:hover { border-bottom-color: var(--color-accent); }
.ob-row { transition: background .3s; }
.ob-row:hover { background: color-mix(in srgb, var(--color-accent) 6%, transparent); }
.ob-row:hover .ob-rowt { color: var(--color-accent-700); }
.ob-rowt { transition: color .3s; }

/* — entrance motion — */
@keyframes obrise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes obwipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.ob-rise { animation: obrise 1.1s cubic-bezier(.2,.7,.2,1) both; }
.ob-wipe { animation: obwipe 1.4s cubic-bezier(.4,0,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  .ob-rise, .ob-wipe { animation: none; }
  .ob-grow img, .ob-lift, .ob-idx { transition: none; }
}

/* — marquee (home gallery strip) — */
@keyframes obmarq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ob-marq { display: flex; gap: 22px; width: max-content; animation: obmarq 46s linear infinite; }
.ob-marqwrap:hover .ob-marq { animation-play-state: paused; }

/* — site header: sticky and translucent, so it reads as a thin glass strip
   over the page rather than a fixed bar — matches ref/Oleh Bolyuk Landing.html. — */
.ob-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 72%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}
.ob-headerrow { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 24px; gap: 24px; }
.ob-brand { font-family: var(--font-heading); font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--color-text); text-decoration: none; }
.ob-mainnav { display: flex; align-items: center; gap: 22px; font-family: var(--font-body); font-size: 13.5px; font-weight: 400; color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.ob-menubtn { display: none; }

@media (max-width: 860px) {
  .ob-mainnav { position: absolute; top: 100%; left: 0; right: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-divider); flex-direction: column; align-items: flex-start; gap: 16px; padding: 18px 24px 22px; display: none; }
  .ob-mainnav.is-open { display: flex; }
  .ob-menubtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: transparent; cursor: pointer; }
  .ob-menubtn span, .ob-menubtn::before, .ob-menubtn::after { content: ""; display: block; width: 16px; height: 1px; background: var(--color-text); position: relative; }
  .ob-menubtn::before { transform: translateY(-4px); }
  .ob-menubtn::after { transform: translateY(3px); }
}

/* — footer — */
.ob-footer {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  padding: 40px 24px 48px; font-size: 12.5px;
  color: color-mix(in srgb, var(--color-text) 45%, transparent);
}

/* — misc layout helpers — */
.ob-plate-alt { background: var(--color-surface); }

/* — numbered index badge: research themes, register entries. A content
   marker (a real sequence), never a decoration stamped on a photo. — */
.ob-badge { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border: 1px solid var(--color-text); border-radius: var(--radius-md); font-weight: 500; font-size: 17px; font-variant-numeric: tabular-nums; }

.ob-fields { display: grid; grid-template-columns: repeat(3,1fr); gap: 34px; }
.ob-fields > div + div { border-left: 1px solid var(--color-divider); padding-left: 34px; }
.ob-fields > div:first-child { padding-right: 0; }

/* — grid items default to min-width:auto, which floors their width at the
   longest unbroken run of text inside (a tracked label, a year range like
   "1995–2017") — below that the item refuses to shrink and drags the whole
   row past the viewport instead of just wrapping its text. min-width:0 lets
   them shrink and wrap normally. — */
.ob-fields > div, .ob-statgrid > div, .ob-yearlist > * { min-width: 0; }

/* — justified gallery (Jetpack Tiled Gallery style): rows tile edge to edge
   like a mosaic. Each row's photos are scaled together as one unit — via
   flex-grow proportional to each photo's own aspect ratio, on a row whose
   own aspect-ratio equals that same sum — so the row always fills the full
   width exactly and every photo keeps its true proportions; nothing is
   individually cropped, only jointly scaled. See justifyIntoRows() in
   inc/helpers.php, which decides which photos share a row. Below ~760px
   there's no width left to tile side by side, so it drops to one stacked
   column at each photo's natural shape. — */
.ob-justgrid { display: flex; flex-direction: column; gap: 6px; }
.ob-justrow { display: flex; gap: 6px; }
.ob-justtile { position: relative; margin: 0; min-width: 0; overflow: hidden; flex: var(--ob-aspect, 1) 1 0; }
.ob-justtile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* — a sparse trailing row (see justifyIntoRows' 'stretch' flag) isn't wide
   enough to stretch honestly, so it sits at a plain fixed height instead of
   filling the row width — natural size, left-aligned, wrapping if needed. — */
.ob-justrow--natural { aspect-ratio: auto; height: 260px; flex-wrap: wrap; justify-content: flex-start; }
.ob-justrow--natural .ob-justtile { flex: none; width: auto; height: 100%; aspect-ratio: var(--ob-aspect, 1); }
.ob-justcap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px;
  background: linear-gradient(to top, rgba(19,15,10,.75), transparent);
  color: #faf8f4; font-size: 12.5px; line-height: 1.4;
  opacity: 0; transition: opacity .25s ease;
}
.ob-justcap em { color: #fff; }
.ob-justtile:hover .ob-justcap, .ob-justtile:focus-visible .ob-justcap { opacity: 1; }
@media (max-width: 760px) {
  .ob-justrow { flex-direction: column; aspect-ratio: auto !important; gap: 6px; }
  .ob-justrow--natural { height: auto; }
  .ob-justtile { flex: none; aspect-ratio: var(--ob-aspect, 1); width: 100%; height: auto; }
  .ob-justcap { opacity: 1; position: static; background: none; color: var(--color-text); padding: 10px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .ob-justcap { transition: none; } }

/* — publication filter: plain text tabs, weight and color are the only
   states — no chip, no underline, matches the Works filter in
   ref/Oleh Bolyuk Landing.html. — */
.ob-tagbar { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; }
.ob-tagbar .tag {
  cursor: pointer; background: none; border: none; padding: 0;
  font-size: 13.5px; font-weight: 400; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 45%, transparent); transition: color .2s;
}
.ob-tagbar .tag:hover { color: var(--color-text); }
.ob-tagbar .tag.is-active { color: var(--color-text); font-weight: 500; }
.ob-pubrow[hidden] { display: none !important; }

@media (max-width: 900px) {
  .ob-fields { grid-template-columns: 1fr; gap: 24px; }
  .ob-fields > div + div { border-left: none; padding-left: 0; border-top: 1px solid var(--color-divider); padding-top: 24px; }
}

/* — clickable publication rows: the whole row (not just the inline title
   link) opens the cited source; JS reads data-href, see main.js — */
.ob-pubrow[data-href]:hover { cursor: pointer; }

/* — scroll-reveal: elements fade/rise in as they enter the viewport (see
   main.js IntersectionObserver). Starts hidden only once JS confirms it can
   run the reveal, so content never gets stuck invisible without it. — */
.ob-jsready .ob-reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.ob-jsready .ob-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ob-jsready .ob-reveal { opacity: 1; transform: none; transition: none; }
}

/* — hero & about: a text column paired with a photo-only column has no
   content to balance the photo's height against, so it stacks earlier
   (under ~980px) than the rest — a narrow two-up phase here is exactly
   where the photo ends up floating in leftover space. — */
@media (max-width: 980px) {
  .ob-herogrid { grid-template-columns: 1fr !important; min-height: 0 !important; }
  .ob-herogrid > figure { max-width: 240px !important; margin: 32px auto 0 !important; }

  .ob-aboutgrid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .ob-aboutgrid figure { position: static !important; }
}

/* — responsive multi-column sections — */
@media (max-width: 760px) {
  .ob-split { grid-template-columns: 1fr !important; }
  .ob-split > div { padding: 32px 20px !important; border-right: none !important; border-left: none !important; }
  .ob-split > div + div { border-top: 1px solid var(--color-divider); }

  .ob-statgrid { grid-template-columns: repeat(2, 1fr) !important; row-gap: 28px !important; }

  .ob-yearlist { grid-template-columns: 1fr !important; gap: 6px !important; }
}

/* — comfortable side gutters on phones: the desktop design leans on wide
   44–52px side padding, which eats too much width under ~640px — */
@media (max-width: 640px) {
  .ob-container { padding-left: 16px; padding-right: 16px; }
  .ob-container > div { padding-left: 20px !important; padding-right: 20px !important; }
  h1 { word-break: break-word; }
  .ob-memberstrip span { padding-left: 14px !important; padding-right: 14px !important; }
}

/* — lightbox: click a plate to enlarge, click again (or the backdrop, ✕,
   Escape) to shrink it back. One overlay per page, populated by main.js. — */
[data-lightbox-src] { cursor: zoom-in; }
.ob-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 48px;
  background: rgba(19,15,10,.94);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
}
.ob-lightbox.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.ob-lightbox-img {
  max-width: 100%; max-height: 84vh; object-fit: contain; display: block;
  box-shadow: var(--shadow-lg);
  transform: scale(.94); transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.ob-lightbox.is-open .ob-lightbox-img { transform: scale(1); }
.ob-lightbox-caption {
  position: absolute; left: 24px; right: 24px; bottom: 22px; text-align: center;
  font-size: 13px; color: rgba(250,248,244,.82);
}
.ob-lightbox-caption em { color: #faf8f4; }
.ob-lightbox-close {
  position: absolute; top: 20px; right: 24px; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid rgba(250,248,244,.3); color: #faf8f4;
  font-size: 22px; line-height: 1; cursor: pointer; font-family: var(--font-body);
}
.ob-lightbox-close:hover { border-color: #faf8f4; }
@media (prefers-reduced-motion: reduce) {
  .ob-lightbox, .ob-lightbox-img { transition: none; }
}
