/* Jon Lee — one homepage: the dual-column (对照双栏) design, shared with the studio shell. Small-screen rules live in mobile.css. */
:root{--paper:#fafaf9;--ink:#232322;--muted:#75756f;--accent:#4f6349;--body:17px;--lh:1.7;--line:calc(var(--body) * var(--lh))}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--paper);color:var(--ink);font-family:Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased}
body{height:100dvh;overflow:hidden}
button,a,input,textarea{font:inherit}
button{cursor:pointer;color:inherit;background:none;border:0}
a{color:inherit}
button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
[hidden]{display:none!important}
.nowrap{white-space:nowrap}
.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}

/* Screen layer: the biography is the MacBook screen; the studio canvas sits behind it. */
#world{position:fixed;inset:0;background:#aaa9ad}
#world canvas{display:block}
#screen-layer{position:fixed;inset:0;pointer-events:none}
#desktop{position:absolute;inset:0;background:var(--paper);overflow:hidden;pointer-events:auto;color:var(--ink);transform-origin:0 0;will-change:transform}
#pages{height:100%;overflow:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#dcdcd7 var(--paper)}
body.in-studio #desktop{pointer-events:none}
body.in-studio #world{cursor:grab}
body.in-studio #world:active{cursor:grabbing}
#film-grain{position:fixed;inset:0;pointer-events:none;opacity:0;mix-blend-mode:soft-light;background-image:url("./assets/grain.png");background-repeat:repeat;z-index:2}
body.in-studio #film-grain{opacity:.12}

/* Typographic base — one size, one weight. Sections are separated by space alone; round accent dots are the only mark. */
.profile{display:flex;flex-direction:column;width:100%;max-width:1000px;min-width:0;min-height:min(100%,940px);margin:0 auto;padding:clamp(72px,11vh,128px) 48px 56px;font-size:var(--body);line-height:var(--lh);letter-spacing:-.2px;text-wrap:pretty;overflow-wrap:anywhere}
.profile h1,.profile h2,.profile p,.profile ul{margin:0;font-size:inherit;font-weight:400;line-height:inherit;letter-spacing:inherit}
.profile ul{list-style:none;padding:0}
.profile .profile-name{font-size:38px;font-weight:500;line-height:1.1;letter-spacing:-1.7px;color:var(--ink)}
.profile-header{margin-bottom:calc(var(--line) * 3.5)}
/* Jon ___: five roles stacked in one grid cell (sized to the longest) roll up in turn every 2.4 s, odometer style.
   A static clip-path (not overflow) keeps the baseline on "Jon"; animating `top` (not transform/opacity) keeps the
   words painted in the same layer as "Jon", so weight and colour match. Reduced motion shows "Builder" only. */
.role-cycle{display:inline-grid;vertical-align:baseline;clip-path:inset(-.1em -.3em)}
.role-cycle>span{grid-area:1/1;position:relative;top:1.25em;white-space:nowrap;animation:role-cycle 12s cubic-bezier(.7,0,.25,1) infinite}
.role-cycle>span:nth-child(1){top:0;animation-delay:0s}
.role-cycle>span:nth-child(2){animation-delay:-9.6s}
.role-cycle>span:nth-child(3){animation-delay:-7.2s}
.role-cycle>span:nth-child(4){animation-delay:-4.8s}
.role-cycle>span:nth-child(5){animation-delay:-2.4s}
@keyframes role-cycle{
  0%,16.67%{top:0}
  20%{top:-1.25em}
  20.01%,96.67%{top:1.25em}
  100%{top:0}
}
.profile li{position:relative;padding-left:22px}
.profile li::before{content:"";position:absolute;left:0;top:calc(var(--lh) * .5em - 3px);width:6px;height:6px;border-radius:50%;background:var(--accent)}
.profile .inline-link{display:inline;padding:0;color:var(--ink);line-height:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:color-mix(in srgb,var(--ink) 28%,transparent);border-radius:0;transition:color .18s,text-decoration-color .18s}
.profile .inline-link:hover{color:var(--accent);text-decoration-color:var(--accent)}
@media(min-width:961px){.profile li.one-line{white-space:nowrap}}
.group,.portfolio{display:grid;grid-template-columns:minmax(120px,150px) minmax(0,1fr);column-gap:40px}
.group+.group{margin-top:calc(var(--line) * 1.5)}
.group li+li{margin-top:4px}

