/* Sebastian Lim — 个人网站唯一样式表 (v1)
   纸感 / 衬线 / 墨绿 + 暖橙 / 可打印 */

:root {
  --paper: #f7f4ec;
  --ink: #22302a;
  --muted: #68746d;
  --accent: #275e46;
  --accent-deep: #173f2e;
  --warm: #c45f3c;
  --line: rgba(34, 48, 42, 0.16);
}

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

html { font-size: 17px; }

body {
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(196, 95, 60, 0.07), transparent 26rem),
    linear-gradient(180deg, #faf7f0 0%, var(--paper) 100%);
  background-attachment: fixed;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--accent-deep); }

/* ---------- 页眉 / 导航 ---------- */

.site-header {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.site-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
  text-decoration: none;
}

.site-nav { display: flex; gap: 1.25rem; font-size: 0.9rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 0.22em; }
.site-nav a[aria-current] { color: var(--accent-deep); font-weight: 700; }

/* ---------- 布局 ---------- */

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.6rem 1.25rem 3.5rem;
}

section + section { margin-top: 3rem; }

h1, h2, h3 { line-height: 1.4; letter-spacing: 0.01em; }
h1 { font-size: 1.9rem; }

h2 {
  font-size: 1.15rem;
  color: var(--accent-deep);
  margin-bottom: 1rem;
}
h2::before {
  content: "";
  display: inline-block;
  width: 1.1em;
  height: 2px;
  background: var(--warm);
  margin-right: 0.5em;
  vertical-align: 0.32em;
}

.lede {
  font-size: 1.08rem;
  color: var(--ink);
  margin-top: 0.9rem;
  max-width: 34em;
}

.muted { color: var(--muted); }

/* ---------- 作品选辑 ---------- */

.work-list { list-style: none; }
.work-list li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.work-list li:first-child { border-top: 0; padding-top: 0; }
.work-name { font-weight: 700; }
.work-name a { color: var(--ink); }
.work-name a:hover { color: var(--accent-deep); }
.work-desc { color: var(--muted); font-size: 0.95rem; }
.work-status { font-size: 0.82rem; color: var(--warm); }

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

.post-list { list-style: none; }
.post-list li {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.post-list li:first-child { border-top: 0; padding-top: 0; }
.post-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.post-title:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 0.22em; }
.post-meta { font-size: 0.82rem; color: var(--muted); margin-left: 0.6em; }
.post-summary { color: var(--muted); font-size: 0.95rem; margin-top: 0.25rem; }

/* ---------- 文章页 ---------- */

.back-link {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.8rem;
}
.back-link:hover { color: var(--accent-deep); }

.article-header { margin-bottom: 2.2rem; }
.article-title { font-size: 1.7rem; margin-bottom: 0.5rem; }
.article-meta { color: var(--muted); font-size: 0.88rem; }

.article p { margin-bottom: 1.15em; }
.article p:last-child { margin-bottom: 0; }
.article ol, .article ul { margin: 0 0 1.15em 1.4em; }
.article li { margin-bottom: 0.45em; }
.article h2 { margin: 2.3em 0 0.9em; font-size: 1.12rem; }

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  width: 5rem;
  margin: 2.4rem auto;
}

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

.site-footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.2rem 1.25rem 2.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

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

@media (max-width: 560px) {
  html { font-size: 16px; }
  .site-header { flex-direction: column; gap: 0.35rem; }
  h1 { font-size: 1.6rem; }
  .article-title { font-size: 1.45rem; }
}

/* ---------- 打印 ---------- */

@media print {
  html { font-size: 12pt; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
  .site-nav, .site-footer, .back-link { display: none; }
  .site-header { border-bottom: 0; padding: 0 0 0.5rem; max-width: none; }
  main { max-width: none; padding: 0; }
  section + section { margin-top: 1.6rem; }
}

/* ---------- 徽章（方向卡片 / 时间线共用） ---------- */
/* 基础徽章=灰框（筹备中/完成）；badge-active=进行中；badge-pivot=转向；badge-paused=搁置 */

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1;
  padding: 0.34em 0.7em;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-left: 0.6em;
  vertical-align: 0.22em;
  color: var(--muted);
  white-space: nowrap;
}
.badge-active { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.badge-pivot { color: var(--accent); border-color: var(--accent); }
.badge-paused { color: var(--warm); border-color: var(--warm); }

/* ---------- 首页：方向卡片 ---------- */

.direction-list { list-style: none; }
.direction-card {
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}
.direction-card:first-child { border-top: 0; padding-top: 0; }
.direction-name {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--ink);
}
a.direction-name { text-decoration: none; }
a.direction-name:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 0.22em; }
.direction-desc { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }

.section-note { color: var(--muted); font-size: 0.92rem; margin: -0.5rem 0 1rem; }

/* ---------- 方向页：时间线 ---------- */

.timeline {
  list-style: none;
  margin-left: 0.4rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--line);
}
.article ol.timeline { margin-left: 0.4rem; }
.timeline-item {
  position: relative;
  padding-bottom: 1.7rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 0.35rem - 1px);
  top: 0.42em;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}
.timeline-item.is-paused::before { border-color: var(--warm); }
.timeline-date {
  display: block;
  font-size: 0.8rem;
  color: var(--warm);
  letter-spacing: 0.04em;
}
.timeline-title {
  display: inline;
  font-size: 1.06rem;
}
.timeline-item p { margin-top: 0.35rem; }

/* ---------- 方向页：归档 / 经验 ---------- */

.archive-list { list-style: none; }
.article ul.archive-list { margin-left: 0; }
.archive-list li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.archive-list li:first-child { border-top: 0; padding-top: 0; }
.archive-name { font-weight: 700; }
.archive-list p { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }

.lesson-list li { margin-bottom: 0.7em; }

/* ---------- 打印补充 ---------- */

@media print {
  .badge { background: none !important; color: #000 !important; border-color: #000; }
  .timeline { border-left-color: #999; }
  .timeline-item::before { background: #fff; border-color: #000; }
}
