/* Published posts: same look as the main page (karrmedia.com, Jekyll "minimal" theme + JetBrains Mono):
   white, grey #727272 body text 14/21, dark bold headings, grey underlined links. Photos get the full width. */
@font-face { font-family: "JetBrainsMono"; src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrainsMono"; src: url("/assets/fonts/JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrainsMono"; src: url("/assets/fonts/JetBrainsMono-Italic.woff2") format("woff2"); font-style: italic; font-display: swap; }
:root { --bg: #fff; --ink: #727272; --head: #222; --head2: #393939; --line: #e5e5e5; --tile: #f3f3f3; --mono: "JetBrainsMono", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; }
* { box-sizing: border-box; }
html.noscroll { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--mono); }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--head); }
.site-head, .page-head, main, .page-foot { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.site-head { display: flex; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.site-name { font-size: 22px; font-weight: 700; color: var(--head); text-decoration: none; }
.site-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.page-head { padding-top: 30px; padding-bottom: 4px; }
.kicker { margin: 0; font-size: 13px; }
h1 { font-size: 28px; line-height: 1.1; font-weight: 700; color: var(--head); margin: 10px 0 10px; }
.meta { font-size: 13px; margin: 0 0 18px; }
.prose { max-width: 80ch; }
.prose p { margin: 0 0 .9em; }
.prose h2, .prose h3, .prose h4 { color: var(--head2); margin: 1.2em 0 .5em; }
.prose blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--line); }
.prose code, .prose pre { font-family: var(--mono); background: var(--tile); border-radius: 4px; }
.prose code { padding: 1px 5px; }
.prose pre { padding: 10px 12px; overflow-x: auto; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 .9em; }
.prose li { margin: .15em 0; }
.prose strong { color: var(--head2); }

.step { padding: 24px 0 10px; border-top: 1px solid var(--line); margin-top: 22px; }
.step h2 { font-size: 21px; line-height: 1.1; font-weight: 700; color: var(--head2); margin: 0 0 14px; }
.step h2 .anchor { color: inherit; text-decoration: none; }
.step h2 .anchor:hover::after { content: " #"; color: var(--ink); }
.photos { display: grid; gap: 8px; margin-top: 14px; }
.photos.n1 { grid-template-columns: 1fr; }
.photos.n2 { grid-template-columns: 1fr 1fr; }
.photos.n3 { grid-template-columns: repeat(3, 1fr); }
.photos.many { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ph { position: relative; display: block; border-radius: 6px; overflow: hidden; background: var(--tile); cursor: zoom-in; text-decoration: none; }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .2s; }
.photos.n1 .ph img { aspect-ratio: auto; max-height: 78vh; object-fit: contain; }
.ph:hover img { transform: scale(1.02); }
.ph .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; color: #fff; font-size: 12px; line-height: 1.35;
  background: linear-gradient(transparent, rgb(0 0 0 / .7)); }
.page-foot { padding-top: 36px; padding-bottom: 60px; font-size: 13px; }
.preview-banner { position: sticky; top: 0; z-index: 5; text-align: center; background: #fde68a; color: #422006; font: 700 13px/2.2 var(--mono); }

.index-grid { list-style: none; padding: 0; margin: 10px 0 60px; display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.index-grid a { display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
.index-grid img, .index-grid .nocover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--tile); display: block; }
.index-grid .t { font-size: 16px; font-weight: 700; color: var(--head2); margin-top: 6px; }
.index-grid .m { font-size: 12px; }
.index-grid .d { font-size: 13px; }
.index-grid a:hover .t { text-decoration: underline; }

/* lightbox */
.lb[hidden] { display: none; }
.lb { position: fixed; inset: 0; z-index: 50; background: rgb(8 8 8 / .95); display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; color: #eee; }
.lb figure { margin: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 0; min-width: 0; }
.lb img { max-width: 100%; max-height: calc(100vh - 70px); object-fit: contain; }
.lb figcaption { font: 14px/1.4 system-ui, sans-serif; margin-top: 10px; text-align: center; color: #ccc; min-height: 1.4em; }
.lb button { background: none; border: 0; color: #ccc; font-size: 42px; cursor: pointer; height: 100%; }
.lb button:hover { color: #fff; }
.lb .x { position: absolute; top: 6px; right: 10px; height: auto; font-size: 32px; }
@media (max-width: 640px) {
  .photos.n3 { grid-template-columns: 1fr 1fr; }
  .photos.many { grid-template-columns: 1fr 1fr; gap: 6px; }
  .lb { grid-template-columns: 1fr; }
  .lb .prev, .lb .next { display: none; }
}
