:root {
  --page: #fafbfc;
  --surface: #fff;
  --text: #3a4f66;
  --heading: #192a3d;
  --muted: #516477;
  --line: #e1e8ed;
  --tint: #f2f5f7;
  --accent: #1559ed;
  --focus: #2872fa;
  --shadow: 0 12px 18px -6px rgba(34, 56, 101, 0.075);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.65 var(--font);
}
h1, h2, h3 { color: var(--heading); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
::selection { background: #dbe8ff; color: var(--heading); }
.wrap { width: min(90%, 1290px); margin-inline: auto; }
.skip {
  position: absolute;
  z-index: 5;
  left: 12px;
  top: 12px;
  transform: translateY(-160%);
  background: var(--surface);
  padding: 8px 12px;
}
.skip:focus { transform: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header { background: var(--surface); }
.masthead {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 120px;
}
.brand { display: block; margin-right: auto; }
.brand strong, .brand small { display: block; }
.brand strong { color: var(--heading); font-size: 25px; font-weight: 700; line-height: 1.38; }
.brand small { margin-top: 3px; color: var(--text); font-size: 13px; }
.desktop-navigation { display: flex; align-items: center; gap: 26px; }
.desktop-navigation a, .mobile-panel nav a { font-size: 13px; font-weight: 600; }
.desktop-navigation a { padding-block: 12px; }
.nav-item { position: relative; }
.nav-item > a { display: block; }
.nav-submenu { position: absolute; z-index: 2; top: 100%; left: -12px; display: none; min-width: max-content; background: var(--surface); border: 1px solid var(--line); }
.nav-submenu a { display: block; padding-inline: 12px; }
.nav-item:hover .nav-submenu, .nav-item:focus-within .nav-submenu { display: block; }

.desktop-search, .mobile-navigation { color: var(--heading); }
.desktop-search summary, .mobile-navigation summary {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
.desktop-search summary:hover, .mobile-navigation summary:hover { color: var(--accent); }
.search-icon {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.search-icon::after {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 6px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(47deg);
  content: "";
}
.header-search-form { display: flex; gap: 8px; }
.desktop-search .header-search-form, .mobile-panel {
  position: absolute;
  z-index: 2;
  top: calc(50% + 25px);
  right: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.header-search-form input, .header-search-form button {
  min-width: 0;
  min-height: 40px;
  padding: 7px 12px;
  font: inherit;
  font-size: 14px;
}
.header-search-form input {
  flex: 1;
  width: 195px;
  border: 1px solid var(--line);
  background: var(--tint);
  color: var(--heading);
}
.header-search-form input::placeholder { color: var(--muted); }
.header-search-form button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--surface);
  white-space: nowrap;
  cursor: pointer;
}
.header-search-form button:hover { background: #1245bd; }
.mobile-navigation { display: none; }
.menu-icon {
  width: 18px;
  height: 14px;
  border-block: 1.5px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
}
.mobile-panel { width: min(100%, 320px); }
.mobile-panel nav { display: grid; margin-bottom: 12px; }
.mobile-panel nav a { padding: 9px 4px; }
.mobile-panel nav .nav-child { padding-inline-start: 20px; }

.blog-archive { padding-top: 60px; }
.post-card { background: var(--surface); box-shadow: var(--shadow); }
.post-card + .post-card { margin-top: 30px; }
.post-card--with-cover {
  display: grid;
  grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
}
.post-cover {
  position: relative;
  min-width: 0;
  display: block;
  background: var(--tint);
}
.post-cover::before { display: block; padding-top: 75%; content: ""; }
.post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-cover:focus-visible { outline-offset: -5px; }
.post-summary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 30px;
}
.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 11px;
  font-size: 12px;
  font-weight: 600;
}
.post-summary h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.post-excerpt { margin: 0 0 19px; overflow-wrap: anywhere; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.post-meta li + li::before {
  margin-inline: 9px;
  color: var(--muted);
  content: "/";
  content: "/" / "";
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block: 38px 0;
  padding-block: 8px;
  color: var(--muted);
  font-size: 13px;
}
.pagination--archive { justify-content: center; flex-wrap: wrap; gap: 8px; }
.pagination--archive a, .pagination--archive span { min-width: 36px; text-align: center; padding: 6px 9px; }
.pagination--archive .current-page { background: var(--accent); color: var(--surface); }
.pagination--archive .next-page { margin-left: 5px; }
.archive-categories {
  margin-block: 36px 0;
  padding-block: 20px;
  border-top: 1px solid var(--line);
}
.archive-categories h2, .search-results h2 { margin: 0 0 12px; font-size: 18px; }
.archive-categories ul, .search-results ul { margin: 0; padding: 0; list-style: none; }
.archive-categories ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.archive-categories li { color: var(--muted); font-size: 14px; }
.archive-categories a, .search-results a { color: var(--accent); }
.search-results {
  margin-bottom: 30px;
  padding: 24px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.search-results p { margin: 0 0 12px; }
.search-results li + li { margin-top: 8px; }
.search-results a:hover, .archive-categories a:hover { text-decoration: underline; }
.muted, .empty { color: var(--muted); }

.page-head { margin-block: 60px 28px; }
.page-head h1, .article-head h1 {
  margin: 0;
  font-size: clamp(25px, 3.4vw, 32px);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.page-head p { margin: 10px 0 0; color: var(--muted); }
.article {
  width: min(100%, 750px);
  margin-inline: auto;
  padding-block: 58px 30px;
}
.article-head { margin-bottom: 39px; }
.article-head .post-meta, .article-head time { margin-top: 20px; }
.article-head > time { display: block; color: var(--muted); font-size: 13px; }
.prose, .comment-body { overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.25em; }
.prose h2, .prose h3 { line-height: 1.35; }
.prose h2 { font-size: 24px; margin: 1.8em 0 .65em; }
.prose h3 { font-size: 19px; margin: 1.4em 0 .6em; }
.prose img, .comment-body img { max-width: 100%; height: auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { color: var(--muted); font-size: 13px; }
.prose a, .comment-body a, .comment-author-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 1.5em 0;
  padding: 12px 18px;
  border-inline-start: 1px solid var(--accent);
  background: var(--tint);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose pre, .prose code { background: var(--tint); }
.prose pre { padding: 12px; overflow-x: auto; }
.prose table { border-collapse: collapse; max-width: 100%; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px; }
.comments { margin-top: 54px; padding-top: 22px; border-top: 1px solid var(--line); }
.comments h2 { margin: 0 0 16px; font-size: 21px; }
.comments h2 span { color: var(--muted); font-size: 13px; font-weight: 500; }
.comment { padding-block: 12px; border-bottom: 1px solid var(--line); }
.comment:target { scroll-margin-top: 16px; background: var(--tint); }
.comment-head { display: flex; gap: 10px; align-items: center; }
.comment-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.comment-byline { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.comment-head strong { color: var(--heading); }
.comment-head time { color: var(--muted); font-size: 12px; }
.comment-permalink:hover, .comment-permalink:focus-visible { text-decoration: underline; }
.comment-body { font-size: 14px; }
.comment-children { margin-left: 12px; padding-left: 13px; border-left: 1px solid var(--line); }
.comment-children .comment:last-child { border-bottom: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; font-size: 13px; }
footer { margin-top: 60px; border-top: 1px solid var(--line); background: var(--surface); }
.foot { padding-block: 22px; color: var(--muted); font-size: 13px; }

@media (max-width: 850px) {
  .masthead { min-height: 70px; }
  .desktop-navigation, .desktop-search { display: none; }
  .mobile-navigation { display: block; }
  .mobile-panel { top: calc(100% - 4px); }
  .blog-archive { padding-top: 40px; }
  .article { padding-top: 42px; }
  .page-head { margin-top: 40px; }
}
@media (max-width: 640px) {
  .wrap { width: 88%; }
  .post-card--with-cover { grid-template-columns: minmax(0, 1fr); }
  .post-summary, .search-results { padding: 23px 22px; }
  .post-summary h2 { font-size: 18px; }
  .post-card + .post-card { margin-top: 24px; }
  .article-head { margin-bottom: 28px; }
  .prose table { display: block; overflow-x: auto; }
  .comment-children { margin-left: 5px; padding-left: 7px; }
}
