:root {
  --bg: #f7f6f4;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-2: #4a4f59;
  --ink-3: #8a8f98;
  --line: #e3e3de;
  --blue: #22397a;
  --blue-soft: #e8ecf5;
  --navy: #1b2a52;
  --accent: #e6b325;
  --accent-ink: #8a6600;
  --accent-soft: #fbf3dc;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { 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);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---- header / footer ---- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 650; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.logo { width: 26px; height: 26px; flex: none; }
.site-header nav { display: flex; gap: 24px; font-size: 15px; }
.site-header nav a { color: var(--ink-2); }
.site-header nav a:hover { color: var(--ink); text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); margin-top: 112px; padding: 32px 0 40px; color: var(--ink-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
.foot-brand .logo { width: 20px; height: 20px; }
.foot-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-meta a { color: var(--ink-3); }

/* ---- hero ---- */
.hero { padding: 24px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 32px; min-height: min(calc(100vh - 60px), 680px); }
.eyebrow { margin: 0 0 14px; color: var(--accent-ink); font-size: 13px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { margin: 0; color: var(--navy); font-size: clamp(40px, 5.6vw, 72px); white-space: nowrap; line-height: 1.1; font-weight: 800; letter-spacing: .02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub { text-wrap: pretty; margin: 26px 0 0; max-width: 430px; color: var(--ink-2); font-size: clamp(16px, 1.6vw, 18px); line-height: 1.9; }
.btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 36px; padding: 12px 24px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 15px; font-weight: 600; transition: background .15s, transform .15s; }
.btn:hover { text-decoration: none; background: var(--blue); transform: translateY(-1px); }
.hero-art { margin: 0; }
.hero-art img { width: 100%; }

@media (max-width: 820px) {
  .hero { padding: 40px 0 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; min-height: 0; }
  .hero-art { max-width: 560px; width: 100%; margin: 0 auto; }
}

/* ---- 首屏下方：方向与评价，两张卡片上下排列 ---- */
.intro { padding: 88px 0; border-top: 1px solid var(--line); }
.intro-blocks { display: flex; flex-direction: column; gap: 24px; }
.intro-card { padding: 40px 56px 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.intro-card h2 { display: flex; align-items: baseline; gap: 14px; margin: 0; color: var(--navy); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.4; font-weight: 750; }
.intro-num { flex: none; color: var(--accent-ink); font-size: 15px; font-weight: 700; letter-spacing: .06em; }
.intro-card > p { text-wrap: pretty; margin: 14px 0 0; max-width: 760px; color: var(--ink-2); font-size: 17px; line-height: 1.85; }

.intro-links { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.intro-links li + li { border-top: 1px solid var(--line); }
.intro-links a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; padding: 18px 0; color: var(--ink-3); font-size: 15px; }
.intro-links a:hover { text-decoration: none; }
.intro-links strong { color: var(--navy); font-size: 16px; font-weight: 700; }
.intro-links a:hover strong { color: var(--blue); }
.intro-arrow { margin-left: auto; color: var(--blue); font-weight: 600; transition: transform .2s; }
.intro-links a:hover .intro-arrow { transform: translateX(4px); }

@media (max-width: 640px) {
  .intro { padding: 56px 0; }
  .intro-blocks { gap: 16px; }
  .intro-card { padding: 26px 20px 6px; border-radius: 16px; }
  .intro-card > p { font-size: 16px; }
  .intro-card h2 { gap: 10px; font-size: 20px; }
  .intro-links a { position: relative; flex-direction: column; gap: 2px; padding: 14px 28px 14px 0; }
  .intro-arrow { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
  .intro-links a:hover .intro-arrow { transform: translate(4px, -50%); }
}

/* ---- 最近工作 ---- */
.work { padding: 88px 0 0; border-top: 1px solid var(--line); scroll-margin-top: 40px; }
.section-head { margin: 0 0 48px; }
.section-head h2 { margin: 0; color: var(--navy); font-size: clamp(28px, 3.6vw, 38px); line-height: 1.3; }
.section-head p:last-child { margin: 12px 0 0; color: var(--ink-2); font-size: 17px; max-width: 640px; }

.posts { display: flex; flex-direction: column; gap: 56px; }
.post {
  display: block; overflow: hidden; scroll-margin-top: 84px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
a.post:hover { text-decoration: none; border-color: #d3d6de; box-shadow: 0 18px 48px rgba(27, 42, 82, .08); }
.post:target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.post-cover { aspect-ratio: 21 / 9; background: #f1efea; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.post-cover img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
a.post:hover .post-cover img { transform: scale(1.025); }
.post-cover-blank { font-size: 32px; font-weight: 800; color: var(--blue); opacity: .4; letter-spacing: .12em; }
.post-body { padding: 36px 56px 44px; }
.post h3 { max-width: 900px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0 0 14px; color: var(--ink-3); font-size: 14px; }
.post-meta span + span::before { content: "·"; margin: 0 10px; color: #c3c6cc; }
.post-num { color: var(--accent-ink); font-weight: 700; letter-spacing: .04em; }
.post h3 { margin: 0; color: var(--navy); font-size: clamp(24px, 3.2vw, 34px); line-height: 1.35; font-weight: 750; letter-spacing: .01em; }
.post-summary { margin: 14px 0 0; color: var(--ink-2); font-size: 17px; line-height: 1.8; max-width: 680px; }
.post-cta { display: inline-flex; gap: 8px; margin-top: 24px; color: var(--blue); font-size: 15px; font-weight: 600; }
.post-cta span { transition: transform .2s; }
a.post:hover .post-cta span { transform: translateX(4px); }
.post.is-pending .post-cta { color: var(--ink-3); }
.post.is-pending .post-cta span { display: none; }

@media (max-width: 640px) {
  .work { padding-top: 56px; }
  .section-head { margin-bottom: 32px; }
  .posts { gap: 32px; }
  .post { border-radius: 16px; }
  .post-cover { aspect-ratio: 16 / 9; }
  .post-body { padding: 22px 20px 26px; }
  .post-date { flex-basis: 100%; margin-top: 2px; }
  .post-meta .post-date::before { content: none; }
  .post-summary { font-size: 16px; }
}

/* ---- 文章页 ---- */
.article-main { padding-top: 24px; }
.back { display: inline-block; margin: 16px 0 28px; font-size: 14px; color: var(--ink-2); }
.article header h1 { margin: 0; color: var(--navy); font-size: clamp(28px, 5vw, 40px); line-height: 1.3; }
.lede { margin: 16px 0 0; font-size: 18px; color: var(--ink-2); }
.meta { margin: 12px 0 0; font-size: 14px; color: var(--ink-3); }
.article header { padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.article header:has(+ .article-cover) { border-bottom: 0; padding-bottom: 0; }
.article-cover { margin: 32px 0 16px; aspect-ratio: 16 / 9; background: #f1efea; border-radius: 16px; overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: contain; }

.prose { font-size: 17px; line-height: 1.85; }
.prose h2 { margin: 48px 0 12px; font-size: 24px; line-height: 1.4; }
.prose h3 { margin: 32px 0 8px; font-size: 19px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 4px 0; }
.prose strong { font-weight: 650; }
.prose blockquote { margin: 24px 0; padding: 12px 18px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: #eeeee9; padding: 1px 5px; border-radius: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose figure { margin: 32px 0; }
.prose figure img { margin: 0 auto; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-3); text-align: center; line-height: 1.6; }
.table-wrap { margin: 24px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: #f1f1ec; font-weight: 650; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose .table-note { margin: -8px 0 24px; font-size: 14px; line-height: 1.7; color: var(--ink-3); }
.prose .source-note { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--ink-3); }
.article-foot { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }

.notfound { padding: 96px 24px; text-align: center; }

@media (max-width: 480px) {
  .wrap, .wrap-narrow { padding: 0 16px; }
  .site-header nav { gap: 16px; font-size: 14px; }
  .prose { font-size: 16px; }
}
