/* markbednarski.com v3. Rules: Website Design Standard, Mockup A. One family, two weights, one blue.
   No cards, boxes, bands, shadows, gradients, icons, rounded corners or animation. */
@font-face {
  font-family: "Libre Franklin";
  src: url("/assets/fonts/LibreFranklin-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root { --ink: #1b1b1b; --grey: #5c5c5c; --rule: #d6d6d6; --blue: #1f4e7a; --paper: #ffffff; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  font-family: "Libre Franklin", Helvetica, Arial, sans-serif;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
b { font-weight: 600; }
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
img { display: block; width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 48px; }
/* Accessibility: the skip link shows only when a keyboard reaches it; .vh is read aloud, never shown. */
.skip { position: absolute; left: 8px; top: -100px; padding: 8px 12px; background: var(--paper); font-size: 16px; }
.skip:focus { top: 8px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Masthead */
header.mast { border-bottom: 1px solid var(--ink); }
header.mast .wrap { display: flex; justify-content: space-between; align-items: baseline; padding-top: 28px; padding-bottom: 18px; }
.name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
nav a { color: var(--ink); text-decoration: none; font-size: 15px; margin-left: 28px; padding: 4px 0; }  /* 24px targets (WCAG 2.5.8) */
nav a:hover { text-decoration: underline; }
nav a.on { border-bottom: 2px solid var(--blue); padding-bottom: 3px; text-decoration: none; }

/* Page structure: margin column, reading column, hairlines between sections */
section { padding: 56px 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }
.grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 56px; }
/* Home, Where I fit: the photograph takes the left, the label sits above the text; no margin column.
   The photo gets its 540px first and gives way only when the text would drop under 280px. */
.portrait { display: grid; grid-template-columns: minmax(0, 540px) minmax(280px, 1fr); column-gap: 56px; align-items: start; }
.portrait .margin { padding-top: 0; margin-bottom: 14px; }
.margin { font-size: 14px; color: var(--grey); line-height: 1.5; padding-top: 6px; }
.margin h2, .margin .tag { font-size: 14px; line-height: 1.5; font-weight: 600; letter-spacing: 0; color: var(--ink); margin: 0; }

/* Type */
h1 { font-size: 44px; line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; max-width: 760px; }
h1.page { font-size: 36px; margin-bottom: 14px; }
.page + .body { margin-top: 22px; }
.lead { font-size: 23px; line-height: 1.5; max-width: 720px; margin-top: 22px; }
.lead-p { font-size: 23px; line-height: 1.5; }
.body p { max-width: 660px; margin-bottom: 18px; }
.body p:last-child { margin-bottom: 0; }
.crumb { font-size: 14px; color: var(--grey); margin-bottom: 14px; }
.crumb a { color: var(--grey); }
.said { font-size: 21px; line-height: 1.45; max-width: 620px; padding-left: 20px; border-left: 3px solid var(--blue); margin-top: 8px; }
.next { font-size: 16px; text-align: right; }
.more { font-size: 16px; margin-top: 18px; }
.contact-line { font-size: 17px; overflow-wrap: anywhere; }
.body + .contact-line { margin-top: 28px; }
.sep { color: var(--grey); padding: 0 6px; }

/* Photographs */
figcaption { font-size: 13px; color: var(--grey); line-height: 1.45; padding-top: 8px; }
figure.column { max-width: 520px; margin-top: 36px; }

/* Three changes of ownership */
table.owners { width: 100%; border-collapse: collapse; font-size: 17px; }
table.owners td { padding: 16px 16px 16px 0; border-top: 1px solid var(--rule); vertical-align: top; }
table.owners td:last-child { padding-right: 0; }
table.owners tr:last-child td { border-bottom: 1px solid var(--rule); }
table.owners td.y { width: 80px; font-weight: 600; font-variant-numeric: tabular-nums; }
table.owners td.c { width: 280px; }
table.owners td.c a { font-weight: 600; }
.role { font-size: 13px; color: var(--grey); line-height: 1.45; display: inline-block; margin-top: 4px; }

/* Chapters page: Formation in full, then one block per chapter */
h2.block { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.block + .lead { margin-top: 14px; }
.lead + .body { margin-top: 28px; }
.block + figure.column { margin-top: 22px; }
/* Formation: the whole 3:4 photo beside the text, the same height. Text from 537px to 568px wide is 541px tall and
   406 x 541 is 3:4, so a change to this text means new numbers here. The photo is out of the flow so it cannot
   stretch the row, and it still matches if another browser wraps a line differently. The caption hangs in the
   section's padding. The position keeps the face and the starter's pistol in frame in the phone crop. */
.portrait.fit { grid-template-columns: minmax(0, var(--photo, 406px)) minmax(280px, 1fr); align-items: stretch; }
.fit figure { position: relative; }
.fit figure img { position: absolute; top: 0; left: 0; height: 100%; object-fit: cover; object-position: 50% 8%; }
.fit figcaption { position: absolute; top: 100%; left: 0; }
/* How I think: the same, with its own numbers. Text from 488px to 608px wide is 509px tall and 339 x 509 is this
   photo's shape. Wider text is shorter, and that would leave only 281 x 422. */
.think { --photo: 339px; }
.think > div { max-width: 608px; }
.think figure img { object-position: 50% 3%; }
/* Below this width the text wraps longer than the photo: the whole photo wins over the same height. */
@media (min-width: 761px) and (max-width: 1110px) {
  .portrait.fit { align-items: start; }
  .fit figure, .fit figure img, .fit figcaption { position: static; }
  .fit figure img { height: auto; }
}

/* The sale */
.facts { font-size: 16px; max-width: 660px; border-top: 1px solid var(--ink); margin-top: 8px; }
.facts div { display: grid; grid-template-columns: 200px minmax(0, 1fr); padding: 10px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--grey); }

/* Writing */
.writing { list-style: none; }
.writing li { padding: 14px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 160px minmax(0, 1fr); column-gap: 24px; }
.writing li:last-child { border-bottom: 1px solid var(--rule); }
.writing time { color: var(--grey); font-size: 15px; font-variant-numeric: tabular-nums; padding-top: 2px; }
/* The Writing page: a wall of small squares, the list beside it with the date above each title. Never wider than
   the photos on the Chapters page. */
.fitw { display: grid; grid-template-columns: minmax(0, 400px) minmax(280px, 1fr); grid-template-rows: auto auto 1fr; column-gap: 56px; align-items: start; }
.fitw figure { grid-column: 1; grid-row: 1 / span 3; }
.fitw h1, .fitw .intro, .fitw > ul { grid-column: 2; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs a { display: block; }
.intro { margin-bottom: 22px; }
.writing.dated li { display: block; }
.writing.dated time { display: block; font-size: 14px; padding-top: 0; margin-bottom: 2px; }

/* Footer */
footer { border-top: 1px solid var(--ink); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 24px; padding-top: 18px; padding-bottom: 40px; font-size: 14px; color: var(--grey); }
footer a { color: var(--grey); padding: 4px 0; }  /* 24px targets, as in the navigation */
.dated { font-size: 14px; color: var(--grey); }

/* Chapters header: the second line stays one line at laptop width and up */
@media (min-width: 1000px) {
  .lead.oneline { max-width: none; white-space: nowrap; }
}

/* Phone: the margin column moves above the text; same rules. The navigation stays on one line. */
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  header.mast .wrap { display: block; padding-top: 20px; padding-bottom: 14px; }
  nav { display: flex; justify-content: space-between; margin-top: 10px; }
  nav a { margin-left: 0; font-size: clamp(11px, 3.45vw, 15px); white-space: nowrap; }
  section { padding: 36px 0; }
  .grid, .portrait { display: block; }
  .margin { padding-top: 0; margin-bottom: 14px; }
  .margin:empty { display: none; }
  h1 { font-size: 32px; line-height: 1.15; }
  .lead, .lead-p { font-size: 20px; }
  .lead { margin-top: 16px; }
  h1.page { font-size: 32px; }
  .portrait figure { margin-bottom: 28px; }
  .fitw { display: block; }
  .fitw figure { margin-bottom: 28px; }
  .fit figure, .fit figure img, .fit figcaption { position: static; }
  .fit figure img { height: 60vw; }
  .think figure img { height: 102vw; object-position: 50% 21%; }  /* 60vw would lose his crossed arms */
  table.owners, table.owners tbody, table.owners tr, table.owners td { display: block; width: auto; }
  table.owners tr { padding: 14px 0; border-top: 1px solid var(--rule); }
  table.owners tr:last-child { border-bottom: 1px solid var(--rule); }
  table.owners td, table.owners tr:last-child td { padding: 0; border: 0; }
  table.owners td.c { width: auto; margin: 2px 0 8px; }
  table.owners td.y { width: auto; }
  .facts div { grid-template-columns: 100px minmax(0, 1fr); }
  .writing li { display: block; }
  .writing time { display: block; padding-top: 0; }
  .next { text-align: left; }
  .contact-line a { display: block; }
  .contact-line .sep { display: none; }
  footer .wrap { padding-bottom: 28px; }
}
