:root {
  --text: #111111;
  --muted: #999999;
  --line: #ececec;
  --bg: #f7f7f7;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 7vh 20px;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body.font-system {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

body.font-system .site-title,
body.font-system .post-row-title,
body.font-system .post-header h1,
body.font-system .post-content,
body.font-system .post-content a,
body.font-system .post-nav a,
body.font-system .post-comments-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

body.font-system .post-row time,
body.font-system .pagination-pages,
body.font-system .post-header time,
body.font-system .post-content pre,
body.font-system .post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

a {
  color: inherit;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

.site-header {
  border: 0;
}

.site-headline {
  padding: 0;
}

.site-title {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-family: "Crimson Pro", "Times New Roman", serif;
}

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

.site-icons {
  margin-bottom: 2.2rem;
}

.page-main {
  padding: 0.6rem 0 0;
}

.articles {
  margin: 0;
  padding: 0;
}

.post-row {
  list-style: none;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.post-row time {
  font-family: "IBM Plex Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
  white-space: nowrap;
}

.post-row-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  font-family: "Lora", "Noto Serif SC", serif;
  text-autospace: ideograph-alpha;
}

.post-row-title a {
  text-decoration: none;
}

.post-row-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.pagination {
  margin: 0.6rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.pagination-pages {
  display: flex;
  gap: 0.4rem;
  font-family: "IBM Plex Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

.pagination-prev {
  margin-right: 0.35rem;
}

.pagination-next {
  margin-left: 0.35rem;
}

.pagination .current {
  text-decoration: none;
  font-weight: 600;
}

.pagination .ellipsis {
  color: #999;
}

.disabled {
  color: #b3b3b3;
}

.post-article {
  padding: 0;
}

.post-header {
  margin-bottom: 1.3rem;
}

.post-header h1 {
  margin: 0 0 0.3rem;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.32;
  font-family: "Lora", "Noto Serif SC", serif;
}

.post-header time {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-content {
  overflow-wrap: anywhere;
  font-family: "Lora", "Noto Serif SC", serif;
  font-size: 1.03rem;
  line-height: 1.8;
  text-autospace: ideograph-alpha;
}

.post-content a,
.post-nav a {
  font-family: "Lora", "Noto Serif SC", serif;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-weight: 600;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content pre,
.post-content blockquote,
.post-content table {
  margin: 0.9rem 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.35rem;
}

.post-content blockquote {
  margin-left: 0;
  padding-left: 0.8rem;
  border-left: 2px solid var(--line);
}

.post-content pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

.post-content code {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.post-content img,
.post-content video,
.post-content iframe,
.post-content table {
  max-width: 100%;
}

.post-content table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.post-content th,
.post-content td {
  border: 1px solid var(--line);
  padding: 0.4rem 0.55rem;
}

.post-nav {
  margin: 1.1rem 0 0;
  padding: 0.82rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.post-nav a {
  text-decoration: none;
}

.post-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.post-nav-next {
  text-align: right;
}

.post-nav-placeholder {
  display: block;
}

.post-comments {
  margin-top: 1.35rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.post-comments-head {
  margin: 0 0 0.65rem;
  padding-bottom: 0.5rem;
}

.post-comments h2 {
  margin: 0;
  font-family: "Lora", "Noto Serif SC", serif;
  font-size: 1.06rem;
  font-weight: 520;
}

.post-comments-meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-family: "Lora", "Noto Serif SC", serif;
}

.comments-empty {
  margin: 0;
  color: var(--muted);
  font-family: "Lora", "Noto Serif SC", serif;
}

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

.comment-item {
  margin-top: 0.62rem;
  padding-top: 0.62rem;
  border-top: 1px solid var(--line);
}

.comment-meta {
  margin: 0 0 0.35rem;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.comment-author {
  font-family: "Lora", "Noto Serif SC", serif;
  font-weight: 520;
}

.comment-meta time {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  color: var(--muted);
}

.comment-content {
  margin: 0;
  padding: 0;
  border-left: 0;
  background: transparent;
  font-family: "Lora", "Noto Serif SC", serif;
  line-height: 1.78;
  text-autospace: ideograph-alpha;
}

.comment-replies {
  margin-top: 0.55rem;
  margin-left: 1.05rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
}

.site-footer {
  margin-top: 2rem;
  padding-top: 0.8rem;
}

.footer-overlay {
  padding: 0;
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.icon-link {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  text-decoration: none;
}

.icon-link:hover {
  background: #f6f6f6;
}

.icon {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-quote {
  margin: 0.58rem 0 0.2rem;
  text-align: center;
  color: #888;
  font-size: 0.92rem;
  font-family: "Crimson Pro", "Times New Roman", serif;
  letter-spacing: 0.03em;
}

@media (max-width: 760px) {
  .post-row {
    grid-template-columns: 88px 1fr;
    gap: 1rem;
  }

  .post-header h1 {
    font-size: 1.72rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 5vh 14px;
  }

  .site-title {
    font-size: 1.65rem;
  }

  .site-icons {
    margin-bottom: 1.45rem;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    margin-bottom: 1.8rem;
  }

  .post-row time {
    text-align: left;
    font-size: 0.85rem;
  }

  .post-header h1 {
    font-size: 1.62rem;
  }

  .post-content {
    font-size: 1rem;
    line-height: 1.78;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav-next {
    text-align: right;
  }

  .comment-item {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
  }

  .post-comments {
    padding-top: 0.7rem;
  }

  .comment-replies {
    margin-left: 0.8rem;
    padding-left: 0.65rem;
  }

  .footer-icons {
    gap: 0.55rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #d7d7d7;
    --muted: #9f9f9f;
    --line: #3a3a3a;
    --bg: #121212;
    --surface: #171717;
  }

  body {
    background: var(--bg);
    color: var(--text);
  }

  .icon-link {
    border-color: #4b4b4b;
    background: transparent;
  }

  .icon-link:hover {
    background: #222;
  }

  .disabled {
    color: #6f6f6f;
  }

  .footer-quote {
    color: #aaaaaa;
  }
}
