@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin-wght-normal.woff2?v=7a19a702") format("woff2-variations");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin-wght-italic.woff2?v=9a15dafc") format("woff2-variations");
}

:root {
  --bg: #fff;
  --fg: #4a4a4a;
  --strong: #111;
  --muted: #9a9a9a;
  --rule: #ececec;
  --soft: #f5f5f5;
  --sans: -apple-system, BlinkMacSystemFont, "Source Sans 3",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Source Sans 3", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font: 17px/1.55 var(--sans);
  background: var(--bg);
  color: var(--fg);
  max-width: var(--max-width, 640px);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

::selection {
  background: var(--accent, #0066cc);
  color: #fff;
}

a {
  color: var(--accent, #0066cc);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent, #0066cc) 30%, transparent);
  transition: border-color 120ms ease, color 120ms ease;
}
a:hover { border-bottom-color: var(--accent, #0066cc); }

strong, b { color: var(--strong); font-weight: 700; }

/* Header */
header {
  margin-bottom: 2.5rem;
}
header h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
header h1 a {
  color: var(--strong);
  border-bottom: none;
}
header h1 a:hover { color: var(--accent, #0066cc); }

/* Articles */
article { margin: 0 0 2.5rem; }
article + article {
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

article time {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

article h2 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.65rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--strong);
}
article h2 a {
  color: inherit;
  border-bottom: none;
}
article h2 a:hover { color: var(--accent, #0066cc); }

/* Article body */
.body { font-size: 1rem; }
.body > * + * { margin-top: 1em; }
.body p { margin: 0; }

.body h1,
.body h2,
.body h3,
.body h4 {
  color: var(--strong);
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 1.75em;
  margin-bottom: 0.4em;
}
.body h1 { font-size: 1.5em; }
.body h2 { font-size: 1.3em; }
.body h3 { font-size: 1.1em; }
.body h4 { font-size: 1em; }

.body img,
.body video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
  border-radius: 4px;
}

.body blockquote {
  margin: 1.25em 0;
  padding: 0.1em 0 0.1em 1.25em;
  border-left: 3px solid var(--strong);
  color: var(--fg);
}
.body blockquote p { margin: 0.5em 0; }

.body code {
  font: 0.9em/1.5 var(--mono);
  background: var(--soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--strong);
}
.body pre {
  font: 0.88em/1.55 var(--mono);
  background: var(--soft);
  padding: 0.9em 1em;
  border-radius: 4px;
  overflow-x: auto;
  color: var(--strong);
}
.body pre code {
  background: none;
  padding: 0;
  font-size: 1em;
}

.body hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 2em auto;
  width: 100%;
}

.body ul, .body ol { padding-left: 1.5em; }
.body li + li { margin-top: 0.25em; }

.body sup { font-size: 0.7em; vertical-align: super; line-height: 0; }

/* Permalink for note posts (no title) */
.permalink {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.35em 0.9em;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.permalink:hover {
  color: var(--strong);
  border-color: var(--muted);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}
.pagination a {
  color: var(--strong);
  border-bottom: none;
}
.pagination a:hover { color: var(--accent, #0066cc); }
.pagination span {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* Mentions */
.mentions {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.mentions h3 {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.mentions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mentions li {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  padding: 0.5em 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
}
.mentions li:last-child { border-bottom: none; }
.mentions time {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.78rem;
}
footer a {
  color: var(--muted);
  border-bottom: none;
}
footer a:hover { color: var(--strong); }

/* Single-post view: bigger title, a touch more breathing room */
article.single h2 {
  font-size: 2.15rem;
  margin-bottom: 1.25rem;
}
article.single time { margin-bottom: 0.6rem; }
article.single .body { font-size: 1.06rem; line-height: 1.6; }

@media (max-width: 540px) {
  body { font-size: 16px; padding: 1.75rem 1.1rem 3rem; }
  article h2 { font-size: 1.4rem; }
  article.single h2 { font-size: 1.75rem; }
  header { margin-bottom: 1.75rem; }
  article { margin-bottom: 2rem; }
  article + article { padding-top: 2rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --fg: #b8b8b8;
    --strong: #f0f0f0;
    --muted: #777;
    --rule: #232323;
    --soft: #1a1a1a;
  }
  ::selection { color: #0e0e0e; }
}
