/* Kilo devlog: a garden at dawn, seen from 10 cm up. */
:root {
  --dew: #EEF2E3;
  --leaf-wash: #DEE6CB;
  --loam: #2B2417;
  --loam-soft: #5A503C;
  --pickle: #4B661A;
  --trail: #8A6A43;
  --sun: #F2B33D;
  --barn: #9E3B2C;
  --measure: 40rem;
  --wide: 58rem;
  --card: #FBFCF6;
  --ink: #2B2417;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --dew: #141A0F;
    --leaf-wash: #222B19;
    --loam: #E4E9D4;
    --loam-soft: #AEB59B;
    --pickle: #B3CF73;
    --trail: #A88A5F;
    --card: #1C2414;
    --ink: #E4E9D4;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--dew);
  color: var(--loam);
  font: 1.0625rem/1.65 var(--sans);
}
img { max-width: 100%; height: auto; }
a { color: var(--pickle); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--loam); color: var(--dew); padding: 0.4rem 0.8rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1rem; }

/* Masthead: the garden is the memorable thing; everything else stays quiet. */
.masthead { position: relative; height: clamp(300px, 46vw, 460px); overflow: hidden; background: #A9CBD6; }
.is-inner .masthead { height: 150px; }
.garden { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scale-label { font: 600 11px var(--sans); fill: #2B2417; }
.is-inner .scale, .is-inner .scale-label { display: none; }
.masthead-text {
  position: relative;
  max-width: 60rem; margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) 1rem 0;
}
.wordmark {
  display: inline-block;
  font: 400 clamp(3.5rem, 11vw, 7.5rem)/0.9 var(--serif);
  color: #2B2417;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.is-inner .wordmark { font-size: 2.75rem; }
.tagline {
  max-width: 22rem; margin: 0.75rem 0 0;
  font: 400 clamp(1rem, 2.2vw, 1.25rem)/1.4 var(--serif);
  color: #3B321F;
}

/* Navigation sits on the soil line under the garden. */
.site-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem;
  padding: 0.7rem 1rem;
  background: #6E5233; font-size: 0.95rem;
}
.site-nav a { color: #F3E9D2; text-decoration: none; padding: 0.15rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #FFFFFF; box-shadow: inset 0 -2px 0 var(--sun); }

main { padding-top: 2.5rem; padding-bottom: 2rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin: 0 0 1.25rem; }
.prose h2 { font-size: 1.5rem; margin: 2.25rem 0 0.5rem; }
.prose p, .prose ul { margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose li::marker { color: var(--pickle); }
.prose blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--sun); color: var(--loam-soft); }
.prose img { display: block; margin: 1.5rem 0; border-radius: 6px; }

.intro { font-size: 1.125rem; }
.section-title { font-size: 1.6rem; margin: 2.5rem 0 1rem; }

/* The trail log: posts are stops along an ant trail, newest first. */
.trail { list-style: none; margin: 0; padding: 0 0 0 2rem; position: relative; }
.trail::before {
  content: ""; position: absolute; left: 0.55rem; top: 0.4rem; bottom: 0.4rem;
  border-left: 2px dashed var(--trail);
}
.trail-stop { position: relative; padding-bottom: 2rem; }
.trail-stop::before {
  /* a pickle, for scale */
  content: ""; position: absolute; left: -1.75rem; top: 0.35rem;
  width: 0.7rem; height: 1.3rem; border-radius: 0.35rem;
  background: var(--pickle); box-shadow: 0 0 0 4px var(--dew);
}
.trail-stop time, .post-head time { font-size: 0.9rem; color: var(--loam-soft); }
.trail-stop h3 { font-size: 1.45rem; margin: 0.15rem 0 0.4rem; }
.trail-stop h3 a { color: var(--loam); text-decoration: none; }
.trail-stop h3 a:hover { color: var(--pickle); text-decoration: underline; }
.trail-stop p { margin: 0; color: var(--loam-soft); }

.post-head { margin-bottom: 1.5rem; }
.post-head h1 { margin-top: 0.25rem; }
.back { margin-top: 2.5rem; }

.site-foot {
  padding-top: 1.5rem; padding-bottom: 3rem;
  border-top: 2px dashed var(--trail);
  font-size: 0.9rem; color: var(--loam-soft);
}
.site-foot p { margin: 0.25rem 0; }

@media (max-width: 640px) {
  .masthead { height: 360px; }
  .tagline { max-width: 10.5rem; font-size: 0.95rem; }
  .is-home .garden { width: 125%; } /* nudges the jar right, clear of the tagline */
  .is-inner .masthead { height: 120px; }
  .is-inner .wordmark { font-size: 2.25rem; }
}

/* ---- Design pass: progress board, post meta, figures, quirk. ---- */

/* Let a block run wider than the reading column on big screens. */
.breakout { width: min(var(--wide), 100vw - 2rem); margin-left: 50%; transform: translateX(-50%); }

/* A hand-drawn squiggle under section titles. */
.section-title { display: inline-block; padding-bottom: 0.35rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 8'%3E%3Cpath d='M0 4 Q5 0 10 4 T20 4 T30 4 T40 4' fill='none' stroke='%23F2B33D' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left bottom / 20px 6px; }

/* Stickers and chips. */
.sticker { display: inline-block; padding: 0.2rem 0.7rem; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--sun); color: #2B2417; font: 600 0.95rem/1.2 var(--sans); transform: rotate(-2deg); }
.chip { display: inline-block; margin-left: 0.35rem; padding: 0 0.5rem; border: 1.5px solid var(--trail); border-radius: 999px;
  font-size: 0.8rem; line-height: 1.5; color: var(--loam-soft); }
.meta { margin: 0; font-size: 0.9rem; color: var(--loam-soft); }

/* "Where Kilo is at": three lanes, like index cards pinned in the garden shed. */
.board { margin-top: 1.5rem; }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; }
.board-head .section-title { margin-bottom: 0.5rem; }
.board-date { margin: 0; font-size: 0.9rem; color: var(--loam-soft); }
.lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.lane { background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px;
  padding: 1rem 1.1rem 0.6rem; box-shadow: 5px 5px 0 var(--trail); }
.lane:nth-child(2) { transform: rotate(0.6deg); }
.lane:nth-child(3) { transform: rotate(-0.5deg); }
.lane h3 { margin: 0; }
.lane-note { margin: 0.5rem 0 0.4rem; font-size: 0.85rem; color: var(--loam-soft); }
.lane ul { margin: 0; padding: 0; list-style: none; }
.lane li { position: relative; padding: 0.45rem 0 0.45rem 1.5rem; border-top: 1.5px dashed var(--leaf-wash); font-size: 0.98rem; line-height: 1.45; }
.lane li::before { position: absolute; left: 0; top: 0.42rem; font-weight: 600; }
.lane-playable li::before { content: "\2713"; color: var(--pickle); }
.lane-building li::before { content: "\2692"; color: var(--trail); }
.lane-cooking li::before { content: "\2026"; color: var(--loam-soft); }
.lane-building .sticker { background: #F3E9D2; }
.lane-cooking .sticker { background: var(--leaf-wash); color: var(--ink); }

/* Trail log cards. */
.trail-stop h3 { margin-top: 0.25rem; }
.trail-thumb { display: block; margin-bottom: 0.6rem; }
.trail-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 2px solid var(--ink); border-radius: 10px; }

/* Easier reading inside posts. */
.prose { font-size: 1.0625rem; }
.prose h2 { padding-top: 0.25rem; }
.prose strong { font-weight: 600; }
.prose .tldr { padding: 0.9rem 1.1rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--card);
  box-shadow: 5px 5px 0 var(--sun); }
.prose hr { border: 0; border-top: 2px dashed var(--trail); margin: 2.5rem 0; }

/* Screenshots: framed like a polaroid, with a caption. */
.shot { margin: 2rem 0; }
.shot img { display: block; width: 100%; height: auto; margin: 0; border: 2px solid var(--ink); border-radius: 10px; background: var(--leaf-wash); }
.shot figcaption { margin-top: 0.5rem; font-size: 0.9rem; color: var(--loam-soft); }
.shot.breakout figcaption { max-width: var(--measure); margin-left: auto; margin-right: auto; padding: 0 1rem; }

/* Older / newer post links. */
.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-top: 3rem; }
.post-nav a { display: block; padding: 0.8rem 1rem; border: 2px solid var(--ink); border-radius: 10px; color: var(--ink); text-decoration: none; background: var(--card); }
.post-nav a:hover { box-shadow: 4px 4px 0 var(--pickle); }
.post-nav .next { text-align: right; }
.post-nav span { display: block; font-size: 0.8rem; color: var(--loam-soft); }

@media (prefers-reduced-motion: no-preference) {
  .lane, .post-nav a { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .lane:hover { transform: rotate(0deg) translateY(-2px); }
}
