:root {
  --paper: #f3efe4;
  --paper-2: #e9e3d3;
  --ink: #191913;
  --muted: #6f6a5c;
  --line: rgba(25, 25, 19, 0.14);
  --lime: #c8ef4a;
  --orange: #ff7a45;
  --card: rgba(255, 255, 255, 0.44);
  --shadow: 0 18px 50px rgba(25, 25, 19, 0.07);
  --serif: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC",
    "SimSun", serif;
  --sans: "Inter", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui,
    sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

/* 后台文案读取完成前先藏住默认文字，避免先闪旧文案再替换。 */
html.content-pending [data-copy] {
  visibility: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::selection {
  background: var(--lime);
  color: var(--ink);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(25, 25, 19, 0.055) 1px, transparent 1px);
  background-size: 4px 4px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 239, 228, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.wordmark {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark .wm-slash {
  color: var(--orange);
  padding: 0 2px;
}

.wordmark .wm {
  color: var(--ink);
}

.topbar-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 22px);
}

.topbar-admin {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.topbar-admin:hover,
.topbar-admin:focus-visible {
  background: var(--lime);
  border-color: var(--ink);
  outline: none;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--page-max, 1120px);
  margin: 0 auto;
  padding: clamp(52px, 9vw, 112px) clamp(20px, 5vw, 56px) clamp(56px, 7vw, 88px);
}

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero {
  padding-bottom: clamp(56px, 9vw, 104px);
}

.hero h1 {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 8.4vw, var(--hero-max, 96px));
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.hero h1 em {
  font-style: normal;
  white-space: nowrap;
  padding: 0 0.04em;
  background: linear-gradient(
    transparent 62%,
    var(--lime) 62%,
    var(--lime) 93%,
    transparent 93%
  );
}

.hero-center .hero {
  text-align: center;
}

.hero-center .lede {
  margin-right: auto;
  margin-left: auto;
}

.hero-center .meta-row {
  justify-content: center;
}

.lede {
  max-width: 680px;
  margin: 30px 0 0;
  font-size: 15.5px;
  line-height: 1.9;
  color: #34322a;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.meta-row li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12.5px;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}

.section-head .kicker {
  color: var(--ink);
}

.section-count {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.work {
  padding-bottom: clamp(56px, 8vw, 96px);
}

.project {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 40px;
  gap: clamp(16px, 3vw, 34px);
  align-items: start;
  padding: clamp(24px, 3.4vw, 38px) clamp(6px, 1vw, 12px);
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.project-live {
  transition:
    background 0.45s var(--ease),
    padding 0.45s var(--ease);
}

.project-live:hover,
.project-live:focus-visible {
  padding-left: clamp(14px, 2vw, 24px);
  background: var(--card);
  outline: none;
}

.project-no {
  padding-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.project-body {
  display: block;
  min-width: 0;
}

.project-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.project-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
}

.status-quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.status-quiet::before {
  background: var(--muted);
  opacity: 0.55;
}

.project-desc {
  display: block;
  max-width: 720px;
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.85;
  color: #454237;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.tag {
  padding: 2px 9px;
  border-radius: 5px;
  background: rgba(25, 25, 19, 0.055);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.project-arrow {
  padding-top: 4px;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.45s var(--ease), color 0.45s var(--ease);
}

.project-live:hover .project-arrow,
.project-live:focus-visible .project-arrow {
  transform: translateX(6px);
  color: var(--orange);
}

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

.project-soon .project-title {
  color: #514d41;
}

.method {
  padding-top: clamp(8px, 2vw, 20px);
}

.method-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.method-list li {
  padding: 26px clamp(14px, 2.4vw, 28px) 30px 0;
  border-right: 1px solid var(--line);
}

.method-list li:first-child {
  padding-left: 0;
}

.method-list li:last-child {
  padding-right: 0;
  border-right: 0;
}

.method-no {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--orange);
}

.method-list b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
}

.method-list p {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  max-width: var(--page-max, 1120px);
  margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 56px) 34px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

@media (max-width: 820px) {
  .method-list {
    grid-template-columns: 1fr;
  }

  .method-list li,
  .method-list li:first-child,
  .method-list li:last-child {
    padding: 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .method-list li:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .topbar-meta {
    display: none;
  }

  .project {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .project-arrow {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .hero h1 em {
    white-space: normal;
  }
}

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

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