:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #eceef3;
  --text: #12141a;
  --muted: #5b6170;
  --dim: #666d7a;
  --accent: #2b4bf2;
  --accent-strong: #1d3bda;
  --accent-soft: #e6eaff;
  --accent-ink: #ffffff;
  --line: rgba(18, 20, 26, 0.1);
  --line-strong: rgba(18, 20, 26, 0.2);
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 56px);
  --head-h: 72px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --pill: 999px;
  --shadow-sm: 0 1px 2px rgba(18, 20, 26, 0.05);
  --shadow: 0 12px 32px rgba(18, 20, 26, 0.07);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

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

img {
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 600;
  margin: 0;
}

p {
  margin: 0;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 2px;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--head-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-cn {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 32px);
  margin-left: auto;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  border-radius: var(--pill);
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease);
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.nav a.is-active::after {
  transform: scaleX(1);
}

.head-status {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(44px, 7vh, 88px) clamp(36px, 5vh, 64px);
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(18, 20, 26, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 62%, transparent 88%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 62%, transparent 88%);
}

.hero-grid {
  position: relative;
}

.hero-copy {
  max-width: 980px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
}

.eyebrow-num {
  color: var(--accent);
  letter-spacing: 0.1em;
}

.eyebrow-num::after {
  content: "—";
  margin-left: 12px;
  color: var(--line-strong);
}

