/* 与首屏共用紫色像素语言；只在脚本成功准备画布后隐藏后备图片。 */
.projects:has(.project-entry){grid-template-columns:repeat(12,minmax(0,1fr));column-gap:4%;row-gap:85px}
.project-entry{grid-column:span 7;min-width:0}
.project-entry:nth-child(4n+2),.project-entry:nth-child(4n+3){grid-column:span 5}
.project-entry:nth-child(even){margin-top:140px}
.project-entry .project{width:100%;margin:0}
.project-entry .project-image{aspect-ratio:4/3;border:1px solid var(--line);background:#fff}
.project-entry:nth-child(4n+2) .project-image,.project-entry:nth-child(4n+3) .project-image{aspect-ratio:4/5}
.project-entry .project-image:after{display:none}
.project-entry .project-image>img{filter:none;transition:opacity .7s ease,transform .9s ease;opacity:1}
.photo-pixels{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:0;transition:opacity .7s ease;background:#fff}
.halftone-ready .photo-pixels{opacity:1}
.halftone-ready .project-image>img{opacity:0}
.halftone-ready.photo-visible .project-image>img{opacity:1;transform:scale(1.025)}
.halftone-ready.photo-visible .photo-pixels{opacity:0}
.project-entry .project-label,.project-entry .project-open{z-index:2}
.project-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px;padding-top:15px;border-top:1px solid var(--line);font-size:11px;color:var(--gray)}
.photo-toggle{font-size:11px;white-space:nowrap;padding:6px 12px;border:1px solid var(--line);border-radius:25px;background:white}
.photo-toggle:hover,.photo-toggle[aria-pressed=true]{color:var(--purple);border-color:#b8a0df;background:var(--lavender)}
.project-tools[hidden]{display:none}
.skills-list.motion-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-left:1px solid var(--line);align-items:start}
.motion-grid details{border-right:1px solid var(--line);background:#fff;min-width:0;transition:background .5s}
.motion-grid details:hover{background:#f9f6ff}
.motion-grid summary{display:grid;grid-template-columns:1fr auto;gap:14px;padding:0 22px 20px}
.motion-grid .skill-art{grid-column:1/-1;display:block;position:relative;aspect-ratio:1.4;margin:0 -22px 12px;border-bottom:1px solid var(--line);overflow:hidden;background:white}
.skill-art canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.motion-grid .skill-code{grid-column:1;font-size:9px;line-height:1.6}
.motion-grid h3{grid-row:3;grid-column:1/-1;font-size:22px;line-height:1.55;font-weight:400;min-height:3.1em;text-wrap:wrap}
.motion-grid .plus{grid-column:2;grid-row:2;font-size:22px;margin:0}
.motion-grid .skill-body{padding:0 22px 28px;max-width:none;animation:detail-enter .4s ease}
.motion-grid .skill-body>p{font-size:13px;line-height:2;min-height:10em}
.motion-grid .skill-body .tags{margin:20px 0;min-height:60px;align-content:start}
.motion-grid .skill-body>a{font-size:11px;line-height:1.8;display:inline-block}
.motion-grid .tags>span{font-size:9px;padding:5px 8px}
.footer-name{position:relative;height:clamp(150px,28vw,400px);padding:0;margin-top:45px;overflow:hidden}
.footer-word{display:block;padding-top:20px}
.footer-name>canvas{position:absolute;inset:0;width:100%;height:100%;opacity:0;pointer-events:none}
.word-pixels-ready>canvas{opacity:1}
.word-pixels-ready>.footer-word{opacity:0}
.footer-motion-toggle{font:10px/1.7 var(--mono);padding:0;color:var(--gray);text-align:left}
.footer-motion-toggle:hover{color:var(--purple)}
.pixel-trail{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:12}
.line-mask{display:block;overflow:hidden;padding-bottom:.07em;margin-bottom:-.07em}
.line-content{display:block;transform:translateY(0);transition:transform .95s cubic-bezier(.2,.7,.2,1);transition-delay:var(--line-delay)}
.motion-enabled .reveal:not(.visible) .line-content{transform:translateY(105%)}
@media(max-width:1100px){.skills-list.motion-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.motion-grid .skill-art{aspect-ratio:1.7}.motion-grid h3{min-height:auto}.motion-grid .skill-body>p{min-height:6em}.project-entry:nth-child(even){margin-top:100px}.footer-bottom{flex-wrap:wrap}}
@media(max-width:700px){.projects:has(.project-entry){grid-template-columns:1fr;row-gap:40px}.project-entry,.project-entry:nth-child(4n+2),.project-entry:nth-child(4n+3){grid-column:1;margin-top:0}.project-entry .project-image,.project-entry:nth-child(4n+2) .project-image,.project-entry:nth-child(4n+3) .project-image{aspect-ratio:4/3}.project-tools{font-size:10px;margin-top:18px}.photo-toggle{font-size:10px}.photo-instruction{font-size:0}.photo-instruction:after{content:"点击封面查看项目详情";font-size:10px}.project-help{font-size:0}.project-help:after{content:"点击“显示原图”，切换像素与照片。";font-size:13px}.motion-grid summary{padding-inline:15px}.motion-grid .skill-art{margin-inline:-15px;aspect-ratio:1.2}.motion-grid .skill-code{font-size:8px}.motion-grid h3{font-size:19px;min-height:3.1em}.motion-grid .skill-body{padding-inline:15px}.motion-grid .skill-body>p{font-size:12px;min-height:12em}.motion-grid .skill-body .tags{min-height:100px}.motion-grid .skill-body>a{font-size:10px}.footer-name{height:30vw;min-height:110px;margin-top:30px}.footer-motion-toggle{font-size:9px;grid-column:1/-1}.line-mask{padding-bottom:.1em;margin-bottom:-.1em}}
@media(max-width:370px){.skills-list.motion-grid{grid-template-columns:1fr}.motion-grid .skill-art{aspect-ratio:1.8}.motion-grid h3,.motion-grid .skill-body>p,.motion-grid .skill-body .tags{min-height:0}}
@media(prefers-reduced-motion:reduce){.photo-pixels,.project-entry .project-image>img,.line-content{transition:none}.motion-enabled .reveal:not(.visible) .line-content{transform:none}}
html[data-motion-paused=true] .line-content{transition:none}
@media print{.photo-pixels,.skill-art,.project-tools,.footer-name>canvas,.pixel-trail{display:none!important}.line-content{transform:none!important}}
