:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Mono', 'Cascadia Code', Consolas, monospace;
  --text: #222;
  --bg: #fafafa;
  --link: #0066cc;
  --border: #ddd;
  --meta: #666;
  --max-width: 1100px;
  --sidebar-width: 260px;
}

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

body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  padding: 1rem;
}

header, .layout, footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 0;
}

.layout {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
}

main {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  font-size: 0.9rem;
}

.sidebar section {
  margin-bottom: 1.5rem;
}

.sidebar h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--meta);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.sidebar a {
  color: var(--text);
  text-decoration: none;
}

.sidebar a:hover {
  color: var(--link);
}

.sidebar .bio img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.sidebar .bio p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.tags li {
  display: inline;
}

.tags li::after {
  content: ' · ';
  color: var(--border);
}

@media (max-width: 640px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
  }
}

header { border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
header h1 { font-size: 1.4rem; }
header h1 a { text-decoration: none; color: var(--text); }
.tagline { color: var(--meta); font-size: 0.9rem; }

footer { border-top: 1px solid var(--border); margin-top: 2rem; color: var(--meta); font-size: 0.9rem; }

article h1 { font-size: 1.8rem; margin-bottom: 0.5rem; line-height: 1.3; }
.meta { color: var(--meta); font-size: 0.85rem; margin-bottom: 1.5rem; }
.meta a { color: var(--meta); }
.meta time { margin-right: 0.25rem; }

.post-body p { margin-bottom: 1rem; }
.post-body h2, .post-body h3, .post-body h4 { margin: 1.5rem 0 0.5rem; line-height: 1.3; }
.post-body ul, .post-body ol { margin: 0.5rem 0 1rem 1.5rem; }
.post-body li { margin-bottom: 0.25rem; }
.post-body a { color: var(--link); }
.post-body img { max-width: 100%; height: auto; }
.post-body blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--meta);
  margin: 1rem 0;
}

.post-body pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #f0f0f0;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.post-body pre code { background: none; padding: 0; }

.summary { margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
.summary h3 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.summary h3 a { text-decoration: none; color: var(--text); }
.summary h3 a:hover { color: var(--link); }
.summary p { color: var(--meta); font-size: 0.95rem; }

nav.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.pagination { text-align: center; margin-top: 2rem; }
.pagination a, .pagination span { margin: 0 0.25rem; }
