/* Ralf SEO — minimal blog styles */
:root {
  --text: #1a1a1a;
  --muted: #666;
  --light: #999;
  --border: #e5e5e5;
  --bg: #fff;
  --accent: #16a34a;
  --code-bg: #f5f5f5;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", monospace;
}

[data-theme="dark"] {
  --text: #e5e5e5;
  --muted: #999;
  --light: #666;
  --border: #333;
  --bg: #111;
  --code-bg: #1a1a1a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

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

/* Layout */
.wrap { max-width: 640px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--accent); }
nav a {
  color: var(--muted);
  font-size: 0.875rem;
  margin-left: 1.25rem;
}
nav a:hover { color: var(--text); }
.theme-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  margin-left: 1rem;
  padding: 0.25rem;
}

/* Index page */
.intro { margin-bottom: 2.5rem; }
.intro p { color: var(--muted); font-size: 0.95rem; }

.post-list { list-style: none; }
.post-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.post-list li:first-child { border-top: 1px solid var(--border); }
.post-list a { display: block; text-decoration: none; }
.post-list a:hover h2 { color: var(--accent); }
.post-list .meta {
  font-size: 0.8rem;
  color: var(--light);
  font-family: var(--mono);
  margin-bottom: 0.25rem;
}
.post-list .meta .tag {
  color: var(--muted);
  margin-left: 0.5rem;
}
.post-list h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.2rem;
  transition: color 0.15s;
}
.post-list .excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Post page */
.post-header { margin-bottom: 2rem; }
.post-header .meta {
  font-size: 0.8rem;
  color: var(--light);
  font-family: var(--mono);
  margin-bottom: 0.5rem;
}
.post-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.post-body p { margin-bottom: 1rem; }
.post-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}
.post-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}
.post-body ul, .post-body ol { margin: 0 0 1rem 1.5rem; }
.post-body li { margin-bottom: 0.3rem; }
.post-body code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}
.post-body pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
.post-body pre code { background: none; padding: 0; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1rem 0;
}
.post-body strong { font-weight: 600; }

/* Learned callout */
.learned {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
}
.learned h2 {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.learned ul { margin-left: 1.25rem; }
.learned li { margin-bottom: 0.4rem; font-size: 0.95rem; }

/* Back link */
.back {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.back:hover { color: var(--accent); }

/* About page */
.about h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.about h2 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.about p { margin-bottom: 1rem; }
.about ul { margin: 0 0 1rem 1.5rem; }
.about li { margin-bottom: 0.3rem; }

/* Footer */
footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--light);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer a { color: var(--light); }
footer a:hover { color: var(--muted); }

/* Empty state */
.empty { color: var(--light); font-style: italic; padding: 2rem 0; }
