
/* Real-project browser: native horizontal snap, a synchronized index, no synthetic art. */
.gallery-shell{display:grid;grid-template-columns:minmax(220px,.78fr) minmax(0,1.55fr);gap:clamp(28px,5vw,70px);align-items:start}
.gallery-main{grid-column:2;grid-row:1;min-width:0;position:relative}
.gallery-index{grid-column:1;grid-row:1;min-width:0;position:relative;border-top:1px solid var(--ink)}
.gallery-index button{position:relative;width:100%;display:grid;grid-template-columns:minmax(0,1fr) 18px;align-items:center;gap:12px;text-align:left;background:none;border:0;border-bottom:1px solid var(--hair);min-height:57px;padding:12px 6px;color:var(--sub);transition:color .3s,background .35s var(--ease)}
.gallery-index button::before{content:'';position:absolute;inset:0;background:rgba(188,88,55,.09);transform:scaleX(0);transform-origin:left;transition:transform .38s var(--ease);pointer-events:none}
.gallery-index button[aria-current=true]{color:var(--ink)}
.gallery-index button[aria-current=true]::before{transform:scaleX(1)}
.index-title{font-size:14px;line-height:1.55;position:relative;overflow-wrap:anywhere}
.index-arrow{font-size:18px;line-height:1;position:relative;opacity:0;transform:translateX(-5px);transition:transform .35s var(--ease),opacity .25s}
.gallery-index button[aria-current=true] .index-arrow{transform:none;opacity:1}
.gallery-index button:hover{color:var(--rust)}
.gallery-main .cards.is-gallery{position:relative;display:flex!important;grid-template-columns:none!important;gap:0!important;align-items:stretch;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;margin:0;padding:0 0 4px;min-width:0;isolation:isolate;scroll-behavior:auto}
.gallery-main .cards.is-gallery::-webkit-scrollbar{display:none}
.gallery-main .cards.is-gallery>.pcard{flex:0 0 100%;width:100%;min-width:0;max-width:none;display:flex!important;flex-direction:column;grid-template-columns:none!important;gap:0!important;border:0!important;padding:0!important;align-self:stretch;scroll-snap-align:start;scroll-margin:0;outline-offset:-3px;transform:none}
.gallery-main .cards.is-gallery>.pcard .pc-art{width:100%;margin:0;flex:none;align-self:stretch}
.gallery-main .cards.is-gallery>.pcard .cover-board{aspect-ratio:1.85;min-height:0;padding:clamp(20px,3vw,38px)}
.gallery-main .cards.is-gallery>.pcard .cover-meta,.gallery-main .cards.is-gallery>.pcard .cover-bottom{display:flex}
.gallery-main .cards.is-gallery>.pcard .cover-word{font-size:clamp(64px,8.8vw,124px);writing-mode:horizontal-tb;white-space:nowrap;letter-spacing:-.06em;line-height:1.2;align-self:flex-start;margin:0;transform:translate3d(var(--rail-word,0px),var(--word-shift,0px),0);transition:none}
.gallery-main .cards.is-gallery>.pcard .cover-lines{background:repeating-linear-gradient(90deg,transparent 0 15px,currentColor 15px 16px);transform:translate3d(var(--rail-lines,0px),0,0) rotate(24deg);transition:none}
.gallery-main .cards.is-gallery>.pcard .pc-top{margin:21px 0 10px}
.gallery-main .cards.is-gallery>.pcard .pc-title{font-size:clamp(24px,3vw,37px);line-height:1.43}
.gallery-main .cards.is-gallery>.pcard .pc-summary{font-size:16px;line-height:1.9;margin:14px 0 0;max-width:92%}
.gallery-main .cards.is-gallery>.pcard .pc-foot{margin-top:auto;padding:22px 0 0;border:0}
.gallery-main .cards.is-gallery>.pcard .pc-open{font-size:14px;border-bottom:1px solid var(--rust);padding-bottom:5px}
.gallery-controls{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:18px;margin-top:20px;padding-top:18px;border-top:1px solid var(--hair)}
.gallery-position{font-size:15px;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap}
.gallery-position strong{font-size:24px;font-weight:500;color:var(--rust)}
.gallery-progress{height:2px;background:var(--hair);position:relative;overflow:hidden}
.gallery-progress i{display:block;position:absolute;inset:0;background:var(--rust);transform-origin:left;transform:scaleX(var(--gallery-progress,.1))}
.gallery-arrows{display:flex;gap:10px}
.gallery-arrows button{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--hair);border-radius:50%;background:transparent;line-height:1;font-size:20px;transition:color .28s,background .28s,transform .28s var(--ease)}
.gallery-arrows button:disabled{opacity:.25}
.gallery-arrows button:active:not(:disabled){transform:scale(.86)}
@media(hover:hover){.gallery-arrows button:hover:not(:disabled){background:var(--ink);color:var(--paper)}}
.gallery-index button:focus-visible,.gallery-arrows button:focus-visible{outline-offset:2px}
.gallery-index-toggle{display:none}
@media(max-width:900px){
 .gallery-shell{display:flex;flex-direction:column;gap:6px}
 .gallery-main{order:1;width:100%}
 .gallery-index-toggle{order:2;display:block;min-height:44px;width:100%;text-align:right;border:0;background:none;color:var(--rust);font-size:13px}
 /* On compact screens the current/total counter is the only visible numbered navigation.
    The optional list contains names, not a second series of numbers. */
 .gallery-index{order:3;display:none;width:100%;border-top:1px solid var(--hair);border-bottom:0;overflow:visible}
 .gallery-index.is-expanded{display:block}
 .gallery-index.is-expanded button{display:grid;grid-template-columns:minmax(0,1fr) 18px;min-height:48px;padding:10px 8px;border:0;border-bottom:1px solid var(--hair)}
 .gallery-index.is-expanded .index-title{font-size:14px;overflow-wrap:anywhere}
 .gallery-main .cards.is-gallery{gap:14px!important;scroll-snap-type:x mandatory}
 .gallery-main .cards.is-gallery>.pcard{flex-basis:88%;width:88%}
 .gallery-main .cards.is-gallery::after{content:'';flex:0 0 max(0px,calc(12% - 14px))}
 .gallery-main .cards.is-gallery>.pcard .cover-board{aspect-ratio:1.55;padding:22px}
 .gallery-main .cards.is-gallery>.pcard .cover-word{font-size:clamp(47px,14vw,100px)}
 .gallery-main .cards.is-gallery>.pcard .pc-title{font-size:clamp(21px,5.8vw,30px)}
 .gallery-main .cards.is-gallery>.pcard .pc-summary{font-size:15px;max-width:100%}
 .gallery-main .cards.is-gallery>.pcard .pc-top{margin-top:16px}
 .gallery-main .cards.is-gallery>.pcard .pc-foot{padding-top:16px}
 .gallery-controls{gap:12px;margin-top:13px;padding-top:13px}
 .gallery-arrows{gap:8px}
 .gallery-arrows button{width:42px;height:42px}
}
@media(max-width:380px){.gallery-main .cards.is-gallery>.pcard .cover-board{padding:16px}.gallery-main .cards.is-gallery>.pcard .cover-word{font-size:46px}.gallery-main .cards.is-gallery>.pcard .cover-meta,.gallery-main .cards.is-gallery>.pcard .cover-bottom{font-size:10px}}
html[data-motion=paused] .gallery-main .cards.is-gallery>.pcard .cover-word{transform:none!important}
html[data-motion=paused] .gallery-main .cards.is-gallery>.pcard .cover-lines{transform:rotate(24deg)!important}
@media(prefers-reduced-motion:reduce){.gallery-main .cards.is-gallery>.pcard .cover-word{transform:none!important}.gallery-main .cards.is-gallery>.pcard .cover-lines{transform:rotate(24deg)!important}}
@media print{.gallery-shell{display:block}.gallery-index,.gallery-controls,.gallery-index-toggle{display:none}.gallery-main .cards.is-gallery{display:block!important;overflow:visible}.gallery-main .cards.is-gallery>.pcard{width:100%;margin:20px 0}}

