/* Longtime Readers, look G: "Grove". A's typefaces on a light cream page, with F's forest green as the accent
   (name, headings, pills, card hover, footer) instead of the background. Marigold is the small second accent. */

:root {
  --page: #f7f2e7;
  --card: #fffcf5;
  --ink: #1f2a24;
  --muted: #627066;
  --rule: #ddd5c3;
  --green: #12382b;
  --green-2: #1a4a39;
  --green-soft: #e3ebdf;
  --marigold: #e9a23b;
  --cream: #f6efe0;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--serif); font-size: 1.1875rem; line-height: 1.65; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration-color: var(--marigold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--green-2); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--green); color: var(--cream); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: .5rem .75rem; z-index: 10; border-radius: 8px; }

.site-header, main, .site-footer { max-width: 60rem; margin-inline: auto; padding-inline: 1.25rem; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.75rem 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--green); font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.wordmark:hover { color: var(--green); }
.wordmark em { font-weight: 400; }
.wordmark .mark { width: 1.75rem; height: 1.49rem; flex: none; }
nav { display: flex; gap: .35rem; font-family: var(--sans); font-size: .95rem; font-weight: 500; }
nav a { text-decoration: none; color: var(--green); padding: .4rem .95rem; border-radius: 999px; transition: background .15s, color .15s; }
nav a:hover { background: var(--green-soft); color: var(--green); }
nav a[aria-current="page"] { background: var(--green); color: var(--cream); }

main { padding-block: 2.5rem 5rem; }

/* Home */
.hero { padding-block: clamp(1.5rem, 5vw, 3.25rem) 1rem; }
.hero h1 { color: var(--green); font-size: clamp(2.5rem, 8vw, 4.75rem); line-height: 1.04; font-weight: 400; font-style: italic; letter-spacing: -.02em; margin: 0 0 1.2rem; max-width: 15ch; }
.hero p { margin: 0; color: var(--muted); font-size: 1.25rem; max-width: 33rem; }
.hero p a { color: var(--ink); }
.block { margin-top: 4rem; }
.label { display: inline-block; font-family: var(--sans); font-weight: 500; font-size: .92rem; color: var(--green); margin: 0; padding: .32rem 1rem; border: 1.5px solid var(--green); border-radius: 999px; }

/* Cards */
.cards { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.1rem; }
.card a { display: flex; flex-direction: column; height: 100%; min-height: 13.5rem; padding: 1.4rem 1.5rem 1.3rem; background: var(--card); border: 1px solid var(--rule); border-radius: 22px; text-decoration: none; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.card a:hover { background: var(--green); border-color: var(--green); color: var(--cream); transform: translateY(-3px); }
.card .kind { align-self: flex-start; font-family: var(--sans); font-size: .76rem; font-weight: 600; letter-spacing: .03em; color: var(--green); background: var(--green-soft); padding: .22rem .7rem; border-radius: 999px; transition: background .18s, color .18s; }
.card.lab .kind { background: #f8e6c4; color: #6b4708; }
.card a:hover .kind { background: var(--marigold); color: var(--green); }
.card h3 { font-size: 1.6rem; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 1rem 0 .5rem; }
.card p { margin: 0 0 1.1rem; color: var(--muted); font-size: 1.05rem; line-height: 1.45; transition: color .18s; }
.card time { margin-top: auto; font-family: var(--sans); font-size: .84rem; color: var(--muted); transition: color .18s; }
.card a:hover p, .card a:hover time { color: #c9d8cc; }
.cards .empty { color: var(--muted); font-style: italic; }
.more { margin: 1.3rem 0 0; font-family: var(--sans); font-size: .95rem; font-weight: 500; }
.more a { text-decoration: none; color: var(--green); border-bottom: 2px solid var(--marigold); padding-bottom: 1px; }
.more a:hover { color: var(--green-2); }

/* Page and post headers */
.page-header { margin-bottom: 1.75rem; padding-top: 1rem; }
.page-header h1, .post-header h1 { color: var(--green); font-size: clamp(2.3rem, 7vw, 3.6rem); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .8rem; }
.page-header p { color: var(--muted); margin: 0 0 1rem; max-width: 36rem; }
.meta { font-family: var(--sans); font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 .8rem; }

/* Post body */
.post, body:not(.home):not(.list):not(.wide) main > .page-header, body:not(.home):not(.list):not(.wide) main > .prose { max-width: 41rem; }
.post { padding-top: 1rem; }
.post-header { margin-bottom: 2rem; }
.prose > * { margin-block: 0 1.3rem; }
.prose h2 { color: var(--green); font-size: 1.65rem; line-height: 1.2; margin-top: 2.6rem; margin-bottom: .7rem; }
.prose h3 { color: var(--green); font-size: 1.3rem; margin-top: 2rem; margin-bottom: .5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--green); }
.prose blockquote { margin-inline: 0; padding: 1rem 1.3rem; background: var(--green-soft); border-radius: 16px; font-style: italic; color: var(--green); }
.prose blockquote p { margin: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2.5rem; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .84em; background: var(--green-soft); border-radius: 5px; padding: .1em .3em; }
.prose pre { background: var(--green); color: var(--cream); border-radius: 14px; padding: 1rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.back { font-family: var(--sans); font-size: .95rem; font-weight: 500; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--muted); }
.back a { text-decoration: none; color: var(--green); border-bottom: 2px solid var(--marigold); }

/* Lab piece frame */
body.wide .piece { max-width: 48rem; }
.frame { border: 1px solid var(--rule); border-radius: 22px; overflow: hidden; background: var(--card); }
.frame iframe { display: block; width: 100%; height: 80vh; border: 0; }

/* Footer: the one place the green fills the width */
.site-footer { padding-block: 1.6rem 5rem; font-family: var(--sans); font-size: .9rem; color: #c9d8cc; background: var(--green); box-shadow: 0 0 0 100vmax var(--green); clip-path: inset(0 -100vmax); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--cream); }

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  .wordmark { font-size: 1.35rem; }
  .card a { min-height: 0; }
}
