:root {
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-tertiary: #8a8a8a;
  --accent: #b5322e;
  --border: #e5e2dd;
  --bg: #fdfcfa;
  --bg-subtle: #f6f4f1;
}

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

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.site-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.site-nav a {
  margin-left: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}
.hero-name {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.hero-name .en {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 1.35rem;
  margin-left: 10px;
}
.hero-role {
  margin-top: 10px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}
.hero-role .en { color: var(--text-tertiary); }
.hero-tagline {
  margin-top: 20px;
  max-width: 640px;
  font-size: 0.98rem;
  color: var(--text-secondary);
}
.hero-meta {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-tertiary);
}
.hero-meta span { margin-right: 18px; }

/* ---------- Sections ---------- */
.section {
  padding: 44px 0;
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.section-title-en {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* ---------- Project cards ---------- */
.project {
  padding: 28px 0;
  border-top: 1px dashed var(--border);
}
.project:first-of-type { border-top: none; padding-top: 0; }
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.project-title {
  font-size: 1.02rem;
  font-weight: 600;
}
.project-title .en {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 0.88rem;
  margin-left: 8px;
}
.project-time {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.project-org {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 2px 0 10px;
}
.project-desc {
  font-size: 0.93rem;
  color: var(--text-secondary);
  max-width: 660px;
}
.project-metrics {
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.project-metrics li {
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 12px;
}
.project-metrics li strong { color: var(--accent); font-weight: 600; }
.project-links { margin-top: 14px; }
.btn {
  display: inline-block;
  font-size: 0.86rem;
  padding: 8px 18px;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid var(--text);
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover { opacity: 0.9; }
.btn-note {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* ---------- Resume ---------- */
.resume-block { margin-bottom: 36px; }
.resume-item { margin-bottom: 22px; }
.resume-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.resume-item-title { font-weight: 600; font-size: 0.97rem; }
.resume-item-sub { font-size: 0.87rem; color: var(--text-secondary); margin: 2px 0 8px; }
.resume-item-time { font-size: 0.82rem; color: var(--text-tertiary); white-space: nowrap; }
.resume-list { margin: 8px 0 0; padding-left: 1.2em; font-size: 0.92rem; color: var(--text-secondary); }
.resume-list li { margin-bottom: 6px; }
.resume-list strong { color: var(--text); font-weight: 600; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  font-size: 0.8rem;
  padding: 3px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  margin-top: 24px;
}
.site-footer .contact-line {
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.site-footer .contact-line a { color: var(--accent); text-decoration: none; }
.site-footer .fine {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

@media (max-width: 560px) {
  .hero { padding: 48px 0 40px; }
  .hero-name { font-size: 1.7rem; }
  .hero-name .en { font-size: 1.05rem; display: block; margin-left: 0; margin-top: 4px; }
  .site-nav a { margin-left: 14px; }
}
