/* A post, in the hill's hand: same paper, ink and type; code set in inks. */
:root {
  --paper: #f8f2e4;
  --ink: #2b231c;
  --soft: #6e6152;
  --faint: #a2937f;
  --link: #2f6a45;
  --link-line: rgba(47, 106, 69, 0.35);
  --brass: #c99a2e;
  --card: #fbf6ea;
  --col: 40rem;
  --grain: 0.3;
}
[data-time='morning'] { --paper: #f9f4e8; }
[data-time='afternoon'] { --paper: #f8f0de; }
[data-time='dusk'] { --paper: #f5ecdc; --grain: 0.34; }
[data-time='night'] { --paper: #f0e9dc; --grain: 0.38; --soft: #645a4e; }
[data-season='winter'] { --link: #2f5f62; --link-line: rgba(47, 95, 98, 0.35); }
[data-season='autumn'] { --link: #6a5a24; --link-line: rgba(140, 100, 30, 0.38); }

html { background: var(--paper); }
body { color: var(--ink); background: var(--paper); font: 400 19px/1.66 'Alegreya', 'Alegreya Fallback', ui-serif, Georgia, serif; }
::selection { background: rgba(233, 185, 58, 0.35); }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; text-decoration-style: wavy; }
a:focus-visible { outline: 2px dashed var(--link); outline-offset: 3px; border-radius: 2px; }

.col { max-width: var(--col); margin: 0 auto; padding: 26px 20px 96px; }

.trail, .end .home { font: 600 21px/1.2 'Caveat', 'Caveat Fallback', cursive; }
.trail a, .end .home { color: var(--soft); text-decoration: none; }
.trail a:hover, .end .home:hover { color: var(--ink); }

/* ---- the sketch, a little wider than the column */
.sketch { margin: 10px -60px 0; }
.sketch canvas { width: 100%; aspect-ratio: 720 / 380; height: auto; }
.sketch figcaption { margin: -8px 0 0 calc(60px + 4%); font: 600 20px/1.2 'Caveat', 'Caveat Fallback', cursive; color: var(--soft); transform: rotate(-1.2deg); transform-origin: left; }

/* ---- title */
.title { margin: 30px 0 34px; }
.kicker { margin: 0 0 6px; font: 600 19px/1 'Caveat', 'Caveat Fallback', cursive; color: var(--faint); }
.title h1 { margin: 0; font-weight: 700; font-size: clamp(30px, 5.4vw, 40px); line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
.excerpt { margin: 14px 0 0; font-style: italic; color: var(--soft); }
.tags { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; padding: 0; list-style: none; font: 600 18px/1 'Caveat', 'Caveat Fallback', cursive; color: var(--soft); }
.tags li::before { content: '✦ '; color: var(--brass); font-size: 0.75em; }

/* ---- the text */
.prose h2, .prose h3, .prose h4 { position: relative; isolation: isolate; font-weight: 700; line-height: 1.2; margin: 2em 0 0.55em; }
.prose h2 { font-size: 27px; }
.prose h3 { font-size: 22px; }
.prose h4 { font-size: 19px; color: var(--soft); }
/* the hill's watercolor swatch behind each section heading (wash.css) */
.prose h2 .wash { left: -30px; top: -14px; height: 64px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.2em 0; }
.prose li::marker { color: var(--brass); }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

/* code: inline in a pale ink box; blocks on a card with a ruled ink edge */
.prose code { font: 400 0.8em/1.5 'JetBrains Mono', ui-monospace, monospace; }
.prose :not(pre) > code { padding: 0.08em 0.32em; border-radius: 3px; background: rgba(43, 35, 28, 0.06); box-shadow: inset 0 0 0 1px rgba(43, 35, 28, 0.1); white-space: break-spaces; }
.ink-code {
  margin: 0; padding: 14px 16px 12px; overflow-x: auto;
  background: transparent; border: 1px solid rgba(43, 35, 28, 0.18);
  font-size: 17px; line-height: 1.5;
}
.ink-code:focus-visible { outline: 2px dashed var(--link); outline-offset: 2px; }
.pinned.code, .pinned.code:nth-of-type(even) { padding-bottom: 6px; transform: none; } /* code stays square to the page, so it stays crisp */
.pinned.code figcaption { text-align: right; margin-top: 4px; color: var(--faint); }
.ink-code code { font-size: 0.86em; line-height: 1.5; }
/* the inks: iron-gall for words, sap green for strings, rust for keywords, ochre for numbers */
.hljs-keyword, .hljs-built_in, .hljs-literal { color: #9a3f22; }
.hljs-string, .hljs-symbol { color: #3f6b3a; }
.hljs-number { color: #9a6a12; }
.hljs-comment { color: #8a7d6b; font-style: italic; }
.hljs-title, .hljs-title.function_ { color: #2f5f62; }
.hljs-params, .hljs-variable, .hljs-attr { color: var(--ink); }
.hljs-operator, .hljs-punctuation { color: #5b4f43; }

.end { margin-top: 3.4em; padding-top: 1.2em; border-top: 1px dashed rgba(43, 35, 28, 0.25); }
.end p { margin: 0 0 0.4em; }
.end .write { color: var(--soft); font-style: italic; }

@media (max-width: 760px) {
  .sketch { margin: 8px -20px 0; }
  .sketch figcaption { margin-left: 6%; }
}
@media (max-width: 520px) {
  body { font-size: 17.5px; }
  .prose h2 .wash { left: -20px; }
  .col { padding: 20px 16px 80px; }
  .sketch { margin: 6px -16px 0; }
  .ink-code { font-size: 15.5px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
}

/* a screenshot, pinned to the page like a photo with two strips of tape */
.pinned { position: relative; margin: 1.6em -10px 1.8em; padding: 10px 10px 8px; background: var(--card); border: 1px solid rgba(43, 35, 28, 0.18); box-shadow: 2px 3px 0 rgba(43, 35, 28, 0.1); transform: rotate(-0.4deg); }
.pinned:nth-of-type(even) { transform: rotate(0.5deg); }
.pinned img { display: block; width: 100%; height: auto; border: 1px solid rgba(43, 35, 28, 0.25); }
.pinned figcaption { margin: 8px 2px 0; font: 600 18px/1.25 'Caveat', 'Caveat Fallback', cursive; color: var(--soft); }
.pinned::before, .pinned::after {
  content: ''; position: absolute; top: -9px; width: 74px; height: 20px;
  background: rgba(233, 222, 190, 0.78); box-shadow: 0 1px 1px rgba(43, 35, 28, 0.12);
}
.pinned::before { left: 18px; transform: rotate(-4deg); }
.pinned::after { right: 18px; transform: rotate(5deg); }
@media (max-width: 520px) { .pinned { margin: 1.4em -6px 1.6em; } }

/* a quoted aside, ruled in brass; a break between parts, three small stars */
.prose blockquote { margin: 0 0 1em; padding: 1px 0 1px 16px; border-left: 2px solid rgba(201, 154, 46, 0.55); color: var(--soft); }
.prose blockquote p { margin: 0.3em 0; }
.prose hr { border: 0; margin: 1.8em 0; text-align: center; overflow: visible; }
.prose hr::before { content: '✦ ✦ ✦'; color: var(--brass); font-size: 12px; letter-spacing: 0.9em; }
