/* Case layout measured from https://moenly.design/works/starnest, 2026-10-24.
   Shared layout rules; project text, imagery and identity belong to this portfolio. */
:root{--font-primary:"Figtree","PingFang SC",Arial,sans-serif;--font-heading:"Anthropic Serif",Georgia,serif;--bg:#0d0e0e;--panel:#151616;--ink:#f1f1ed;--muted:#858783;--line:#ffffff1c;--brand:#1677ff;--soft-surface:#ffffff09;--soft-surface-hover:#ffffff13;--work-choice-border-angle:0deg}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font-primary);-webkit-font-smoothing:antialiased;line-height:1.5}a{color:inherit;text-decoration:none}button{font:inherit;color:inherit}img{display:block;max-width:100%;height:auto}figure,p{margin:0}button,a{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:2px solid var(--brand);outline-offset:4px}.shell{width:min(1440px,100% - 96px);margin-inline:auto}
.shell{width:min(1440px,100% - 96px);margin-inline:auto}
.work-detail-page{--work-switcher-height:215px;min-height:100svh;color:var(--ink);background:var(--bg);overflow-x:clip;overflow-y:visible}
.work-project-switcher{z-index:850;background:var(--bg);padding:72px 0 12px;position:sticky;top:0}
@supports (color:color-mix(in lab, red, red)){.work-project-switcher{background:color-mix(in srgb, var(--bg) 38%, transparent)}}
.work-project-switcher{-webkit-backdrop-filter:blur(24px)saturate(132%);backdrop-filter:blur(24px)saturate(132%)}
.work-project-switcher-track{grid-template-columns:minmax(180px,236px) minmax(0,980px);justify-content:space-between;gap:clamp(56px,7vw,112px);display:grid}
.work-project-switcher-track::-webkit-scrollbar{display:none}
.work-project-switcher-list{grid-column:2;justify-content:flex-start;align-items:flex-start;gap:24px;min-width:0;display:flex}
.work-project-switcher-list::-webkit-scrollbar{display:none}
@media(min-width:721px){.work-project-switcher-list{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding:8px 6px 12px;overscroll-behavior-x:contain}}
.work-project-choice{width:84px;color:var(--ink);flex-direction:column;flex:0 0 84px;align-items:center;gap:8px;display:flex}
@supports (color:color-mix(in lab, red, red)){.work-project-choice{color:color-mix(in srgb, var(--ink) 50%, transparent)}}
.work-project-choice{text-align:center;transition:color .2s,transform .24s cubic-bezier(.22,1,.36,1)}
.work-project-choice:hover{color:var(--ink);transform:translateY(-3px)}
.work-project-choice:focus-visible{outline:2px solid var(--brand);outline-offset:5px}
.work-project-choice-image{isolation:isolate;border:1px solid var(--line);background:var(--panel);border-radius:16px;width:72px;height:72px;transition:border-color .2s,box-shadow .2s,transform .24s cubic-bezier(.22,1,.36,1);position:relative;overflow:hidden}
.work-project-choice-image-inner{z-index:1;border-radius:15px;transition:inset .24s cubic-bezier(.22,1,.36,1),border-radius .24s cubic-bezier(.22,1,.36,1);position:absolute;inset:0;overflow:hidden}
.work-project-choice-image img{object-fit:cover}
.work-project-choice.is-active{width:92px;color:var(--ink);flex-basis:92px}
.work-project-choice.is-active .work-project-choice-image{background:var(--bg);border:0;border-radius:20px;width:92px;height:92px;transform:translateY(-4px);box-shadow:0 8px 20px #0000003d}
.work-project-choice.is-active .work-project-choice-image-inner{border-radius:15px;inset:11px}
.work-project-choice.is-active .work-project-choice-image:before{z-index:2;border-radius:inherit;background:conic-gradient(from var(--work-choice-border-angle), #feda75, #fa7e1e 22%, #d62976 45%, #962fbf 68%, #4f5bd5 84%, #feda75);content:"";pointer-events:none;-webkit-mask-composite:xor;-webkit-mask-composite:xor;-webkit-mask-source-type:auto,auto;-webkit-mask-composite:xor;-webkit-mask-source-type:auto,auto;padding:3px;animation:3s linear infinite work-choice-border-flow;position:absolute;inset:0;-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-position:0 0,0 0;mask-position:0 0,0 0;-webkit-mask-size:auto,auto;mask-size:auto,auto;-webkit-mask-repeat:repeat,repeat;mask-repeat:repeat,repeat;-webkit-mask-clip:content-box,border-box;mask-clip:content-box,border-box;-webkit-mask-origin:content-box,border-box;mask-origin:content-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-source-type:auto,auto;mask-mode:match-source,match-source}
@property --work-choice-border-angle{syntax:"<angle>";inherits:false;initial-value:0deg}
@keyframes work-choice-border-flow{to{--work-choice-border-angle:1turn}}
.work-project-choice-name{text-overflow:clip;white-space:normal;overflow-wrap:anywhere;width:100%;min-height:2.4em;font-size:10px;font-weight:500;line-height:1.2;overflow:hidden}
.work-detail-back{z-index:875;color:#fff;background:#050505;border:1px solid #ffffff47;border-radius:999px;align-items:center;gap:8px;min-height:44px;padding:0 18px;font-size:12px;font-weight:500;line-height:1;display:inline-flex;position:fixed;top:104px;left:max(48px,50vw - 720px);box-shadow:0 12px 32px #0000002e}
.work-detail-back span{font-size:17px;line-height:0}
.work-detail-back:hover{background:#1c1c1c}
.work-detail-back:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.work-detail-layout{grid-template-columns:minmax(180px,236px) minmax(0,980px);justify-content:space-between;gap:clamp(56px,7vw,112px);padding-top:92px;padding-bottom:160px;display:grid}
.work-detail-layout.is-pending{display:block}
.work-detail-layout.is-pending .work-detail-article{max-width:980px;margin-inline:auto}
.work-detail-aside{min-width:0;position:relative}
.work-detail-toc{top:calc(var(--work-switcher-height) + 64px);width:236px;position:fixed;left:max(48px,50vw - 720px)}
.work-detail-toc-links{flex-direction:column;gap:13px;display:flex}
.work-detail-toc a{color:var(--ink);display:block;position:relative}
@supports (color:color-mix(in lab, red, red)){.work-detail-toc a{color:color-mix(in srgb, var(--ink) 62%, transparent)}}
.work-detail-toc a{font-size:12px;line-height:1.45;transition:color .18s,transform .18s}
.work-detail-toc a:hover,.work-detail-toc a.is-active{color:var(--ink);transform:translate(4px)}
.work-detail-toc a.is-active:after{background:var(--brand);content:"";border-radius:3px;width:3px;height:16px;position:absolute;left:-14px}
.work-detail-toc a:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.work-detail-article{min-width:0}
.work-detail-primary{border-bottom:1px solid var(--line);padding-bottom:64px}
.work-detail-header h1{letter-spacing:-.065em;overflow-wrap:anywhere;max-width:12ch;margin:0;font-size:clamp(54px,7vw,104px);font-weight:800;line-height:.94}
.work-detail-meta{justify-content:space-between;align-items:flex-end;gap:28px;margin-top:50px;display:flex}
.work-detail-date{color:var(--ink);margin:0}
@supports (color:color-mix(in lab, red, red)){.work-detail-date{color:color-mix(in srgb, var(--ink) 50%, transparent)}}
.work-detail-date{font-size:13px;font-weight:500}
.work-detail-meta ul{flex-wrap:wrap;justify-content:flex-end;gap:8px;margin:0;padding:0;list-style:none;display:flex}
.work-detail-meta li{border:1px solid var(--line);border-radius:999px;align-items:center;min-height:30px;padding:0 13px;font-size:10px;font-weight:500;display:inline-flex}
.work-detail-intro{max-width:820px;color:var(--ink);margin:42px 0 0}
@supports (color:color-mix(in lab, red, red)){.work-detail-intro{color:color-mix(in srgb, var(--ink) 50%, transparent)}}
.work-detail-intro{font-size:clamp(14px,1.05vw,15px);line-height:1.72}
.work-detail-external-links{margin-top:24px}
.work-detail-external-link{color:var(--ink);border-bottom:1px solid var(--line);align-items:center;gap:8px;padding-bottom:5px;font-size:12px;font-weight:500;transition:color .18s,border-color .18s;display:inline-flex}
.work-detail-external-link:hover{color:var(--brand);border-color:currentColor}
.work-detail-external-link:focus-visible{outline:2px solid var(--brand);outline-offset:4px}
.work-detail-cover{aspect-ratio:16/9;background:var(--panel);border-radius:24px;width:100%;margin-top:72px;position:relative;overflow:hidden}
.work-detail-cover img{object-fit:cover}
.work-detail-section{padding-top:128px;scroll-margin-top:calc(var(--work-switcher-height) + 20px)}
.work-detail-section-heading{display:block}
.work-detail-section h2{letter-spacing:-.04em;margin:0;font-size:clamp(30px,4vw,52px);font-weight:500;line-height:1.05}
.work-detail-body{max-width:760px;margin:36px 0 0}
.work-detail-body p{color:var(--ink);margin:0}
@supports (color:color-mix(in lab, red, red)){.work-detail-body p{color:color-mix(in srgb, var(--ink) 76%, transparent)}}
.work-detail-body p{font-size:15px;line-height:1.9}
.work-detail-body p+p{margin-top:32px}
.work-detail-media-wrap{margin-top:50px}
.work-media-layout-toggle{width:44px;height:44px;color:var(--ink);border:1px solid var(--line);background:var(--soft-surface);cursor:pointer;border-radius:12px;place-items:center;margin-left:auto;transition:color .18s,background .18s,border-color .18s;display:grid}
.work-media-layout-toggle:hover{border-color:var(--ink)}
@supports (color:color-mix(in lab, red, red)){.work-media-layout-toggle:hover{border-color:color-mix(in srgb, var(--ink) 36%, transparent)}}
.work-media-layout-toggle:hover{background:var(--soft-surface-hover)}
.work-media-layout-toggle:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.work-media-layout-icon{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;width:18px;height:12px;display:grid}
.work-media-layout-icon i{border:1px solid;border-radius:2px;display:block}
.work-media-layout-toggle.is-single .work-media-layout-icon{grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:1fr;gap:2px}
.work-detail-media{gap:18px;margin-top:12px;display:grid}
.work-detail-media.is-pair{grid-template-columns:repeat(2,minmax(0,1fr))}
.work-detail-media figure{background:var(--panel);border-radius:20px;min-width:0;margin:0;position:relative;overflow:hidden}
.work-detail-media.is-single figure,.work-detail-media.is-pair figure{aspect-ratio:16/9}
.work-detail-media img{object-fit:cover}
@media (max-width:1000px){.work-detail-toc{width:190px}
.work-project-switcher-track,.work-detail-layout{grid-template-columns:minmax(150px,190px) minmax(0,1fr);gap:42px}
.work-detail-header h1{font-size:clamp(50px,8vw,80px)}}
@media (max-width:720px){.work-detail-page{--work-switcher-height:230px}
.work-project-switcher{padding:140px 0 10px}
.work-project-switcher-track{overscroll-behavior-x:contain;scrollbar-width:none;padding:4px 5px;display:block;overflow-x:auto}
.work-project-switcher-list{gap:12px;width:max-content}
.work-project-choice{flex-basis:58px;gap:0;width:58px}
.work-project-choice-image{border-radius:13px;width:58px;height:58px}
.work-project-choice-image-inner{border-radius:12px}
.work-project-choice.is-active{flex-basis:72px;width:72px}
.work-project-choice.is-active .work-project-choice-image{border-radius:19px;width:72px;height:72px}
.work-project-choice.is-active .work-project-choice-image-inner{border-radius:12px}
.work-project-choice-name{display:none}
.work-detail-back{min-height:44px;padding-inline:15px;font-size:11px;top:84px;left:15px}
 .work-detail-layout{padding-top:76px;padding-bottom:100px;display:block}
.work-detail-aside{display:none}
.work-detail-primary{padding-bottom:48px}
 .work-detail-header h1{max-width:none;font-size:clamp(40px,12vw,52px);line-height:.98}
.work-detail-meta{flex-direction:column;align-items:flex-start;margin-top:34px}
.work-detail-meta ul{justify-content:flex-start}
.work-detail-intro{margin-top:32px;font-size:14px;line-height:1.72}
.work-detail-external-links{margin-top:20px}
.work-detail-cover{border-radius:16px;margin-top:48px}
.work-detail-section{padding-top:92px}
.work-detail-section h2{font-size:32px}
.work-detail-body{margin:28px 0 0}
.work-detail-body p{font-size:14px;line-height:1.82}
.work-detail-media-wrap{margin-top:38px}
.work-media-layout-toggle{display:none}
.work-detail-media{gap:12px;margin-top:0}
.work-detail-media.is-pair{grid-template-columns:1fr}
.work-detail-media figure,.work-detail-media.is-pair figure{aspect-ratio:16/9;border-radius:14px}}
@media (prefers-reduced-transparency:reduce){.work-project-switcher{background:var(--bg);-webkit-backdrop-filter:none;backdrop-filter:none}}
@media (min-width:1280px){.shell{width:calc(100% - 240px);max-width:none}}
@media (max-width:1000px){.shell{width:min(100% - 48px,1440px)}}
@media (max-width:720px){.shell{width:calc(100% - 30px)}}
@media (prefers-reduced-motion:reduce){.work-project-choice.is-active .work-project-choice-image:before{animation:none}}
.case-header{position:fixed;z-index:900;top:0;left:0;width:100%;height:92px;isolation:isolate;transform:translateZ(0);pointer-events:none}.case-header .shell{height:100%;display:flex;align-items:center;gap:32px}.case-header a{min-height:44px;display:inline-flex;align-items:center;pointer-events:auto;font-size:13px}.case-header .wordmark{margin-right:auto;font-size:26px;letter-spacing:-1.7px;font-weight:800}.work-project-choice-image img{width:100%;height:100%}.work-detail-back{transform:translateZ(0)}.image-button{display:block;border:0;padding:0;background:transparent;width:100%;height:100%;cursor:zoom-in}.work-detail-cover .image-button img{width:100%;height:100%;object-fit:cover}.work-detail-media .image-button img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.work-detail-media figure{background:#e9edf2}.work-detail-body strong{color:var(--ink);font-weight:500}.work-detail-body h3{font-size:18px;font-weight:500;margin:32px 0 12px}.work-detail-body h3:first-child{margin-top:0}.work-detail-toc a[aria-current]{color:var(--ink);transform:translateX(4px)}.work-detail-toc a[aria-current]:after{content:'';position:absolute;left:-14px;width:3px;height:16px;border-radius:3px;background:var(--brand)}.case-footer{margin-top:100px;padding-top:24px;border-top:1px solid var(--line);display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}.skip{position:fixed;top:-100px;z-index:1000;background:var(--panel);padding:12px}.skip:focus{top:10px}
dialog{color:var(--ink);background:#111;border:1px solid var(--line);border-radius:16px;width:min(1280px,94vw);max-height:92vh;padding:18px}dialog::backdrop{background:#000b;backdrop-filter:blur(12px)}.viewer-actions{display:flex;justify-content:space-between;gap:16px;margin-bottom:16px}.viewer-actions button{min-height:44px;border:1px solid var(--line);border-radius:30px;padding:9px 16px;background:var(--panel);cursor:pointer}.image-scroll{max-height:74vh;overflow:auto}.image-scroll img{margin:auto;max-height:70vh;width:auto;object-fit:contain}dialog.actual-size .image-scroll img{max-width:none;max-height:none}dialog figcaption{font-size:12px;color:var(--muted);margin-top:14px}
@media(max-width:720px){.case-header{height:76px}.case-header .shell{gap:20px}.case-header .contact{display:none}.work-detail-section{scroll-margin-top:calc(var(--work-switcher-height) + 20px)}.case-footer{margin-top:70px}}
@media(prefers-reduced-motion:reduce){*,*:before{animation:none!important;transition:none!important}}

/* Established portfolio typography: Anthropic Serif headings, Figtree body. */
.work-detail-header h1{font-family:var(--font-heading);font-weight:450}
.work-detail-section h2,.work-detail-body h3{font-family:"PingFang SC",sans-serif;font-weight:500}

/* Preserve the complete monitoring artboard in its cover. */
.case-monitor .work-detail-cover{aspect-ratio:45/32;background:#e9edf2}.case-monitor .work-detail-cover .image-button img{object-fit:contain}

/* Keep the two guest-captured case artboards at or below their source pixels. */
.case-model .work-detail-media .image-button img{width:auto;height:auto;max-width:min(100%,960px);max-height:100%;left:50%;top:50%;transform:translate(-50%,-50%)}
/* The replacement monitor homepage keeps the complete 2880×2048 ratio; detail artboards retain their source-size cap below. */
.case-monitor .work-detail-media .image-button img{width:auto;height:auto;max-width:min(100%,720px);max-height:min(100%,512px);left:50%;top:50%;transform:translate(-50%,-50%)}
.viewer-navigation{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0}.viewer-actions{align-items:center;flex-wrap:wrap}.viewer-navigation button{min-height:44px;white-space:nowrap}.viewer-navigation button:disabled{opacity:.42;cursor:not-allowed}.viewer-count{min-width:5ch;text-align:center;font-size:12px;color:var(--muted)}
@media(max-width:520px){dialog{padding:12px}.viewer-actions{gap:8px}.viewer-actions button{padding:8px 10px}.viewer-navigation{gap:4px}.viewer-navigation button{min-height:44px;padding-inline:8px}.viewer-count{font-size:11px;min-width:4ch}}

/* Keep the original 4:3 UC and modeling cover artboards fully visible. */
.case-uc .work-detail-cover,.case-model .work-detail-cover{aspect-ratio:4/3}
.case-uc .work-detail-cover .image-button img,.case-model .work-detail-cover .image-button img{object-fit:contain}

/* UC 1.0 approval states: preserve each original artboard ratio without cropping. */
.case-uc .work-detail-media.uc-approval-overview-grid figure{aspect-ratio:auto;display:flex;flex-direction:column;align-self:start}
.case-uc .work-detail-media.uc-approval-overview-grid .image-button{height:auto;flex:0 0 auto}
.case-uc .work-detail-media.uc-approval-overview-grid .image-button img{position:static;display:block;width:100%;height:auto;max-width:100%;object-fit:contain;transform:none}
.case-uc .uc-approval-overview-grid figcaption{padding:10px 14px 12px;font-size:12px;color:var(--muted);line-height:1.5}

/* V1.12: UC process artboards keep their natural ratios and the third item spans the row. */
.case-uc #process .uc-process-media figure{aspect-ratio:auto;align-self:start}
.case-uc #process .uc-process-media .image-button{height:auto}
.case-uc #process .uc-process-media .image-button img{position:static;width:100%;height:auto;object-fit:contain}
.case-uc #process .uc-process-media figure:nth-child(3){grid-column:1/-1}
@media(max-width:720px){.case-uc #process .uc-process-media figure:nth-child(3){grid-column:auto}}
