:root {
  --bg: #fdfdfc;
  --fg: #1f1f1f;
  --muted: #6b6b6b;
  --accent: #2f5bd3;
  --border: #e6e6e3;
  --code-bg: #f3f3f1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --fg: #e6e6e6;
    --muted: #8f8f8f;
    --accent: #8aa8ff;
    --border: #2a2a2a;
    --code-bg: #1e1e1e;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 3rem 1.25rem;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin-bottom: 3rem;
}
.site-title { color: var(--fg); font-weight: 600; }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--fg); text-decoration: none; }

.intro { color: var(--muted); margin-bottom: 2rem; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  display: flex;
  gap: 1.25rem;
  padding: 0.4rem 0;
}
.post-list time {
  flex: 0 0 6.5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { line-height: 1.25; margin: 2rem 0 0.75rem; }
h1 { font-size: 1.75rem; margin-top: 0; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

.meta { color: var(--muted); margin-top: -0.25rem; }

img { max-width: 100%; height: auto; }

blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

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

.back { margin-top: 3rem; }

.site-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--muted); }

@media (max-width: 480px) {
  .post-list li { flex-direction: column; gap: 0; }
  .post-list time { flex: none; font-size: 0.9rem; }
}

table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 1rem 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
th { font-weight: 600; }

.cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 0 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
@media (min-width: 52rem) {
  .cover {
    width: calc(100% + 8rem);
    max-width: none;
    margin-left: -4rem;
  }
}
