:root {
  --ink: #1A1A1A;
  --muted: #5C5C5C;
  --grid: #ECECEC;
  --paper: #FFFFFF;
  --hand: 'Gochi Hand', cursive;
  --body: 'Patrick Hand', 'Comic Sans MS', cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { text-decoration-style: wavy; }
a:focus-visible { outline: 2px dashed var(--ink); outline-offset: 4px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Header / footer — same as the home page */
header.site { padding: 36px 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
header.site .logo { font-family: var(--hand); font-size: 26px; text-decoration: none; padding: 8px 0; }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 22px; }
header.site nav a { text-decoration: none; padding: 10px 0; }
footer.site { margin-top: 96px; padding: 24px 0 64px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 18px; color: var(--muted); border-top: 2px dashed #D6D6D6; }

/* Article */
.article { max-width: 720px; margin: 0 auto; padding-top: 56px; }
.article-meta { margin: 0 0 16px; font-family: var(--hand); font-size: 22px; color: var(--muted); }
.article-title { margin: 0; font-family: var(--hand); font-weight: 400; font-size: clamp(36px, 5.4vw, 56px); line-height: 1.12; }
.article-deck { margin: 24px 0 0; font-size: 24px; line-height: 1.5; color: #333; }
.byline { margin-top: 28px; display: flex; align-items: center; gap: 12px; font-family: var(--hand); font-size: 18px; line-height: 1.3; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--ink); }
.article-head { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 2px dashed #D6D6D6; }

.article-body { font-size: 21px; line-height: 1.7; }
.article-body p { margin: 0 0 22px; }
.article-body h2 { margin: 56px 0 18px; font-family: var(--hand); font-weight: 400; font-size: 34px; line-height: 1.2; }
.article-body h2 .num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 46px; padding: 0 8px; margin-right: 10px;
  border: 2px solid var(--ink);
  border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%;
  font-size: 22px; vertical-align: middle; transform: rotate(-3deg);
}
.article-body ul { margin: 0 0 22px; padding-left: 28px; }
.article-body li { margin-bottom: 10px; }
.article-body strong { font-weight: 400; background: linear-gradient(transparent 60%, #E6E6E6 60%); }
.article-body em { font-style: italic; }

/* Code — a sketched box */
.article-body pre {
  margin: 0 0 26px; padding: 18px 20px; overflow-x: auto;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px 3px 7px 4px;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 15px; line-height: 1.6;
}
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Side note — a sticky note */
.article-body .note {
  margin: 8px 0 30px; padding: 18px 22px;
  background: #F4F4F4;
  border: 1.5px solid var(--ink);
  border-radius: 3px 6px 4px 7px;
  transform: rotate(-0.6deg);
  font-size: 19px; line-height: 1.6;
}

/* Timeline — hand-drawn line with dots */
.article-body .tl { margin: 0 0 28px; padding-left: 28px; border-left: 2px solid var(--ink); }
.article-body .tl > div { position: relative; display: flex; flex-wrap: wrap; gap: 2px 16px; padding: 0 0 18px; }
.article-body .tl > div::before {
  content: ""; position: absolute; left: -38px; top: 8px;
  width: 16px; height: 16px; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%;
}
.article-body .tl time { flex: 0 0 110px; font-family: var(--hand); font-size: 22px; }
.article-body .tl span { flex: 1 1 280px; min-width: 0; }

.article-back { margin: 56px 0 0; font-family: var(--hand); font-size: 24px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
