﻿:root {
  --ink: #1a1f2e;
  --muted: #5c6578;
  --line: #e2e5ec;
  --accent: #0f6e56;
  --accent-soft: #e8f3ef;
  --paper: #f6f4ef;
  --card: #ffffff;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --measure: 960px;
  --nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 28px;
}

main.wrap {
  flex: 1;
  padding-top: 8px;
  padding-bottom: 80px;
}

a { color: var(--ink); }

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.86em;
  color: var(--accent);
}

/* —— 顶栏 —— */
.site-nav {
  border-bottom: 1px solid var(--line);
  background: rgba(246, 244, 239, 0.94);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 20px 28px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  gap: 4px 20px;
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--accent); }

.site-nav a.is-active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* —— 个人空间门户 —— */
.portal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.portal {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 28px 40px;
}

.portal-head {
  margin-bottom: 28px;
}

.portal-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.06em;
}

.portal-head .lead {
  margin-top: 10px;
  font-size: 0.96rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.portal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  min-height: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.portal-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.portal-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  margin-bottom: 4px;
}

.portal-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.portal-card strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.portal-card > span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.portal-foot {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.82rem;
}

.portal-foot p + p { margin-top: 6px; }

.portal-foot a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.portal-foot a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 720px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

/* —— 单页分栏 —— */
.panel {
  scroll-margin-top: calc(var(--nav-h) + 12px);
  padding-bottom: 24px;
}

.panel + .panel {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* —— 页脚 —— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.site-footer p + p { margin-top: 6px; }

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.site-footer a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* —— 页头 —— */
.page-head {
  padding: 48px 0 8px;
}

.page-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.hero-home h1 {
  font-size: clamp(2.6rem, 7vw, 3.4rem);
  letter-spacing: 0.08em;
}

.sub {
  margin-top: 14px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
}

.lead {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 36em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.pill {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-soft);
  letter-spacing: 0.04em;
}

/* —— 章节标题 —— */
.section {
  margin-top: 56px;
}

.section-tight {
  margin-top: 40px;
}

.section-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}

/* —— 优势：编号列表 —— */
.adv-list {
  display: grid;
  gap: 0;
}

.adv {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.adv:first-child { padding-top: 0; }

.adv-num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.adv b {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.adv p {
  font-size: 0.94rem;
  color: #2a3140;
}

.path-box {
  margin-bottom: 28px;
  padding: 18px 18px 18px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.path-box p {
  font-size: 0.94rem;
  color: #24312c;
}

.path-box p + p { margin-top: 10px; }

/* —— 证书 —— */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span {
  border: 1px solid var(--ink);
  padding: 8px 14px;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

/* —— 代表作 —— */
.feat-list { display: grid; gap: 0; }

.feat {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.feat:hover .feat-name { color: var(--accent); }
.feat:hover .go { border-color: var(--accent); }

.feat-idx {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 0.95rem;
}

.feat-name {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.feat small {
  color: var(--muted);
  font-size: 0.86rem;
}

.feat .go {
  font-size: 0.8rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: border-color 0.15s ease;
}

/* —— 技能明细 —— */
.skill-block {
  margin-top: 40px;
}

.skill-block:first-of-type { margin-top: 8px; }

.skill-block .section-title {
  margin-bottom: 18px;
}

.point-list {
  list-style: none;
  padding: 0;
  counter-reset: point;
}

.point-list li {
  position: relative;
  padding: 14px 0 14px 44px;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
  color: #2a3140;
  margin: 0;
}

.point-list li::before {
  counter-increment: point;
  content: counter(point, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  font-family: var(--serif);
  color: var(--accent);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.point-list li:last-child { border-bottom: none; }

/* —— 工作时间线 —— */
.timeline {
  position: relative;
  padding-left: 0;
}

.job {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 0 0 36px;
  position: relative;
}

.job:last-child { padding-bottom: 0; }

.job-when {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding-top: 4px;
  white-space: nowrap;
}

.job-body {
  border-left: 1px solid var(--line);
  padding-left: 22px;
  padding-bottom: 8px;
}

.job-body strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.org {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin: 14px 0 6px;
}

ul {
  padding-left: 1.1em;
  color: #2a3140;
  font-size: 0.94rem;
}

li { margin: 6px 0; }

.more-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.more-link:hover { border-bottom-color: var(--accent); }

/* —— 可演示项目 —— */
.note {
  margin: -12px 0 24px;
  font-size: 0.86rem;
  color: var(--muted);
}

.demo-list { display: grid; gap: 0; }

.demo-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

.demo-card:first-child { padding-top: 0; }

.demo-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 6px;
}

.demo-top strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.03em;
}

.when {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.demo-card .org { margin-bottom: 10px; }

.demo-card > p {
  font-size: 0.94rem;
  color: #2a3140;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.is-off {
  border-color: var(--line);
  color: var(--muted);
  pointer-events: none;
}

/* —— 归档 —— */
.archive-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.archive-item:last-child { border-bottom: none; }

.archive-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 4px;
}

.archive-head strong { font-size: 1rem; }

@media (max-width: 640px) {
  .wrap, .site-nav .wrap { padding-left: 18px; padding-right: 18px; }
  .page-head { padding-top: 32px; }
  .job {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .job-body {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 12px;
  }
  .feat {
    grid-template-columns: 32px 1fr;
  }
  .feat .go {
    grid-column: 2;
  }
  .point-list li {
    padding-left: 40px;
  }
}

@media print {
  body { background: #fff; }
  .site-nav, .site-footer, .btn { display: none; }
  .job, .adv, .demo-card { break-inside: avoid; }
  html { scroll-behavior: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
