/* Shared image geometry keeps the page steady while assets load. */
html{scrollbar-gutter:stable}
img{max-width:100%}
img[width][height]{height:auto}
.hero-portrait img{width:100%;height:100%;object-fit:cover}
.published-work__cover img,.work-card__image img{display:block;width:100%;height:100%;object-fit:cover}

/* Tool directory: one category per row, no individual cards. */
#capabilities .tool-grid{display:block;border-top:1px solid var(--line);margin-top:32px}
#capabilities .tools-intro{font-size:14px;font-weight:300;color:#7c8176;line-height:1.8;margin:24px 0 0}
#capabilities .tool-card{display:grid;grid-template-columns:175px minmax(0,1fr);align-items:center;gap:24px;padding:25px 0;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;background:none;min-height:0}
#capabilities .tool-card h2{margin:0;font-family:var(--sans);font-size:16px;font-weight:500;letter-spacing:0;line-height:1.5}
#capabilities .tool-chips{display:flex;align-items:center;flex-wrap:wrap;gap:18px;margin:0}
#capabilities .tool-chip{display:inline-flex;align-items:center;gap:7px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;font-size:12px;color:#555;white-space:nowrap;min-height:28px}
#capabilities .tool-chip img{display:block;width:22px;height:22px;object-fit:contain;border-radius:4px;padding:0;flex:none}
@media(min-width:1450px){#capabilities .tool-card{grid-template-columns:190px minmax(0,1fr)}#capabilities .tool-chips{gap:18px 25px}}
@media(max-width:700px){#capabilities .tool-card{grid-template-columns:1fr;gap:16px;padding:23px 0}#capabilities .tool-chips{gap:16px 22px}#capabilities .tool-card h2{font-size:15px}#capabilities .tool-chip{font-size:12px}}

/* Stable card typography and shared action baseline. */
.published-work{display:flex;flex-direction:column}
.published-work__info{display:flex;flex-direction:column;flex:1;min-width:0}
.published-work h3{height:3.3em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.published-work__info>p{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:0;margin:8px 0 0;height:1.8em}
.published-work__info .work-card--prompt{display:flex;justify-content:space-between;align-items:center;width:100%;padding:12px 0;margin-top:14px;border:0;border-top:1px solid #d4d9ce;border-bottom:1px solid #d4d9ce;font-size:12px;color:#47533d}
.published-work__info .work-card--prompt span{font-size:19px;line-height:1}
.published-work__info .work-card--prompt:hover{color:#111;background:#e9efdf66}
.published-work__meta{min-height:15px;align-items:center;font-variant-numeric:tabular-nums}
.content-collection--local .work-card__meta strong{min-height:3em}

/* One scroll area inside the modal. Tabs remain outside it and always visible. */
.viewer{position:fixed;inset:0;left:0;top:0;transform:none;margin:auto;width:min(1140px,calc(100vw - 32px));height:fit-content;max-height:calc(100dvh - 32px);border:1px solid #e1e4dd;border-radius:14px;overflow:hidden;background:#fafbf8;box-shadow:0 24px 100px #0005}
.viewer::backdrop{background:#172015a6;backdrop-filter:blur(5px)}
.viewer__head{height:76px;box-sizing:border-box;gap:15px;padding:15px 24px;background:#fafbf8}
.viewer__head h2{font-size:17px;font-weight:500;line-height:1.4;margin:3px 0 0;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.viewer__eyebrow{font-size:9px;letter-spacing:.15em;color:#7c8571;margin:0}
.viewer__close{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border:1px solid #dce1d5;border-radius:50%;background:white;color:#333;font-size:24px}
.viewer:not(.viewer--solo) .viewer__body{display:grid;grid-template-columns:var(--video-width,minmax(0,1fr)) minmax(0,1fr);height:min(76dvh,760px);min-height:0;overflow:hidden}
.viewer .viewer__video{background:#edf0e8;min-height:0;overflow:hidden}
.viewer .viewer__video video{width:100%;height:100%;object-fit:contain}
.viewer .viewer__prompt{display:flex;flex-direction:column;padding:0;min-width:0;min-height:0;height:100%;overflow:hidden;background:#fafbf8;border-left:1px solid #dde2d5}
.viewer--prompt-only:not(.viewer--solo) .viewer__body{display:block;height:min(76dvh,760px)}
.viewer--prompt-only .viewer__video{display:none}
.viewer--prompt-only .viewer__prompt{border:0}
.prompt-tabs{display:flex;align-items:center;flex:0 0 auto;gap:8px;overflow-x:auto;padding:14px 24px;border-bottom:1px solid #e1e5da;background:#f4f6ef;scrollbar-width:thin}
.prompt-tabs:empty{display:none}
.prompt-tabs button{font-family:var(--sans);font-size:12px;white-space:nowrap;border:1px solid #dbe1d1;border-radius:999px;background:transparent;color:#76816b;padding:8px 15px}
.prompt-tabs button[aria-selected=true]{background:#263322;color:#fff;border-color:#263322}
.prompt-tabs button:focus-visible,.prompt-gallery a:focus-visible,.viewer__close:focus-visible{outline:2px solid #759b40;outline-offset:3px}
.prompt-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:26px clamp(20px,4vw,46px) 42px;scrollbar-width:thin;scrollbar-color:#b8c2ab transparent}
.prompt-segment-title{margin:0 0 24px}
.prompt-segment-number{margin:0 0 7px;font-size:10px;letter-spacing:.1em;color:#929a86}
.viewer .prompt-segment-title h3{position:static;padding:0;margin:0;font-family:var(--sans);font-size:22px;font-weight:500;line-height:1.5;background:none}
.viewer .prompt-references{margin:0 0 24px;padding:0;max-width:none}
.prompt-references h4{font-size:12px;color:#7c8571;font-weight:400;margin:0 0 12px}
.prompt-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:16px;max-width:750px}
.prompt-gallery figure{margin:0;min-width:0}
.prompt-gallery a{display:flex;justify-content:center;align-items:center;aspect-ratio:4/3;background:#e9ede3;border:1px solid #e0e5d8;border-radius:7px;overflow:hidden}
.prompt-gallery img{display:block;width:100%;height:100%;object-fit:contain;transition:transform .2s}
.prompt-gallery a:hover img{transform:scale(1.03)}
.prompt-gallery figcaption{font-size:10px;line-height:1.5;color:#859078;margin-top:7px;overflow-wrap:anywhere}
.prompt-block{margin:0;border-top:1px solid #dce2d3}
.prompt-block:last-child{border-bottom:1px solid #dce2d3}
.prompt-block summary{display:flex;align-items:center;gap:12px;list-style:none;cursor:pointer;padding:18px 0;font-size:14px;font-weight:500;color:#36442b}
.prompt-block summary::-webkit-details-marker{display:none}
.prompt-block-number{font-size:10px;color:#a0a794;font-weight:400;font-variant-numeric:tabular-nums}
.prompt-block-toggle{margin-left:auto;font-size:16px;font-weight:400}
.prompt-block[open] .prompt-block-toggle{transform:rotate(45deg)}
.prompt-prose{color:#52594d;font-family:var(--sans);font-size:13px;line-height:1.95;overflow-wrap:anywhere;padding:0 0 20px;max-width:82ch}
.prompt-prose p{white-space:pre-line;margin:0 0 16px}
.prompt-prose h5{font-size:13px;font-weight:600;color:#2f3b28;line-height:1.6;margin:22px 0 10px}
.prompt-prose h5:first-child{margin-top:0}
.prompt-status,.prompt-empty{font-size:13px;line-height:1.8;color:#88917e;margin:12px 0 20px}
.prompt-retry{padding:10px 20px;background:#273421;border:0;border-radius:20px;color:white}
.viewer--solo .viewer__head{height:66px}
.viewer--solo .viewer__body{height:auto;display:block}
.viewer--solo .viewer__video{width:100%;aspect-ratio:var(--video-ratio,16/9)}
.viewer--solo .viewer__prompt{display:none}
@media(max-width:850px){.viewer:not(.viewer--solo):not(.viewer--prompt-only) .viewer__body{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(160px,32%) minmax(0,1fr);height:calc(100dvh - 116px)}.viewer .viewer__prompt{border-left:0}.viewer--prompt-only:not(.viewer--solo) .viewer__body{height:calc(100dvh - 116px)}.viewer__head{padding:12px 18px;height:68px}.viewer__head h2{font-size:15px}.prompt-tabs{padding:12px 18px}.prompt-scroll{padding:22px 20px 30px}.viewer .prompt-segment-title h3{font-size:19px}.prompt-gallery{grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:12px}.prompt-prose{font-size:12px}.prompt-tabs button{font-size:11px;padding:7px 12px}}
@media(prefers-reduced-motion:reduce){.prompt-gallery img{transition:none}}

/* Shared visual scale across the home, collections and project stories. */
:root{--section-space:clamp(56px,6vw,84px);--surface-radius:12px;--text-secondary:#68705f;--line:#dce0d7}
html{scroll-padding-top:84px}
#capabilities,#about,.content-collection,.project-section,.design-section,.case{scroll-margin-top:84px}
.site-global-nav{border-bottom:1px solid rgba(110,125,95,.06)}
body[data-page="index"] #hero{min-height:100svh;justify-content:center;padding:116px var(--pad-x) 72px}
body[data-page="index"] #hero .hero-content{padding:0;gap:clamp(48px,8vw,120px);align-items:center}
body[data-page="index"] .hero-main{min-width:0}
body[data-page="index"] .hero-title--name{margin-bottom:26px;font-weight:500;letter-spacing:.07em}
body[data-page="index"] .hero-line{opacity:1;transform:none;transition:none}
body[data-page="index"] .hero-info,body[data-page="index"] .hero-portrait{opacity:1;animation:none;transform:none}
body[data-page="index"] .hero-portrait::before{content:none}
body[data-page="index"] .hero-portrait .portrait-wrap{padding:8px;border:1px solid #e1e5dc;border-radius:var(--surface-radius);background:#f9faf7;box-shadow:0 16px 50px #2c37220c}
body[data-page="index"] .hero-portrait img{border-radius:6px}
body[data-page="index"] .hero-evaluation h2{font-size:15px;font-weight:600;letter-spacing:.04em}
body[data-page="index"] .hero-evaluation p{color:#68705f;line-height:1.85}
body[data-page="index"] #capabilities,body[data-page="index"] #about{padding-top:var(--section-space);padding-bottom:var(--section-space)}
body[data-page="index"] #capabilities{padding-bottom:28px}
body[data-page="index"] .section-meta{align-items:flex-end;padding-bottom:22px;margin-bottom:30px}
body[data-page="index"] #capabilities .section-label,body[data-page="index"] #about .section-label{font-size:clamp(36px,4.5vw,58px);font-weight:400;letter-spacing:.03em;color:#4e5548}
body[data-page="index"] .section-label-stack .ja{margin-top:12px;font-size:11px;letter-spacing:.08em}
body[data-page="index"] .section-num{font-size:10px;color:#909786}
.creator-panel{border-radius:var(--surface-radius);box-shadow:none}
.creator-panel--about{margin-bottom:40px}
.resume-on-site>.section{grid-template-columns:150px minmax(0,1fr);gap:24px 36px;background:none;border:0;border-top:1px solid var(--line);border-radius:0;padding:32px 0;margin:0;backdrop-filter:none;-webkit-backdrop-filter:none}
.resume-on-site h2{font-size:16px;font-weight:500;color:#4e5945;line-height:1.6}
.resume-on-site .entry-head{margin-bottom:12px;gap:8px 16px}
.resume-on-site .entry-org{font-size:18px;font-weight:600;line-height:1.5}
.resume-on-site .entry-role{font-size:13px;color:#7c8474}
.resume-on-site .entry-date{font-size:12px;color:#8b9383;font-variant-numeric:tabular-nums}
.resume-on-site li{padding:6px 0;font-size:14px;line-height:1.9;color:#596151}
.resume-on-site li+li{margin-top:2px}
.resume-on-site li strong{font-weight:600;color:#333e2d}
.resume-on-site .entry+.entry{padding-top:28px;margin-top:6px}

/* Every collection opens with the same title size and top breathing room. */
body[data-page="projects"] #projects-main{max-width:1400px;margin:auto;padding:124px var(--pad-x) 80px}
body[data-page="projects"] .projects-hero{padding:0 0 32px}
.projects-hero h1,.content-hero h1{font-size:clamp(38px,4.7vw,64px);font-weight:400;line-height:1.2;letter-spacing:.025em}
.projects-hero p,.content-hero p:last-child{font-size:14px;color:var(--text-secondary);line-height:1.8}
body[data-page="aigc-content"] .content-hero{padding:124px 0 32px}
body[data-page="projects"] #works{padding:24px 0 0}
body[data-page="projects"] .work-list{gap:64px}
body[data-page="projects"] .work-entry{padding-top:32px;padding-bottom:32px;border-top:1px solid var(--line)}
body[data-page="projects"] #projects-main .work-title{font-size:clamp(26px,2.6vw,36px)!important;font-family:var(--sans);font-weight:500;line-height:1.4;letter-spacing:.01em}
body[data-page="projects"] .work-tag{font-size:11px;letter-spacing:.08em;color:#7c8770}
body[data-page="projects"] #projects-main .work-img-wrap{border:1px solid #dce1d6;border-radius:var(--surface-radius);background:#eef0e9}
body[data-page="projects"] .work-detail-link{border-radius:999px;background:#dbeabf;color:#2c3b20;padding:10px 16px;border:1px solid #cdddac;font-size:12px;transition:background .2s}
body[data-page="projects"] .work-detail-link:hover{background:#cfe3aa}
.published-work__cover,.content-collection--local .work-card__image{border-radius:var(--surface-radius);border:1px solid rgba(87,104,68,.1)}
.published-work h3{font-weight:500;color:#283221}
.collection-heading h2{font-size:25px;font-weight:500;line-height:1.4}

/* Project details: quieter headings, shared gutters, soft media frames. */
.site-global-nav ~ main.project-page,.site-global-nav ~ main.design-page{padding-top:124px}
body[data-page] .project-hero,body[data-page] .design-hero{padding:0 0 40px!important}
body[data-page] .project-title,body[data-page] .design-title{font-size:clamp(38px,4.7vw,64px)!important;font-weight:400;letter-spacing:.025em;line-height:1.2;max-width:none;margin-top:16px}
body[data-page] .project-title__cn{font-size:clamp(29px,3.6vw,46px);font-weight:400;line-height:1.35;white-space:normal;margin-top:8px;letter-spacing:.025em}
.project-kicker,.design-kicker,.content-hero__kicker{font-size:11px;color:#7d8673;letter-spacing:.12em}
.project-intro,.design-intro{margin-top:26px;align-items:start}
.project-summary,.design-summary{font-size:14px;line-height:1.9;color:var(--text-secondary)}
.project-section,.design-section{padding-top:var(--section-space)}
.project-section h2,.design-section h2,.section-head h2{font-family:var(--sans);font-size:clamp(23px,2.4vw,32px);font-weight:500;line-height:1.4;letter-spacing:0}
.project-section__head{grid-template-columns:92px minmax(0,1fr);align-items:baseline;padding-bottom:18px;gap:28px}
.project-section__lead{font-size:14px;line-height:1.85;color:var(--text-secondary);margin-top:16px}
.project-at-a-glance{background:#f7f8f3;border-color:var(--line);border-radius:var(--surface-radius)}
.project-cover,.demo-frame,.output-video{border-radius:var(--surface-radius);overflow:hidden;border:1px solid #dce1d6;background:#f1f3ed}
.project-page figure>img,.design-page figure>img{border-radius:8px}
.project-toc{gap:10px;padding:16px 0;border-color:var(--line)}
.project-toc a{font-size:12px;border-radius:999px;padding:7px 12px;color:#647157;border-color:#dce2d3;background:#f9faf6}
body[data-page="government-tools"] .wrap{max-width:1400px;padding:100px clamp(24px,5vw,80px) 0}
body[data-page="government-tools"] .wrap>.nav{padding:0 0 20px;border:0;font:400 12px/1.6 var(--sans);color:#7d8673}
body[data-page="government-tools"] .hero{padding:0 0 40px;align-items:start}
body[data-page="government-tools"] h1{font-size:clamp(38px,4.7vw,64px);font-weight:400;line-height:1.2;letter-spacing:.025em;margin:16px 0 24px}
body[data-page="government-tools"] .eyebrow{font-size:11px;color:#7d8673}
body[data-page="government-tools"] .intro{font-size:14px;line-height:1.9;color:var(--text-secondary)}
body[data-page="government-tools"] .hero-aside{align-self:center}
body[data-page="government-tools"] .case-heading h3{font-family:var(--sans);font-size:25px;font-weight:500;line-height:1.4}
body[data-page="government-tools"] .case-copy{font-size:14px;line-height:1.9}
body[data-page="government-tools"] figure>img{border-radius:8px}
@media(max-width:900px){
 body[data-page="index"] #hero{padding:112px var(--pad-x) 68px;min-height:100svh}
 body[data-page="index"] #hero .hero-content{padding:0!important;gap:30px!important;grid-template-columns:1fr}
 body[data-page="index"] .hero-portrait{width:min(42vw,260px)!important;order:-1;margin:0 auto}
 body[data-page="index"] .hero-title--name{margin-bottom:22px}
 .resume-on-site>.section{grid-template-columns:1fr;gap:22px}
 .resume-on-site .entry{grid-column:1}
 .project-section__head{grid-template-columns:1fr;gap:10px}
}
@media(max-width:700px){
 body[data-page="index"] #hero{padding-top:108px;padding-bottom:56px}
 body[data-page="index"] .hero-portrait{width:190px!important}
 body[data-page="index"] .hero-title--name{font-size:42px!important;text-align:left}
 body[data-page="index"] #capabilities .section-label,body[data-page="index"] #about .section-label{font-size:36px!important;margin-bottom:0!important}
 body[data-page="index"] .section-meta{margin-bottom:24px;padding-bottom:18px}
 body[data-page="index"] .hero-info{margin-top:20px!important;gap:0}
 .resume-on-site>.section{padding:26px 0}
 .resume-on-site .entry-org{font-size:16px}
 .resume-on-site li{font-size:13px;line-height:1.85}
 .site-global-nav ~ main.project-page,.site-global-nav ~ main.design-page{padding-top:108px}
 body[data-page="projects"] #projects-main{padding-top:108px}
 body[data-page="aigc-content"] .content-hero{padding-top:108px}
 body[data-page="projects"] .work-entry{padding-top:24px;padding-bottom:24px}
 body[data-page] .project-hero,body[data-page] .design-hero{padding-bottom:30px!important}
 .project-kicker,.design-kicker{font-size:10px;letter-spacing:.06em}
 .project-section h2,.design-section h2,.section-head h2{font-size:23px}
 body[data-page="government-tools"] .wrap{padding-top:94px}
 body[data-page="government-tools"] .hero{gap:26px;padding-bottom:30px}
}
