/* Matches the old Squarespace site: Montserrat headings, Helvetica body, teal accent, Roboto Mono code.
   All colors are variables so dark mode is one block at the end. The landing hero has a light and a dark photo (--hero). */
:root {
  color-scheme: light dark;
  --bg: #fff;           /* page background */
  --surface: #fff;      /* menu dropdown */
  --placeholder: #f3f5f6; /* empty image boxes */
  --ink: #272727;       /* headings, post titles in lists */
  --text: #5e5e5e;      /* body text */
  --subtle: #6b6b6b;    /* section headings, summaries, tagline */
  --title: #707070;     /* light post title */
  --muted: #767676;     /* dates, meta (4.5:1 on white) */
  --border: #e6e6e6;    /* year rules, quote bar */
  --rule: #f0f0f0;      /* row separators, inline code bg */
  --accent: #07828f;    /* links, brand */
  --hero: url('/images/hero-light.jpg');
  --accent-soft: #4ba3ad; /* post title underline */
  --shadow: rgba(0,0,0,.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --surface: #202326;
    --placeholder: #24282b;
    --ink: #e8e8e8;
    --text: #c4c4c4;
    --subtle: #a8a8a8;
    --title: #cfcfcf;
    --muted: #8a8a8a;
    --border: #33373a;
    --rule: #26292c;
    --accent: #3fb6c2;
    --hero: url('/images/hero-dark.jpg');
    --accent-soft: #3fb6c2;
    --shadow: rgba(0,0,0,.5);
  }
  /* old screenshots are mostly white; take the edge off the glare */
  .body img, .vb-img { filter: brightness(.9); }
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; color: var(--text); background: var(--bg);
  font: 15px/1.75 "Helvetica Neue", Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
svg { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.125em; }
h1, h2, h3, h4 { font-family: Montserrat, sans-serif; color: var(--ink); }
.meta { font-family: Montserrat, sans-serif; font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); margin: 0; }

/* header bar */
header.site { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: 1040px; margin: 0 auto; padding: 28px 24px; }
.brand { text-align: center; }
.brand a { font-family: Montserrat, sans-serif; font-size: 13px; color: var(--accent); text-decoration: none; }
.brand p { margin: 0; font-size: 9px; font-style: italic; color: var(--title); }
.social { justify-self: end; font-size: 18px; }
.social a { margin-left: 10px; color: var(--accent); }
.menu summary { list-style: none; cursor: pointer; font-size: 20px; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; background: var(--surface); padding: 12px 18px; box-shadow: 0 4px 16px var(--shadow); z-index: 5; }
.menu nav a { display: block; font-family: Montserrat, sans-serif; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; text-decoration: none; color: var(--ink); line-height: 2.2; }

/* post page */
article { max-width: 730px; margin: 0 auto; padding: 0 24px 80px; }
header.post { text-align: center; margin: 4px 0 64px; }
header.post h1 { font-weight: 400; font-size: 28px; color: var(--title); display: inline-block;
  min-width: 60%; padding-bottom: 10px; border-bottom: 3px solid var(--accent-soft); margin: 6px 0 12px; }
.body h2, .body h3 { font-size: 14px; font-weight: 700; text-transform: uppercase; color: var(--subtle); margin: 34px 0 10px; }
.body img { max-width: 100%; height: auto; display: block; margin: 28px auto; }
.body blockquote { margin: 24px 0; padding-left: 16px; border-left: 2px solid var(--border); font-style: italic; }
code, pre { font-family: "Roboto Mono", monospace; font-size: 13px; }
:not(pre) > code { font-weight: 700; color: var(--ink); }
pre { padding: 18px; overflow-x: auto; line-height: 1.6; border-radius: 2px; }
.post-foot { margin-top: 56px; }
.post-foot .tags a { font-family: "Roboto Mono", monospace; font-size: 13px; margin-right: 8px; text-decoration: none; }
.meta a { text-decoration: none; }
.pager { position: fixed; top: 50%; font-size: 26px; color: var(--subtle); text-decoration: none; padding: 10px; }
.pager.prev { left: 12px; } .pager.next { right: 12px; }

/* landing page: a photo with white text, same in light and dark */
.home main { min-height: 100vh; }
.hero { position: relative; min-height: 100vh; background: #c9ced3 var(--hero) center / cover no-repeat;
  display: flex; align-items: center; justify-content: center; text-align: center; color: #fff;
  box-shadow: inset 0 0 0 100vmax rgba(50, 60, 70, .2); text-shadow: 0 1px 3px rgba(0,0,0,.25); }
.hero .logo { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); width: 34px; }
.hero-text { margin-top: -12vh; }
.hero h1 { font-weight: 400; font-size: 52px; color: #fff; margin: 0 0 12px; letter-spacing: .01em; }
.hero p { margin: 0 0 10px; font-size: 15px; letter-spacing: .04em; }
.hero .lead { font-weight: 700; }
.hero nav { margin-top: 26px; }
.hero nav a { color: #fff; font-family: Montserrat, sans-serif; font-weight: 700; font-size: 14px;
  text-transform: uppercase; text-decoration: none; margin: 0 7px; }
.hero-social { position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%); }
.hero-social a { display: inline-flex; width: 22px; height: 22px; margin: 0 3px; border-radius: 50%;
  background: #fff; color: #555; align-items: center; justify-content: center; font-size: 11px; }

/* standalone pages (About): no title block, small caps headings, photo on the right */
article.page { max-width: 1040px; padding-top: 10px; }
.page .body h1, .page .body h2 { font-size: 14px; font-weight: 700; text-transform: uppercase; color: var(--ink); margin: 26px 0 8px; }
.page .body > h1:first-child { text-align: center; font-size: 15px; margin-bottom: 26px; }
.page .body img { float: right; width: 30%; margin: 0 0 24px 32px; }

/* blog list: editorial rows grouped by year */
.vb { max-width: 760px; margin: 0 auto; padding: 0 24px 80px; }
.vb-year { font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--accent);
  border-bottom: 1px solid var(--border); padding-bottom: 8px; margin: 48px 0 8px; }
.vb-row { display: grid; grid-template-columns: 1fr 160px; gap: 28px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.vb-row:not(:has(.vb-img)) { grid-template-columns: 1fr; }
.vb-row h3 { font-size: 19px; font-weight: 600; margin: 4px 0 6px; color: var(--ink); line-height: 1.3; }
.vb-row:hover h3 { color: var(--accent); }
.vb-sum { margin: 0; font-size: 14px; line-height: 1.6; color: var(--subtle);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vb-img { aspect-ratio: 4/3; background: var(--placeholder) center/cover no-repeat; border-radius: 6px; }
@media (max-width: 600px) { .pager { display: none; } .vb-row { grid-template-columns: 1fr 90px; gap: 16px; } }
