:root {
  --bg: #eef3f8;
  --bg-accent: radial-gradient(circle at top, rgba(74, 123, 167, 0.14), transparent 42%);
  --card: rgba(255, 255, 255, 0.9);
  --card-border: rgba(117, 138, 160, 0.18);
  --text: #223042;
  --muted: #627184;
  --accent: #2f6fa3;
  --accent-soft: #d7e7f4;
  --shadow: 0 20px 50px rgba(32, 51, 72, 0.08);
  --radius: 22px;
  --shell-width: 1460px;
  --side-width: 292px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg-accent), var(--bg);
  font: 16px/1.75 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code,
pre {
  font-family: "SFMono-Regular", "JetBrains Mono", "Consolas", monospace;
}

pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: #182433;
  color: #edf2f7;
}

blockquote {
  margin: 1.25rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 4px solid var(--accent-soft);
  color: var(--muted);
}

.site-shell {
  width: min(var(--shell-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.brand img {
  width: 42px;
  height: 42px;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
}

.brand small {
  display: block;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: minmax(250px, var(--side-width)) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.content,
.sidebar {
  min-width: 0;
}

.sidebar .card {
  padding: 22px;
  text-align: left;
}

.sidebar .card h3 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card {
  margin-bottom: 20px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 30px 28px;
}

.page-header h1,
.hero-card h1,
.article-header h1,
.post-card h2 {
  margin: 0;
  line-height: 1.25;
}

.post-card h2 {
  margin-top: 6px;
  font-size: 1.5rem;
}

.eyebrow,
.post-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-intro > :first-child,
.markdown-body > :first-child {
  margin-top: 0;
}

.post-taxonomies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.post-taxonomies a,
.taxonomy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.92rem;
}

.about-header {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(117, 138, 160, 0.16);
}

.about-body {
  color: var(--text);
}

.about-body p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.9;
}

.profile-card h2 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  line-height: 1.3;
}

.avatar {
  width: 74px;
  height: 74px;
  margin: 0 0 16px;
  border-radius: 50%;
  object-fit: cover;
}

.meta-list,
.link-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.meta-list li,
.link-list li + li {
  margin-top: 8px;
}

.meta-list li {
  color: var(--text);
  font-size: 0.95rem;
}

.profile-card .meta-list {
  margin-top: 0;
}

.link-list li + li {
  padding-top: 8px;
  border-top: 1px solid rgba(117, 138, 160, 0.14);
}

.icon-links {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.icon-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
  opacity: 0.9;
}

.icon-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.archive-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(117, 138, 160, 0.16);
}

.archive-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.taxonomy-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.taxonomy-chip {
  justify-content: space-between;
  min-width: 140px;
}

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

.site-footer {
  margin-top: 8px;
  color: var(--muted);
  text-align: center;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.markdown-body p,
.markdown-body li {
  word-break: break-word;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
  padding: 10px 12px;
  border: 1px solid rgba(117, 138, 160, 0.2);
}

.comment-card h2 {
  margin: 0 0 18px;
  font-size: 1.15rem;
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .content {
    order: 1;
  }

  .sidebar {
    order: 2;
  }

  .archive-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: calc(100% - 20px);
    padding-top: 20px;
  }

  .card {
    padding: 20px;
    border-radius: 18px;
  }

  .nav {
    gap: 12px;
  }

  .nav a {
    font-size: 0.95rem;
  }
}
