:root {
  --text: #111111;
  --muted: #999999;
  --line: #ececec;
  --bg: #f7f7f7;
  --surface: #ffffff;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Lora", "Noto Serif SC", ui-serif, "Songti SC", STSong,
    "Noto Serif CJK SC", "Source Han Serif SC", SimSun, Georgia,
    "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 7vh 20px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
}

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: var(--font-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: var(--font-mono);
  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: var(--font-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: var(--font-mono);
  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: var(--font-serif);
}

.post-header time {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.9rem;
}

.post-content {
  overflow-wrap: anywhere;
  font-family: var(--font-serif);
  font-size: 1.03rem;
  line-height: 1.8;
  text-autospace: ideograph-alpha;
}

.post-content a,
.post-nav a {
  font-family: var(--font-serif);
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.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: 0;
  border-radius: 6px;
  padding: 0.85rem 0.95rem;
  background: #eeeeeb;
  font-family: var(--font-mono);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.post-content :not(pre) > code {
  padding: 0.08em 0.28em;
  border-radius: 4px;
  background: #eeeeeb;
}

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

.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.65rem;
  padding-top: 0.35rem;
}

.comments-head {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  margin-bottom: 0.9rem;
  color: var(--muted);
}

.comments-head h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 0.94rem;
  font-weight: 500;
}

.comments-icon {
  width: 17px;
  height: 17px;
}

.comments-icon,
.comment-mark svg,
.comments-empty svg,
.comment-time svg,
.comment-reply-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.comments-count {
  min-width: 1.3rem;
  padding: 0.06rem 0.34rem;
  border-radius: 999px;
  background: #e9e9e5;
  color: #777;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.35;
  text-align: center;
}

.comments-empty {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.comments-empty svg {
  width: 18px;
  height: 18px;
  opacity: 0.72;
}

.comments-empty circle {
  fill: currentColor;
  stroke: none;
}

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

.comment-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0.58rem;
  margin-top: 1rem;
}

.comment-item:first-child {
  margin-top: 0;
}

.comment-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #ecece8;
  color: #777;
}

.comment-mark svg {
  width: 13px;
  height: 13px;
}

.comment-body {
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 22px;
  color: var(--muted);
  font-size: 0.76rem;
}

.comment-meta strong {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 500;
}

.comment-time {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.comment-time svg,
.comment-reply-icon {
  width: 12px;
  height: 12px;
}

.comment-reply-icon {
  opacity: 0.72;
}

.comment-content {
  margin-top: 0.18rem;
  color: #444;
  font-family: var(--font-serif);
  font-size: 0.91rem;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.comment-content pre {
  overflow-x: auto;
  margin: 0.42rem 0 0.55rem;
  padding: 0.62rem 0.72rem;
  border: 0;
  border-radius: 5px;
  background: #eeeeeb;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
}

.comment-content code {
  font-family: var(--font-mono);
}

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

.comment-replies .comment-mark {
  width: 20px;
  height: 20px;
  background: transparent;
  color: var(--muted);
}

.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: var(--font-mono);
  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;
  }

  .post-comments {
    margin-top: 1.4rem;
  }

  .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;
  }

  .post-content pre,
  .comment-content pre,
  .post-content :not(pre) > code {
    background: #1b1b1b;
  }

  .comments-count,
  .comment-mark {
    background: #242424;
    color: #aaa;
  }

  .comment-content {
    color: #c4c4c4;
  }
}