/* Contact + Selected Portfolio: one block resting at the foot of the screen. */
.portfolio{margin-top:auto;padding-top:calc(var(--line) * 3);row-gap:calc(var(--line) * .5)}
.portfolio h2,.portfolio .contact{grid-column:2}
.portfolio h2 button{display:inline-block;padding:0;text-align:inherit;color:var(--ink);transition:color .18s}
.portfolio h2 button:hover{color:var(--accent)}
.contact{display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px;font-size:15px;line-height:1.5}
.contact a,.contact button{display:inline-flex;align-items:center;padding:0;color:var(--ink);text-decoration:none;white-space:nowrap;transition:color .18s}
.contact a:hover,.contact button:hover{color:var(--accent)}
.contact-arrow{width:9px;height:9px;margin-left:4px;fill:none;stroke:var(--muted);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s,stroke .18s}
.contact a:hover .contact-arrow,.contact button:hover .contact-arrow{transform:translate(1px,-1px);stroke:var(--accent)}
/* Contact and Selected Portfolio are centred in the whole viewport — the one homepage. */
.portfolio{display:flex;flex-direction:column;align-items:center;text-align:center}
.contact{justify-content:center}

/* Software product pages (Shuorufa, Android companion) — same paper palette, no OS shell. */
.page{max-width:790px;margin:auto;padding:64px 32px 95px}
.software{max-width:1280px;padding:130px 65px 120px;display:grid;grid-template-columns:.85fr 1.15fr;gap:60px;align-items:center;min-height:100%;color:var(--ink)}
.eyebrow{font-size:11px;letter-spacing:.15em;color:var(--muted);display:block}
.software h2{font-size:46px;line-height:1.13;font-weight:400;letter-spacing:-.04em;margin:30px 0;color:var(--ink)}
.software h2 em{font-family:Georgia,serif;color:var(--accent);font-weight:400}
.software-story p{font-size:16px;color:var(--muted);line-height:1.75}
.small-label{font-size:12px;color:var(--muted);line-height:1.8;display:block}
.text-button{font-size:14px;color:var(--ink);text-decoration:underline;text-underline-offset:5px;padding:0;margin-top:28px}
.text-arrow{font-variant-emoji:text}
.browser-preview{display:block;border:1px solid #dedfd8;border-radius:9px;overflow:hidden;text-decoration:none;transition:transform .2s}
.browser-preview:hover{transform:translateY(-4px)}
.browser-bar{display:flex;gap:12px;padding:11px;background:#30332d;align-items:center;font-size:11px;color:#999f91}
.window-dots{letter-spacing:1px;font-size:9px}
.address{flex:1;text-align:center;border-radius:3px;background:#23251f;padding:5px}
.live-preview{position:relative;overflow:hidden;background:#fff;pointer-events:none;height:auto;aspect-ratio:1135/639}
.live-preview img{display:block;width:100%;height:100%;object-fit:cover}
.browser-caption{display:block;background:#30332d;padding:13px;text-align:center;font-size:12px;color:#b8c3ad}
.android-card{border:1px solid #dedfd8;padding:45px;background:color-mix(in srgb,var(--accent) 8%,var(--paper));border-radius:4px}
.android-card h3{font-weight:400;font-size:32px;line-height:1.25}
.android-card p,.android-card .stack-row{color:var(--muted)}
.android-card p{font-size:15px;line-height:1.8}
.stack-row{display:flex;flex-wrap:wrap;gap:15px;margin:35px 0;font-size:14px}

/* Status and the story dialog. */
#scene-status{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:#333a2f;color:#f1f1e8;padding:12px 18px;border-radius:4px;font-size:13px;z-index:20}
dialog{width:min(1040px,92vw);max-height:88dvh;border:0;border-radius:8px;padding:0;background:#f6f6f1;color:#292e26;box-shadow:0 30px 100px #0005}
dialog::backdrop{background:#151a1699;backdrop-filter:blur(6px)}
#story{z-index:10}
#close-story{position:sticky;top:18px;float:right;margin:16px 20px 0 0;width:34px;height:34px;background:#e1e4db;border-radius:50%;z-index:3;font-size:22px;color:#444b3e}
#story-content{padding:60px}
.story-eyebrow{font-size:12px;letter-spacing:.15em;color:#78806f}
.story-title{font-size:48px;line-height:1.1;font-weight:400;letter-spacing:-.045em;margin:22px 0}
.story-lead{font-size:19px;line-height:1.6;color:#6a7261;max-width:690px}
.story-body{line-height:1.85;font-size:16px;color:#656e5b;max-width:730px}
.story-image{display:block;width:100%;max-height:380px;object-fit:contain;margin:30px 0;background:white;border-radius:4px}
.story-link{display:inline-block;background:#2d3d26;color:#eff3e7;padding:13px 18px;border-radius:4px;margin:15px 12px 15px 0;text-decoration:none;font-size:14px}
.story-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:24px;margin:30px 0}
.story-grid article{padding-top:20px;border-top:1px solid #d6dcd0}
.story-grid h3{font-size:19px;font-weight:500}
.story-grid p{font-size:14px;color:#727b65;line-height:1.7}
.note-form{display:grid;gap:16px;margin-top:25px}
.note-form label{display:grid;gap:7px;font-size:14px}
.note-form input,.note-form textarea{padding:12px;border:1px solid #c7cebd;border-radius:3px;background:#fff;color:#333;font-size:16px}
.note-form button{justify-self:start;background:#d6dbc9;color:#777e6d;padding:12px 20px;border-radius:3px;cursor:default}
.note-form small{color:#888e7e}

/* Studio HUD — one compact card. Desktop: a wrapping flex row pair — row 1 About Jon | Behind the wall / Exhibition | sound,
   row 2 view label | distance | pause | mode — with the menu wrapper flattened (display:contents) and the break drawn by ::after.
   Phones (mobile.css) regroup the same elements into a floating corner menu: About Jon | pause | more, the rest one tap away. */
#studio-signature{position:fixed;left:max(24px,env(safe-area-inset-left));top:max(22px,env(safe-area-inset-top));z-index:4;display:flex;flex-wrap:wrap;align-items:center;align-content:center;column-gap:2px;width:min(300px,calc(100vw - 48px));padding:3px 6px 3px 12px;color:#eeeae1;background:#292c2bec;border:1px solid #ffffff16;border-left:2px solid #bca27c;border-radius:2px 9px 9px 2px;box-shadow:0 5px 20px #25272512;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.signature-menu{display:contents}
.signature-title{order:1;flex:1 1 0;margin:0;min-width:0;font:600 13px/1.3 Arial,Helvetica,sans-serif;letter-spacing:.03em;color:#eeeae1}
#studio-home{display:flex;align-items:center;max-width:100%;min-height:32px;padding:0;text-align:left;font:inherit;letter-spacing:inherit;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#studio-home:hover{color:#d6c5a8}
.signature-side{order:2;display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:0 6px;border-radius:4px;color:#d6c5a8;font-size:11px;letter-spacing:.035em;white-space:nowrap}
.signature-side::after{content:"";flex:none;width:9px;height:9px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l6-6M4 3h5v5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l6-6M4 3h5v5'/%3E%3C/svg%3E") center/contain no-repeat}
.signature-side:hover{color:#fff;background:#ffffff13}
.signature-side:disabled{opacity:.5;cursor:wait}
.signature-sound{order:3;width:32px;height:32px;padding:7px;border-radius:4px;color:#c5c4b9}
.signature-sound:hover{background:#ffffff13}
.signature-sound svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.3}
.signature-sound .sound-slash{display:none}
.signature-sound.muted .sound-slash{display:block}
/* Sound wanted but refused by the browser (or failed): amber, slashed and gently pulsing until a tap enables it.
   The phone menu keeps this button one tap away, so its "more" toggle carries the same amber ring.
   Reduced motion keeps the static amber ring (the global rule below removes the pulse). */
.signature-sound.sound-blocked{color:#f3cd8c;background:#f3cd8c24;box-shadow:0 0 0 1px #f3cd8cb3;animation:sound-attention 1.8s ease-in-out infinite}
.signature-sound.sound-blocked .sound-slash{display:block}
#studio-signature:has(.signature-sound.sound-blocked) .signature-more{color:#f3cd8c;box-shadow:inset 0 0 0 1px #f3cd8cb3}
@keyframes sound-attention{50%{background:#f3cd8c3d;box-shadow:0 0 0 4px #f3cd8c40}}
/* Row break + hairline between the two desktop rows. */
#studio-signature::after{content:"";order:4;flex:0 0 100%;height:1px;margin:2px 0;background:#ffffff16}
#camera-mode-label{order:5;flex:1 1 0;min-width:0;display:block;font-size:11px;line-height:1.3;color:#e0d5c2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;text-decoration:underline dotted #e0d5c266;text-underline-offset:3px}
#camera-mode-label:hover{color:#fff;text-decoration-color:currentColor}
.signature-tool,.signature-pause,.signature-more{display:grid;place-items:center;flex:none;width:32px;height:32px;padding:6px;border-radius:4px}
#camera-distance{order:6}
.signature-pause{order:7}
#camera-mode{order:8}
.signature-tool:hover,.signature-pause:hover,.signature-more:hover{background:#ffffff13}
.signature-tool:disabled,.signature-pause:disabled{cursor:default;opacity:.45}
.signature-tool svg,.signature-pause svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.signature-more svg{width:20px;height:20px;fill:currentColor}
/* The disclosure toggle exists for phones only; wide layouts show every control. */
.signature-more{display:none}
.orbit-icon{display:none}
#studio-signature[data-mode="free"] .camera-icon{display:none}
#studio-signature[data-mode="free"] .orbit-icon{display:block}
#studio-signature[data-view="bench"] #distance-plus,#studio-signature[data-view="computer"] #distance-plus{display:none}
#studio-signature[data-area="workshop"]:not([data-view="workshop"]) #distance-plus{display:none}

/* Laptops with short viewports keep the same rhythm at a slightly tighter scale. */
@media(max-height:760px) and (min-width:621px){
  .profile{padding-top:56px;padding-bottom:48px}
  .profile-header{margin-bottom:calc(var(--line) * 2.75)}
  .group+.group{margin-top:calc(var(--line) * 1.25)}
  .portfolio{padding-top:calc(var(--line) * 2)}
}
@media(max-width:960px){
  .group,.portfolio{grid-template-columns:minmax(104px,124px) minmax(0,1fr);column-gap:32px}
  .software{padding-left:32px;padding-right:32px;gap:30px}
  .software h2{font-size:38px}
}
@media(max-width:760px){
  .profile{padding:64px 32px 56px}
  .profile-header{margin-bottom:calc(var(--line) * 2.75)}
  .group+.group{margin-top:calc(var(--line) * 1.25)}
  .group,.portfolio{grid-template-columns:minmax(0,1fr);row-gap:calc(var(--line) * .25)}
  .portfolio{padding-top:calc(var(--line) * 2.25);row-gap:calc(var(--line) * .5)}
  .portfolio h2,.portfolio .contact{grid-column:1}
}
@media(max-width:750px){
  .page{padding:40px 24px 110px}
  .software{padding:80px 25px 120px;grid-template-columns:1fr;gap:35px}
  .software h2{font-size:38px}
  #story-content{padding:55px 25px 30px}
  .story-title{font-size:34px}
  .story-grid{grid-template-columns:1fr}
  .story-lead{font-size:17px}
}
@media(max-width:620px){
  :root{--body:16px}
  .profile .profile-name{font-size:34px;letter-spacing:-1.4px}
  .profile{padding:56px 24px 48px}
  .profile-header{margin-bottom:calc(var(--line) * 2.5)}
  .portfolio{padding-top:calc(var(--line) * 2)}
  .contact{font-size:14px}
}
@media(max-width:600px){.software{padding-left:24px;padding-right:24px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Object callouts (callouts.js): a translucent window joined to its object by a dashed leader. Above the film grain, below the HUD. */
#callouts{position:fixed;inset:0;z-index:3;pointer-events:none;overflow:hidden;--callout:#dff3e6}
#callouts svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
#callouts g{opacity:0;transition:opacity .18s ease}
#callouts g.on{opacity:1;transition:opacity .3s ease}
#callouts polyline{fill:none;stroke:var(--callout);stroke-width:1.1;stroke-dasharray:3 5;stroke-linecap:round;filter:drop-shadow(0 0 2px #0b120e)}
#callouts g.on polyline{animation:callout-march 1.1s linear infinite}
#callouts circle{fill:var(--callout);filter:drop-shadow(0 0 3px #0b120e)}
#callouts circle.callout-ring{fill:none;stroke:var(--callout);stroke-width:1;transform-box:fill-box;transform-origin:center}
#callouts g.on circle.callout-ring{animation:callout-ping 2.2s ease-out infinite}
.callout{position:absolute;left:0;top:0;box-sizing:border-box;width:min(272px,calc(100vw - 24px));margin:0;padding:12px 14px 13px;color:#eef3ec;background:linear-gradient(160deg,#1a231dc7,#101612b8);border:1px solid #dff3e659;border-radius:2px;box-shadow:0 10px 34px #0000003d,inset 0 0 0 1px #ffffff08;-webkit-backdrop-filter:blur(10px) saturate(130%);backdrop-filter:blur(10px) saturate(130%);opacity:0;visibility:hidden;clip-path:inset(0 0 100% 0);transition:opacity .18s ease,clip-path .18s ease,visibility 0s .18s}
.callout.on{opacity:1;visibility:visible;clip-path:inset(-40px);transition:opacity .28s ease .08s,clip-path .34s cubic-bezier(.2,.7,.2,1) .08s}
.callout.wide{width:min(336px,calc(100vw - 24px))}
/* Corner ticks: the window reads as an instrument overlay, not a card. */
.callout::before,.callout::after{content:"";position:absolute;width:9px;height:9px;border:1px solid var(--callout);pointer-events:none}
.callout::before{left:-1px;top:-1px;border-right:0;border-bottom:0}
.callout::after{right:-1px;bottom:-1px;border-left:0;border-top:0}
.callout-label{display:block;font:500 9.5px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.14em;color:#dff3e6b8;margin-bottom:6px}
.callout h3{margin:0 0 5px;font-size:15px;line-height:1.25;font-weight:600;letter-spacing:.01em;color:#fbfdf9}
.callout p{margin:0;font-size:12.5px;line-height:1.5;color:#e4eae1e0}
.callout a{display:inline-block;margin-top:8px;font:500 11px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.04em;color:var(--callout);text-decoration:none;border-bottom:1px dashed #dff3e68c;padding-bottom:1px;pointer-events:auto}
.callout a:hover{color:#fff;border-bottom-style:solid}
/* The free-view hint (free-view-hint.js): the same window, hung from the HUD's view-mode control, with the switch itself. */
.callout.tour-hint button{display:inline-block;margin-top:10px;padding:6px 10px;font:500 11px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.04em;color:var(--callout);border:1px dashed #dff3e68c;border-radius:2px;pointer-events:auto;transition:background .18s,color .18s}
.callout.tour-hint button:hover{color:#fff;background:#dff3e61f;border-style:solid}
.callout.tour-hint button:disabled{cursor:default;opacity:.7}
#studio-signature .hint-target{color:#dff3e6;background:#dff3e624;box-shadow:0 0 0 1px #dff3e6b3;animation:hint-attention 1.8s ease-in-out infinite}
@keyframes hint-attention{50%{background:#dff3e63d;box-shadow:0 0 0 4px #dff3e640}}
@keyframes callout-march{to{stroke-dashoffset:-16}}
@keyframes callout-ping{0%{transform:scale(.5);opacity:.9}70%,100%{transform:scale(1.7);opacity:0}}
