/* Skeleton styles only: readable, accessible, 320px-safe. The visual layer
   (zoom, lanes, promo paging) comes later and builds on these classes. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page-bg); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--text-body); line-height: 1.6;
  overflow-wrap: break-word;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--accent-start); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--page-bg); padding: .75rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* heading ladder: golden-ratio tokens, clamped so 320px never overflows */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; font-variation-settings: 'opsz' var(--opsz-heading); }
.page-title { font-size: clamp(var(--text-h4), 9vw, var(--text-h3)); font-variation-settings: 'opsz' var(--opsz-display); }
h2 { font-size: clamp(var(--text-h5), 5vw, var(--text-h4)); }
h3 { font-size: var(--text-h5); }
h4 { font-size: 1.25rem; }

/* light-background pages: raw-silk ground, white cards. Applied by the
   bm_tint_body filter in functions.php (posts, About, Colophon, Privacy). */
.bm-tint { --page-bg: var(--surface-tint); --card-bg: var(--surface-raised); }

/* header + nav */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-block: 1rem; }
.site-title { font-family: var(--font-serif); font-size: 1.5rem; text-decoration: none; color: var(--ink); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: .5rem 0; text-decoration: none; color: var(--ink); }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }
.site-nav .cta a { background: var(--accent-start); color: var(--on-accent-start); padding: .5rem 1rem; }

/* three doors */
.doors { display: grid; gap: 1px; background: var(--border); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); border-block: 1px solid var(--border); }
.door { background: var(--page-bg); padding: clamp(1.5rem, 5vw, 3rem); text-decoration: none; color: var(--ink); display: block; }
.door:hover { background: var(--card-bg); }
.door h2 { margin-bottom: .25em; }

.section { padding-block: clamp(2rem, 6vw, 4rem); }
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); list-style: none; margin: 0; padding: 0; }
.card { background: var(--card-bg); border: 1px solid var(--border); padding: 1.25rem; height: 100%; }
.card a { text-decoration: none; color: inherit; }
.meta { font-family: var(--font-mono); font-size: var(--text-meta); color: var(--text-tertiary); }
.filter { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.filter a { display: inline-block; padding: .4rem .9rem; border: 1px solid var(--border-strong); text-decoration: none; color: var(--ink); }
.filter a[aria-current="true"] { background: var(--ink); color: var(--page-bg); }

.site-footer { border-top: 1px solid var(--border); padding-block: 2rem; color: var(--text-secondary); }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: 0; margin: 0; }
.entry-content { max-width: 42rem; }
.entry-content > * + * { margin-top: 1.25em; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.lead { font-size: clamp(1.125rem, 3vw, 1.5rem); max-width: 40rem; color: var(--text-secondary); }

/* project page */
.project-facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1.5rem; margin: 1.5rem 0; max-width: 42rem; }
.project-facts dt { text-transform: uppercase; letter-spacing: var(--label-tracking); font-size: var(--label-size); font-weight: var(--label-weight); color: var(--text-tertiary); padding-top: .2em; }
.project-facts dd { margin: 0; font-family: var(--font-sans); }
@media (max-width: 30rem) { .project-facts { grid-template-columns: 1fr; } .project-facts dd { margin-bottom: .5rem; } }
.project-glance { max-width: 42rem; margin: 2rem 0; padding: 1.25rem 1.5rem; background: var(--card-bg); border-left: 4px solid var(--accent-start); }
.project-glance h2 { font-size: var(--text-h6); font-family: var(--font-sans); text-transform: uppercase; letter-spacing: var(--label-tracking); font-weight: var(--label-weight); margin-bottom: .75rem; }
.project-glance ul { margin: 0; padding-left: 1.1rem; }
.project-short p { margin: 0 0 1em; }
.entry-content img { display: block; margin-block: 1.5rem; }
