/* Five compact services keep the approved blueprint language. */
#services .services,.motion-paused #services .services{grid-template-columns:repeat(5,minmax(0,1fr))}
#services .service{padding:20px;height:310px}
#services .service h3{font-size:18px;line-height:1.65}
#services .service p{font-size:11px}
#services .service-art{inset:32px 4px 120px}
.service-art-4{color:#ffa987}
.service-art-4>svg{animation-delay:-3s}
#services .service:last-child .service-art:before{inset:0}

/* The cards are data-driven; only published directory entries appear. */
.collections-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:-8px 0 22px;color:#b6a6c9;font-size:10px;letter-spacing:.1px}
.collections-toolbar>span:first-child{display:flex;align-items:center;gap:11px}
.collections-toolbar>span:first-child:before{content:'';width:6px;height:6px;background:#b58af1;border-radius:50%;box-shadow:0 0 12px #b58af166}
.collections-count{color:#81758e;font-size:10px}
.collections-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.collection-card{--collection-accent:#c9a4ff;position:relative;display:flex;flex-direction:column;min-width:0;border:1px solid #b791e335;border-radius:14px;overflow:hidden;background:linear-gradient(155deg,#1a1425,#111019);transition:border-color .3s,box-shadow .3s;animation:collection-card-arrive .6s both;animation-delay:calc(var(--card-order,0)*.065s)}
.collection-card:hover{border-color:#c7a1fb9c;box-shadow:0 15px 50px #0004}
.collection-card:focus-visible{outline-offset:5px}
.collection-card-media{position:relative;height:250px;overflow:hidden;background:radial-gradient(ellipse at 50% 80%,#8d46cc45,transparent 70%),#171020;isolation:isolate}
.collection-card-media:after{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(0deg,#191322 0%,transparent 32%)}
.collection-card-media img{position:relative;z-index:1;width:100%;height:100%;object-fit:cover;transition:transform .65s cubic-bezier(.2,.7,.3,1)}
.collection-card:hover .collection-card-media img{transform:scale(1.035)}
.collection-card-character .collection-card-media img{position:absolute;width:100%;height:160%;top:6%;object-fit:contain;object-position:top center;filter:drop-shadow(0 12px 20px #0005)}
.collection-card-watermark{position:absolute;inset:-45px 0 0;font:800 350px/1 Space;text-align:center;color:#ca87fc0b;z-index:0}
.collection-card-ring{position:absolute;width:80%;aspect-ratio:1;border:1px solid #b885ed2e;border-radius:50%;top:25%;left:10%;transform:rotate(-18deg) scaleY(.85)}
.collection-card-ring:after{content:'';position:absolute;inset:-16px;border:1px dashed #b885ed1e;border-radius:50%;animation:collection-spin 40s linear infinite}
.collection-card-number{position:absolute;top:20px;left:20px;z-index:3;font:9px Space;letter-spacing:2px;color:#d1b4eb}
.collection-card-open{position:absolute;top:16px;right:16px;z-index:3;display:grid;place-items:center;width:35px;height:35px;border:1px solid #c6a5ed5c;border-radius:50%;font:23px Space;color:#e5d3fa;background:#1e132a80;transition:background .3s,color .3s}
.collection-card:hover .collection-card-open{background:#d3b3ff;color:#1b1027}
.collection-card-copy{position:relative;z-index:3;display:flex;flex:1;flex-direction:column;align-items:flex-start;padding:23px 25px 20px;gap:14px}
.collection-card-status{display:flex;align-items:center;gap:8px;color:#b59bc9;font-size:9px}
.collection-card-status i{width:4px;height:4px;border-radius:50%;background:#c49be9}
.collection-card h3{font:700 27px/1.4 Space,Vazir;margin:0;color:#ecdcff;letter-spacing:-.8px;overflow-wrap:anywhere}
.collection-card p{margin:0;color:#b7a8c7;font-size:12px;line-height:1.95;max-width:460px}
.collection-card-tags{display:flex;gap:6px;flex-wrap:wrap;margin-block:1px 7px}
.collection-card-tags span{padding:3px 7px;border:1px solid #b78ee826;border-radius:3px;font-size:8px;color:#b7a1cd}
.collection-card-cta{display:flex;align-items:center;justify-content:space-between;gap:25px;width:100%;padding-top:13px;margin-top:auto;border-top:1px solid #c09cdd26;color:#e2d1f2;font-size:11px}
.collection-card-cta b{font:21px Space;font-weight:400;transition:transform .3s}
.collection-card:hover .collection-card-cta b{transform:translate(-3px,-3px)}
.collections-grid:has(>.collection-card:only-child){grid-template-columns:1fr}
.collections-grid>.collection-card:only-child{display:grid;grid-template-columns:1fr 1fr;min-height:315px}
.collections-grid>.collection-card:only-child .collection-card-media{grid-column:2;grid-row:1;height:100%;min-height:315px}
.collections-grid>.collection-card:only-child .collection-card-copy{grid-column:1;grid-row:1;padding:30px 36px;gap:17px}
.collections-grid>.collection-card:only-child h3{font-size:clamp(32px,3.5vw,54px);line-height:1.15;letter-spacing:-1.8px}
.collections-grid>.collection-card:only-child .collection-card-character{height:100%}
.collections-grid>.collection-card:only-child .collection-card-media img{height:190%;top:2%}
.collections-grid>.collection-card:only-child .collection-card-watermark{font-size:440px;top:-65px}
.collections-loading,.collections-empty,.collections-error{min-height:220px;border:1px solid #b791e329;border-radius:14px;background:#171220;padding:35px;display:flex;align-items:center;justify-content:center;gap:20px;color:#bbaccb;font-size:13px}
.collection-loading-orbit{width:26px;height:26px;border:1px solid #ba8ce84d;border-top-color:#c6a0f0;border-radius:50%;animation:collection-spin 1s linear infinite}
.collections-error{flex-wrap:wrap;justify-content:flex-start;align-content:center}
.collections-error p{width:100%;margin:0 0 7px}
.collection-error-link{font-size:12px;color:#d3b9f3;min-height:44px;display:flex;align-items:center}
@keyframes collection-card-arrive{from{opacity:.2;translate:0 14px}to{opacity:1;translate:0 0}}
@media(max-width:1250px){#services .services,.motion-paused #services .services{grid-template-columns:repeat(3,minmax(0,1fr))}#services .service{height:280px}#services .service-art{inset:22px 7px 115px}}
@media(max-width:1000px){.collections-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.collection-card-media{height:235px}.collection-card-copy{padding:21px}.collection-card h3{font-size:24px}}
@media(max-width:899px){#services .services,.motion-paused #services .services{grid-template-columns:repeat(2,minmax(0,1fr))}#services .service{height:265px}#services .service:last-child{grid-column:span 2;height:205px;padding-inline-end:46%}#services .service:last-child .service-art{inset:15px auto 20px 0;width:43%}#services .service:last-child .service-art>svg{width:72%;height:95%}#services .service:last-child .icon{display:none}.collections-grid>.collection-card:only-child .collection-card-copy{padding:26px}.collections-grid>.collection-card:only-child .collection-card-media{min-height:320px}}
@media(max-width:650px){#services .service{height:252px;padding:16px 13px}#services .service h3{font-size:14px}#services .service p{font-size:10px}#services .service-art{inset:28px 0 103px}#services .service:last-child{height:200px;padding:22px 17px 22px 44%}#services .service:last-child h3{font-size:17px;line-height:1.8}#services .service:last-child p{font-size:11px}#services .service:last-child .service-art{inset:15px auto 15px 0;width:42%}.collections-toolbar{margin:0 0 19px;font-size:10px;gap:10px}.collections-count{font-size:9px}.collections-grid{grid-template-columns:1fr;gap:18px}.collection-card-media{height:230px}.collection-card-copy{padding:22px;gap:13px}.collection-card h3{font-size:27px}.collection-card p{font-size:12px}.collections-grid>.collection-card:only-child{display:flex;min-height:0}.collections-grid>.collection-card:only-child .collection-card-media{min-height:0;height:245px}.collections-grid>.collection-card:only-child .collection-card-media img{height:175%;top:4%}.collections-grid>.collection-card:only-child .collection-card-copy{padding:23px;gap:14px}.collections-grid>.collection-card:only-child h3{font-size:31px}.collections-loading,.collections-empty,.collections-error{min-height:200px;padding:25px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.collection-card,.collection-card-ring:after,.collection-loading-orbit{animation:none}.collection-card,.collection-card-media img,.collection-card-cta b,.collection-card-open{transition:none}}
.motion-paused .collection-card{animation:none}

/* Light follows the existing portrait frames without covering the photograph. */
@property --portrait-light-angle{syntax:'<angle>';inherits:false;initial-value:0deg}
.portrait-outline{--frame-light:#be8bff;--frame-light-soft:#8359ea}
.portrait-outline.outline-two{--frame-light:#8ffaff;--frame-light-soft:#39bed7}
.portrait-outline:before,.portrait-outline:after{content:'';position:absolute;inset:-1px;border-radius:inherit;padding:1.6px;background:conic-gradient(from var(--portrait-light-angle),transparent 0deg 225deg,var(--frame-light-soft) 263deg,var(--frame-light) 284deg,#f7ffff 292deg,var(--frame-light) 300deg,transparent 330deg 360deg);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;pointer-events:none;animation:portrait-light-travel 8s linear infinite}
.portrait-outline:after{padding:3px;filter:blur(5px);opacity:.75}
.portrait-outline.outline-two:before,.portrait-outline.outline-two:after{animation-duration:10s;animation-direction:reverse;animation-delay:-3s}
@keyframes portrait-light-travel{to{--portrait-light-angle:360deg}}

/* A moving edge highlight and a soft sweep keep the Discord label legible. */
#contact .contact-featured .contact-node-inner{isolation:isolate;overflow:hidden;animation:discord-light-breathe 4.8s ease-in-out infinite}
#contact .contact-featured .contact-node-inner>*{position:relative;z-index:2}
#contact .contact-featured .contact-node-inner>small{position:absolute}
#contact .contact-featured .contact-node-inner:before{content:'';position:absolute;inset:0;z-index:1;border-radius:inherit;padding:2px;background:conic-gradient(transparent 0deg 220deg,#fcffd2 265deg,#fff 282deg,#ecff7a 298deg,transparent 330deg);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;animation:discord-light-orbit 5.5s linear infinite;pointer-events:none}
#contact .contact-featured .contact-node-inner:after{content:'';position:absolute;inset:-70% -100%;z-index:0;background:linear-gradient(90deg,transparent 42%,#ffffff08 46%,#ffffff85 50%,#ffffff08 54%,transparent 58%);transform:translateX(-65%) rotate(-25deg);animation:discord-light-sweep 6.5s ease-in-out infinite;pointer-events:none}
#contact .contact-featured:hover .contact-node-inner,#contact .contact-featured:focus-visible .contact-node-inner{animation-duration:2.8s}
@keyframes discord-light-orbit{to{transform:rotate(360deg)}}
@keyframes discord-light-sweep{0%,12%{transform:translateX(-65%) rotate(-25deg);opacity:0}20%{opacity:1}48%{transform:translateX(65%) rotate(-25deg);opacity:1}58%,100%{transform:translateX(65%) rotate(-25deg);opacity:0}}
@keyframes discord-light-breathe{0%,100%{box-shadow:0 0 22px #dfff0022,0 0 55px #dfff0010}50%{box-shadow:0 0 30px #dfff0045,0 0 75px #dfff0020}}
@media(prefers-reduced-motion:reduce){.portrait-outline:before,.portrait-outline:after,#contact .contact-featured .contact-node-inner,#contact .contact-featured .contact-node-inner:before,#contact .contact-featured .contact-node-inner:after{animation:none}.portrait-outline:before,.portrait-outline:after{--portrait-light-angle:35deg}#contact .contact-featured .contact-node-inner:after{opacity:0}}

/* Unify the masonry preview's uneven edge with actions above the fade. */
#gallery .gallery-actions{position:relative;z-index:3;display:flex;flex-direction:column;align-items:center;gap:12px;padding:28px 16px 18px;isolation:isolate;pointer-events:none}
#gallery .gallery-actions.has-fade{--gallery-fade-height:clamp(310px,30vw,480px);margin-top:calc(-1 * var(--gallery-fade-height));padding-top:calc(var(--gallery-fade-height) - 115px);background:linear-gradient(180deg,#0c0e1200 0%,#0c0e1240 20%,#0c0e12e8 52%,#0c0e12 75%)}
#gallery .gallery-actions .more-works{position:relative;z-index:1;margin:0;min-height:50px;pointer-events:auto;box-shadow:0 8px 32px #0005}
#gallery .gallery-actions .gallery-archive-link{position:relative;z-index:1;margin:0;pointer-events:none}
#gallery .gallery-actions .gallery-archive-link a{pointer-events:auto;min-height:44px;display:inline-flex;align-items:center;color:#b6c4e1}
@media(max-width:650px){#gallery .gallery-actions{gap:8px;padding-inline:8px}#gallery .gallery-actions.has-fade{--gallery-fade-height:250px;padding-top:calc(var(--gallery-fade-height) - 100px)}#gallery .gallery-actions .more-works{min-height:48px}}
/* Portfolio spotlights: frame the work without covering the artwork. */
@property --work-light-angle{syntax:'<angle>';inherits:true;initial-value:0deg}
#gallery .work-card{--work-light:#b6caff;isolation:isolate;animation:work-edge-orbit 9s linear infinite}
#gallery .work-card:nth-child(3n+2){--work-light:#b2a0ff;animation-delay:-3s}
#gallery .work-card:nth-child(3n){--work-light:#77dbe6;animation-delay:-6s}
#gallery .work-card:before{content:'';position:absolute;inset:0;z-index:3;border-radius:inherit;padding:1.5px;background:conic-gradient(from var(--work-light-angle),transparent 0deg 225deg,color-mix(in srgb,var(--work-light) 25%,transparent) 260deg,var(--work-light) 290deg,#fff 300deg,var(--work-light) 309deg,transparent 340deg);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;pointer-events:none;opacity:.8;transition:opacity .25s}
#gallery .work-card:hover,#gallery .work-card:focus-visible{border-color:#b6caff80;box-shadow:0 12px 35px #0005,0 0 22px #9cabff20}
#gallery .work-card:hover:before,#gallery .work-card:focus-visible:before{opacity:1;padding:2px}
#gallery .work-info{position:relative;background:linear-gradient(120deg,#192234,#141925 75%)}
#gallery .work-info:before{content:'';position:absolute;top:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent 20%,var(--work-light) 48%,#fff 50%,var(--work-light) 52%,transparent 80%);background-size:250% 100%;opacity:.5;animation:work-caption-light 6s ease-in-out infinite;pointer-events:none}
#gallery .work-card:nth-child(3n+2) .work-info:before{animation-delay:-2s}
#gallery .work-card:nth-child(3n) .work-info:before{animation-delay:-4s}
#gallery .gallery-actions{gap:14px}
#gallery .gallery-actions.has-fade{padding-top:calc(var(--gallery-fade-height) - 145px)}
#gallery .gallery-actions #more-works,#gallery .gallery-actions .gallery-archive-link a{position:relative;isolation:isolate;overflow:hidden;justify-content:center;gap:18px;min-width:280px;padding:15px 30px;border-radius:12px;font-size:14px;font-weight:700;letter-spacing:0;transition:box-shadow .25s,transform .25s,background .25s;animation:gallery-action-orbit 5s linear infinite}
#gallery .gallery-actions #more-works{--action-glow:#e1ff00;min-height:58px;color:#182005;background:linear-gradient(120deg,#e5ff39,#cde900);border:1px solid #f1ff97;box-shadow:0 6px 30px #dfff0028,0 0 0 5px #dfff0008;animation:gallery-action-orbit 5s linear infinite,gallery-action-breathe 3.5s ease-in-out infinite}
#gallery .gallery-actions .gallery-archive-link a{--action-glow:#8ce9ff;min-height:52px;background:linear-gradient(120deg,#142d40,#172236);border:1px solid #75cce84a;color:#def7ff;box-shadow:0 6px 25px #0004;animation-delay:-2.5s}
#gallery .gallery-actions #more-works:before,#gallery .gallery-actions .gallery-archive-link a:before{content:'';position:absolute;inset:0;border-radius:inherit;padding:1.5px;background:conic-gradient(from var(--work-light-angle),transparent 0deg 190deg,var(--action-glow) 260deg,#fff 285deg,var(--action-glow) 310deg,transparent 345deg);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;pointer-events:none}
#gallery .gallery-actions #more-works:after,#gallery .gallery-actions .gallery-archive-link a:after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(110deg,transparent 35%,#ffffff40 50%,transparent 65%);transform:translateX(-130%);animation:gallery-action-sheen 5s ease-in-out infinite;pointer-events:none}
#gallery .gallery-actions .gallery-archive-link a:after{animation-delay:1.3s}
#gallery .gallery-actions #more-works:hover,#gallery .gallery-actions #more-works:focus-visible,#gallery .gallery-actions .gallery-archive-link a:hover,#gallery .gallery-actions .gallery-archive-link a:focus-visible{transform:translateY(-3px);box-shadow:0 8px 32px color-mix(in srgb,var(--action-glow) 26%,transparent)}
#gallery .gallery-actions #more-works:active,#gallery .gallery-actions .gallery-archive-link a:active{transform:translateY(0) scale(.98)}
@keyframes work-edge-orbit{to{--work-light-angle:360deg}}
@keyframes gallery-action-orbit{to{--work-light-angle:360deg}}
@keyframes work-caption-light{0%,100%{background-position:150% 0;opacity:.25}50%{background-position:-50% 0;opacity:.75}}
@keyframes gallery-action-sheen{0%,18%{transform:translateX(-130%)}45%,100%{transform:translateX(130%)}}
@keyframes gallery-action-breathe{0%,100%{box-shadow:0 6px 26px #dfff0020,0 0 0 4px #dfff0008}50%{box-shadow:0 6px 38px #dfff0040,0 0 0 7px #dfff0005}}
@media(max-width:650px){#gallery .gallery-actions.has-fade{padding-top:calc(var(--gallery-fade-height) - 130px)}#gallery .gallery-actions #more-works,#gallery .gallery-actions .gallery-archive-link a{min-width:0;width:260px;max-width:100%;font-size:12px;padding:13px 22px}#gallery .gallery-actions .gallery-archive-link{max-width:100%}#gallery .gallery-actions #more-works{min-height:54px}#gallery .gallery-actions .gallery-archive-link a{min-height:48px}}
@media(prefers-reduced-motion:reduce){#gallery .work-card,#gallery .work-info:before,#gallery .gallery-actions #more-works,#gallery .gallery-actions .gallery-archive-link a,#gallery .gallery-actions #more-works:after,#gallery .gallery-actions .gallery-archive-link a:after{animation:none;--work-light-angle:35deg}#gallery .gallery-actions #more-works:after,#gallery .gallery-actions .gallery-archive-link a:after{display:none}#gallery .gallery-actions #more-works,#gallery .gallery-actions .gallery-archive-link a{transition:none}}

/* A compact overlay: masonry supplies a uniform preview edge. */
#gallery .gallery-actions.has-fade{--gallery-fade-height:200px;padding-top:130px;background:linear-gradient(180deg,#0c0e1200 0%,#0c0e1280 30%,#0c0e12f2 65%,#0c0e12 82%)}
@media(max-width:650px){#gallery .gallery-actions.has-fade{--gallery-fade-height:170px;padding-top:105px}}
