*{box-sizing:border-box}body{margin:0;color:#050505;background:white;font-family:Georgia,'Times New Roman',serif;overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}button:focus-visible,a:focus-visible,.projects:focus-visible,.marquee:focus-visible{outline:2px solid #7774c8;outline-offset:5px}header{height:6.5vh;min-height:62px;display:flex;align-items:center;padding:0 5.5vw}header nav{display:flex;gap:2.8vw}header button{font-size:clamp(15px,1.15vw,20px);padding:8px 0}main{height:calc(100svh - max(6.5vh,62px) - 56px);position:relative;overflow:hidden;background-image:radial-gradient(circle,#f0f0f0 2px,transparent 2.5px);background-size:23px 23px}.intro{position:absolute;left:5.5vw;top:46%;transform:translateY(-25%);z-index:5;width:40vw}h1{font-size:clamp(40px,4.75vw,88px);font-weight:500;line-height:1.08;margin:0 0 15px;letter-spacing:-.035em;white-space:nowrap}.intro p{font-size:clamp(15px,1.26vw,23px);white-space:nowrap;margin:0;line-height:1.6}.categories{display:flex;gap:22px;margin-top:30px;align-items:center}.categories button{font-size:clamp(16px,1.3vw,23px);padding:10px 17px;border-radius:28px;white-space:nowrap}.categories .selected{background:#e3e4ff}.projects{position:absolute;left:46.6%;width:61%;height:100%;top:0}.deck{position:absolute;top:20%;width:100%;aspect-ratio:1.66}.card{position:absolute;inset:0;margin:0;border-radius:28px;overflow:hidden;transition:transform .85s cubic-bezier(.22,.75,.2,1),opacity .85s,filter .85s;transform-origin:65% 50%;background:#b2b4f0;will-change:transform}.card img{width:100%;height:100%;object-fit:cover;display:block}.card[data-position="front"]{z-index:3;transform:translate(0,0);opacity:1}.card[data-position="back1"]{z-index:2;transform:translate(23%,-13%) rotate(14deg);filter:opacity(.55)}.card[data-position="back2"]{z-index:1;transform:translate(29%,14%) rotate(-16deg);filter:opacity(.4)}.resume{position:absolute;top:81%;left:20%;width:60%;text-align:center;color:#555;font-size:18px}.resume button{color:blue;padding:0}.project-controls{position:absolute;bottom:5%;left:24%;display:flex;gap:12px}.project-controls button{width:8px;height:8px;border-radius:50%;background:#ddd;padding:0}.project-controls button[aria-pressed="true"]{background:#8380bd}footer{position:fixed;bottom:0;left:0;right:0;height:56px;background:#000;color:#fff;display:flex;align-items:center;padding-left:5.5vw;gap:28px;z-index:10}footer>span{white-space:nowrap;font-size:18px}.marquee{overflow:hidden;flex:1;height:42px}.track{display:flex;width:max-content;animation:marquee 32s linear infinite;height:40px;gap:65px}.track img{width:1350px;height:40px;object-fit:contain}.marquee:hover .track,.marquee:focus .track{animation-play-state:paused}@keyframes marquee{to{transform:translateX(-50%)}}dialog{max-width:560px;width:88%;border:0;border-radius:22px;padding:40px;line-height:1.7}dialog::backdrop{background:#0006;backdrop-filter:blur(5px)}.close{position:absolute;right:14px;top:6px;font-size:30px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@media(max-width:700px){header{height:68px;padding:0 6vw}header nav{gap:20px}header button{font-size:14px}main{height:calc(100svh - 124px)}.intro{top:7%;left:6vw;width:88%;transform:none}h1{font-size:clamp(35px,8.6vw,56px)}.intro p{font-size:15px;white-space:normal;max-width:340px}.categories{gap:4px;margin-top:15px}.categories button{padding:8px 12px;font-size:16px}.projects{left:6vw;width:100%;top:0;pointer-events:none}.projects button{pointer-events:auto}.deck{top:45%;width:100%;aspect-ratio:1.66}.card{border-radius:18px}.resume{top:85%;font-size:15px;left:0;width:88%}.project-controls{bottom:4%;left:35%}footer{padding-left:18px;gap:20px}footer>span{font-size:14px}.track{animation-duration:32s}}@media(prefers-reduced-motion:reduce){.card{transition:none}.track{animation:none}}

/* Refined portfolio layout */
:root{--client-bar:44px;--header:76px}header{height:var(--header);min-height:0}main{height:calc(100svh - var(--header) - var(--client-bar));background-size:24px 24px;background-image:radial-gradient(circle,#eeeef1 1.5px,transparent 2px)}
.intro{top:50%;transform:translateY(-50%);width:38vw}.intro p{white-space:normal;max-width:38vw;font-size:clamp(16px,1.16vw,20px)}h1{font-size:clamp(40px,4.5vw,80px);letter-spacing:-.045em}.categories{gap:12px;margin-top:26px}.categories button{font-size:clamp(16px,1.2vw,21px);transition:background .2s,transform .2s}.categories button:hover{background:#ededfa;transform:translateY(-2px)}header button:hover{color:#66629d}
.projects{left:47%;width:53%}.deck{top:50%;transform:translateY(-50%);width:min(56vw,calc((100svh - 230px)*1.3333));aspect-ratio:4/3}.card{border-radius:24px;box-shadow:0 12px 35px #1c1c4020;transform-origin:70% 50%}.card img{object-fit:contain}.card[data-position="back1"]{transform:translate(17%,10%) rotate(-10deg);filter:opacity(.42)}.card[data-position="back2"]{transform:translate(25%,15%) rotate(-17deg);filter:opacity(.25)}body[data-project="1"] .card[data-position="back1"],body[data-project="2"] .card[data-position="back1"]{transform:translate(16%,-12%) rotate(11deg)}
.scroll-cue{position:absolute;bottom:25px;left:0;display:flex;gap:18px;align-items:center;font-family:Arial,sans-serif;font-size:12px;letter-spacing:.04em;color:#62616d}.project-count{font-variant-numeric:tabular-nums;color:#292832}.project-controls{left:auto;right:6vw;bottom:14px;gap:2px}.project-controls button{width:32px;height:32px;background:none;position:relative}.project-controls button::after{content:'';position:absolute;inset:13px;border-radius:50%;background:#d5d4df}.project-controls button[aria-pressed="true"]{background:none}.project-controls button[aria-pressed="true"]::after{background:#7770ac;inset:12px}.resume{top:auto;bottom:65px;font-size:15px;left:5%;width:75%}.resume button{color:#625b98}
footer{height:var(--client-bar);gap:25px}footer>span{font-size:14px;color:#c9c9cd}.marquee{height:28px;mask-image:linear-gradient(to right,transparent,#000 25px,#000 calc(100% - 25px),transparent)}.track{height:28px;gap:0;animation-duration:38s}.track img{width:945px;height:28px}
@media(max-width:700px){:root{--header:64px;--client-bar:40px}header nav{gap:18px}header button{min-height:44px}.intro{top:7%;transform:none;width:88%}.intro p{max-width:360px;font-size:16px}h1{font-size:clamp(34px,8.7vw,56px)}.categories{margin-top:15px;gap:3px}.categories button{font-size:16px}.projects{left:6%;width:94%;pointer-events:auto}.deck{top:60%;width:94vw;max-width:calc((100svh - 330px)*1.3333);aspect-ratio:4/3}.card{border-radius:18px}.scroll-cue{bottom:18px;font-size:12px;gap:12px}.project-controls{right:8vw;bottom:7px}.resume{bottom:55px;width:88%;left:0;font-size:14px}footer{padding-left:16px;gap:15px}footer>span{font-size:13px}.track{animation-duration:38s}}
@media(max-height:600px) and (min-width:701px){:root{--header:60px}.deck{width:min(50vw,calc((100svh - 160px)*1.3333))}.categories{margin-top:16px}.resume{bottom:50px}}
@media(prefers-reduced-motion:reduce){.categories button{transition:none}.track{animation:none}}

/* Physical card stack: preserve solid faces, turn completed cards upward. */
.projects{left:61%;width:39%;--cover-width:41vw;--cover-height:calc(var(--cover-width)*.75)}
.deck{width:var(--cover-width);top:48%;aspect-ratio:4/3;perspective:1600px;perspective-origin:55% 20%;transform:translateY(-50%);isolation:isolate}
.card{transform-origin:50% 0%;backface-visibility:hidden;filter:none!important;opacity:1!important;transition:transform 1s cubic-bezier(.22,.68,.16,1),box-shadow 1s;will-change:transform;box-shadow:0 14px 38px #20203b18}
.card[data-position="front"]{z-index:3;transform:translate3d(0,0,0) rotateX(0deg) rotateZ(0deg)}
.card[data-position="back1"],body[data-project="1"] .card[data-position="back1"],body[data-project="2"] .card[data-position="back1"]{z-index:2;transform:translate3d(8%,7%,-35px) rotateZ(-8deg)}
.card[data-position="back2"]{z-index:1;transform:translate3d(14%,13%,-70px) rotateZ(-14deg)}
.card[data-position="turned"]{z-index:4;transform:translate3d(0,-125%,120px) rotateX(75deg) rotateZ(-5deg);pointer-events:none;box-shadow:0 25px 45px #20203b24}
.card::after{content:'';position:absolute;inset:0;background:#7771ba;opacity:0;pointer-events:none;transition:none}.card[data-position="back1"]::after{opacity:.3}.card[data-position="back2"]::after{opacity:.48}
.resume{position:absolute;top:calc(100% + 22px);bottom:auto;left:0;width:min(100%,42vw);font-size:15px;line-height:1.5;z-index:6}.resume[hidden]{display:none}.scroll-cue{bottom:18px}.intro{width:43vw}.intro p{max-width:42vw}.project-controls{right:4vw}
@media(min-width:701px) and (max-aspect-ratio:4/3){.projects{--cover-width:41vw}}
@media(max-width:700px){.projects{left:12%;width:88%;--cover-width:94vw}.deck{width:var(--cover-width);max-width:none;top:58%;}.resume{top:calc(100% + 16px);width:80vw;font-size:14px}.intro{width:88%}.intro p{max-width:360px}.scroll-cue{left:0;bottom:12px}.project-controls{right:9vw}}
@media(max-width:700px) and (max-height:700px){.projects{--cover-width:82vw;left:22%}.deck{top:57%}.resume{top:calc(100% + 12px);width:70vw}.intro{top:4%}.categories{margin-top:8px}}
@media(prefers-reduced-motion:reduce){.card{transition:none}}
/* Compact navigation height requested for preview. */
:root{--header:24px}
header{height:var(--header);min-height:0}
header button{padding:0;min-height:0;line-height:24px}
@media(max-width:700px){:root{--header:24px}header{height:var(--header)}header button{min-height:0;line-height:24px}}
@media(max-height:600px) and (min-width:701px){:root{--header:24px}}
/* Navigation size refinement. */
:root{--header:40px}
header button{font-size:16px;line-height:40px}
@media(max-width:700px){:root{--header:40px}header button{font-size:16px;line-height:40px}}
@media(max-height:600px) and (min-width:701px){:root{--header:40px}}

/* Letter-by-letter reveal without changing heading geometry. */
.typewriter{position:relative;white-space:pre}
.typed-letter{visibility:hidden}
.typed-letter.revealed{visibility:visible}
.typing .typed-letter.revealed:not(:has(+ .revealed)){border-right:2px solid currentColor;margin-right:-2px;animation:typing-caret .65s step-end infinite}
@keyframes typing-caret{50%{border-right-color:transparent}}
@media(prefers-reduced-motion:reduce){.typed-letter{visibility:visible}.typing .typed-letter{animation:none;border:0;margin:0}}

.intro .greeting{font-size:16px;font-weight:400;line-height:1.5;margin:0 0 14px;letter-spacing:.01em}
.typing .typed-letter.revealed:not(:has(+ .revealed)){border-right-color:#A1ABF6}
@keyframes typing-caret{0%,100%{border-right-color:#A1ABF6}50%{border-right-color:transparent}}
@media(prefers-reduced-motion:reduce){.typing .typed-letter.revealed{border:0;margin:0;animation:none}}
/* A real gap before the caret; reserve it without moving adjacent letters. */
.typing .typed-letter.revealed:not(:has(+ .revealed)){padding-right:4px;margin-right:-6px;border-right:2px solid #A1ABF6}
main.has-interactive-dots{background-image:none}
.dot-field{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}
@media(prefers-reduced-motion:reduce){.typing .typed-letter.revealed{padding:0;margin:0;border:0}}

/* Project summaries stay attached to each physical card face. */
.project-overlay{position:absolute;inset:0;z-index:2;display:flex;align-items:flex-end;padding:clamp(24px,3vw,52px);background:rgb(0 0 0 / 60%);color:#fff;opacity:0;transition:opacity .25s ease;pointer-events:none;font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif}
.project-overlay>div{max-width:34ch;transform:translateY(8px);transition:transform .25s ease}
.project-overlay h2{font-size:clamp(22px,2.1vw,34px);line-height:1.2;letter-spacing:-.02em;margin:0 0 14px;font-weight:600}
.project-overlay p{font-size:clamp(16px,1.2vw,20px);line-height:1.8;margin:0;font-weight:400}
@media(hover:hover){.card[data-position="front"]:hover .project-overlay{opacity:1}.card[data-position="front"]:hover .project-overlay>div{transform:translateY(0)}}
.card[data-position="front"]:focus-visible .project-overlay{opacity:1}.card[data-position="front"]:focus-visible .project-overlay>div{transform:translateY(0)}
.card:focus-visible{outline:3px solid #A1ABF6;outline-offset:4px}
@media(hover:none){.card[data-position="front"]:focus .project-overlay{opacity:1}.card[data-position="front"]:focus .project-overlay>div{transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.project-overlay,.project-overlay>div{transition:none;transform:none}}
/* Match project captions to the introduction typography. */
.project-overlay{font-family:inherit}
.project-overlay h2{font-size:18px;font-weight:700}
.project-overlay p{font-size:14px}

.project-overlay h2{margin-bottom:10px}
.project-tags{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.project-tags span{font-size:12px;line-height:1.4;padding:4px 9px;border:1px solid rgb(255 255 255 / 30%);border-radius:20px;background:rgb(255 255 255 / 10%);color:#fff}

/* Personal serif signature paired with clean Geist interface typography. */
body{font-family:'Geist',Arial,sans-serif}
h1{font-family:Georgia,'Times New Roman',serif}
.scroll-cue,.project-overlay{font-family:inherit}
/* Consistent interface and introduction text sizing. */
header button,.intro .greeting,.intro p,.categories button{font-size:16px}
.avatar-cursor{position:fixed;left:0;top:0;width:32px;height:32px;object-fit:contain;pointer-events:none;z-index:2147483647;user-select:none;will-change:transform}
.avatar-cursor[hidden]{display:none}
@media(hover:hover) and (pointer:fine){html.avatar-cursor-active,html.avatar-cursor-active *{cursor:none!important}}

.avatar-cursor{width:128px;height:128px}

/* Heart pointer and heading-bound avatar. */
.avatar-cursor{width:48px;height:48px;font-size:48px;line-height:1;display:flex;align-items:center;justify-content:center;font-family:"Apple Color Emoji","Segoe UI Emoji",sans-serif}
.typing .typed-letter.revealed:not(:has(+ .revealed)){padding-right:0;margin-right:0;border-right:0;animation:none}
.typing-follower{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:12px;pointer-events:none;white-space:normal}
.name-caret{width:2px;height:.85em;flex:0 0 2px;background:#A1ABF6;animation:name-caret-blink .65s step-end infinite}
.name-avatar{display:block;width:128px;height:128px;max-width:none;object-fit:contain;flex:0 0 128px}
@keyframes name-caret-blink{50%{background:transparent}}
@media(prefers-reduced-motion:reduce){.name-caret{animation:none}}

.avatar-cursor{width:28px;height:28px;font-size:28px}
.typing-follower{gap:0}
.intro-avatar{width:128px;height:128px;margin-bottom:20px;position:relative;pointer-events:none}
.intro-avatar img,.intro-avatar canvas{display:block;width:128px;height:128px;object-fit:contain}
.intro-avatar [hidden]{display:none}
header{justify-content:space-between;gap:20px}
.design-credit{margin-left:auto;font-size:12px;line-height:1.4;color:#85858e;white-space:nowrap}
@media(max-width:700px){header{gap:8px;flex-wrap:wrap;align-content:center}.design-credit{font-size:10px}header nav{gap:12px}header button{font-size:14px}.intro{top:3%}.intro-avatar{margin-bottom:20px}.deck{top:68%}}
@media(max-width:520px){.design-credit{position:absolute;right:12px;top:43px;z-index:6;font-size:10px}.intro-avatar{margin-top:12px}}
/* Lift the introduction and bring the project stack in from the upper right. */
@media(min-width:701px){.intro{top:calc(50% - 60px)}}
.deck{animation:deck-arrive 1.25s cubic-bezier(.16,.75,.22,1) both}
@keyframes deck-arrive{
  0%{transform:translate(70vw,calc(-50% - 65vh)) rotate(28deg)}
  76%{transform:translate(-8px,calc(-50% + 10px)) rotate(-1.5deg)}
  100%{transform:translate(0,-50%) rotate(0deg)}
}
@media(prefers-reduced-motion:reduce){.deck{animation:none}}

.card{border-radius:8px}
.cursor-heart{display:block;transform-origin:center;animation:cursor-heartbeat 2s ease-in-out infinite}
@keyframes cursor-heartbeat{0%,32%,100%{transform:scale(1)}8%{transform:scale(1.2)}16%{transform:scale(.96)}24%{transform:scale(1.12)}}
@media(prefers-reduced-motion:reduce){.cursor-heart{animation:none}}
.click-heart{position:fixed;transform:translate(-50%,-50%);pointer-events:none;user-select:none;font-family:"Apple Color Emoji","Segoe UI Emoji",sans-serif;font-size:28px;line-height:1;z-index:2147483646;animation:click-heart-fade 3s linear forwards}
@keyframes click-heart-fade{0%,15%{opacity:1}100%{opacity:0}}
/* Blur only the cover image, leaving all hover copy crisp. */
.card>img{transition:filter .25s ease,transform .25s ease}
@media(hover:hover){.card[data-position="front"]:hover>img{filter:blur(6px);transform:scale(1.025)}}
.card[data-position="front"]:focus-visible>img{filter:blur(6px);transform:scale(1.025)}
@media(hover:none){.card[data-position="front"]:focus>img{filter:blur(6px);transform:scale(1.025)}}
@media(prefers-reduced-motion:reduce){.card>img{transition:none}}

/* Three seconds visible in each five-second speech cycle, after a five-second wait. */
.avatar-speech{position:absolute;left:calc(100% + 12px);top:22px;padding:12px 18px;border-radius:24px;background:#fff;color:#222;box-shadow:0 6px 20px rgb(30 25 55 / 12%);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-weight:600;line-height:1.5;white-space:nowrap;transform-origin:12px 100%;opacity:0;visibility:hidden;animation:avatar-speech-cycle 5s 5s infinite;z-index:7}
.avatar-speech::after{content:'';position:absolute;left:25px;bottom:-6px;width:12px;height:12px;background:#fff;transform:rotate(45deg);border-radius:0 0 4px 0}
@keyframes avatar-speech-cycle{0%{visibility:visible;opacity:0;transform:translateY(7px) scale(.85) rotate(-4deg)}6%{visibility:visible;opacity:1;transform:translateY(-3px) scale(1.05) rotate(2deg)}12%{visibility:visible;opacity:1;transform:translateY(0) scale(1) rotate(-1deg)}18%,52%{visibility:visible;opacity:1;transform:translateY(0) scale(1) rotate(0)}60%,100%{visibility:hidden;opacity:0;transform:translateY(-4px) scale(.97)}}
@media(max-width:700px){.avatar-speech{left:calc(100% + 4px);font-size:11px;padding:10px 12px}}
@media(prefers-reduced-motion:reduce){.avatar-speech{animation:avatar-speech-quiet 5s 5s infinite}@keyframes avatar-speech-quiet{0%,59.9%{visibility:visible;opacity:1}60%,100%{visibility:hidden;opacity:0}}}

.avatar-video-source{position:absolute;width:1px;height:1px;left:0;top:0;opacity:.001;pointer-events:none}

header nav button{font-family:Georgia,'Times New Roman',serif}
@media(max-width:700px){header nav{gap:14px;flex-wrap:wrap}header{height:auto;min-height:40px}:root{--header:80px}header nav button{line-height:32px}.design-credit{position:static;margin-left:auto}}
