/* 极简风格 - 自定义样式 */

:root {
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-bg: #fafafa;
  --color-border: #e8e8e8;
  --color-accent: #1a1a1a;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --max-width: 680px;
  --spacing: 1.5rem;
}

/* 基础 */
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* 页面容器 - 统一最大宽度与左右留白 */
.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
  box-sizing: border-box;
}

/* 页头 - 左对齐，标题左、导航右 */
.site-header {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing) 0;
  margin-bottom: 2rem;
}

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

.header-wrapper .site-nav {
  margin-top: 0;
}

.site-title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.site-title,
.site-title:visited {
  color: var(--color-text);
  text-decoration: none;
}

.site-title:hover {
  opacity: 0.7;
}

/* 导航 */
.site-nav {
  margin-top: 0.5rem;
}

.site-nav .trigger {
  display: flex;
  gap: 1.5rem;
}

.site-nav .page-link {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  margin-right: 1.5rem;
}

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

/* 主内容区 */
main.page-content .wrapper {
  padding-top: 0;
  padding-bottom: 2rem;
}

/* 首页 - 文章列表 */
.home {
  padding-bottom: 2rem;
}

.home .page-heading {
  display: none;
}

/* 隐藏 Posts 标题 */
.post-list-heading {
  display: none;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list > li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post-list > li:first-child {
  padding-top: 0;
}

.post-list > li:last-child {
  border-bottom: none;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.post-list h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

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

.post-link:hover {
  opacity: 0.7;
}

/* 文章页 */
.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.post-content {
  margin-top: 2rem;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

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

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

.post-content a:hover {
  opacity: 0.7;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: #f0f0f0;
  padding: 0.15em 0.4em;
  border-radius: 2px;
}

.post-content pre {
  background: #f8f8f8;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

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

/* 关于页 / 文章页 */
.post-content h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.post-content p,
.post-content ul {
  margin-bottom: 1rem;
}

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

/* 页脚 - 与内容区左对齐 */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing) 0;
  margin-top: 2rem;
}

.site-footer .footer-col-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer .footer-col {
  flex: 0 0 auto;
}

.site-footer .rss-subscribe {
  margin: 0;
}

.site-footer .contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.site-footer .contact-list li {
  margin: 0;
}

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

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

/* 响应式 */
@media screen and (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .wrapper {
    padding: 0 1rem;
  }

  .post-title {
    font-size: 1.25rem;
  }
}
