/* suburbanhobbit.com -- the recipes theme.
 *
 * The zine's layout (opt/mannablog/site_static/style.css) on parchment
 * instead of black: same masthead block, same two columns, same dense index
 * rows. What changes is the palette, and two rules at the end that turn an
 * ordinary Markdown recipe -- "## Ingredients" over a bullet list, "## Method"
 * over a numbered list -- into an ingredients box and numbered steps, with no
 * markup the author has to know about.
 *
 * 2026-09-17: repainted as a cottage-garden hobbit-hole -- a hero
 * illustration of the front door over a deep round-door green masthead,
 * brick-and-mustard recipe box, stepping-stone dividers instead of plain
 * rules. header.jpg is the one image this theme carries itself (everything
 * else here is gradients and border-radius); style-src/img-src are 'self'
 * only, which same-origin satisfies same as a post's own pictures do.
 *
 * Deliberately no dark mode. Recipes are read in kitchens, in daylight.
 */
:root {
  --ground: #f6ecd6;   /* warm parchment -- the cottage's front room */
  --text:   #3a2d1c;   /* soil brown */
  --door:   #3e5527;   /* the round front door: masthead bg, every link */
  --door-lt:#54703a;   /* door, one step lighter -- hovers, the doorknob ring */
  --brick:  #8f4425;   /* the door's brick surround: recipe box, step numbers */
  --sun:    #d99a2b;   /* sunflowers by the path: sparing highlights only */
  --ash:    #6b5a3e;   /* labels, dates, summaries: 5.7:1 on parchment */
  --edge:   #e3d3ab;   /* stepping-stone dividers */

  --serif: Georgia, "Times New Roman", Times, serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 18px/1.75 var(--serif);
  -webkit-text-size-adjust: 100%;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
}

a { color: var(--door); }

:focus-visible {
  outline: 2px solid var(--brick);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------- hero */

.hero {
  display: block;
  line-height: 0;
}

.hero img {
  display: block;
  width: 100%;
  /* Capped rather than left at the source's own ratio: at the shell's full
     1280px width that ratio would stand over 700px tall, most of it hills
     and sky nobody scrolled here for. */
  height: clamp(140px, 26vw, 300px);
  object-fit: cover;
  object-position: center 48%;
}

/* --------------------------------------------------------------- masthead */

.masthead {
  background: var(--door);
  color: var(--ground);
  padding: 40px 48px 34px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  position: relative;
}

/* The doorknob: a small brass-mustard circle riding the wordmark's left
   edge, the one purely decorative flourish on the page. */
.brand { position: relative; }

.brand::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--sun);
  border: 2px solid #a5741c;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding-left: 22px;
  min-width: 0; /* lets .tagline's ellipsis actually engage in this flex row */
}

.wordmark {
  color: var(--ground);
  text-decoration: none;
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.03em;
}

.wordmark:hover { color: var(--sun); text-decoration: underline; text-decoration-thickness: 3px; }

.tagline {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  /* Fluid so a full sentence has a shot at fitting on one line before the
     ellipsis has to step in; the wordmark next to it does the same. */
  font: italic clamp(11px, 1.4vw, 16px)/1.5 var(--serif);
  color: #e4dcc2;
}

.count {
  margin: 0;
  font: 12px/1.4 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #b9caa0;
}

.menu {
  display: flex;
  flex-shrink: 0;
  gap: 22px;
  font: 13px/1.4 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.menu a {
  color: var(--ground);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.menu a.on,
.menu a:hover,
.menu a:focus-visible { border-bottom-color: var(--sun); }

/* ---------------------------------------------------------------- columns */

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
}

main { padding: 36px 48px 64px; min-width: 0; }

.side {
  border-left: 1px solid var(--edge);
  padding: 36px 40px 64px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

@media (max-width: 60rem) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  main { padding: 28px 20px 40px; }
  .side { border-left: 0; border-top: 1px solid var(--edge); padding: 28px 20px 48px; }
  .masthead { padding: 28px 20px 24px; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}

/* ---------------------------------------------------------------- the index */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto 64px;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
}

.rows li:not(:last-child) {
  background-image: repeating-linear-gradient(90deg, var(--edge) 0 10px, transparent 10px 22px);
  background-position: bottom;
  background-size: 100% 2px;
  background-repeat: no-repeat;
}

.rows time,
.rows .s {
  font: 12px/1.5 var(--mono);
  color: var(--ash);
}

.rows time { letter-spacing: .1em; }

.rows .s {
  max-width: 26em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rows .t {
  color: var(--text);
  text-decoration: none;
  font-size: 22px;
  line-height: 1.25;
}

.rows .t:hover,
.rows .t:focus-visible { text-decoration: underline; text-underline-offset: .15em; color: var(--brick); }

.rows .pic {
  display: block;
  width: 64px;
  height: 48px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--door);
  overflow: hidden;
}

.rows .pic img,
.rows .pic video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 40rem) {
  .rows li {
    grid-template-columns: minmax(0, 1fr) 64px;
    grid-template-areas: "time pic" "title pic" "sum pic";
    row-gap: 2px;
  }
  .rows time { grid-area: time; }
  .rows .t   { grid-area: title; font-size: 19px; }
  .rows .s   { grid-area: sum; }
  .rows .pic { grid-area: pic; }
}

