:root {
  --bg: #ffffff;
  --surface: #f5f6f8;
  --text: #1f2328;
  --muted: #59636e;
  --line: #d8dee4;
  --link: #0b62c4;
  --accent: #6b3fa0;
  --measure: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1e2126;
    --text: #e6e8eb;
    --muted: #9aa3ad;
    --line: #333940;
    --link: #6cb0ff;
    --accent: #b794e6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); }
img, video, iframe { max-width: 100%; height: auto; }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 4px 8px; z-index: 10; }

/* header */
.site-header { border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.site-header .wrap { max-width: 64rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .75rem; padding-bottom: .75rem; }
.brand { display: flex; gap: .75rem; align-items: center; color: inherit; text-decoration: none; }
.brand img { border-radius: 8px; }
.brand span { display: flex; flex-direction: column; line-height: 1.25; }
.brand strong { font-size: 1.2rem; }
.brand small { color: var(--muted); font-size: .8rem; }
nav ul { list-style: none; margin: 0; padding: 0; }
nav > ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
nav li { position: relative; }
nav a { color: var(--text); text-decoration: none; font-size: .95rem; }
nav a:hover, nav a:focus { color: var(--link); text-decoration: underline; }
nav .has-children > ul {
  display: none; position: absolute; top: 100%; left: -.75rem; min-width: 14rem; z-index: 5;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: .4rem .75rem;
}
nav .has-children:hover > ul, nav .has-children:focus-within > ul { display: block; }

/* listing */
.card { display: grid; grid-template-columns: 9rem 1fr; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.card:not(:has(.thumb)) { grid-template-columns: 1fr; }
.card .thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; display: block; }
.card h2 { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { color: var(--link); }
.card p { margin: .25rem 0 0; }
@media (max-width: 560px) { .card { grid-template-columns: 1fr; } }
.meta { color: var(--muted); font-size: .85rem; }
.meta a { color: inherit; }
.more { margin: 2rem 0; font-weight: 600; }
.kicker { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.year h2 { border-bottom: 1px solid var(--line); }
.list { list-style: none; padding: 0; }
.list li { padding: .2rem 0; }
.list time { display: inline-block; min-width: 4.5rem; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }

/* entry */
.entry h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .25rem; }
.content { overflow-wrap: break-word; }
.content h2 { margin-top: 2rem; line-height: 1.25; }
.content blockquote { margin: 1.25rem 0; padding: .25rem 1rem; border-left: 4px solid var(--accent); background: var(--surface); }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.content table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: .9rem; margin: 1rem 0; }
.content th, .content td { border: 1px solid var(--line); padding: .35rem .55rem; vertical-align: top; text-align: left; }
.content th { background: var(--surface); }
.content pre { overflow-x: auto; background: var(--surface); padding: 1rem; }

/* WordPress alignment & media classes */
.alignleft { float: left; margin: .3rem 1.25rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.25rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
img.alignleft, img.alignright, .wp-caption.alignleft, .wp-caption.alignright { max-width: 50%; }
@media (max-width: 560px) {
  .alignleft, .alignright { float: none; margin: 1rem auto; }
  img.alignleft, img.alignright, .wp-caption.alignleft, .wp-caption.alignright { max-width: 100%; display: block; }
}
.content::after, .entry::after { content: ""; display: table; clear: both; }
.wp-caption { margin-top: .3rem; margin-bottom: 1rem; }
.wp-caption.aligncenter, .wp-caption.alignnone { margin-left: auto; margin-right: auto; }
.wp-caption img { display: block; margin: 0 auto; }
figcaption { font-size: .85rem; color: var(--muted); text-align: center; padding-top: .35rem; }
.gallery { display: grid; gap: .75rem; margin: 1rem 0; grid-template-columns: repeat(var(--cols, 3), 1fr); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.gallery-columns-1 { --cols: 1; } .gallery-columns-2 { --cols: 2; } .gallery-columns-4 { --cols: 4; }
@media (max-width: 560px) { .gallery { --cols: 2; } }
.embed-video { position: relative; aspect-ratio: 16/9; margin: 1rem 0; }
.embed-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wp-video { margin: 1rem 0; }
.wp-video video { width: 100%; }
.form-retired { background: var(--surface); border-radius: 6px; padding: .25rem 1rem; }

.tags { font-size: .9rem; color: var(--muted); margin-top: 2rem; }
.prevnext { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; font-size: .9rem; }

/* comments */
.comments { margin-top: 3rem; }
.comments .note { color: var(--muted); font-size: .9rem; }
.comments ol { list-style: none; padding: 0; }
.comment { border-top: 1px solid var(--line); padding: .75rem 0; font-size: .95rem; }
.comment .who { margin: 0; }
.comment .who a { color: var(--muted); font-size: .85rem; margin-left: .5rem; }
.comment .body p { margin: .4rem 0; }
.depth-1 { margin-left: 1.25rem; } .depth-2 { margin-left: 2.5rem; } .depth-3 { margin-left: 3.5rem; } .depth-4 { margin-left: 4.25rem; }
@media (max-width: 560px) { .depth-1, .depth-2, .depth-3, .depth-4 { margin-left: 1rem; } }

.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding: 1.5rem 0; color: var(--muted); font-size: .85rem; }
.site-footer a { color: inherit; }
