:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-bg: #fff;
  --color-border: #e5e5e5;
  --color-link: #0066cc;
  --color-tag-bg: #f0f0f0;
  --max-width: 700px;
}

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  padding: 0;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

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

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }

/* Header */
header {
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.site-title:hover {
  text-decoration: none;
}

nav a {
  margin-left: 1.5rem;
}

/* Footer */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

footer p {
  margin: 0.5rem 0;
}

/* Article list */
.article-list {
  list-style: none;
  padding: 0;
}

.article-list li {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.article-list time {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-family: var(--font-mono);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--color-tag-bg);
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.tag:hover {
  text-decoration: none;
  background: #e0e0e0;
}

/* Article */
.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.article-meta {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.article-meta time {
  font-family: var(--font-mono);
}

.reading-time::before {
  content: "·";
  margin: 0 0.5rem;
}

.article-content {
  line-height: 1.7;
}

.article-content ul, .article-content ol {
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-tag-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}

pre {
  background: #f6f8fa;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 0.5rem;
  }

  nav a:first-child {
    margin-left: 0;
  }
}
