/* ============================================================
   个人主页 — 样式表
   ============================================================ */

:root {
  color-scheme: light;

  --bg: #f4f8ec;
  --surface: #fdfef8;
  --text: #232c1c;
  --text-strong: #131c0c;
  --muted: #66705a;
  --faint: #737e63;
  --border: #dde5cb;
  --border-strong: #c5d1ae;
  --accent: #3f7a3a;
  --accent-hover: #2f5f2c;
  --accent-soft: rgba(63, 122, 58, 0.09);
  --shadow: 0 1px 2px rgba(30, 44, 20, 0.05), 0 10px 30px -14px rgba(30, 44, 20, 0.16);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11150d;
    --surface: #1a2015;
    --text: #dde4d1;
    --text-strong: #f1f5e8;
    --muted: #98a189;
    --faint: #7a8570;
    --border: #293121;
    --border-strong: #3a4530;
    --accent: #9ccf74;
    --accent-hover: #b2dc8c;
    --accent-soft: rgba(156, 207, 116, 0.13);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11150d;
  --surface: #1a2015;
  --text: #dde4d1;
  --text-strong: #f1f5e8;
  --muted: #98a189;
  --faint: #7a8570;
  --border: #293121;
  --border-strong: #3a4530;
  --accent: #9ccf74;
  --accent-hover: #b2dc8c;
  --accent-soft: rgba(156, 207, 116, 0.13);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-strong);
  letter-spacing: 0.01em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: rgba(63, 122, 58, 0.18);
}

.shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- 页头 ---------- */

.top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
}

.top .name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.02em;
}

.top .name:hover {
  color: var(--text-strong);
}

.top nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.top nav a {
  padding: 5px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.top nav a:hover {
  color: var(--text-strong);
  background: var(--accent-soft);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--text-strong);
  border-color: var(--border-strong);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

[data-theme="light"] .icon-moon,
[data-theme="dark"] .icon-sun {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .icon-moon { display: none; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .icon-sun { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 78px 0 66px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.1rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.hero .lead {
  max-width: 26em;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.9;
}

/* ---------- 区块 ---------- */

.block {
  padding: 54px 0;
  border-bottom: 1px solid var(--border);
}

.block:last-of-type {
  border-bottom: 0;
}

.block-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 22px;
}

.block-head h2 {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--faint);
  text-transform: uppercase;
}

.block-head .count {
  font-size: 0.76rem;
  color: var(--faint);
}

/* ---------- 作品卡 ---------- */

.work {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 30px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.work:hover {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(30, 44, 20, 0.06), 0 20px 44px -20px rgba(30, 44, 20, 0.26);
}

.work-body {
  min-width: 0;
  flex: 1;
}

.work h3 {
  font-size: 1.5rem;
  line-height: 1.4;
}

.work .sub {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.work .tagline {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.work .go {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.1rem;
  transition: background 0.18s ease, transform 0.18s ease;
}

.work:hover .go {
  background: var(--accent);
  color: #fff;
  transform: translateX(3px);
}

/* 待上线的企划：不可点击，不暗示可跳转 */

.work.is-pending {
  border-left-color: var(--border-strong);
  box-shadow: none;
  cursor: default;
}

.work.is-pending:hover {
  transform: none;
  box-shadow: none;
}

.work.is-pending .go {
  color: var(--faint);
  font-size: 1.2rem;
}

.work.is-pending:hover .go {
  background: transparent;
  color: var(--faint);
  transform: none;
}

.work + .work {
  margin-top: 16px;
}

/* ---------- 关于 / 联系 ---------- */

.about-text {
  margin: 0 0 1.3em;
  font-size: 1.01rem;
  line-height: 1.95;
  color: var(--text);
}

.about-text:last-child {
  margin-bottom: 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px 9px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-strong);
  font-size: 0.9rem;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.link-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.link-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.link-chip.is-bili .dot { background: #00a1d6; }
.link-chip.is-xhs .dot { background: #ff2442; }
.link-chip.is-weibo .dot { background: #ffb300; }

.link-chip .handle {
  color: var(--muted);
  font-size: 0.86em;
}

.link-chip:hover .handle {
  color: var(--accent);
}

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

.foot {
  padding: 34px 0 54px;
  color: var(--faint);
  font-size: 0.8rem;
}

.foot .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: baseline;
}

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

.foot a:hover {
  color: var(--accent);
}

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

@media (max-width: 620px) {
  body {
    font-size: 15.5px;
  }

  .shell {
    padding: 0 20px;
  }

  .top {
    padding: 20px 0;
    gap: 10px;
  }

  .top nav a {
    padding: 5px 8px;
    font-size: 0.84rem;
  }

  .hero {
    padding: 52px 0 44px;
  }

  .block {
    padding: 40px 0;
  }

  .work {
    padding: 22px 20px;
    gap: 14px;
  }

  .work h3 {
    font-size: 1.28rem;
  }

  .work .go {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }
}
