:root {
  --bg: #0f1114;
  --bg-elevated: #161a1f;
  --border: #2a3038;
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --accent: #3ec9b9;
  --accent-hover: #5fd9cc;
  --code-bg: #1e2329;
  --focus-ring: 2px solid var(--accent);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.inner {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 1.25rem;
}

.site-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 650;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent-hover);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--accent-hover);
}

.site-nav a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-main {
  flex: 1;
  padding: 2.5rem 0 3.5rem;
}

.site-main .inner > h1:first-child,
.site-main .inner > .post-list-title {
  margin-top: 0;
}

.site-footer {
  margin-top: auto;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}

.footer-inner {
  padding: 0 1.25rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-copy a {
  color: var(--accent);
}

.footer-copy a:hover {
  color: var(--accent-hover);
}

.footer-copy a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.prose h1,
.prose h2,
.prose h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.prose h3 {
  margin-top: 1.5rem;
  font-size: 1.0625rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

code,
pre {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  line-height: 1.45;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.8125rem;
}

.post-header {
  margin-bottom: 2rem;
}

.post-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.post-meta {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.post-meta time {
  font-variant-numeric: tabular-nums;
}

.post-meta-sep {
  margin: 0 0.35rem;
}

.tag {
  display: inline-block;
  font-size: 0.8125rem;
  padding: 0.1em 0.45em;
  border-radius: 4px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:first-child {
  padding-top: 0;
}

.post-list h2 {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.post-list h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-list h2 a:hover {
  color: var(--accent-hover);
}

.post-list .excerpt {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.post-list .list-meta {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-top: 0;
}
