/* ============================================================
   苏东的个人旅行日记 · 样式
   纯静态，无外部依赖（字体走系统栈），手机优先
   ============================================================ */

:root {
  --ink: #1c2321;
  --ink-soft: #55605c;
  --ink-faint: #8a9390;
  --paper: #fbf8f3;
  --paper-2: #f4efe6;
  --line: #e3dbcd;
  --accent: #b4552d;      /* 陶土橙 */
  --accent-soft: #f2e2d6;
  --forest: #2f4f43;      /* 松绿 */
  --radius: 14px;
  --maxw: 760px;
  --shadow: 0 1px 2px rgba(28, 35, 33, .04), 0 8px 24px rgba(28, 35, 33, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9e6e0;
    --ink-soft: #b3b8b4;
    --ink-faint: #7c8481;
    --paper: #161a19;
    --paper-2: #1e2422;
    --line: #2c3330;
    --accent: #e08a5c;
    --accent-soft: #2a2019;
    --forest: #86ad9c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------------- 顶部 ---------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .3px;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--accent), var(--forest));
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--paper) 60%, transparent);
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 14.5px;
}
.nav a { color: var(--ink-soft); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------------- 首屏 ---------------- */
.hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 320px at 82% -12%, var(--accent-soft), transparent 62%),
    var(--paper);
}

.hero-kicker {
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(28px, 5.2vw, 42px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -.2px;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  border-bottom: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
}

.hero p {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 34em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--ink-faint);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta b { color: var(--ink-soft); font-weight: 600; }

/* ---------------- 内容区 ---------------- */
.section { padding: 46px 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}
.section-title h2 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .2px;
}
.section-title .hint { font-size: 13px; color: var(--ink-faint); }

/* 列表 */
.post-list { list-style: none; display: grid; gap: 18px; }

.post-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  align-items: stretch;
  padding: 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(28,35,33,.05), 0 14px 30px rgba(28,35,33,.10);
}

.post-thumb {
  position: relative;
  min-height: 118px;
  background: var(--accent-soft);
  overflow: hidden;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-body { padding: 16px 18px 18px 0; }

.post-date {
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.post-body h3 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 18.5px;
  line-height: 1.45;
  margin: 5px 0 7px;
  font-weight: 700;
}
.post-body h3 a { color: var(--ink); }
.post-body h3 a:hover { color: var(--accent); text-decoration: none; }

.post-excerpt {
  font-size: 14.5px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.tag {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--forest) 12%, transparent);
  color: var(--forest);
  border: 1px solid color-mix(in srgb, var(--forest) 22%, transparent);
}

/* 关于 */
.about-grid {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 20px;
  align-items: start;
}
.avatar {
  width: 92px; height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #fff3e6, transparent 46%),
    radial-gradient(circle at 68% 72%, var(--forest), transparent 62%),
    var(--accent);
  box-shadow: inset 0 0 0 3px var(--paper), 0 4px 14px rgba(28,35,33,.14);
}
.about-grid p { color: var(--ink-soft); font-size: 15.5px; }
.about-grid p + p { margin-top: 12px; }

.note {
  margin-top: 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* ---------------- 文章页 ---------------- */
.article-head { padding: 46px 0 26px; border-bottom: 1px solid var(--line); }
.article-head h1 {
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(25px, 4.6vw, 34px);
  line-height: 1.34;
  font-weight: 700;
  margin-bottom: 14px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13.5px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.article-body { padding: 34px 0 20px; }
.article-body p { margin-bottom: 1.15em; color: var(--ink); }
.article-body p.lead {
  font-size: 17.5px;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin-bottom: 1.5em;
}
.article-body h2 {
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
  margin: 1.9em 0 .7em;
  padding-bottom: .3em;
  border-bottom: 1px dashed var(--line);
}
.article-body ul, .article-body ol { margin: 0 0 1.15em 1.3em; color: var(--ink); }
.article-body li { margin-bottom: .45em; }
.article-body blockquote {
  margin: 1.4em 0;
  padding: 12px 18px;
  background: var(--paper-2);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 15px;
}

.figure { margin: 1.6em 0; }
.figure .ph {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 13.5px;
  letter-spacing: .12em;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--forest) 16%, var(--paper)) 0%,
                            color-mix(in srgb, var(--accent) 14%, var(--paper)) 52%,
                            color-mix(in srgb, var(--forest) 10%, var(--paper)) 100%);
}
.figure img { border-radius: 12px; }
.figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
}

.article-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 54px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  font-size: 14px;
}
.back-link { color: var(--ink-soft); }
.back-link:hover { color: var(--accent); text-decoration: none; }

/* ---------------- 页脚（含备案号，法规要求） ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 30px 0 40px;
  margin-top: 10px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
}
.footer-beian a {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.footer-beian a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.footer-extra { font-size: 12.5px; color: var(--ink-faint); }

/* ---------------- 小屏 ---------------- */
@media (max-width: 560px) {
  .hero { padding: 44px 0 32px; }
  .post-card { grid-template-columns: 92px 1fr; gap: 14px; }
  .post-thumb { min-height: 92px; }
  .post-body { padding: 13px 14px 14px 0; }
  .post-body h3 { font-size: 16.5px; }
  .about-grid { grid-template-columns: 64px 1fr; gap: 14px; }
  .avatar { width: 64px; height: 64px; }
  .nav { gap: 14px; font-size: 13.5px; }
  .brand { font-size: 17px; }
}

/* 打印 / 无障碍 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .post-card { transition: none; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