.empty {
  margin: 0;
  padding: 1.5rem 0 .5rem;
  color: var(--ash);
  font: 13px/1.5 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- gallery */

/* Albums, on /gallery/: a card per year, cover photo over a stepping-stone
   edge, same border-radius language as .projects in the sidebar. */
.albums {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.albums a {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.albums img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--door);
}

.albums .name {
  font-size: 19px;
  line-height: 1.3;
}

.albums .count {
  font: 12px/1.4 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ash);
}

.albums a:hover .name,
.albums a:focus-visible .name { text-decoration: underline; color: var(--brick); }

/* One album's photos, on /gallery/<slug>/: a plain wall of thumbnails, each
   linking straight to its own file -- there is only the one stored size, so
   "open bigger" is just the browser's own image view, no lightbox needed. */
.photos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.photos a {
  display: block;
  line-height: 0;
}

.photos img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--door);
}

.photos a:hover img,
.photos a:focus-visible img { outline: 2px solid var(--brick); outline-offset: 2px; }

@media (max-width: 40rem) {
  .albums { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .photos { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ---------------------------------------------------------------- sidebar */

.side h2 {
  margin: 0 0 12px;
  font: 12px/1.4 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brick);
}

.side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.projects a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.projects img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: left top;
  border: 1px solid var(--edge);
  border-radius: 10px;
}

.projects .name {
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.projects .blurb { color: var(--ash); }

.projects a:hover .name,
.projects a:focus-visible .name { text-decoration: underline; color: var(--brick); }

.years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  border-top: 0;
  background-image: repeating-linear-gradient(90deg, var(--edge) 0 10px, transparent 10px 22px);
  background-position: top;
  background-size: 100% 2px;
  background-repeat: no-repeat;
  padding-top: 22px;
  font: 12px/1.5 var(--mono);
  letter-spacing: .1em;
}

.years a { color: var(--ash); text-decoration: none; }
.years a:hover, .years a:focus-visible { color: var(--brick); }

/* ---------------------------------------------------------------- the post */

.post,
.notfound { max-width: 40em; }

.post header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.post header time,
.archive-h .count {
  font: 12px/1.5 var(--mono);
  letter-spacing: .1em;
  color: var(--ash);
}

.post h1,
.notfound h1,
.archive-h {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: normal;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.archive-h { margin-bottom: 1.5rem; }
.archive-h .count { margin-left: .75rem; }

.post h2,
.post h3 {
  margin: 2.5rem 0 .6rem;
  font-weight: normal;
  line-height: 1.3;
}

.post h2 { font-size: 1.4rem; }
.post h3 { font-size: 1.15rem; font-style: italic; }

.post p, .post ul, .post ol { margin: 0 0 1.4rem; }
.post li { margin-bottom: .4rem; }

/* Underlined always in prose: it is what links looked like when this
 * design is from, and colour is then not the only thing marking them. */
.post a {
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}

.post img,
.post video {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--edge);
  border-radius: 10px;
}

.post video { display: block; margin: 0 0 1.4rem; }

.post blockquote {
  margin: 0 0 1.4rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--sun);
  color: var(--ash);
  font-style: italic;
}

.post code {
  font: .85em/1.6 var(--mono);
  color: var(--text);
  background: #ece0c2;
  padding: .1em .35em;
  border: 1px solid var(--edge);
  border-radius: 4px;
}

.post pre {
  margin: 0 0 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: #ece0c2;
  overflow-x: auto;
}

.post pre code { background: none; border: 0; padding: 0; }

.post hr {
  border: 0;
  height: 2px;
  margin: 2.5rem 0;
  background-image: repeating-linear-gradient(90deg, var(--edge) 0 10px, transparent 10px 22px);
}

.tags, .backlink {
  margin-top: 2.5rem;
  font: 12px/1.5 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ash);
}

.backlink a, .tags a { color: var(--door); text-decoration: none; }
.backlink a:hover, .tags a:hover { color: var(--brick); }

/* ---------------------------------------------------------------- recipes */

/* A recipe is ordinary Markdown: "## Ingredients" over a bullet list, then
   "## Method" over a numbered list. The list directly after a heading is
   what these two rules style, so the author writes nothing special. */

.post h2 {
  font: 13px/1.4 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brick);
  margin: 2.2rem 0 .6rem;
}

.post h2 + ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 18px 22px;
  background: rgba(217, 154, 43, .14);
  border: 1px solid rgba(143, 68, 37, .25);
  border-left: 4px solid var(--brick);
  border-radius: 0 10px 10px 0;
  columns: 2;
  column-gap: 28px;
}
.post h2 + ul li { break-inside: avoid; padding: 2px 0; }
.post h2 + ul li::marker { color: var(--brick); }

.post h2 + ol {
  list-style: none;
  counter-reset: step;
  margin: 0 0 1.5rem;
  padding: 0;
}
.post h2 + ol li {
  counter-increment: step;
  position: relative;
  padding: 0 0 .9rem 3rem;
}
.post h2 + ol li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: .15rem;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--brick);
  color: var(--ground);
  font: 700 14px/2rem var(--mono);
  text-align: center;
}

@media (max-width: 40rem) {
  .post h2 + ul { columns: 1; }
}
