@charset "UTF-8";
:root {
  color-scheme: light;
  --paper: #f7f9f8;
  --ink: #26342e;
  --muted: #64746b;
  --line: #dfe7e1;
  --soft: #eaf1ec;
  --accent: #397659;
  --surface: #fcfdfc;
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #19221d;
  --ink: #e3ede6;
  --muted: #a4b7a9;
  --line: #36473c;
  --soft: #293b2f;
  --accent: #a2d0b2;
  --surface: #202d25;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #19221d;
    --ink: #e3ede6;
    --muted: #a4b7a9;
    --line: #36473c;
    --soft: #293b2f;
    --accent: #a2d0b2;
    --surface: #202d25;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.9 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.page {
  max-width: 560px;
  width: calc(100% - 48px);
  margin: 0 auto;
  padding: 56px 0 152px;
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.monogram,
.dialog-mark {
  font:
    600 31px/1 ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: -0.1em;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 4px;
}
.monogram span,
.dialog-mark span {
  color: #9ec8ae;
}
.nav-actions {
  display: flex;
  gap: 10px;
}
.nav-actions > a,
.nav-actions > button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 0;
  border-radius: 10px;
  background: none;
}
.nav-actions > a:hover,
.nav-actions > button:hover {
  background: var(--soft);
  color: var(--accent);
}
.visual {
  height: 175px;
  margin: 16px -28px 10px;
  overflow: hidden;
  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 17%,
    #000 77%,
    transparent
  );
}
.visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 49%;
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] .visual {
  opacity: 0.68;
}
:root[data-theme="dark"] .visual img {
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .visual {
    opacity: 0.68;
  }
  :root:not([data-theme="light"]) .visual img {
    filter: invert(1) hue-rotate(180deg);
    mix-blend-mode: screen;
  }
}
.name-line {
  display: flex;
  align-items: baseline;
  gap: 17px;
}
h1 {
  font-family: var(--display);
  font-size: 35px;
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1.3;
}
.name-dot {
  color: var(--accent);
}
.role {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.lead {
  font-size: 17px;
  line-height: 1.7;
  margin-top: 20px;
  letter-spacing: 0.015em;
}
.bio {
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
  margin-top: 9px;
}
.articles {
  margin-top: 43px;
}
.section-label {
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 12px;
  font-weight: 500;
}
.section-label h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: -1px;
}
.section-label .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 112px;
  color: var(--muted);
  font-size: 12px;
}
.empty .icon {
  color: var(--accent);
  width: 18px;
  height: 18px;
}
.empty p {
  opacity: 1;
}
footer {
  margin-top: 17px;
}
footer h2 {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 15px;
}
.contact-links {
  display: flex;
  gap: 26px;
}
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  background: none;
  border: 0;
  padding: 0;
  min-height: 36px;
}
.contact-item:hover {
  color: var(--accent);
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.contact-item .arrow {
  width: 12px;
  height: 12px;
  color: var(--muted);
  margin-left: 4px;
}
.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: currentColor;
  mask: var(--icon) center/contain no-repeat;
  -webkit-mask: var(--icon) center/contain no-repeat;
}
.notebook {
  --icon: url("assets/icons/notebook.svg");
}
.github {
  --icon: url("assets/icons/brand-github.svg");
}
.mail {
  --icon: url("assets/icons/mail.svg");
}
.message {
  --icon: url("assets/icons/message-circle.svg");
}
.arrow {
  --icon: url("assets/icons/arrow-up-right.svg");
}
.moon {
  --icon: url("assets/icons/moon.svg");
}
.sun {
  --icon: url("assets/icons/sun.svg");
}
.pencil {
  --icon: url("assets/icons/pencil.svg");
}
.bottom-fade {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 94px;
  background: linear-gradient(transparent, var(--paper));
  pointer-events: none;
  z-index: 1;
}
.chat {
  position: fixed;
  bottom: max(26px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 17px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    0 5px 8px rgb(50 70 57 / 0.03),
    0 12px 32px rgb(50 70 57 / 0.08);
  font-size: 13px;
  white-space: nowrap;
  z-index: 2;
}
.chat-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--soft);
  color: var(--accent);
}
.chat > .arrow {
  width: 14px;
  height: 14px;
  margin-left: 15px;
  color: var(--accent);
}
.chat:hover {
  border-color: var(--accent);
}
.chat:active {
  transform: translateX(-50%) scale(0.98);
}
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  width: calc(100% - 48px);
  max-width: 380px;
  max-height: 85dvh;
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: rgb(20 29 23 / 0.32);
  backdrop-filter: blur(4px);
}
.close {
  display: block;
  margin-left: auto;
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--muted);
  padding: 0 0 12px;
}
.dialog-mark {
  width: 40px;
  height: 40px;
  font-size: 26px;
  border-radius: 10px;
  margin-bottom: 17px;
}
dialog h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
dialog p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
dialog .pending {
  font-size: 12px;
  margin: 20px 0 0;
}
.skip {
  position: fixed;
  top: -80px;
  left: 12px;
  padding: 10px;
  background: var(--ink);
  color: var(--paper);
  z-index: 3;
}
.skip:focus {
  top: 12px;
}
@media (max-width: 600px) {
  .page {
    padding-top: 32px;
  }
  .visual {
    height: 145px;
    margin: 12px -18px 8px;
  }
  .monogram {
    width: 44px;
    height: 44px;
    font-size: 29px;
  }
  h1 {
    font-size: 32px;
  }
  .lead {
    font-size: 16px;
    margin-top: 16px;
  }
  .bio {
    font-size: 12px;
  }
  .articles {
    margin-top: 34px;
  }
  .empty {
    min-height: 96px;
  }
  footer {
    margin-top: 14px;
  }
  .chat {
    bottom: max(22px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: no-preference) {
  .introduction {
    animation: appear 0.45s ease-out both;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Contact action belongs to the page flow, alongside contact links. */
.welcome {
  font-size: 13px;
  color: var(--muted);
  margin-top: 13px;
}
footer {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 20px;
  align-items: center;
}
footer h2 {
  grid-column: 1/-1;
}
.chat {
  position: static;
  transform: none;
  justify-self: end;
  font-size: 12px;
  padding: 8px 12px;
  gap: 9px;
  border-radius: 12px;
  box-shadow: none;
  z-index: auto;
}
.chat:active {
  transform: scale(0.98);
}
.chat > .arrow {
  margin-left: 4px;
  width: 12px;
  height: 12px;
}
.chat-icon {
  width: 27px;
  height: 27px;
  border-radius: 8px;
}
.page {
  padding-bottom: 80px;
}
@media (max-width: 600px) {
  footer {
    grid-template-columns: 1fr;
    row-gap: 15px;
  }
  footer h2 {
    margin-bottom: 0;
  }
  .chat {
    justify-self: start;
    margin-top: 3px;
  }
  .welcome {
    font-size: 12px;
  }
  .lead {
    font-size: 15px;
  }
}

/* Intro paragraphs share the same visual weight. */
.lead,
.bio,
.welcome {
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: normal;
}
@media (max-width: 600px) {
  .lead,
  .bio,
  .welcome {
    font-size: 12px;
  }
}

.name-line h1 {
  font-size: 34px;
  letter-spacing: -1px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 4px;
}
.name-chinese {
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.introduction .bio {
  margin-top: 14px;
}
.wechat-qr {
  display: block;
  width: 100%;
  height: auto;
  margin: 20px auto 12px;
  border-radius: 10px;
  background: #fff;
}
dialog .qr-note {
  font-size: 12px;
  margin-bottom: 8px;
}
.qr-download {
  font-size: 12px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 600px) {
  .name-line h1 {
    font-size: 30px;
  }
  .name-chinese {
    font-size: 21px;
  }
}

.article-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
}
.article-row:hover {
  color: var(--accent);
}
.article-row time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.post {
  margin-top: 48px;
}
.back-link {
  font-size: 12px;
  color: var(--muted);
}
.post h1 {
  font-size: 28px;
  letter-spacing: 0;
  margin: 24px 0 10px;
}
.post > time {
  font-size: 12px;
  color: var(--muted);
}
.prose {
  margin-top: 32px;
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin: 18px 0;
}
.prose h2 {
  font-size: 21px;
  margin: 32px 0 14px;
}
.prose h3 {
  font-size: 18px;
  margin-top: 28px;
}
.prose img {
  max-width: 100%;
  height: auto;
}
.prose pre {
  overflow: auto;
  padding: 18px;
  border-radius: 10px;
  font-size: 13px;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose blockquote {
  border-left: 3px solid var(--line);
  padding-left: 18px;
  color: var(--muted);
}
.prose table {
  display: block;
  overflow: auto;
  border-collapse: collapse;
}
.prose td,
.prose th {
  padding: 8px 12px;
  border: 1px solid var(--line);
}
