/* ==========================================================================
   周语涵 个人站点 — 极简静态博客样式表
   无外部依赖、无字体/CDN 请求，可直接离线使用
   ========================================================================== */

:root {
  --bg: #fbfaf7;
  --bg-soft: #f2efe9;
  --card: #ffffff;
  --text: #1f2328;
  --text-soft: #5d6672;
  --text-mute: #8b939e;
  --line: #e4e0d8;
  --accent: #2f6f5e;
  --accent-soft: #e9f1ee;
  --max-width: 44rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(31, 35, 40, 0.04), 0 8px 24px rgba(31, 35, 40, 0.05);
  --font-sans: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-serif: Georgia, "Songti SC", "Noto Serif SC", "Source Han Serif SC",
    "SimSun", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --bg-soft: #1e2126;
    --card: #1b1e23;
    --text: #e6e8eb;
    --text-soft: #a8b0ba;
    --text-mute: #7d858f;
    --line: #2c3037;
    --accent: #6fbfa6;
    --accent-soft: #1f2c28;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

/* ----- 布局容器 ----- */

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.35rem;
}

/* ----- 顶部导航 ----- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(12px);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--text-soft);
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ----- 首页头部 ----- */

.hero {
  padding: 3.4rem 0 2.2rem;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4.4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  margin: 0;
  max-width: 34rem;
  color: var(--text-soft);
  font-size: 1rem;
}

.hero .facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.hero .facts li {
  padding: 0.18rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 0.8rem;
}

/* ----- 文章列表 ----- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.6rem 0 0.4rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.section-head a {
  font-size: 0.85rem;
}

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

.post-list li {
  padding: 1.55rem 0;
  border-bottom: 1px solid var(--line);
}

.post-list li:last-child {
  border-bottom: 0;
}

.post-list time {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-mute);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.post-list h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.5;
}

.post-list h3 a {
  color: var(--text);
}

.post-list h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-list p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  color: var(--text-mute);
  font-size: 0.76rem;
}

.tags li::before {
  content: "#";
  opacity: 0.55;
}

/* ----- 文章正文 ----- */

.article {
  padding: 2.8rem 0 1rem;
}

.article-header {
  padding-bottom: 1.6rem;
  margin-bottom: 1.9rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.8vw, 1.95rem);
  font-weight: 600;
  line-height: 1.45;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  color: var(--text-mute);
  font-size: 0.82rem;
}

.prose {
  font-size: 1rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 2.4rem 0 0.85rem;
  font-family: var(--font-serif);
  font-size: 1.24rem;
  font-weight: 600;
  line-height: 1.5;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.prose h3 {
  margin: 1.9rem 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.prose p {
  margin: 0 0 1.15rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 3px solid var(--accent);
  color: var(--text-soft);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  padding: 0.12em 0.38em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-soft);
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.prose pre {
  margin: 1.4rem 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  line-height: 1.7;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.84rem;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.prose hr {
  margin: 2.4rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose table {
  width: 100%;
  margin: 1.4rem 0;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--bg-soft);
  font-weight: 600;
}

/* ----- 关于页 ----- */

.page {
  padding: 2.8rem 0 1rem;
}

.page > h1 {
  margin: 0 0 1.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.8vw, 1.95rem);
  font-weight: 600;
}

.info-card {
  margin: 1.8rem 0;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.info-card dl {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: 0.92rem;
}

.info-card dt {
  color: var(--text-mute);
}

.info-card dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

/* ----- 页脚 ----- */

.site-footer {
  margin-top: 3.5rem;
  padding: 2.2rem 0 2.6rem;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 2;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
  border-bottom: 1px solid color-mix(in srgb, var(--text-soft) 35%, transparent);
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}

.site-footer .sep {
  margin: 0 0.45rem;
  color: var(--text-mute);
}

.site-footer .beian {
  margin-top: 0.35rem;
  color: var(--text-mute);
}

/* ----- 404 ----- */

.notfound {
  padding: 5rem 0 6rem;
  text-align: center;
}

.notfound .code {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.notfound h1 {
  margin: 1.2rem 0 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.notfound p {
  margin: 0 0 1.6rem;
  color: var(--text-soft);
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.9rem;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

/* ----- 响应式 ----- */

@media (max-width: 34rem) {
  body {
    font-size: 16px;
  }

  .site-header .inner {
    min-height: 3.4rem;
  }

  .site-nav {
    gap: 0.95rem;
    font-size: 0.88rem;
  }

  .hero {
    padding: 2.4rem 0 1.8rem;
  }

  .info-card dl {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .info-card dd {
    margin-bottom: 0.55rem;
  }
}