/* The visible action is the link's affordance, not a nested button. No hover is required. */
.browse-hint{display:flex;align-items:center;gap:9px;color:var(--sub);font-size:14px;line-height:1.6;margin:-20px 0 24px}
.browse-hint-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:var(--ink);color:var(--paper);font-size:14px;flex:none}
#work .pcard .pc-open,.skill-card-link .pc-open{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 17px!important;border:1px solid transparent!important;background:var(--rust);color:#fffaf0;font-size:14px;white-space:normal;line-height:1.4;gap:13px;flex:none;transition:background .25s,transform .3s var(--ease)}
#work .pcard .pc-open::after,.skill-card-link .pc-open::after{content:'↗';font-size:18px;line-height:1;transform:none!important}
@media(hover:hover){#work .pcard:hover .pc-open,.skill-card-link:hover .pc-open{background:#9b432a;transform:translateY(-2px)}}
#work .pcard:active .pc-open,.skill-card-link:active .pc-open{transform:scale(.97)}
#work .pcard .pc-foot,.skill-card .pc-foot{flex-wrap:wrap;gap:10px}
#work .pcard .pc-open,.skill-card-link .pc-open{margin-left:auto}
.practice-section .gallery-shell{--ink:#F5F0E6;--sub:#c5c7bb;--hair:rgba(245,240,230,.22);--rust:#D19578;--paper:#242720}
.practice-section .browse-hint{color:#d9dbce;margin:0 0 24px}
.practice-section .browse-hint-icon{background:#F5F0E6;color:#242720}
.practice-section .gallery-index button::before{background:rgba(209,149,120,.14)}
.practice-section .gallery-index .index-title{font-size:15px}
.practice-section .skill-card{color:#F5F0E6}
.practice-section .skill-card:not(a){cursor:default}
.practice-section .skill-card .pc-no,.practice-section .skill-card .pc-date,.practice-section .skill-card .pc-tag,.practice-section .skill-card .pc-summary{color:#c5c7bb}
.practice-section .skill-card .pc-title{color:#F5F0E6}
.practice-section .skill-card .cover-board{aspect-ratio:1.85;min-height:0}
.practice-section .skill-card .cover-paper{--cover-ink:#352F26;--cover-accent:#BC5837}
.practice-section .skill-card .cover-word,.practice-section .gallery-main .cards.is-gallery>.skill-card .cover-word{font-size:clamp(30px,5.2vw,86px);white-space:normal;writing-mode:horizontal-tb;overflow-wrap:anywhere;line-height:1.15;letter-spacing:-.04em;margin:0}
.practice-section .skill-card .cover-meta,.practice-section .skill-card .cover-bottom{font-size:12px}
.practice-section .skill-card-link .pc-open{background:#BC5837;color:#fffaf0}
.practice-section .skill-card-link:hover .pc-title{color:#D19578}
.practice-section .skill-card:not(a):hover .pc-title{color:#F5F0E6}
.practice-section .skill-card .pc-foot{border-color:rgba(245,240,230,.22)}
/* Fallback list works with JS disabled, as with the project cards. */
.practice-section .skill-cards:not(.is-gallery){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px 28px}
.practice-section .skill-cards:not(.is-gallery)>.skill-card{display:flex;flex-direction:column;grid-column:span 1;padding:0;gap:0;border:0}
.practice-section .skill-cards:not(.is-gallery) .pc-art{width:100%}
.practice-section .skill-cards:not(.is-gallery) .cover-meta,.practice-section .skill-cards:not(.is-gallery) .cover-bottom{display:flex}
.skill-detail-return{display:flex;justify-content:flex-start;padding:12px 0 0}
.skill-detail-return a{display:inline-flex;align-items:center;min-height:44px;padding:8px 16px;border:1px solid var(--hair);color:var(--rust);font-size:14px;transition:border-color .2s}
.skill-detail-return a:hover{border-color:var(--rust)}
@media(max-width:900px){.practice-section .gallery-main .cards.is-gallery>.skill-card .cover-word{font-size:clamp(25px,9vw,72px)}.practice-section .skill-card .cover-board{aspect-ratio:1.55}.browse-hint{margin:-8px 0 20px}.practice-section .browse-hint{margin:0 0 20px}}
@media(max-width:500px){.practice-section .skill-cards:not(.is-gallery){grid-template-columns:1fr}.practice-section .skill-card .cover-meta,.practice-section .skill-card .cover-bottom{font-size:10px}.practice-section .gallery-main .cards.is-gallery>.skill-card .cover-word{font-size:clamp(23px,8.4vw,42px)}#work .pcard .pc-open,.skill-card-link .pc-open{font-size:13px;padding:9px 11px!important;gap:8px;min-height:44px}}
html[data-motion=paused] #work .pcard:hover .pc-open,html[data-motion=paused] .skill-card-link:hover .pc-open{transform:none}
@media(prefers-reduced-motion:reduce){#work .pcard:hover .pc-open,.skill-card-link:hover .pc-open{transform:none}}
@media print{.browse-hint,.skill-detail-return,.pc-open{display:none!important}.practice-section .skill-card,.practice-section .skill-card .pc-title,.practice-section .skill-card .pc-summary{color:#16130E}.practice-section .skill-cards:not(.is-gallery){display:block}}
