:root {
  --blue: #2079b2;
  --blue-deep: #165a86;
  --red: #c8102e;
  --ink: #14202b;
  --ink-2: #4a5966;
  --bg: #f6f9fb;
  --paper: #ffffff;
  --line: #dbe4ea;
  --link: #165a86;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6edf2;
    --ink-2: #9fb0bd;
    --bg: #0e1620;
    --paper: #15202b;
    --line: #26343f;
    --link: #6fb8e6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.65 var(--body);
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--blue); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 6px 10px; z-index: 10; }

/* Masthead */
.masthead { background: var(--blue); color: #fff; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: baseline; gap: 10px; }
.brand:hover { color: #fff; }
.brand-mark { font: 700 34px/1 var(--display); letter-spacing: .01em; }
.brand-sub { font: 600 15px/1 var(--display); text-transform: uppercase; letter-spacing: .14em; opacity: .8; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; font: 600 17px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; }
.nav a { color: #fff; text-decoration: none; opacity: .92; }
.nav a:hover { opacity: 1; text-decoration: underline; color: #fff; }
.nav .cta { background: #fff; color: var(--blue-deep); padding: 9px 14px; border-radius: 4px; opacity: 1; }
.nav .cta:hover { text-decoration: none; background: #e9f3fa; color: var(--blue-deep); }
.redline { height: 5px; background: var(--red); box-shadow: 0 3px 0 rgba(255,255,255,.5) inset; }

main.wrap { padding-top: 40px; padding-bottom: 64px; }
.prose img:not(.alignleft):not(.alignright) { display: block; margin: 1.2em 0; }

/* Headings */
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; letter-spacing: .005em; color: var(--ink); }
.intro { margin-bottom: 28px; max-width: 46rem; }
.intro h1 { font-size: clamp(38px, 6vw, 56px); margin: 0 0 8px; }
.intro p { margin: 0; color: var(--ink-2); font-size: 19px; }
.meta { font: 600 14px/1.3 var(--ui); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 0 0 6px; }
.meta a { color: var(--blue); text-decoration: none; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 6px; padding: 20px 22px 18px; display: flex; flex-direction: column; }
.card h2 { font-size: 28px; margin: 4px 0 10px; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover { color: var(--blue); }
.excerpt { color: var(--ink-2); font-size: 16.5px; line-height: 1.55; flex: 1; }
.more { font: 600 14px var(--ui); margin-top: 14px; text-decoration: none; }
.more::after { content: " \2192"; }

.pager, .post-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 36px; font-family: var(--ui); font-size: 15px; }

/* Article */
.post { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: clamp(22px, 5vw, 56px); max-width: 780px; margin: 0 auto; }
.post-head h1 { font-size: clamp(36px, 6vw, 54px); margin: 4px 0 12px; }
.byline { font: 15px/1.4 var(--ui); color: var(--ink-2); margin: 0 0 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.prose h2 { font-size: 32px; margin: 1.6em 0 .4em; }
.prose h3 { font-size: 26px; margin: 1.4em 0 .3em; }
.prose h4 { font-size: 22px; margin: 1.3em 0 .2em; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--blue); color: var(--ink-2); font-style: italic; }
.prose figure { margin: 1.4em 0; }
.prose figcaption { font: 14px/1.4 var(--ui); color: var(--ink-2); margin-top: 6px; }
.prose img { border-radius: 4px; }
.alignright { float: right; margin: 6px 0 14px 24px; max-width: 45%; }
.alignleft { float: left; margin: 6px 24px 14px 0; max-width: 45%; }
.aligncenter { display: block; margin: 1.2em auto; }
.prose::after { content: ""; display: table; clear: both; }
.embed { position: relative; aspect-ratio: 16 / 9; margin: 1.6em 0; background: #000; border-radius: 4px; overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.form-link a, .tweet a { font-family: var(--ui); font-weight: 600; }
.post-nav { max-width: 780px; margin-left: auto; margin-right: auto; }
.post-nav a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; max-width: 48%; }
.post-nav .next { text-align: right; margin-left: auto; }

/* Archived comments */
.archived-comments { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); clear: both; }
.archived-comments h2 { font-size: 26px; margin: 0 0 4px; }
.archived-comments .note { font: 14px var(--ui); color: var(--ink-2); margin-top: 0; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16.5px; }
.comment .who { font: 15px var(--ui); margin: 0 0 4px; }
.comment time { color: var(--ink-2); margin-left: 6px; }

/* Listings */
.year h2 { font-size: 32px; margin: 32px 0 8px; }
.year h2 a { color: var(--ink); text-decoration: none; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; }
ul.plain time { font: 14px/1.9 var(--ui); color: var(--ink-2); min-width: 4.5em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); padding: 36px 0 44px; font-family: var(--ui); font-size: 15px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.footer-inner nav { display: flex; flex-direction: column; gap: 6px; }
.footer-inner nav a { color: var(--ink-2); text-decoration: none; }
.footer-inner nav a:hover { color: var(--blue); }
.footer-brand { font: 700 24px var(--display); margin: 0 0 4px; }
.footer-h { font-weight: 700; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }

@media (max-width: 720px) {
  body { font-size: 17px; }
  .masthead-inner { padding-top: 14px; padding-bottom: 14px; }
  .brand-mark { font-size: 28px; }
  .nav { font-size: 15px; gap: 10px 14px; }
  .alignright, .alignleft { float: none; margin: 1em 0; max-width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .post { border-left: 0; border-right: 0; border-radius: 0; margin: 0 -16px; }
}
