:root{color-scheme:light;--ink:#193b38;--paper:#f3f0e7;--line:#c4c7b9;--rust:#9d4629;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:var(--ink);background:var(--paper)}
.music-toggle {position:fixed;right:max(1rem,env(safe-area-inset-right));bottom:max(1rem,env(safe-area-inset-bottom));z-index:10;display:grid;place-items:center;width:2.5rem;height:2.5rem;border:1px solid #82908280;border-radius:50%;background:#fff9e9dc;color:#345e56;font-size:1.25rem;box-shadow:0 2px 7px #25362b18;}
.music-toggle[aria-pressed="false"] span {opacity:.55;text-decoration:line-through;}
*{box-sizing:border-box}body{margin:0}button,a{font:inherit;color:inherit}button{cursor:pointer}a{text-decoration:none}a:hover{text-decoration:underline;text-underline-offset:.24em}:focus-visible{outline:3px solid #bf542e;outline-offset:4px}html{scroll-behavior:smooth}h1,h2,h3,p,ul{margin:0}.experience {
  --sheet: #fffaed;
  --teal: #345e56;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 270px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 45% 40%, #fcf6e7, #e7dfcc 85%);
}
.mail-scene, .studio, #scene, .pins { position: absolute; inset: 0; }
.mail-scene {
  z-index: 2;
  display: grid;
  place-items: center;
  perspective: 1100px;
  background: repeating-linear-gradient(118deg, transparent 0 8vw, #fff9e455 9vw 12vw, transparent 13vw 22vw);
  transition: opacity .65s, transform .8s cubic-bezier(.22,.7,.25,1);
}
.mailer {
  width: min(78vw, 520px, 100svh);
  aspect-ratio: 1.58;
  position: relative;
  perspective: 1000px;
  animation: arrive 1.45s cubic-bezier(.19,.7,.24,1) both;
}
@keyframes arrive {
  0% {opacity:0; transform:translate3d(-65vw,24vh,-240px) rotate(-24deg) rotateY(36deg) scale(.65)}
  43% {opacity:1; transform:translate3d(-12vw,-6vh,-65px) rotate(9deg) rotateY(-12deg) scale(.9)}
  75% {transform:translate3d(2vw,1vh,0) rotate(-4deg)}
  100% {transform:translate3d(0,0,0) rotate(-2deg)}
}
.envelope-back, .flap, .pocket, .unseal, .stationery { position:absolute; inset:0; border-radius:5px; }
.envelope-back {background:#b69565;box-shadow:0 27px 42px -18px #45372280,0 3px 5px #57462755;}
.pocket {
  z-index:3; background:linear-gradient(31deg,#e1c59b 0 49%,transparent 49.5%) left / 50.2% 100% no-repeat,
  linear-gradient(-31deg,#d8b783 0 49%,transparent 49.5%) right / 50.2% 100% no-repeat,#d9bb8d;
  clip-path:polygon(0 0,50% 54%,100% 0,100% 100%,0 100%);
}
.flap {z-index:4;transform-origin:top;clip-path:polygon(0 0,100% 0,51% 59%,49% 59%);
  background:linear-gradient(162deg,#f2ddba,#ddbd88);transition:transform .62s cubic-bezier(.33,0,.2,1),opacity .65s;}
.unseal {z-index:5;width:100%;border:0;background:transparent;color:#533d29;}
.seal {position:absolute;left:50%;top:55%;transform:translate(-50%,-50%);display:grid;place-items:center;width:clamp(40px,7vw,65px);aspect-ratio:1;
  font:2rem Georgia,serif;color:#ffe6bb;border:5px double #a05a45;border-radius:46% 52% 43% 50%;
  background:radial-gradient(circle at 35% 24%,#bd6e51,#883f31 76%);box-shadow:1px 4px 4px #55382b66,inset 0 0 0 2px #d68f6d88;}
.unseal-label {position:absolute;top:72%;left:0;width:100%;font-size:.85rem;letter-spacing:.16em}
.stationery {
  z-index:2;inset:4% 3%;padding:clamp(1rem,4.4vw,3rem);display:flex;flex-direction:column;justify-content:center;gap:clamp(.55rem,1.8vw,1.35rem);
  visibility:hidden;opacity:0;background:repeating-linear-gradient(0deg,transparent 0 4px,#574a2920 4.2px,transparent 4.5px),var(--sheet);
  border:1px solid #bcae91;box-shadow:0 15px 48px #5e523729;transform:translateY(7%) rotate(2deg);
}
.stationery h1 {font:700 clamp(2.6rem,6.7vw,5.8rem)/1.05 "Songti SC",SimSun,serif;letter-spacing:-.065em}
.stationery p {font-size:clamp(.95rem,1.6vw,1.13rem);line-height:1.8;max-width:29ch}
.enter {background:none;border:0;border-bottom:1px solid #55776c;color:#345e56;padding:.25em 0;font-weight:650;font-size:.88rem;align-self:flex-start}
.experience[data-stage="letter"] .mailer {cursor:pointer}
.experience:not([data-stage="envelope"]) .flap {transform:rotateX(174deg);opacity:0}
.experience:not([data-stage="envelope"]) .unseal {visibility:hidden}
.experience:not([data-stage="envelope"]) .stationery {z-index:6;opacity:1;visibility:visible;transform:translateY(-8%) rotate(2deg);animation:unfold .85s cubic-bezier(.2,.7,.2,1) both}
@keyframes unfold {0%{opacity:0;transform:translateY(5%) scale(.93)}35%{opacity:1;transform:translateY(-25%) rotate(1deg)}100%{transform:translateY(-8%) rotate(2deg)}}
.experience[data-stage="desk"] .mail-scene {pointer-events:none;opacity:0;transform:translateY(-7vh) scale(1.09);visibility:hidden;transition:opacity .55s,transform .65s,visibility 0s .65s}
.studio {background:#ece6d6;opacity:0;visibility:hidden;transition:opacity .65s}
.experience[data-stage="desk"] .studio {opacity:1;visibility:visible}
.studio canvas {display:block;width:100%;height:100%;touch-action:none;cursor:grab}
.view-reset {position:absolute;left:max(1rem,env(safe-area-inset-left));bottom:max(1rem,env(safe-area-inset-bottom));z-index:2;width:2.5rem;height:2.5rem;border:0;background:transparent;color:#345e56;font-size:1.7rem}
.pins {pointer-events:none}
.pins button {position:absolute;left:0;top:0;border:1px solid #98a398;border-radius:2rem;background:#fffbed;color:#26463e;
  font-weight:700;font-size:clamp(.76rem,1vw,.96rem);padding:.4em .8em;box-shadow:0 3px 8px #25362b2b;white-space:nowrap;
  pointer-events:auto;visibility:hidden;opacity:0;transition:opacity .2s}
.pins button::before {content:"";display:inline-block;width:.45em;height:.45em;border-radius:100%;background:#b95b39;margin-right:.42em;vertical-align:.1em}
.pins button:hover {background:#fbe3b4}
.studio.ready .pins button,.studio.static .pins button {visibility:visible;opacity:1}
.studio.static .pins {display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:1rem}
.studio.static .pins button {position:static}
@media (max-width:600px) {
  .mailer {width:min(89vw,490px);aspect-ratio:1.38}
  .stationery {padding:1.3rem;gap:.72rem}
  .pins button {padding:.33em .48em}
}
@media (prefers-reduced-motion:no-preference) {
  #detail::backdrop{transition:opacity .25s} @starting-style {#detail[open]::backdrop{opacity:0}}
  #detail.leaving::backdrop{opacity:0}
}
@media (prefers-reduced-motion:reduce) {
  .experience *, .experience:not([data-stage="envelope"]) .stationery {animation:none!important;transition:none!important}
}

/* Each reader keeps the shape and materials of its desk object. */
#detail {
  --room: min(78svh, 48rem);
  width: min(92vw, 54rem); max-width: none; max-height: 96svh;
  margin: auto; padding: 2.9rem .85rem 1.4rem; overflow: auto;
  background: transparent; color: #253f37; border: 0; overscroll-behavior: contain;
}
#detail::backdrop {background: #182c29a6; backdrop-filter: blur(4px)}
body:has(dialog[open]) {overflow: hidden}
.close {position: absolute; right: .85rem; top: .23rem; width: 2.25rem; height: 2.25rem;
  border: 1px solid #8a9588; border-radius: 50%; background: #fff8e8; font: 1.6rem/1 system-ui; z-index: 6}
.detail-content {position:relative; isolation:isolate}
.detail-content h2,.detail-content h3 {line-height:1.45}
.detail-content p,.detail-content li {font-size:1rem;line-height:1.82;overflow-wrap:anywhere}
.detail-content time {display:block;font:.86rem/1.5 Consolas,monospace;letter-spacing:.04em}
.page-control {display:flex;align-items:center;justify-content:center;gap:1rem;margin:.7rem auto 0;width:fit-content;
  padding:.2rem .45rem;background:#fff7e4;color:#4b493c;border:1px solid #b8ac8c;border-radius:2rem}
.page-control button {width:2rem;height:2rem;border:0;background:transparent;font:1.7rem/1 Georgia,serif}
.page-control output {font:.85rem Consolas,monospace}

/* A left-hand leaf unfolds from the spine, revealing the two school entries. */
.education {position:relative; perspective:1600px}
.education-list {display:grid;grid-template-columns:1fr 1fr;background:#375e52;padding:.55rem;
  border:1px solid #274637;border-radius:.7rem;box-shadow:0 14px 30px #101c2340}
.education-list article {position:relative;min-width:0;transform-style:preserve-3d}
.education-list article:first-child {transform-origin:right center;z-index:1}
.page-ink {height:100%;min-height:22rem;padding:clamp(1.2rem,3vw,2.7rem);backface-visibility:hidden;
  background:linear-gradient(to right,#fff8e4 0%,#fbf0d9 86%,#d4c2a0 100%);
  border-radius:.3rem 0 0 .3rem;box-shadow:0 .22rem #dbceb3,0 .36rem #aa997e}
.education-list article:last-child .page-ink {background:linear-gradient(to right,#baa885,#f7ecd2 6%,#fff8e7 23%,#faf0dc 98%,#e6d8b9);
  border-radius:0 .3rem .3rem 0;padding-top:clamp(2rem,5vw,4rem)}
.education-list article:first-child::after {content:"";position:absolute;inset:0;transform:rotateY(180deg) translateZ(1px);
  backface-visibility:hidden;background:linear-gradient(95deg,#274e43,#416e5b 90%,#2e5445);border:5px double #c7b783;border-radius:.25rem}
.education h2 {font:700 clamp(1.5rem,3vw,2.4rem)/1.2 "Songti SC",SimSun,serif;margin:0 0 1.2rem}
.education time {color:#6d6755;border-top:1px solid #b9aa86;padding-top:.8rem}
.education h3 {font:700 1.14rem/1.65 "Songti SC",SimSun,serif;color:#304a3b;margin:.65rem 0}
.education p {color:#534d3e}
.education .page-control {display:none}
@keyframes spread-open {from{transform:rotateY(176deg)}to{transform:rotateY(0)}}

/* Each project is one sheet in a tabbed paper folder. */
#detail[data-reader="files"] {width:min(92vw,46rem)}
[data-reader="files"] .detail-content {padding:.85rem .85rem 1rem;background:#b88753;border-radius:.45rem;box-shadow:0 .6rem 2rem #201a203f}
.folder-tabs {display:flex;gap:.45rem;position:relative;z-index:2;padding-left:.55rem}
.folder-tabs button {font-weight:650;border:1px solid #b99c72;border-bottom:0;border-radius:.5rem .5rem 0 0;
  padding:.5rem clamp(.5rem,2.5vw,1.05rem);background:#d9c6a1;color:#544b38}
.folder-tabs button[aria-pressed="true"] {background:#fff8e8;color:#315b4a}
@media (max-width:480px) {
  .folder-tabs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.25rem;padding-left:0}
  .folder-tabs button {padding:.45rem .4rem}
}
.case {position:relative;isolation:isolate;padding:clamp(1.2rem,3.6vw,2.5rem);background:#fff8eb;border-radius:.12rem;
  box-shadow:1px 4px #deccb1,4px 7px #f6e6cf,5px 9px #b19b80}
.case::before {content:"";position:absolute;right:1.6rem;top:-.35rem;width:.52rem;height:1.55rem;
  border:2px solid #91846e;border-radius:1rem;transform:rotate(13deg)}
.case-header {display:flex;align-items:flex-start;gap:.75rem;border-bottom:1px solid #baac94;padding-bottom:.8rem}
.case-header h3 {flex:1;min-width:0;overflow-wrap:anywhere;font:700 clamp(1.25rem,2.5vw,1.85rem)/1.4 Georgia,"Songti SC",SimSun,serif;margin-top:.35rem}
.project-link {display:grid;place-items:center;flex:0 0 2.75rem;width:2.75rem;height:2.75rem;color:#345e56;font:500 1.7rem/1 system-ui,sans-serif}
.project-link:hover {color:#9d4629;text-decoration:none}
.case ul {padding-left:1.2rem;margin-top:.8rem}.case li+li {margin-top:.55rem}

/* The dark display, camera bezel and keyboard form the opened notebook. */
#detail[data-reader="skills"] {width:min(93vw,51rem)}
.skills {position:relative;width:92%;margin:auto;background:linear-gradient(120deg,#183c37,#142b2b);color:#e2eddc;
  border:clamp(.48rem,1vw,.84rem) solid #293c3b;border-top-width:1.38rem;border-bottom-width:1.05rem;border-radius:.9rem .9rem .35rem .35rem;
  box-shadow:inset 0 0 0 1px #59736a,0 3px 0 #152624;padding:clamp(.95rem,2.5vw,1.85rem)}
.skills::before {content:"";position:absolute;top:-.93rem;left:50%;width:.32rem;height:.32rem;background:#79938c;border-radius:50%}
.skills h2 {margin:0 0 .8rem;font-size:1.45rem;color:#b4d4bc}
.skills-list {padding:0;list-style:none;max-height:min(52svh,29rem);overflow:auto;scrollbar-color:#829c8e #203d38}
.skills-list li {padding:.55rem .2rem;border-top:1px solid #44685e}
.skills-list strong {color:#edc998}
.keyboard {position:relative;height:3.3rem;background:linear-gradient(#61766d,#96a69a);clip-path:polygon(4% 0,96% 0,100% 86%,99% 100%,1% 100%,0 86%);
  border-bottom:.26rem solid #53695f;border-radius:0 0 .6rem .6rem}
.keyboard::before {content:"";position:absolute;inset:.35rem 12% 43%;background:
  repeating-linear-gradient(0deg,transparent 0 5px,#8c9e91 5px 7px),
  repeating-linear-gradient(90deg,#4a5f55 0 12px,transparent 12px 15px);transform:perspective(120px) rotateX(20deg)}
.keyboard::after {content:"";position:absolute;width:19%;height:.52rem;bottom:.31rem;left:40.5%;border:1px solid #5a7267;border-radius:.12rem}

/* The original certificate names are typeset individually inside a gilt frame. */
#detail[data-reader="certificates"] {width:min(90vw,43rem)}
.certificate-face {position:relative;isolation:isolate;min-height:clamp(15rem,37vw,24rem);padding:2.8rem clamp(1.65rem,6vw,4.4rem) 4.5rem;
  display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;
  background:radial-gradient(ellipse at center,#fffcf0,#f4e8c9);color:#614824;border:.52rem ridge #ad8a53;
  box-shadow:0 10px 2rem #28201655}
.certificate-face::before {content:"";position:absolute;inset:.65rem;border:4px double #b49a63;pointer-events:none}
.certificate-face::after {content:"";position:absolute;left:79.3125%;top:70%;width:7.875%;aspect-ratio:1;transform:translateY(16.6667%);
  background:var(--certificate-seal) center / contain no-repeat;pointer-events:none}
.certificate-face h2 {font:700 clamp(1.8rem,4vw,2.7rem)/1.3 "Songti SC",SimSun,serif;letter-spacing:.2em;margin-bottom:1.1rem}
.certificate-face p {font:600 clamp(1.1rem,2.7vw,1.65rem)/1.65 "Songti SC",SimSun,serif;text-wrap:balance}
@media(prefers-reduced-motion:no-preference) {
  dialog[open] .education-list article:first-child {animation:spread-open .88s cubic-bezier(.17,.68,.23,1) both}
}
@media(max-width:610px) {
  #detail {width:97vw;padding-inline:.55rem}
  .education-list {display:block}
  .education-list article {display:none}
  .education[data-page="0"] article:first-child,.education[data-page="1"] article:last-child {display:block}
  .education-list .page-ink,.education-list article:last-child .page-ink {padding:1.45rem;min-height:18rem;border-radius:.2rem}
  .education .page-control {display:flex}
  dialog[open] .education-list article:first-child {transform-origin:left center;animation-name:mobile-leaf}
  .skills {width:96%}
  .keyboard {height:2.3rem}
}
@keyframes mobile-leaf {from{transform:perspective(900px) rotateY(-75deg);opacity:.4}to{transform:none;opacity:1}}
.file-stack {position:relative;isolation:isolate;margin:.12rem .4rem .55rem}
.file-stack .back-file {position:absolute;inset:0;overflow:hidden;pointer-events:none;transform:rotate(-1.7deg) translate(-.23rem,.23rem);
  transform-origin:50% 65%;background:#eee4cc;border:1px solid #c5af8d}
.file-stack .case:not(.back-file) {z-index:1}
#detail {overflow-x:hidden}
.certificates {overflow-x:clip}
@media(max-width:610px) {
  .file-stack .case:not(.back-file) {max-height:calc(88svh - 7rem);overflow-y:auto;overscroll-behavior:contain}
  .education-list {position:relative;perspective:1000px}
}
@media(max-width:610px) and (prefers-reduced-motion:no-preference) {
  .education-list::after {content:"教育背景";position:absolute;inset:.5rem;display:grid;place-items:center;pointer-events:none;
    color:#e5d6ab;background:linear-gradient(100deg,#27483f,#4e7661);border:4px double #b8a778;
    border-radius:.25rem;font:700 1.5rem "Songti SC",SimSun,serif;transform-origin:left center;
    backface-visibility:hidden;animation:cover-open .78s cubic-bezier(.3,.67,.22,1) both}
  @keyframes cover-open {0%{transform:rotateY(0);opacity:1}85%{opacity:1}100%{transform:rotateY(-110deg);opacity:0;visibility:hidden}}
}
#wall-clock {position:absolute;left:0;top:0;min-width:44px;min-height:44px;border:0;background:transparent;border-radius:50%;visibility:hidden;pointer-events:none}
.studio.ready #wall-clock {visibility:visible;pointer-events:auto}
#wall-clock:focus-visible {outline:2px solid #555e45;outline-offset:3px}
#time-picker {position:fixed;inset:auto 0 max(1rem,env(safe-area-inset-bottom));margin:0 auto;padding:.75rem 1rem;width:min(19rem,92vw);
 color:#24483e;background:#fffaeb;border:1px solid #9f9b80;border-radius:.75rem;box-shadow:0 .4rem 1.5rem #25282045}
#time-picker:popover-open {display:grid;align-items:center;grid-template-columns:auto 1fr auto;gap:.45rem .75rem}
#time-picker label {font-weight:650}
#time-picker input[type=time] {min-width:0;padding:.2rem .4rem;color:inherit;border:1px solid #bdb59c;background:#fffdf6;font:inherit;border-radius:.32rem}
#time-picker button {width:2rem;height:2rem;background:transparent;border:0;font-size:1.25rem}
#time-picker input[type=range] {width:100%;grid-column:1/-1;accent-color:#497462}

