/* The portfolio's print-viewing room, set for reading: the same true neutrals and type, narrower measure.
   Both the placeholder and the real site use this file, so it stays in /public/, which the gate leaves open. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --wall: #f4f4f4;
  --ink: #161616;
  --ink-2: #636363;
  --rule: #dcdcdc;
  --gutter: clamp(20px, 5vw, 80px);
  --measure: 680px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --wall: #161616;
  --ink: #f0f0f0;
  --ink-2: #a3a3a3;
  --rule: #2e2e2e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.desk { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.intro { padding: clamp(72px, 13vw, 200px) 0 clamp(48px, 7vw, 104px); }
.intro h1 {
  margin: 0;
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.25rem, 4.6vw, 4.25rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.intro h1 span { display: block; }
.intro p { margin: 1.25rem 0 0; max-width: 60ch; color: var(--ink-2); }

.empty { margin: 0; max-width: 60ch; color: var(--ink-2); }

.note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 40px;
  padding: clamp(48px, 7vw, 104px) 0 clamp(28px, 3vw, 44px);
  font-size: 0.9375rem;
}
.note p { margin: 0; }
.note-links { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--ink-2); }

/* ---------- The real site (workers/zblog-pages) ---------- */
.inline-link, .post-body a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.intro-small { padding-bottom: clamp(24px, 4vw, 48px); }

.entries { margin: 0; padding: 0; list-style: none; }
.entry { border-top: 1px solid var(--rule); }
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry-link { display: grid; grid-template-columns: 1fr minmax(120px, 34%); gap: 8px 28px; align-items: start; padding: clamp(20px, 3vw, 32px) 0; }
.entry-link:hover { text-decoration: none; }
.entry-link:hover .entry-title { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
/* The list's covers share one shape so the rows line up; the post itself shows the whole photo */
.entry-cover { grid-column: 2; grid-row: 1; display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.entry-text { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 6px; }
.entry-link:not(:has(.entry-cover)) .entry-text { grid-column: 1 / -1; }
.entry-meta { font-size: 0.875rem; color: var(--ink-2); }
.entry-title {
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.015em;
}
.entry-summary { color: var(--ink-2); }

.back { padding: clamp(40px, 7vw, 96px) 0 0; font-size: 0.9375rem; color: var(--ink-2); }
.post-head { padding: clamp(28px, 5vw, 56px) 0 clamp(28px, 4vw, 44px); }
.post-meta { margin: 14px 0 0; font-size: 0.875rem; color: var(--ink-2); }
.post-head h1 {
  margin: 0;
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.025em;
}
.post-summary { margin: 16px 0 0; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); }

.post-body > :first-child { margin-top: 0; }
.post-body p, .post-body ul, .post-body ol, .post-body blockquote { margin: 0 0 1.25em; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: 0.35em; }
.post-body h2, .post-body h3, .post-body h4 {
  margin: 2em 0 0.6em; font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif; font-weight: 500; line-height: 1.2; letter-spacing: -0.015em;
}
.post-body h2 { font-size: 1.625rem; }
.post-body h3 { font-size: 1.3125rem; }
.post-body h4 { font-size: 1.0625rem; }
.post-body blockquote { padding-left: 1.1em; border-left: 2px solid var(--rule); color: var(--ink-2); }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body hr { width: 48px; margin: 2.5em auto; border: 0; border-top: 1px solid var(--ink-2); }
.post-body code { padding: 0.1em 0.35em; border-radius: 3px; background: var(--rule); font-size: 0.9em; }

/* Photos stand a little wider than the text where there's room, and keep their own shape */
.post-body figure, .post-lead {
  --bleed: clamp(0px, (100vw - var(--measure) - 2 * var(--gutter)) / 2, 160px);
  margin: 2.25em calc(-1 * var(--bleed));
}
.post-lead { margin-top: 0; }
/* A tall photo stops at the height of the screen, whole and centred */
.post-body figure img, .post-lead img { display: block; width: auto; max-width: 100%; height: auto; max-height: 88vh; margin: 0 auto; }
.post-body figcaption { margin: 10px var(--bleed) 0; font-size: 0.875rem; color: var(--ink-2); }

@media (max-width: 640px) {
  .entry-link { grid-template-columns: 1fr; }
  .entry-cover, .entry-text { grid-column: 1; grid-row: auto; }
}
