:root {
  --text: #1a1a1a;
  --text-secondary: #6b6b6b;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --border: #e5e5e5;
  --content-width: 640px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e5e5e5;
    --text-secondary: #999999;
    --bg: #141414;
    --bg-alt: #1e1e1e;
    --border: #2e2e2e;
  }
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  padding: 40px 0 32px;
}

.site-header .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-nav a {
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 24px;
}

.site-nav a:hover {
  color: var(--text);
}

/* Content */
.site-content {
  padding: 16px 0 80px;
}

/* Post list */
.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 32px;
}

.post-list time {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.post-list a {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.post-list a:hover {
  text-decoration: underline;
}

.post-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 4px;
}

/* Post */
.post time {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.post h1 {
  margin-bottom: 32px;
}

/* Article typography */
article h1 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

article p {
  margin-bottom: 1.5em;
}

article a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

article blockquote {
  border-left: 3px solid var(--border);
  padding-left: 20px;
  color: var(--text-secondary);
  margin: 1.5em 0;
}

article pre {
  background: var(--bg-alt);
  padding: 16px 20px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 1.5em 0;
}

article code {
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 3px;
}

article pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

article ul, article ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

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

/* Footer */
.site-footer {
  padding: 24px 0 40px;
}

.site-footer .wrapper {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .site-header .wrapper {
    flex-direction: column;
    gap: 8px;
  }

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

  article h1 {
    font-size: 26px;
  }
}
