:root {
  --bg: #fbfaf8;
  --fg: #1e1c1a;
  --muted: #6b6459;
  --accent: #a8543a;
  --accent-soft: #f1e3dd;
  --border: #e7e2da;
  --code-bg: #262220;
  --code-fg: #f2ede6;
  --max-width: 720px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1817;
    --fg: #ece7e0;
    --muted: #a39a8c;
    --accent: #e08a63;
    --accent-soft: #322622;
    --border: #34302b;
    --code-bg: #14120f;
    --code-fg: #f2ede6;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 17px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.site-header nav a {
  margin-left: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--accent); text-decoration: none; }

main { padding: 2.5rem 0 4rem; }

.hero h1 { margin-top: 0; }
.hero p:first-of-type { color: var(--muted); font-size: 1.1rem; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-top: 2.5rem; }

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: -0.5rem;
}
.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.78rem;
  margin-right: 0.3rem;
}

.post-content { margin-top: 1.5rem; }
.post-content p, .post-content ul, .post-content ol { margin: 1rem 0; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.25rem 0;
  padding: 0.1rem 1rem;
  color: var(--muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--accent-soft);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1rem 1.1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.55;
}
pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.post-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list li:first-child { padding-top: 0; }
.post-list-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--fg);
}
.post-list-title:hover { color: var(--accent); text-decoration: none; }
.post-list-date {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.post-list p { color: var(--muted); margin: 0.4rem 0 0; }

.recent-posts { margin-top: 2.5rem; }
.see-all { font-weight: 600; }

.product-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.product-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.product-card:first-child { padding-top: 0; }
.product-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.product-name {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--fg);
}
.product-name:hover { color: var(--accent); text-decoration: none; }
.post .product-card-header { gap: 0.75rem; margin-bottom: 0.25rem; }
.post .product-card-header h1 { margin: 0; }
.post .product-links { margin-bottom: 1.5rem; }
.product-card p { color: var(--muted); margin: 0.5rem 0; }
.product-links { display: flex; gap: 1.25rem; }
.product-links a { font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0.25rem 0; }
