:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #363d36;
  --muted: #676c64;
  --green: #466b48;
  --blue: #4b7282;
  --rule: #d0d2c7;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: var(--serif); -webkit-font-smoothing: antialiased; }
::selection { background: #e2e9db; color: #283d29; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:hover { color: #294f2d; text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 6px; border-radius: 2px; }
button { font: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: min(860px, calc(100% - 80px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 5; left: 20px; top: -70px; background: var(--paper); padding: 12px; }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 42px; }
.identity { display: flex; align-items: center; gap: 18px; color: var(--ink); text-decoration: none; flex: 1; min-width: 0; }
.identity-copy { min-width: 0; flex: 1; }
.portrait { flex-shrink: 0; width: 88px; height: 96px; object-fit: contain; }
.identity strong { font-size: 30px; font-weight: 700; display: block; line-height: 1.5; }
.site-nav { display: flex; align-items: center; gap: 15px; font-size: 17px; white-space: nowrap; flex-shrink: 0; }
.site-nav span { color: #a6aa9e; }
.site-nav a { text-decoration: none; padding-block: 12px; }
.site-nav a:hover { text-decoration: underline; }
.intro { padding: 20px 0 32px; border-bottom: 1px solid var(--rule); }
.type-area { min-width: 0; display: grid; color: var(--green); font-size: 15px; font-weight: 500; line-height: 1.8; letter-spacing: .02em; min-height: 1.8em; }
.type-area > * { grid-area: 1 / 1; margin: 0; }
.type-sizing { visibility: hidden; pointer-events: none; }
.type-output { align-self: start; }
.type-output::after { content: ""; display: inline-block; vertical-align: -.05em; width: 1px; height: 1em; margin-left: 5px; background: currentColor; animation: blink 1.1s steps(1) infinite; }
.intro-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
h1 { font-size: clamp(27px, 3.15vw, 39px); line-height: 1.6; font-weight: 500; letter-spacing: .025em; margin: 0; }
.coffee { width: 170px; height: 138px; object-fit: contain; flex-shrink: 0; margin-right: 24px; }
.section-heading { display: flex; align-items: center; gap: 14px; margin: 32px 0 15px; }
h2 { font-size: 27px; font-weight: 600; margin: 0; letter-spacing: .04em; }
.illustration { display: block; width: 100px; height: 100px; flex-shrink: 0; background-image: url("./icons.webp"); background-size: 500% 500%; background-repeat: no-repeat; background-position: calc(var(--col) * 25%) calc(var(--row) * 25%); }
.section-heading .illustration { width: 45px; height: 45px; }
.project-list { list-style: none; margin: 0; padding: 0; }
.project { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 24px; align-items: center; min-height: 124px; padding: 12px 0; border-bottom: 1px solid #eaeae4; }
.project:last-child { border-bottom: 0; }
.project .illustration { justify-self: center; }
.project .illustration-miaotou { max-width: none; background: none; object-fit: contain; padding: 8px; filter: saturate(.38); opacity: .62; }
.project h3 { font-size: 25px; font-weight: 600; line-height: 1.5; margin: 0 0 5px; letter-spacing: .02em; }
.project:nth-child(4n + 2) h3 a { color: var(--blue); }
.project p { margin: 0; color: var(--muted); font: 16px/1.85 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: .025em; }
.more { font-size: 16px; white-space: nowrap; padding: 12px 0 12px 12px; }
.more span[aria-hidden] { display: inline-block; margin-left: 5px; transition: transform .18s; }
.more:hover span[aria-hidden] { transform: translate(2px, -2px); }
.writing { border-top: 1px solid var(--rule); padding-bottom: 34px; margin-top: 16px; }
.essay { display: block; position: relative; padding: 15px 40px 15px 7px; text-decoration: none; }
.essay strong { font-size: 23px; line-height: 1.6; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.essay p { color: var(--muted); font: 15px/1.8 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; margin: 3px 0 0; }
.essay .arrow { position: absolute; right: 0; top: 25px; font-size: 22px; }
.contact { border-top: 1px solid var(--rule); padding: 40px 0 36px; display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.contact p { font-size: 17px; line-height: 1.9; margin: 0 0 12px; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 14px; font-size: 18px; }
.contact-links span { color: #858f7e; }
.copyright { font-size: 14px; color: var(--muted); margin-top: 23px; }
.sleeping-cat { width: 160px; height: 100px; object-fit: contain; flex-shrink: 0; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (max-width: 680px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { padding-top: 20px; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
  .identity { gap: 10px; flex-basis: 100%; align-items: flex-start; }
  .portrait { width: 53px; height: 68px; }
  .identity strong { font-size: 23px; }
  .site-nav { gap: 23px; flex-wrap: wrap; justify-content: flex-start; width: 100%; font-size: 14px; padding: 0 0 0 63px; }
  .site-nav span { display: none; }
  .site-nav a { padding: 2px 0; }
  .intro { padding: 19px 0 22px; }
  .type-area { font-size: 13px; line-height: 1.75; min-height: 3.5em; height: 3.5em; margin-top: 2px; }
  .intro-main { position: relative; min-height: 112px; gap: 8px; }
  h1 { font-size: clamp(23px, 5.4vw, 31px); line-height: 1.65; letter-spacing: 0; }
  .coffee { position: absolute; right: 0; top: -8px; width: 64px; height: 64px; margin: 0; opacity: .9; }
  .section-heading { gap: 8px; margin: 26px 0 12px; }
  h2 { font-size: 23px; }
  .section-heading .illustration { width: 28px; height: 28px; }
  .project { grid-template-columns: 55px minmax(0, 1fr); column-gap: 15px; row-gap: 6px; padding: 20px 0; min-height: 134px; }
  .project .illustration { width: 60px; height: 60px; align-self: start; margin-top: 3px; }
  .project .illustration-miaotou { padding: 5px; }
  .project h3 { font-size: 21px; margin-bottom: 6px; }
  .project p { font-size: 14px; line-height: 1.8; letter-spacing: 0; }
  .more { grid-column: 2; justify-self: start; font-size: 14px; padding: 5px 0; }
  .writing { margin-top: 8px; padding-bottom: 24px; }
  .essay { padding-left: 0; }
  .essay strong { font-size: 21px; }
  .essay p { font-size: 14px; }
  .contact { padding: 29px 0 27px; position: relative; align-items: flex-end; }
  .contact p { font-size: 15px; max-width: 270px; }
  .contact-links { font-size: 16px; column-gap: 10px; }
  .copyright { font-size: 12px; margin-top: 26px; }
  .sleeping-cat { position: absolute; width: 90px; height: 55px; right: 0; bottom: 21px; }
}
@media (max-width: 360px) { .wrap { width: calc(100% - 32px); } .site-nav { gap: 18px; } .coffee { width: 48px; height: 48px; top: 1px; } h1 { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