.hero h1 {
  margin-top: clamp(18px, 2.4vw, 28px);
  font-family: var(--serif);
  font-size: clamp(32px, 6.4vw, 72px);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.accent {
  color: var(--accent);
}

.hero-lede {
  max-width: 40ch;
  margin-top: clamp(20px, 2.6vw, 30px);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.85;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: clamp(26px, 3.4vw, 38px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--pill);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease), box-shadow 200ms var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 18px rgba(43, 75, 242, 0.22);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-arrow {
  font-family: var(--mono);
  font-size: 13px;
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: clamp(34px, 5vh, 52px) 0 0;
}

.hero-facts > div {
  min-height: 76px;
  padding: 13px 15px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.hero-facts dt,
.about-facts dt {
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--dim);
  text-transform: uppercase;
}

.hero-facts dd,
.about-facts dd {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- home entries ---------- */

.entries {
  padding-block: clamp(16px, 3vw, 32px) clamp(56px, 8vw, 96px);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.entry {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease), transform 220ms var(--ease);
}

.entry:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.entry-title {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.entry-lede {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.entry-list {
  display: grid;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.entry-list li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.entry-foot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.entry-foot span {
  transition: transform 180ms var(--ease);
}

.entry:hover .entry-foot span {
  transform: translate(2px, 2px);
}

/* ---------- subpage header ---------- */

.page {
  padding-block: clamp(40px, 7vh, 76px) clamp(48px, 8vw, 88px);
}

.page-head {
  max-width: 760px;
}

.page-head h1 {
  margin: 14px 0 16px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page-lede {
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.page .back-link {
  margin-top: clamp(36px, 5vw, 56px);
}

/* ---------- portrait card ---------- */

.hero-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.card-id {
  padding: 16px 6px 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.card-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.card-facts {
  margin: 0;
  padding: 6px 6px 4px;
}

.card-facts > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.card-facts > div:last-child {
  border-bottom: 0;
  padding-bottom: 6px;
}

.card-facts dt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
  white-space: nowrap;
}

.card-facts dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(56px, 8vw, 100px);
  scroll-margin-top: calc(var(--head-h) + 8px);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 700px;
}

.section h2 {
  margin: 12px 0 14px;
  font-family: var(--serif);
  font-size: clamp(27px, 4.2vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-lede {
  max-width: 54ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- work ---------- */

.work-list {
  display: grid;
  gap: clamp(24px, 3.6vw, 44px);
  margin-top: clamp(28px, 4.5vw, 48px);
}

.work {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(22px, 3.6vw, 48px);
  align-items: center;
}

.work-media {
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease);
}

.work-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.work-media:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.work-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.work-body h2 {
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.25;
}

.work-body h2 a {
  text-decoration: none;
  transition: color 200ms var(--ease);
}

.work-body h2 a:hover {
  color: var(--accent);
}

.work-body > p:not(.work-meta) {
  max-width: 46ch;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(43, 75, 242, 0.35);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

.text-link span {
  transition: transform 180ms var(--ease);
}

.text-link:hover {
  color: var(--accent-strong);
  border-color: var(--accent-strong);
}

.text-link:hover span {
  transform: translate(2px, -2px);
}

/* ---------- typographic project panel ---------- */

.panel {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  overflow: hidden;
  background-color: var(--accent-soft);
  background-image: radial-gradient(rgba(43, 75, 242, 0.22) 1px, transparent 1px);
  background-size: 20px 20px;
}

.panel-frame {
  display: grid;
  place-items: center;
  width: 40%;
  aspect-ratio: 1;
  border: 1px solid rgba(43, 75, 242, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.panel-glyph {
  font-family: var(--serif);
  font-size: clamp(54px, 6.6vw, 88px);
  line-height: 1;
  color: var(--accent);
}

.panel-note {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(43, 75, 242, 0.72);
}

/* ---------- shared: copy button ---------- */

.copy-btn {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 180ms var(--ease), border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copy-btn.is-done {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- writing: article list ---------- */

.article-block {
  margin-top: clamp(30px, 5vw, 50px);
}

.block-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.block-label::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--line-strong);
}

.article-card {
  display: block;
  max-width: 760px;
  padding: 14px 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}

.article-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.article-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.article-card-date {
  padding: 2px 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.article-card-cover {
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.article-card-cover img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 480ms var(--ease);
}

.article-card:hover .article-card-cover img {
  transform: scale(1.015);
}

.article-card-title {
  margin: 20px 6px 8px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.42;
  letter-spacing: -0.005em;
}

.article-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding: 0 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.article-card-more {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ---------- article page ---------- */

.article-page {
  padding-block: clamp(32px, 6vh, 64px) clamp(48px, 8vw, 88px);
}

.article-shell {
  max-width: 720px;
}

.article-head h1 {
  margin: 16px 0 18px;
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.26;
  letter-spacing: -0.01em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.article-meta .sep {
  color: var(--dim);
  opacity: 0.65;
}

.article-cover {
  margin: clamp(24px, 4vw, 36px) 0 0;
}

.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.article-body {
  margin-top: clamp(30px, 4vw, 44px);
  font-family: var(--serif);
  font-size: clamp(16.5px, 0.6vw + 14.5px, 18px);
  line-height: 1.95;
  color: #1c1f27;
}

.article-body > p {
  margin: 0 0 1.12em;
}

.article-body > p:first-child {
  font-size: 1.08em;
  line-height: 1.9;
}

.article-body h2 {
  margin: 2.4em 0 0.85em;
  padding-top: 0.85em;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(21px, 1.2vw + 16px, 25px);
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.article-figure {
  margin: 2em 0 2.1em;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.article-figure figcaption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--dim);
}

.article-figure--narrow {
  max-width: 320px;
}

.article-figure--portrait {
  max-width: 380px;
}

.article-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

/* ---------- about page ---------- */

.about-page {
  padding-block: clamp(32px, 6vh, 68px);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.about-profile {
  max-width: 340px;
}

.about-profile .portrait {
  border: 0;
}

.about-content h1 {
  margin: 12px 0 16px;
  font-family: var(--serif);
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.24;
  letter-spacing: -0.01em;
}

.about-content .about-lede {
  max-width: 44ch;
}

.about-content .about-body {
  margin-top: 6px;
}

.about-content .back-link {
  margin-top: 26px;
}

.about-lead {
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.6;
  color: var(--text);
}

.about-body > p {
  max-width: 58ch;
  margin-bottom: 13px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}

.focus-list {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.focus-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.focus-num {
  grid-row: span 2;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.focus-list h3 {
  font-size: 15.5px;
  font-weight: 600;
}

.focus-list p {
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(20px, 4vw, 48px);
  margin: 36px 0 0;
}

.about-facts > div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

/* ---------- contact page ---------- */

.contact-page {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--head-h) - 98px);
  padding-block: clamp(36px, 7vh, 76px);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.contact-intro h1 {
  margin: 14px 0 18px;
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.contact-lede {
  max-width: 40ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 20px;
  border-bottom: 1px solid rgba(43, 75, 242, 0.35);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  transition: border-color 180ms var(--ease);
}

.back-link:hover {
  border-color: var(--accent);
}

.contact-panel {
  padding: 8px clamp(16px, 3vw, 28px) 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-panel-label {
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--dim);
}

.channel-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 72px;
  padding: 12px 10px;
  margin-inline: -10px;
  border-bottom: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: background-color 180ms var(--ease);
}

.channel-list > li:last-child .channel-item {
  border-bottom: 0;
}

a.channel-item:hover {
  background: var(--surface-2);
}

a.channel-item:hover .channel-item-value,
a.channel-item:hover .channel-item-action {
  color: var(--accent);
}

.channel-item-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.channel-item-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.channel-item-main--brand {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.channel-item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.channel-mark {
  flex: none;
  width: 52px;
  height: 52px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  object-fit: contain;
}

.channel-mark--github {
  display: grid;
  place-items: center;
  padding: 0;
  border-color: var(--text);
  background: var(--text);
  color: var(--surface);
}

.channel-mark-glyph {
  display: block;
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.channel-item-value {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  transition: color 180ms var(--ease);
}

.channel-item-note {
  font-size: 12px;
  color: var(--muted);
}

.channel-item-action {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  transition: color 180ms var(--ease);
}

.channel-item .copy-btn {
  padding-inline: 14px;
}

.contact-panel-foot {
  padding: 16px 0 2px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.contact-panel-foot a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(43, 75, 242, 0.35);
  padding-bottom: 1px;
}

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

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 24px 36px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.foot-inner a {
  color: var(--muted);
  text-decoration: none;
}

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

/* ---------- motion ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .hero-card {
    animation: rise 700ms var(--ease) both;
  }

  .hero-copy > :nth-child(2) { animation-delay: 60ms; }
  .hero-copy > :nth-child(3) { animation-delay: 130ms; }
  .hero-copy > :nth-child(4) { animation-delay: 200ms; }
  .hero-copy > :nth-child(5) { animation-delay: 270ms; }
  .hero-card { animation-delay: 160ms; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-copy > *,
  .hero-card {
    animation: none;
  }

  .work-media:hover,
  .entry:hover,
  .entry:hover .entry-foot span {
    transform: none;
  }

  .text-link span,
  .channel-item-action,
  .btn,
  .copy-btn {
    transition: none;
  }
}

/* ---------- page transitions ---------- */

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: page-out 180ms var(--ease) both;
  }

  ::view-transition-new(root) {
    animation: page-in 320ms var(--ease) both;
  }

  .page-fallback body {
    animation: page-enter 340ms var(--ease);
  }

  .page-fallback body.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 180ms var(--ease), transform 180ms var(--ease);
  }
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .hero-card {
    max-width: 360px;
  }

  .work {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .work-body > p:not(.work-meta) {
    max-width: 60ch;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-profile {
    max-width: 340px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .head-status {
    display: none;
  }
}

@media (max-width: 768px) {
  .entry-grid {
    grid-template-columns: 1fr;
  }

  .hero-facts {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-facts > div {
    min-height: 0;
  }

  .article-card {
    padding: 12px 12px 16px;
    border-radius: var(--r-md);
  }

  .article-card-title {
    margin: 16px 4px 8px;
  }

  .article-card-more {
    margin-left: 0;
  }

  .article-body {
    line-height: 1.9;
  }

  .article-figure--portrait {
    max-width: 320px;
  }

  .article-figure--narrow {
    max-width: 260px;
  }

  .about-facts {
    grid-template-columns: 1fr;
  }

  .foot-inner {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .channel-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    padding-inline: 8px;
    margin-inline: -8px;
  }

  .channel-item-label {
    grid-column: 1 / -1;
  }

  .contact-panel {
    padding-inline: 16px;
    border-radius: 22px;
  }
}

@media (max-width: 480px) {
  :root {
    --head-h: 64px;
  }

  .head-inner {
    gap: 12px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-cn {
    font-size: 17px;
  }

  .nav {
    gap: 15px;
  }

  .nav a {
    font-size: 12px;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    padding-inline: 16px;
  }

  .hero-card {
    max-width: 320px;
    padding: 12px;
  }

  .work-body h2 {
    font-size: 24px;
  }

  .contact-intro h1 {
    font-size: 30px;
  }
}
