/* blakeb.org — paper, ink, boat-red, one green */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/newsreader-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/newsreader-italic-latin.woff2') format('woff2');
}

:root {
  --paper: #faf7f1;
  --ink: #33302b;
  --ink-soft: #6f6a61;
  --boat-red: #c1271f;
  --birch-green: #79a25a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.19rem;
  line-height: 1.55;
}

main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 5rem 1.25rem 3rem;
}

p { margin: 0 0 1.1em; }

/* first paragraph = thesis (written in italics in the markdown) */
main > p:first-child {
  font-size: 1.45rem;
  line-height: 1.5;
  margin-bottom: 2.4em;
}

a {
  color: var(--boat-red);
  text-decoration: underline dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-style: solid; }

/* a short paragraph introducing a list ("Inspirations:") acts as a header */
main p:has(+ ul) {
  font-weight: 600;
  margin-bottom: 0.6em;
}

h2 {
  font-size: 1.19rem;
  font-weight: 600;
  margin: 2.4em 0 0.6em;
}

ul { margin: 0 0 1.1em; padding-left: 1.2rem; }
li { margin-bottom: 0.45em; }

/* --- in the markdown = a few green crayon dashes */
hr {
  border: none;
  width: 7.5rem;
  height: 0.5rem;
  margin: 3rem 0 1.4rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8'%3E%3Cg stroke-linecap='round' fill='none'%3E%3Cpath d='M2 4h18' stroke='%2379a25a' stroke-width='3.2' opacity='.85'/%3E%3Cpath d='M27 3.4h26' stroke='%2379a25a' stroke-width='2.8' opacity='.6'/%3E%3Cpath d='M60 4.4h14' stroke='%2379a25a' stroke-width='3.4' opacity='.8'/%3E%3Cpath d='M81 3.8h30' stroke='%2379a25a' stroke-width='2.6' opacity='.5'/%3E%3C/g%3E%3C/svg%3E") no-repeat left center / contain;
}

figure {
  margin: 3.2rem 0;
  text-align: center;
}
figure img {
  max-width: min(100%, 30rem);
  height: auto;
  box-shadow: 0 1px 5px rgba(60, 50, 30, 0.18);
}
figure:first-of-type img { transform: rotate(-1.2deg); }
figure:last-of-type img { transform: rotate(0.8deg); }
figcaption {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* a final line written entirely in italics = footer */
main > p:last-child:has(> em:only-child) {
  margin-top: 4.5rem;
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
