:root {
  color-scheme: light;
  --bg: #fff;
  --ink: #15191f;
  --muted: #636b78;
  --line: #e1e5eb;
  --soft: #f5f7fa;
  --blue: #125ad6;
  --green: #26804b;
  --code: #f3f5f8;
  --max: 1160px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #151719;
  --ink: #edf0f3;
  --muted: #a5adb8;
  --line: #353a40;
  --soft: #1e2226;
  --blue: #8ab6ff;
  --green: #8dceab;
  --code: #20252a;
}
* {
  box-sizing: border-box;
  letter-spacing: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
button {
  color: inherit;
}
svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  vertical-align: middle;
}
img {
  max-width: 100%;
  height: auto;
}
.shell {
  width: min(var(--max), calc(100% - 96px));
  margin-inline: auto;
}
.header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 750;
  white-space: nowrap;
}
.brand > svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
  stroke-width: 2.4;
}
.brand small {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 8px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav a {
  color: var(--ink);
  position: relative;
  padding: 28px 0;
}
.nav a[aria-current] {
  color: var(--blue);
}
.nav a[aria-current]:after {
  content: '';
  position: absolute;
  bottom: -1px;
  height: 2px;
  left: 0;
  right: 0;
  background: var(--blue);
}
.header-actions {
  display: flex;
  gap: 6px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--soft);
  color: var(--blue);
  text-decoration: none;
}
.masthead {
  padding: 46px 0 36px;
  border-bottom: 1px solid var(--line);
}
.masthead h1 {
  font-size: 64px;
  font-weight: 780;
  line-height: 1.2;
  margin: 0 0 14px;
}
.title-dot {
  color: var(--blue);
}
.masthead p {
  font-size: 22px;
  color: var(--muted);
  margin: 0;
}
.home-grid,
.archive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 60px;
  padding: 34px 0 64px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}
