/* ===========================================================
   pppiggg.cn — 设计参数取自 love.com（Gazpacho / Figtree 组合）
   字体全部自托管，不依赖 Google Fonts
   =========================================================== */

/* ---------- 字体 ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
/* 中文标题衬线：GB2312 一级常用字子集 */
@font-face {
  font-family: "Noto Serif SC";
  src: url("fonts/noto-serif-sc-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---------- 设计 token ---------- */
:root {
  --bg: #f9f7f4;
  --ink: #22595d;
  --ink-soft: #4b797c;
  --accent: #2d7c86;
  --pale: #dfedeb;
  --line: rgba(34, 89, 93, 0.15);
  --line-strong: rgba(34, 89, 93, 0.28);

  --font-display: "Fraunces", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;

  --w-page: 1216px;
  --w-read: 680px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--pale);
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0 40px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- 站头 ---------- */
.site-head {
  padding: 34px 0 30px;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

.wordmark span {
  color: var(--ink-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

.nav a.quiet {
  color: var(--ink-soft);
}

/* ---------- 首屏 ---------- */
.hero {
  padding: 52px 0 66px;
}

.hero .eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1.18;
  letter-spacing: 0.004em;
  color: var(--accent);
  margin: 0 0 18px;
  max-width: 15em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 34em;
}

/* ---------- 文章列表 ---------- */
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

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

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

.post-list a {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 32px;
  padding: 26px 0 28px;
  align-items: baseline;
}

.post-list .date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.post-list h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: 0.004em;
  margin: 0 0 8px;
  color: var(--ink);
  font-variation-settings: "SOFT" 0, "WONK" 0;
  transition: color 0.18s ease;
}

.post-list a:hover h2 {
  color: var(--accent);
}

.post-list p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46em;
}

.post-list .tags {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--pale);
  border-radius: 999px;
  padding: 4px 11px 5px;
}

/* ---------- 文章页 ---------- */
.article {
  max-width: var(--w-read);
  margin: 0 auto;
  padding: 26px 0 96px;
}

.back {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 34px;
}

.back:hover {
  color: var(--ink);
}

.article h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.2;
  letter-spacing: 0.004em;
  color: var(--ink);
  margin: 0 0 20px;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

.meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 38px;
}

.meta span + span::before {
  content: "·";
  margin: 0 10px;
  opacity: 0.6;
}

.article p {
  margin: 0 0 1.4em;
  font-size: 18px;
  line-height: 1.85;
}

.article h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.35;
  color: var(--ink);
  margin: 2.2em 0 0.7em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

.article h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 2em 0 0.6em;
}

.article ul,
.article ol {
  margin: 0 0 1.4em;
  padding-left: 1.3em;
}

.article li {
  margin-bottom: 0.5em;
  line-height: 1.8;
}

.article a {
  color: var(--accent);
  border-bottom: 1px solid rgba(45, 124, 134, 0.35);
}

.article a:hover {
  border-bottom-color: var(--accent);
}

.article blockquote {
  margin: 1.8em 0;
  padding: 2px 0 2px 22px;
  border-left: 2px solid var(--pale);
  color: var(--ink-soft);
  font-style: italic;
}

.article code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
  background: rgba(34, 89, 93, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.article pre {
  margin: 1.6em 0;
  padding: 20px 22px;
  background: #f2eee8;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.65;
}

.article pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.article hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.6em 0;
}

/* ---------- 关于页 ---------- */
.about {
  max-width: var(--w-read);
  margin: 0 auto;
  padding: 26px 0 96px;
}

.about h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1.2;
  color: var(--accent);
  margin: 0 0 30px;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

.about p {
  font-size: 18px;
  line-height: 1.85;
  margin: 0 0 1.4em;
}

.about dl {
  margin: 2.2em 0 0;
  border-top: 1px solid var(--line);
}

.about dl > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.about dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 3px;
}

.about dd {
  margin: 0;
  font-size: 16px;
}

/* ---------- 页脚 ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
}

.site-foot .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.site-foot a:hover {
  color: var(--ink);
}

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .wrap {
    padding: 0 22px;
  }
  body {
    font-size: 17px;
  }
  .site-head {
    padding: 24px 0 18px;
  }
  .wordmark {
    font-size: 23px;
  }
  .nav {
    gap: 18px;
  }
  .hero {
    padding: 34px 0 44px;
  }
  .post-list a {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 0;
  }
  .post-list h2 {
    font-size: 23px;
  }
  .post-list {
    margin-bottom: 56px;
  }
  .about dl > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .site-foot .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .article,
  .about {
    padding-bottom: 64px;
  }
  .article p,
  .about p {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto;
  }
}
