:root {
  --bg: #fdfdfc;
  --text: #1f2328;
  --muted: #59636e;
  --link: #0b57c2;
  --rule: #d8dee4;
  --code-bg: #f2f4f6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --text: #e6e8eb;
    --muted: #a0a8b2;
    --link: #7fb2ff;
    --rule: #33383f;
    --code-bg: #1f2328;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0 auto;
  max-width: 42rem;
  padding: 0 1rem 3rem;
  background: var(--bg);
  color: var(--text);
  font: 1.125rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-wrap: break-word;
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: 0.25rem 0.5rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}
.site-name { font-weight: 600; color: var(--text); text-decoration: none; }
.site-header nav { display: flex; gap: 1.25rem; }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; margin-top: 2.5rem; }

.meta, .note-list time { color: var(--muted); font-size: 0.95rem; }

.note-list, .project-list { list-style: none; padding: 0; }
.note-list li { display: flex; flex-wrap: wrap; gap: 0 1rem; padding: 0.35rem 0; }
.note-list time { min-width: 7.5rem; font-variant-numeric: tabular-nums; }
.project-list li { padding: 0.35rem 0; }

pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 1rem; white-space: pre-wrap; border-radius: 6px; line-height: 1.45; }
pre code { background: none; padding: 0; }

blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--muted); }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

table { border-collapse: collapse; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--rule); padding: 0.35rem 0.6rem; text-align: left; }

.back { margin-top: 3rem; }

.site-footer {
  display: flex;
  gap: 1.25rem;
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}