.section-heading h2,
.sidebar h2 {
  font-size: 21px;
  font-weight: 700;
  margin: 0;
}
.section-heading > a {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.section-heading svg {
  width: 16px;
  height: 16px;
  margin-left: 6px;
}
.post-row {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.meta a {
  color: var(--muted);
}
.meta-divider {
  height: 12px;
  border-left: 1px solid var(--line);
}
.reading {
  margin-left: auto;
}
.post-row h2 {
  font-size: 22px;
  line-height: 1.5;
  margin: 8px 0 6px;
  font-weight: 650;
}
.post-row h2 a {
  display: block;
  position: relative;
  padding-right: 30px;
}
.row-arrow {
  position: absolute;
  right: 0;
  top: 3px;
  color: var(--green);
  transition: transform 0.18s;
}
.post-row h2 a:hover .row-arrow {
  transform: translate(2px, -2px);
}
.post-row p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notebook {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 28px;
}
.sidebar section {
  margin-bottom: 16px;
}
.topic-list {
  padding: 0;
  margin: 16px 0 24px;
  list-style: none;
}
.topic-list li {
  border-bottom: 1px solid var(--line);
}
.topic-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}
.topic-list small {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sidebar blockquote {
  border-left: 3px solid var(--green);
  padding-left: 18px;
  margin: 35px 0;
  color: var(--muted);
  font-size: 14px;
}
.sidebar cite {
  display: block;
  font-style: normal;
  margin-top: 10px;
  text-align: right;
}
.all-tags {
  font-size: 14px;
}
.all-tags svg {
  width: 16px;
  height: 16px;
}
.footer {
  padding: 26px 0 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  color: var(--muted);
}
.footer div {
  display: flex;
  gap: 24px;
}
.footer a {
  color: var(--muted);
  white-space: nowrap;
}
.footer svg {
  width: 16px;
  height: 16px;
  margin-right: 5px;
}
.page-heading {
  padding: 48px 0 30px;
  border-bottom: 1px solid var(--line);
}
.page-heading h1 {
  font-size: 38px;
  margin: 0;
  line-height: 1.4;
}
.page-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 760px;
}
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
  font-size: 14px;
}
.pagination > * {
  padding: 6px 12px;
  min-width: 34px;
  text-align: center;
}
.pagination .current {
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
}
.pagination .space {
  padding: 6px 0;
}
.article-header {
  max-width: 850px;
  padding: 38px 0 30px;
}
.back-link {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  color: var(--muted);
}
.article-header h1 {
  font-size: 40px;
  line-height: 1.4;
  margin: 16px 0 0;
  font-weight: 720;
}
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 60px;
  padding-bottom: 64px;
}
.article-main {
  min-width: 0;
}
.prose {
  font-size: 17px;
  line-height: 1.95;
}
.prose > *:first-child {
  margin-top: 0;
}
.prose h2 {
  font-size: 27px;
  line-height: 1.5;
  margin: 46px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.prose h3 {
  font-size: 22px;
  margin: 32px 0 14px;
  line-height: 1.5;
}
.prose h4 {
  font-size: 18px;
  margin: 28px 0 10px;
}
.prose p,
.prose ul,
.prose ol {
  margin: 18px 0;
}
.prose li + li {
  margin-top: 6px;
}
.prose img {
  display: block;
  border-radius: 3px;
  height: auto;
  margin: 24px auto;
}
.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose blockquote {
  margin: 24px 0;
  padding: 4px 22px;
  border-left: 3px solid var(--blue);
  background: var(--soft);
  color: var(--muted);
}
.prose code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.85em;
  background: var(--code);
  padding: 3px 5px;
  border-radius: 3px;
}
.prose pre {
  white-space: pre;
  overflow: auto;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.7;
  background: var(--code);
  padding: 20px 22px;
  margin: 24px 0;
  border-radius: 4px;
  tab-size: 2;
}
.prose pre code {
  padding: 0;
  font-size: inherit;
  background: none;
}
.prose figure.highlight {
  position: relative;
  margin: 24px 0;
  border: 1px solid var(--line);
  background: var(--code);
  border-radius: 4px;
  overflow: hidden;
  padding-top: 24px;
}
.highlight table {
  width: 100%;
  border: 0 !important;
  margin: 0 !important;
}
.highlight td {
  padding: 0 !important;
  border: 0 !important;
}
.highlight pre {
  margin: 0;
  border-radius: 0;
  padding: 16px 20px;
}
.highlight .gutter {
  display: none;
}
.copy-code {
  position: absolute;
  right: 8px;
  top: 4px;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 4px;
}
.copy-code svg {
  width: 16px;
  height: 16px;
}
.copy-code:hover {
  color: var(--blue);
  background: var(--bg);
}
.copy-code.copied {
  color: var(--green);
}
.copy-status {
  position: absolute;
  right: 46px;
  top: 4px;
  font-size: 12px;
  line-height: 30px;
  color: var(--muted);
}
.hljs-comment,
.hljs-quote {
  color: var(--muted);
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-title {
  color: var(--blue);
}
.hljs-string,
.hljs-attr {
  color: var(--green);
}
.hljs-number,
.hljs-literal {
  color: #b35673;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
  margin: 24px 0;
}
.prose table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
  margin: 0;
}
.prose th,
.prose td {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  text-align: left;
}
.prose th {
  background: var(--soft);
}
.toc {
  font-size: 13px;
  color: var(--muted);
  align-self: start;
  position: sticky;
  top: 28px;
  border-left: 1px solid var(--line);
  padding-left: 24px;
  max-height: 80vh;
  overflow: auto;
}
.toc summary {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  padding-bottom: 12px;
}
.toc ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.toc ol ol {
  padding-left: 14px;
}
.toc li {
  margin: 10px 0;
  line-height: 1.6;
}
.toc a {
  color: var(--muted);
}
.toc a:hover {
  color: var(--blue);
}
.article-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 14px;
}
.tag-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 15px;
}
.post-navigation small {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}
.standalone {
  max-width: 820px;
  min-height: 45vh;
  padding: 36px 0 64px;
}
.taxonomy {
  list-style: none;
  padding: 24px 0 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 36px;
  min-height: 45vh;
}
.taxonomy li {
  border-bottom: 1px solid var(--line);
}
.taxonomy a {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 24px 0;
}
.taxonomy small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.taxonomy svg {
  width: 16px;
  height: 16px;
}
.search-page {
  max-width: 840px;
  min-height: 55vh;
  padding: 32px 0 64px;
}
.search-field {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--soft);
}
.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  outline-offset: 3px;
}
.search-field button {
  border: 0;
  background: var(--blue);
  color: var(--bg);
  border-radius: 3px;
  padding: 7px 16px;
  font-size: 14px;
  white-space: nowrap;
}
.search-field svg {
  color: var(--muted);
}
mark {
  background: #ffeda5;
  color: #242424;
  padding: 0 2px;
}
.not-found {
  min-height: 60vh;
  padding: 65px 0;
}
.not-found h1 {
  font-size: 34px;
}
.not-found > p {
  color: var(--muted);
}
.not-found .error-code {
  font-size: 64px;
  font-weight: 750;
  color: var(--blue);
  margin: 0;
}
.primary-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin: 16px 24px 16px 0;
}
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
}
[hidden] {
  display: none !important;
}
.visually-hidden,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px;
  top: 8px;
  left: 8px;
  background: var(--bg);
  z-index: 10;
}
@media (max-width: 1000px) {
  .home-grid,
  .archive-layout {
    gap: 36px;
    grid-template-columns: minmax(0, 1fr) 235px;
  }
  .article-grid {
    gap: 36px;
    grid-template-columns: minmax(0, 1fr) 195px;
  }
  .brand small {
    display: none;
  }
  .nav {
    gap: 24px;
  }
  .article-header h1 {
    font-size: 34px;
  }
}
@media (max-width: 720px) {
  .shell {
    width: calc(100% - 40px);
  }
  .header {
    min-height: 116px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 12px;
    padding-top: 14px;
  }
  .brand {
    font-size: 20px;
  }
  .brand small {
    display: inline;
    font-size: 12px;
  }
  .header-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .nav {
    grid-row: 2;
    grid-column: 1/-1;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
  }
  .nav a {
    padding: 10px 0 14px;
    font-size: 14px;
  }
  .masthead {
    padding: 30px 0 28px;
  }
  .masthead h1 {
    font-size: 44px;
  }
  .masthead p {
    font-size: 17px;
  }
  .home-grid,
  .archive-layout {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 24px;
  }
  .section-heading h2 {
    font-size: 19px;
  }
  .post-row {
    padding: 22px 0;
  }
  .post-row h2 {
    font-size: 20px;
  }
  .meta {
    font-size: 12px;
    gap: 9px;
  }
  .reading {
    display: none;
  }
  .post-row p {
    font-size: 14px;
  }
  .home-grid > .sidebar {
    border-top: 1px solid var(--line);
    padding-top: 30px;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
  }
  .notebook {
    margin: 0;
  }
  .home-grid .sidebar blockquote,
  .home-grid .sidebar .all-tags {
    grid-column: 1/-1;
    margin: 0;
  }
  .home-grid .sidebar .topic-list {
    margin: 10px 0 0;
  }
  .home-grid .sidebar h2 {
    font-size: 18px;
  }
  .home-grid .sidebar section {
    margin: 0;
  }
  .home-grid .topic-list a {
    font-size: 14px;
    padding: 7px 0;
  }
  .footer {
    flex-direction: column;
    gap: 12px;
    padding-bottom: 32px;
  }
  .footer div {
    gap: 24px;
  }
  .page-heading {
    padding-top: 32px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .page-heading p {
    font-size: 15px;
  }
  .article-header {
    padding-top: 28px;
  }
  .article-header h1 {
    font-size: 28px;
  }
  .back-link {
    margin-bottom: 24px;
  }
  .article-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .toc {
    position: static;
    order: -1;
    max-height: 250px;
    border-left: 2px solid var(--line);
    padding-left: 18px;
    width: 100%;
  }
  .prose {
    font-size: 16px;
  }
  .prose h2 {
    font-size: 23px;
    margin-top: 36px;
  }
  .prose h3 {
    font-size: 20px;
  }
  .prose pre {
    font-size: 13px;
    padding: 16px;
  }
  .taxonomy {
    grid-template-columns: 1fr 1fr;
    gap: 0 22px;
  }
  .taxonomy a {
    font-size: 14px;
    padding: 20px 0;
  }
  .taxonomy svg {
    display: none;
  }
  .search-field {
    padding: 10px;
    gap: 8px;
  }
  .search-field input {
    font-size: 15px;
  }
  .search-field button {
    padding: 7px 10px;
  }
  .post-navigation {
    grid-template-columns: 1fr;
  }
  .not-found h1 {
    font-size: 28px;
  }
  .back-top {
    right: 12px;
    bottom: 12px;
  }
}
.prose .astro-code {
  color: var(--shiki-light);
  background-color: var(--shiki-light-bg);
}
.astro-code span {
  color: var(--shiki-light);
  background-color: transparent;
}
[data-theme='dark'] .prose .astro-code {
  color: var(--shiki-dark);
  background-color: var(--shiki-dark-bg);
}
[data-theme='dark'] .astro-code span {
  color: var(--shiki-dark);
  background-color: transparent;
}
[data-theme='dark'] .copy-code img {
  filter: invert(1);
}
.toc .toc-nested {
  padding-left: 14px;
}
.comments {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  margin-top: 24px;
}
.comments h2 {
  font-size: 22px;
  margin: 0 0 14px;
}
.comments p {
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.load-comments {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 18px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.load-comments:disabled {
  opacity: 0.65;
  cursor: default;
}
.giscus {
  min-width: 0;
}
.giscus-frame {
  width: 100%;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}
