:root {
  font: 15px/1.55 Inter, system-ui, -apple-system, "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: #201e1a;
  background: #f3f1eb;
  color-scheme: light;
  --background: #f3f1eb;
  --surface: #fdfbf7;
  --inset: #eeebe3;
  --ink: #201e1a;
  --muted: #655f55;
  --border: #d5cfc2;
  --accent: #77521d;
  --focus: #8f642d;
  --active: #25231d;
  --on-active: #fffdf7;
  --shadow: 0 10px 28px #302b1b0b;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  color: #f3f0e7;
  background: #181713;
  --background: #181713;
  --surface: #22201a;
  --inset: #2d2a23;
  --ink: #f3f0e7;
  --muted: #c2b9a8;
  --border: #464035;
  --accent: #e8bb77;
  --focus: #f3c383;
  --active: #efdfbd;
  --on-active: #241d13;
  --shadow: 0 10px 24px #0002;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button, input { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
[hidden] { display: none !important; }
:is(a, button, video, input):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.visually-hidden { width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1280px, calc(100% - 72px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 5; background: var(--background); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 65px; padding: 8px clamp(16px, 2vw, 32px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 750; white-space: nowrap; }
.brand img { flex: none; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.utility-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 650; white-space: nowrap; }
.utility-button:hover { background: var(--inset); }
.header-account { position: relative; min-width: 0; }
.account-menu { margin: 0; }
.account-trigger { display: flex; max-width: min(220px, 38vw); gap: 6px; cursor: pointer; list-style: none; }
.account-trigger::-webkit-details-marker { display: none; }
.account-trigger::after {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  content: '';
}
.account-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.account-trigger:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.account-options {
  position: absolute;
  z-index: 2;
  top: calc(100% + 7px);
  right: 0;
  width: min(255px, calc(100vw - 26px));
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.account-options > * { display: block; padding: 6px 8px; }
.account-email,
.account-provider { color: var(--muted); overflow-wrap: anywhere; font-size: 13px; }
.account-security { border-radius: 7px; font-weight: 650; }
.account-security:hover { background: var(--inset); }
.utility-glyph { font-size: 17px; line-height: 1; }
.utility-globe { position: relative; width: 13px; height: 13px; border: 1px solid currentColor; border-radius: 50%; }
.utility-globe::before { content: ""; display: block; height: 100%; margin-inline: 2px; border-inline: 1px solid currentColor; border-radius: 50%; }
.utility-globe::after { content: ""; position: absolute; border-top: 1px solid currentColor; inset: 5px 0 auto; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0 28px; margin-top: 36px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 60px; }
  .brand img { width: 28px; height: 28px; }
  .utility-button { min-height: 40px; }
  .site-footer { flex-wrap: wrap; gap: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
.brand { font-weight: 800; font-size: clamp(24px,2.25vw,35px); letter-spacing:-.05em; }
.brand img { width:clamp(46px,4.5vw,66px); height:auto; }
.header-inner { min-height:79px; }
@media(max-width:500px){.brand{gap:6px}.header-inner{padding-inline:13px;min-height:67px}.header-actions{gap:4px}}
.primary-menu { display:flex; gap:clamp(10px,2vw,30px); align-items:center; margin-right:auto; margin-left:clamp(15px,3vw,48px); }
.primary-menu :is(a, [data-contact-open]) { display:flex; align-items:center; min-height:44px; padding:5px 2px; border:0; border-bottom:2px solid transparent; background:none; color:var(--muted); white-space:nowrap; font-size:16px; font-weight:650; }
.primary-menu :is(a, [data-contact-open]):hover,.primary-menu a[aria-current=page]{color:var(--ink);border-color:var(--accent)}
.author-contact {
  width: min(410px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 22px 72px #17161145;
  max-height: calc(100% - 24px);
}
.author-contact::backdrop { background: #17161168; }
.author-contact-cover { position: relative; height: clamp(96px, 21vh, 140px); background: var(--inset); }
.author-contact-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 39%; }
.author-contact-cover form { position: absolute; top: 12px; right: 12px; }
.author-contact-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  font-size: 24px;
  line-height: 1;
}
.author-contact-close:hover { background: var(--inset); }
.author-contact-body { padding: clamp(18px, 6vw, 28px); }
.author-contact h2 { margin: 0 0 18px; font-size: clamp(23px, 6vw, 28px); line-height: 1.15; letter-spacing: -.035em; }
.author-contact-wechat {
  margin: 0 0 14px;
  padding: 12px 12px 10px;
  border-radius: 10px;
  background: var(--inset);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.author-contact-wechat a {
  display: block;
  width: min(100%, 224px);
  margin: 0 auto 8px;
  cursor: zoom-in;
}
.author-contact-wechat img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: white;
}
.author-contact-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 8px 13px;
  border-radius: 9px;
  background: var(--active);
  color: var(--on-active);
}
.author-contact-email:hover { opacity: .89; }
.author-contact-email-label { display: block; font-size: 12px; opacity: .85; }
.author-contact-email strong { font-size: 14px; overflow-wrap: anywhere; }
@media(max-width:1040px){.header-inner{display:grid;grid-template-columns:1fr auto;gap:1px 8px}.header-actions{grid-column:2;grid-row:1}.primary-menu{grid-column:1/-1;grid-row:2;margin:0;flex-wrap:wrap;gap:0 clamp(9px,3vw,20px)}.primary-menu :is(a, [data-contact-open]){min-height:37px;font-size:clamp(14px,3.7vw,16px)}.work-card,.landing #works{scroll-margin-top:117px}}
@media (max-width: 480px) {
  .header-actions:has(.header-account) :is([data-theme-toggle], [data-language-toggle]) { width: 38px; flex: none; padding-inline: 0; }
  .header-actions:has(.header-account) :is([data-theme-label], [data-language-label]) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .account-trigger { max-width: clamp(76px, 26vw, 130px); padding-inline: 7px; }
}
@media (max-width: 360px) {
  .header-inner:has(.header-account) { padding-inline: 10px; column-gap: 6px; }
  .header-inner:has(.header-account) .brand { gap: 4px; font-size: 20px; }
  .header-inner:has(.header-account) .brand img { width: 34px; }
}
