/* 方案 D：青黛 — 浅灰纸白 + 墨青 + 黄铜点睛（安静、现代、有墨色质感） */
body.theme-d {
  --bg: #f5f4f0;
  --bg-elevated: #ffffff;
  --text: #232a2e;
  --text-muted: #72797d;
  --border: #e4e2db;
  --primary: #22403f;
  --primary-hover: #18312f;
  --accent: #b0803c;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(35 42 46 / 5%), 0 6px 20px rgb(35 42 46 / 4%);
  --font-display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

body.theme-d .site-header {
  background: rgb(245 244 240 / 90%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

body.theme-d .card,
body.theme-d .work-card,
body.theme-d .contact-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

body.theme-d .hero__role {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  background: rgb(34 64 63 / 8%);
}

/* 青泥印章签名 */
body.theme-d .hero__title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

body.theme-d .hero__title-row .hero__title {
  margin-bottom: 0;
}

body.theme-d .hero__seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  color: #f7f6f2;
  background: var(--primary);
  border-radius: 5px;
  transform: rotate(-5deg);
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 12%),
    0 3px 8px rgb(34 64 63 / 28%);
  font-family: var(--font-display);
}

/* 刊头感：主按钮用墨青，黄铜与黛青点睛 */
body.theme-d .btn--primary {
  color: #f7f6f2;
  background: var(--primary);
  border-color: var(--primary);
}

body.theme-d .btn--primary:hover {
  color: #f7f6f2;
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Hero 更像卷首语 */
body.theme-d .hero__title {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  letter-spacing: 0.015em;
}

body.theme-d .hero__lead {
  border-left: 2px solid var(--primary);
  padding-left: 1rem;
  color: var(--text);
}

/* 分区 eyebrow 墨青段首标记 */
body.theme-d .section__eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.5em;
  height: 2px;
  margin-right: 0.5em;
  vertical-align: middle;
  background: var(--primary);
}

/* 步骤章节化：无卡片，编号 + 细线分隔 */
body.theme-d .step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1.5rem;
  height: auto;
  padding: 1.5rem 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

body.theme-d .step:last-child {
  border-bottom: none;
}

body.theme-d .step__num {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: auto;
  height: auto;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--primary);
  background: none;
  border-radius: 0;
}

body.theme-d .step__title {
  grid-column: 2;
  grid-row: 1;
}

body.theme-d .step__body {
  grid-column: 2;
  grid-row: 2;
}

/* 页脚小印呼应 */
body.theme-d .footer__line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

body.theme-d .footer__seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  color: #f7f6f2;
  background: var(--primary);
  border-radius: 3px;
  transform: rotate(-5deg);
  font-family: var(--font-display);
}

/* ---------- 编排时刻：墨落纸上（Hero 开场） ---------- */
@keyframes hero-char-in {
  from {
    opacity: 0;
    transform: translateY(0.55em);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.theme-d .hero__char {
  display: inline-block;
  opacity: 0;
  animation: hero-char-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes seal-stamp {
  0% {
    opacity: 0;
    transform: scale(0.15) rotate(-18deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.15) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-5deg);
  }
}

body.theme-d .hero__seal {
  opacity: 0;
  animation: seal-stamp 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 1.0s forwards;
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(0.8rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.theme-d .hero__subtitle {
  opacity: 0;
  animation: hero-fade-up 0.6s ease 1.15s forwards;
}

body.theme-d .hero__lead {
  opacity: 0;
  animation: hero-fade-up 0.6s ease 1.35s forwards;
}

body.theme-d .hero__actions {
  opacity: 0;
  animation: hero-fade-up 0.6s ease 1.55s forwards;
}

/* Hero 氛围：墨青淡光晕 */
body.theme-d .hero {
  position: relative;
  overflow: hidden;
}

body.theme-d .hero::after {
  content: "";
  position: absolute;
  top: -12%;
  right: -6%;
  width: min(440px, 46vw);
  height: min(440px, 46vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(34 64 63 / 9%), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

body.theme-d .hero > * {
  position: relative;
  z-index: 1;
}

/* ---------- 滚动渐显 ---------- */
body.theme-d .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

body.theme-d .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- hover 微交互 ---------- */
body.theme-d .nav__links a,
body.theme-d .now-strip__link,
body.theme-d .work-entry__link {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 0.25s ease, color var(--transition);
}

body.theme-d .nav__links a:hover,
body.theme-d .now-strip__link:hover,
body.theme-d .work-entry__link:hover {
  background-size: 100% 1px;
}

body.theme-d .card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.theme-d .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(35 42 46 / 8%);
}

body.theme-d .work-entry {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.theme-d .work-entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgb(35 42 46 / 10%);
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  body.theme-d .hero__char,
  body.theme-d .hero__subtitle,
  body.theme-d .hero__lead,
  body.theme-d .hero__actions,
  body.theme-d .hero__seal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  body.theme-d .hero__seal {
    transform: rotate(-5deg);
  }

  body.theme-d .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
