/* Shared cinematic editorial gallery */
#portfolio.tm-gallery{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:clamp(12px,1.5vw,22px)!important;max-width:1500px!important;margin:0 auto!important;align-items:stretch!important;justify-content:initial!important;}
.tm-gallery .tm-card{grid-column:span 6;min-width:0;position:relative;overflow:hidden;background:#17171a;border:1px solid rgba(255,255,255,.09);display:flex;flex-direction:column;}
.tm-gallery .tm-card.tm-portrait{grid-column:span 4;}
.tm-gallery .tm-card-action{display:block;position:relative;width:100%;border:0;padding:0;background:#08080a;color:inherit;cursor:zoom-in;overflow:hidden;flex:1;min-height:0;}
.tm-gallery .tm-media-frame{position:relative;width:100%;height:100%;min-height:300px;aspect-ratio:16/10;overflow:hidden;background:#0a0a0c;}
.tm-gallery .tm-portrait .tm-media-frame{aspect-ratio:3/4;min-height:0;}
.tm-gallery .tm-media{width:100%;height:100%;display:block;object-fit:cover;background:#0a0a0c;transition:transform .55s ease;}
.tm-gallery .tm-card-action:hover .tm-media{transform:scale(1.035);}
.tm-gallery .tm-media-frame::after{content:'';position:absolute;inset:50% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.22));pointer-events:none;}
.tm-gallery .tm-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:64px;height:64px;border-radius:50%;border:1px solid #efca8d;background:rgba(12,11,11,.48);color:#f8d39c;font-size:23px;padding-left:4px;backdrop-filter:blur(7px);transition:background .2s,transform .2s;z-index:1;}
.tm-gallery .tm-card-action:hover .tm-play{background:rgba(16,13,10,.8);transform:translate(-50%,-50%) scale(1.08);}
.tm-gallery .tm-card-caption{position:relative;padding:19px 23px 22px;background:#111114;text-align:left;}
.tm-gallery .tm-category{font:700 10px/1.5 Arial,sans-serif;color:#e7b978;letter-spacing:.19em;text-transform:uppercase;}
.tm-gallery .tm-card-caption h3{font:400 clamp(22px,2.1vw,31px)/1.2 Georgia,serif;color:#f7f2eb;margin:7px 0 0;letter-spacing:-.025em;}
.tm-gallery .tm-card-caption p{font:13px/1.55 Arial,sans-serif;color:#bfb9b2;margin:8px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.tm-empty,.tm-error{grid-column:1/-1;text-align:center;padding:65px 20px;color:#bfb9b2;}.tm-empty h3{font:400 29px Georgia,serif;color:#f5f1eb;}
.twilight-viewer{position:fixed;inset:0;max-width:min(96vw,1300px);max-height:94dvh;width:max-content;min-width:min(94vw,380px);margin:auto;padding:54px 18px 20px;border:1px solid #66543b;border-radius:8px;background:#0c0c0e;color:#f5f1eb;box-shadow:0 25px 100px #000b;overflow:auto;}
.twilight-viewer::backdrop{background:rgba(0,0,0,.88);backdrop-filter:blur(8px);}
.viewer-close{position:absolute;top:8px;right:12px;z-index:2;width:40px;height:40px;border:1px solid #6a5940;border-radius:50%;background:#1d1a17;color:#f7e0bd;font-size:28px;cursor:pointer;}
.viewer-body{display:flex;align-items:center;justify-content:center;max-height:calc(94dvh - 160px);min-height:100px;}
.viewer-media{display:block;max-width:100%;max-height:calc(94dvh - 170px);width:auto;height:auto;object-fit:contain;background:#080809;}
.viewer-info{padding:13px 8px 2px;max-width:900px;}.viewer-category{font:700 10px Arial,sans-serif;letter-spacing:.2em;color:#e7b978;text-transform:uppercase;}.viewer-info h2{font:400 clamp(22px,3vw,33px) Georgia,serif;margin:6px 0;}.viewer-info p{font:14px/1.5 Arial,sans-serif;color:#c6c0b8;margin:7px 0;}
body.immersive-home .filters button{border:1px solid #564739!important;border-radius:999px!important;padding:12px 19px!important;color:#eee5da!important;background:transparent!important;}
body.immersive-home .filters button.active,body.immersive-home .filters button:hover{background:#f0c27b!important;color:#151012!important;border-color:#f0c27b!important;}
body.immersive-home #portfolio .tm-card{width:auto!important;max-width:none!important;flex:none!important;border:1px solid rgba(255,255,255,.09)!important;background:#17171a!important;}
body.immersive-home #portfolio .tm-media{width:100%!important;max-height:none!important;height:100%!important;object-fit:cover!important;}
body.immersive-home #portfolio .tm-card-caption{background:#111114!important;padding:19px 23px 22px!important;}
body.immersive-home #portfolio .tm-card-caption h3{font:400 clamp(22px,2.1vw,31px)/1.2 Georgia,serif!important;color:#f7f2eb!important;}
body.immersive-home #portfolio .tm-card-caption p{color:#bfb9b2!important;}
@media(max-width:760px){#portfolio.tm-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}.tm-gallery .tm-card,.tm-gallery .tm-card.tm-portrait{grid-column:span 2}.tm-gallery .tm-media-frame{min-height:0;aspect-ratio:16/11}.tm-gallery .tm-portrait .tm-media-frame{aspect-ratio:3/4}.tm-gallery .tm-card-caption{padding:16px 17px 19px}.tm-gallery .tm-play{width:54px;height:54px}.twilight-viewer{padding:55px 10px 15px;max-width:98vw;max-height:96dvh}.viewer-body{max-height:calc(96dvh - 175px)}.viewer-media{max-height:calc(96dvh - 185px)}}
@media(min-width:761px) and (max-width:1050px){.tm-gallery .tm-card.tm-portrait{grid-column:span 6}}
@media(prefers-reduced-motion:reduce){.tm-gallery .tm-media,.tm-gallery .tm-play{transition:none!important}}
