/* Mobile has its own composition: inline profile, slim reading context, full-width work. */
.mobile-context{display:none}
.code-disclosure{margin-top:24px}.code-disclosure>summary{display:none}.code-disclosure .project-example{margin-top:0}
@media(max-width:800px){
 html{scroll-padding-top:68px}
 header{height:78px}.theme,header .ambient-toggle{width:40px;height:40px}nav{gap:16px}nav a{min-height:40px}
 .hero{padding-top:52px;padding-bottom:36px;min-height:0;gap:0;overflow:hidden;display:flex;flex-direction:column}
 .hero-content{order:1;max-width:100%}.hero h1{font-size:clamp(34px,10.5vw,66px);line-height:1.1;letter-spacing:-.055em;margin:25px 0 24px}
 .hero .eyebrow{font-size:9px;letter-spacing:.10em}.hero-desc{font-size:15px;max-width:430px;line-height:1.8}
 .hero .projection-field{position:relative;inset:auto;order:2;opacity:1;visibility:visible;z-index:1;width:100%;height:auto;min-height:0;max-height:none;margin:36px 0 28px;padding:20px 0 16px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:transparent;mask-image:none;overflow:hidden}
 .hero .projection-meta{font-size:9px;padding:0 0 17px;letter-spacing:.025em;justify-content:space-between;gap:15px}.hero .projection-count{font-size:8px}
 .hero .projection-object{font-size:15px;line-height:1.7;padding:0}.hero .object-open{font-size:19px;margin-bottom:12px}.hero .projection-rows{height:120px!important}
 .hero .projection-row{width:100%;gap:12px}.hero .projection-key{font-size:11px;width:64px;flex:0 0 64px;padding-top:1px}.hero .projection-value{font-size:12px;white-space:normal;line-height:1.8;overflow-wrap:normal;flex:1;min-width:0}.hero .projection-punctuation{display:none}.hero .object-close{font-size:18px;line-height:1}
 .hero .projection-foot{display:none}.hero-footer{order:3;width:100%;margin-top:0;align-items:center;gap:24px}.hero-footer .side-note{font-size:9px;flex:0 0 110px;max-width:110px;line-height:1.6}.explore{font-size:12px;gap:14px}.explore .link-arrow{width:17px;height:17px;flex-basis:17px}
 .chapter{padding-top:65px;padding-bottom:65px}.chapter-label{font-size:10px;gap:18px}.section-heading,.work-top .section-heading{font-size:clamp(32px,8.4vw,48px);line-height:1.15;letter-spacing:-.045em;margin-top:24px;margin-bottom:34px}.path-grid{gap:36px}.path-intro{font-size:15px;line-height:1.85}.path-intro p{margin-bottom:22px}.timeline{padding-left:24px;margin-left:2px}.step:before{left:-27px}.step{margin-bottom:30px}.step h3{font-size:20px;line-height:1.35}.step p{font-size:14px;line-height:1.85}.step small{font-size:9px;letter-spacing:.08em}
 .practice-item{padding:25px 0 28px}.practice-item h3{font-size:24px;line-height:1.25;margin:14px 0}.practice-item p{font-size:14px;margin-bottom:10px}.practice-item>.mono{font-size:10px}
 .work-top{gap:18px;margin-bottom:34px}.work-top .section-heading{margin-bottom:0}.work-top>.mono{font-size:10px}
 .project,.project.shiori{display:block;position:relative;padding:30px 0 34px;max-width:100%}.project-number{display:block;font-size:10px!important;padding-top:0;margin-bottom:16px;color:var(--accent)}.project-number:after{content:' /'}
 .project>div{width:100%}.project-heading{padding-right:44px}.project-title{font-size:clamp(22px,5.9vw,32px);line-height:1.25;letter-spacing:-.8px;overflow-wrap:anywhere}.project p{font-size:14px;line-height:1.85;margin:16px 0 17px;max-width:100%}
 .project-out{position:absolute;right:0;top:56px;width:38px;height:38px;min-width:38px;min-height:38px;margin:0}.tags{font-size:10px;line-height:1.8;gap:6px 16px}.project-screen{margin-top:24px;width:100%}.project-screen figcaption{font-size:9px;padding:10px 12px;line-height:1.6}.shiori-layout{display:block}
 .code-disclosure{margin-top:22px}.code-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;list-style:none;padding:15px 16px;min-height:48px;font-size:12px;line-height:1.5;background:var(--surface);border:1px solid var(--line);border-radius:6px;cursor:pointer;color:var(--fg)}.code-disclosure>summary::-webkit-details-marker{display:none}.code-disclosure>summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}.code-disclosure>summary svg{width:14px;height:14px;flex:none;stroke:var(--accent);fill:none;stroke-width:1.5;transition:transform .2s}.code-disclosure[open]>summary{border-radius:6px 6px 0 0}.code-disclosure[open]>summary svg{transform:rotate(180deg)}.code-disclosure .project-example{border-top:0;border-radius:0 0 6px 6px}.project-example pre{font-size:11px;padding:18px 15px;line-height:1.9}.example-label{font-size:9px;padding:12px 15px}.example-source{font-size:11px;padding:15px}.example-source a{min-height:32px;font-size:12px}
 .lilac-note{margin-top:28px;align-items:start;gap:12px;font-size:12px}.swatches{padding-top:6px}.lilac-note .small-link{display:inline-flex;min-height:30px}
 .contact{padding-top:65px;padding-bottom:28px}.contact h2{font-size:clamp(35px,9vw,54px);margin:25px 0;line-height:1.13}.contact-links{gap:28px;margin-top:28px}.contact-links a{font-size:14px;min-height:40px}.footer{margin-top:60px;font-size:10px;line-height:1.8;gap:24px;padding-top:24px}
 .mobile-context{position:fixed;top:0;left:0;right:0;z-index:20;min-height:48px;padding:10px var(--pad);display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line);background:var(--bg);opacity:0;visibility:hidden;transform:translateY(-100%);transition:transform .22s,opacity .22s,visibility .22s}.mobile-context.is-visible{opacity:1;visibility:visible;transform:none}.mobile-context .context-label{display:flex;gap:10px;align-items:center;font:11px/1.5 'DM Sans',sans-serif;color:var(--muted)}.mobile-context .context-label b{font-family:'Space Grotesk',sans-serif;color:var(--accent);font-size:13px;font-weight:400;letter-spacing:-.5px}.mobile-context .context-label i{font-style:normal;color:var(--line)}.mobile-context button{display:grid;place-items:center;width:32px;height:32px;border:0;background:none;color:var(--accent);padding:0;flex:none}.mobile-context svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.5}
}
@media(max-width:440px){.hero{padding-top:42px}.hero h1{font-size:10.5vw}.hero .projection-field{margin-top:30px;margin-bottom:25px}.hero .projection-meta{font-size:8px}.hero .projection-key{font-size:10px;flex-basis:60px;width:60px}.hero .projection-value{font-size:11px}.hero .projection-rows{height:110px!important}.hero .object-open{font-size:18px}.hero .eyebrow{font-size:8px}.hero-desc{font-size:15px}.hero-footer .side-note{font-size:9px}nav{gap:13px}.personal-brand.wordmark{font-size:21px}}
.hero .projection-field[data-section="work"] .projection-key{white-space:nowrap;width:7.4em;flex:0 0 7.4em}
@media(max-width:350px){.hero h1{font-size:10.5vw}.hero{padding-top:34px}.hero .projection-row{gap:8px}.hero .projection-key{flex-basis:56px;width:56px}.hero .projection-value{font-size:10px}.hero .projection-count{font-size:7px}.hero-footer .side-note{font-size:8px;flex-basis:88px;max-width:88px}.hero-footer{gap:16px}.explore{font-size:11px;gap:10px}.personal-brand.wordmark{font-size:18px}nav{gap:10px}.theme,header .ambient-toggle{width:38px;height:38px}.project-title{font-size:22px}.project-heading{padding-right:40px}.project-out{width:34px;height:34px;min-width:34px;min-height:34px}.tags{gap:6px 12px}}
@media(prefers-reduced-motion:reduce){.mobile-context,.code-disclosure>summary svg{transition:none}}
/* Phones: the profile is re-projected at each chapter boundary; rows travel across the full screen width. */
.projection-seam{display:none}
@media(max-width:800px){
 .mobile-context{display:none!important}
 .projection-field{display:none!important}
 html{scroll-padding-top:24px}
 .projection-seam{--gap:30px;--p:1;display:block;margin:-18px calc(var(--pad) * -1) 46px;padding:0 var(--pad) 28px;background:linear-gradient(var(--line),var(--line)) center bottom/calc(100% - var(--pad) * 2) 1px no-repeat;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:-.02em;overflow:hidden}
 .hero .projection-seam{order:2;margin:36px calc(var(--pad) * -1) 30px;padding-top:22px;padding-bottom:22px;background:linear-gradient(var(--line),var(--line)) center top/calc(100% - var(--pad) * 2) 1px no-repeat,linear-gradient(var(--line),var(--line)) center bottom/calc(100% - var(--pad) * 2) 1px no-repeat}
 .seam-meta{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding-bottom:14px;font-size:9px;letter-spacing:.03em;color:var(--muted)}
 .seam-swap{display:inline-grid}.seam-swap>*{grid-area:1/1}.seam-schema b{font-weight:400;color:var(--field-key)}
 .seam-old{opacity:clamp(0,calc(3 - var(--p) * 6),1)}.seam-new{opacity:clamp(0,calc(var(--p) * 6 - 3.3),1)}
 .seam-open,.seam-close{font-size:18px;line-height:1.4;color:var(--field-key)}.seam-open i,.seam-close{font-style:normal;opacity:.8}.seam-open{margin-bottom:8px}.seam-close{margin-top:6px}
 .seam-rows{position:relative;height:calc(var(--rows) * var(--gap))}
 .seam-row{position:absolute;top:0;left:0;right:0;display:flex;align-items:baseline;gap:0;line-height:var(--gap);white-space:nowrap;will-change:transform,opacity}
 .seam-mark{flex:0 0 14px;font-size:11px;color:var(--field-key)}
 .seam-key{flex:0 0 72px;font-size:11px;color:var(--field-key)}
 .seam-value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:12.5px;color:var(--field-value)}
}
@media(max-width:440px){.projection-seam{--gap:28px}.seam-meta{font-size:8px}.seam-key{flex-basis:64px;font-size:10px}.seam-value{font-size:11.5px}.seam-open,.seam-close{font-size:17px}}
@media(max-width:350px){.projection-seam{--gap:26px}.seam-meta{letter-spacing:0}.seam-key{flex-basis:58px}.seam-value{font-size:10.5px}}
/* Compact masthead and opening: keep hierarchy, remove excess vertical space. */
header{height:68px}
header nav{gap:24px}
.personal-brand.wordmark{font-size:21px}
.hero{min-height:min(720px,calc(100svh - 68px));padding-top:clamp(56px,7vh,84px)}
@media(max-width:800px){header{height:58px}header nav{gap:14px}.personal-brand.wordmark{font-size:20px}.hero{min-height:0;padding-top:28px}}
@media(max-width:350px){header nav{gap:10px}.personal-brand.wordmark{font-size:18px}.hero{padding-top:22px}}
/* Phone code cards: labelled header, animated panel (mobile.js), capped height with a fade while more code follows. */
@media(max-width:800px){
 .code-disclosure>summary{padding:13px 16px;transition:border-color .25s,background-color .25s}
 .disclosure-text{display:flex;flex-direction:column;gap:3px;min-width:0}
 .disclosure-text small{font:10px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.06em;color:var(--accent)}
 .disclosure-text span{font-size:13px;line-height:1.4}
 .code-disclosure>summary svg{transition:transform .3s cubic-bezier(.2,.75,.2,1)}
 .code-disclosure[open]>summary,.code-disclosure[open] .project-example{border-color:color-mix(in srgb,var(--accent) 45%,var(--line))}
 .code-disclosure .project-example{max-height:min(64svh,540px);overflow-y:auto;overscroll-behavior-y:auto;-webkit-mask-image:linear-gradient(#000 calc(100% - 48px),transparent);mask-image:linear-gradient(#000 calc(100% - 48px),transparent)}
 .code-disclosure .project-example.at-end{-webkit-mask-image:none;mask-image:none}
 .code-disclosure .project-example pre{white-space:pre-wrap;overflow-wrap:anywhere;overflow-x:hidden}
}
@media(prefers-reduced-motion:reduce){.code-disclosure>summary,.code-disclosure>summary svg{transition:none}}
/* Rounder code cards: pill-like header with a circular chevron, softly rounded panel. */
@media(max-width:800px){
 .code-disclosure>summary{padding:12px 12px 12px 18px;min-height:60px;border-radius:18px;background:linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--surface) 82%,var(--accent)));box-shadow:0 1px 0 color-mix(in srgb,var(--accent) 10%,transparent) inset;transition:border-color .25s,background-color .25s,border-radius .3s,transform .15s}
 .code-disclosure>summary:active{transform:scale(.985)}
 .code-disclosure>summary:focus-visible{outline-offset:3px;border-radius:18px}
 .code-disclosure>summary svg{box-sizing:border-box;width:34px;height:34px;padding:9px;border-radius:50%;background:color-mix(in srgb,var(--accent) 16%,transparent);stroke-width:1.6}
 .code-disclosure[open]>summary{border-radius:18px 18px 0 0}
 .code-disclosure[open]>summary svg{background:color-mix(in srgb,var(--accent) 26%,transparent)}
 .code-disclosure .project-example{border-radius:0 0 18px 18px}
 .code-disclosure .project-example pre{padding:18px 18px}
 .code-disclosure .example-source{padding:14px 18px 16px}
}
@media(prefers-reduced-motion:reduce){.code-disclosure>summary{transition:none}.code-disclosure>summary:active{transform:none}}
