.story-visual[data-galaxy]{background:radial-gradient(ellipse at 50% 50%,#182235 0%,#101515 67%);isolation:isolate}
[data-galaxy] canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}
.galaxy-poster{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;transition:opacity .45s}
.galaxy-poster:before,.galaxy-poster:after{content:'';position:absolute;width:75%;height:48%;border:1px solid #7189ad40;border-radius:50%;transform:rotate(-19deg)}
.galaxy-poster:after{width:94%;height:64%;transform:rotate(17deg)}
.galaxy-poster strong{font-family:Space,Arial,sans-serif;font-size:clamp(80px,12vw,170px);font-weight:650;letter-spacing:.02em;direction:ltr;color:#e8eff9;position:relative;z-index:1}
.galaxy-poster i{position:absolute;width:2px;height:2px;background:#b9d4f5;border-radius:50%;box-shadow:0 0 6px #b9d4f580}
.galaxy-ready .galaxy-poster{opacity:0}
[data-galaxy] .story-axis,[data-galaxy] .story-visual-note{z-index:2;position:absolute}
html[data-reduced=true] .galaxy-poster{transition:none}
@media(max-width:780px){.galaxy-poster strong{font-size:100px}}

/* One persistent scene, behind the home page. Content remains a separate layer. */
body[data-page=home]{position:relative;isolation:isolate;background:#080d17;overflow-x:clip}
.galaxy-backdrop{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;background:radial-gradient(ellipse at 68% 36%,#203b614d,transparent 58%),radial-gradient(ellipse at 15% 82%,#1b3e4138,transparent 54%),#080d17;--galaxy-progress:0;--galaxy-reveal:.12;--galaxy-turn:-7deg;--galaxy-shift:0px}
.galaxy-backdrop:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#080d1740,transparent 45%,#080d1740);z-index:2}
.galaxy-backdrop canvas{opacity:.58}
.galaxy-backdrop .galaxy-poster{transform:translateY(var(--galaxy-shift));opacity:1}
.galaxy-backdrop .galaxy-poster strong{font-size:clamp(180px,37vw,560px);font-weight:700;letter-spacing:-.06em;opacity:var(--galaxy-reveal);transform:perspective(1100px) rotateY(var(--galaxy-turn));background:radial-gradient(circle,#dbeaff 1px,transparent 1.9px);background-size:5px 5px;background-clip:text;-webkit-background-clip:text;color:transparent;filter:drop-shadow(0 0 24px #89baff24)}
.galaxy-backdrop .galaxy-poster:before{width:min(1100px,110vw);height:57%;border-color:#9dbde12b;transform:rotate(calc(-24deg + var(--galaxy-turn)))}
.galaxy-backdrop .galaxy-poster:after{width:min(1400px,135vw);height:72%;border-color:#6d9ac51c;transform:rotate(calc(19deg - var(--galaxy-turn)))}
.galaxy-backdrop .galaxy-poster i{opacity:.5;transform:translateY(calc(var(--galaxy-shift) * var(--depth)));width:calc(1px + var(--depth) * .4px);height:calc(1px + var(--depth) * .4px)}
.galaxy-backdrop.galaxy-ready .galaxy-poster strong{opacity:0}
.galaxy-horizon{position:absolute;inset:52% -50% -60%;background-image:linear-gradient(#8fb4da16 1px,transparent 1px),linear-gradient(90deg,#8fb4da16 1px,transparent 1px);background-size:90px 90px;transform:perspective(600px) rotateX(63deg) translateY(var(--galaxy-shift));mask-image:linear-gradient(transparent,#000 40%,transparent 90%)}
body[data-page=home]>main,body[data-page=home]>.footer{position:relative;z-index:1}
body[data-page=home] .hero,body[data-page=home] .about,body[data-page=home] .industrial,body[data-page=home] .expertise{background:transparent}
body[data-page=home] .story{background:#0d182c70}
body[data-page=home] .experience{background:#111f2ba3}
body[data-page=home] .work-index{background:#111b2bbd}
body[data-page=home] .site-header{background:#0b111dd9}
body[data-page=home] .hero-grid{display:none}
body[data-page=home] .hero{display:flex;flex-direction:column;min-height:calc(100svh - 92px);padding-top:30px}
body[data-page=home] .hero-composition{display:flex;align-items:center;justify-content:center;flex:1;min-height:390px;margin-top:0}
body[data-page=home] .hero-identity{width:100%;padding-top:0;text-align:center}
body[data-page=home] .hero h1{font-size:clamp(44px,7.2vw,110px);font-weight:600;line-height:1.2;letter-spacing:-.045em;white-space:nowrap;text-align:center;color:#f2f4f8;max-width:100%;margin:0}
html[dir=rtl] body[data-page=home] .hero h1{font-family:Estedad,Arial,sans-serif;font-size:clamp(45px,7vw,104px);font-weight:750;letter-spacing:0;line-height:1.55;text-align:center}
body[data-page=home] .name-signature{justify-content:center;text-align:center;margin-top:22px;color:#acbed1}
html[dir] body[data-page=home] .name-signature{justify-content:center;width:auto;max-width:100%;margin-inline:auto}
html[dir] body[data-page=home] .hero-description{display:block}
html[dir] body[data-page=home] .hero-description>.mono{display:block;margin-top:12px}
body[data-page=home] .hero-bottom{margin-top:0;padding-bottom:36px}
body[data-page=home] .story-visual{background:radial-gradient(ellipse at center,#1b2c4250,#0c1523b0);border:1px solid #789dc52e}
@media(max-width:780px){
 body[data-page=home] .hero{min-height:calc(100svh - 76px);padding-top:25px}
 body[data-page=home] .hero-composition{min-height:245px}
 body[data-page=home] .hero h1{font-size:clamp(22px,7.4vw,58px);letter-spacing:-.045em}
 html[dir=rtl] body[data-page=home] .hero h1{font-size:clamp(35px,10vw,68px)}
 body[data-page=home] .hero-bottom{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding-bottom:24px}
 body[data-page=home] .hero .pill-link{margin-top:12px}
 body[data-page=home] .hero-baseline>span:last-child{display:none}
 .galaxy-backdrop .galaxy-poster strong{font-size:clamp(150px,50vw,350px);background-size:4px 4px}
 .galaxy-backdrop canvas{opacity:.48}
 .galaxy-horizon{background-size:70px 70px}
}
@media(prefers-reduced-motion:reduce){.galaxy-backdrop .galaxy-poster,.galaxy-backdrop .galaxy-poster strong{transform:none}}
@media print{.galaxy-backdrop{display:none}body[data-page=home] .hero h1{font-size:36px!important;color:#111}}

/* Continuous dark chapters: the scene is visible between the actual work. */
html:has(body[data-page]){color-scheme:dark;--ink:#f0f4fa;--muted:#a9b6c9;--line:#324156;--paper:#0b1321}
body[data-page]{background:#060a13;color:#f0f4fa}
body[data-page] .work,body[data-page] .contact{background:#07101b38;color:#f0f4fa;--muted:#b0bdd0;--line:#33435b;color-scheme:dark}
body[data-page] .work .heading-pair>p,body[data-page] .project-info p,body[data-page] .project-info .project-output,body[data-page] .contact-bottom>p{color:#bdc9da}
body[data-page] .project-info h4,body[data-page] .contact-head h2,body[data-page] .contact-mail{color:#f0f4fa}
body[data-page] .project-index{color:#a6b9d3}
body[data-page] .project-tools span{background:#162337;color:#dce7f7;border:1px solid #33455e}
body[data-page] .project-meta{color:#a6b9d3}
body[data-page] .project-info>.text-link,body[data-page] .contact-links a,body[data-page] .contact-links button{color:#e3ecf9;border-color:#778da9}
body[data-page] .contact-mail{border-color:#3a4c65}
body[data-page] .contact-top .availability{background:#152336;color:#c6d4e8;border-color:#3b516a}
body[data-page] .contact .availability i{background:#b4ce85}
body[data-page] .contact:before,body[data-page] .contact:after{border-color:#7195bd;opacity:.22}
body[data-page] .contact-arrow{background:#dfff00;color:#111715;border-color:#dfff00}
body[data-page] .work :focus-visible,body[data-page] .contact :focus-visible{outline-color:#dfff00}
body[data-page=home] .experience,body[data-page=home] .story{background:#0a14233d}
body[data-page=home] .work-index{background:#0b172a80}
body[data-page] .footer{background:#080e18}
body[data-page=case]{background:radial-gradient(ellipse at 80% 0%,#18284270,transparent 45%),#080e18}
.galaxy-backdrop{background:radial-gradient(ellipse at 68% 36%,hsl(var(--galaxy-hue,215) 52% 26% / .33),transparent 60%),radial-gradient(ellipse at 15% 82%,#14373c50,transparent 56%),#060a13}
.galaxy-backdrop canvas{opacity:.82}
.galaxy-backdrop .galaxy-horizon{transform:perspective(650px) rotateX(62deg) rotateZ(calc(var(--galaxy-turn) * .15)) translateY(var(--galaxy-shift));opacity:.75}
.galaxy-backdrop .galaxy-poster{transform:translateY(var(--galaxy-shift)) scale(var(--galaxy-zoom,.9))}
@media(max-width:780px){.galaxy-backdrop canvas{opacity:.72}body[data-page] .contact-head h2{color:#f0f4fa}}
@media print{body[data-page],body[data-page] .work,body[data-page] .contact{background:white;color:black}}

/* 1.4.1 — navigation as a smoked glass instrument panel. */
body[data-page] .menu-toggle{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;width:46px;height:46px;padding:10px;border:1px solid #bfd6f02b;border-radius:14px;background:#14203370;transition:background .2s,border-color .2s}
body[data-page] .menu-toggle span{width:20px;height:1px;margin:0;background:#e5effb;transition:transform .2s}
body[data-page] .menu-toggle span:nth-child(2){width:14px;align-self:center}
body[data-page] .menu-toggle:hover{background:#25395090;border-color:#bed8f064}
body[data-page] .menu-toggle:focus-visible{outline:2px solid #bcdafa;outline-offset:4px}
body[data-page] .mobile-menu{inset:18px 18px auto auto;margin:0;width:min(520px,calc(100vw - 36px));height:auto;max-height:calc(100dvh - 36px);overflow-y:auto;padding:28px 32px 24px;border:1px solid #c8e2ff30;border-radius:24px;outline:none;background:linear-gradient(135deg,#182638e8,#0b1423e8);color:#eef4fc;box-shadow:0 24px 100px #0009,inset 0 1px 0 #ffffff12;backdrop-filter:blur(28px) saturate(125%);-webkit-backdrop-filter:blur(28px) saturate(125%)}
body[data-page] .mobile-menu::backdrop{background:#030815a6;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
body[data-page] .mobile-menu[open]{animation:menu-arrive .24s cubic-bezier(.2,.8,.2,1)}
body[data-page] .mobile-menu .brand{font-size:23px;color:#e7f1ff}
body[data-page] .mobile-menu .brand svg{color:#b7d7fb;width:28px;height:28px}
body[data-page] .menu-head{padding-bottom:22px;border-bottom:1px solid #c4ddff20}
body[data-page] .menu-close{display:grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid #c4ddff30;background:#b8d5ff08;color:#eaf2fc;font:300 30px/1 Space,Arial,sans-serif;transition:background .2s,transform .2s}
body[data-page] .menu-close:hover{background:#b8d5ff18;transform:rotate(90deg)}
body[data-page] .menu-intro{padding-top:24px}
body[data-page] .menu-intro .mono{font-size:9px;letter-spacing:.13em;color:#a1b9d7}
body[data-page] .menu-intro p{margin-top:8px;font-size:14px;color:#c2cfdf;line-height:1.8}
body[data-page] .mobile-menu nav{margin:24px 0 28px}
body[data-page] .mobile-menu nav a{display:grid;grid-template-columns:28px 1fr 24px;gap:14px;align-items:center;font-size:clamp(23px,3.4vw,34px);line-height:1.6;padding:17px 6px;border-bottom:1px solid #c4ddff20;border-radius:8px 8px 0 0;transition:background .2s,color .2s}
body[data-page] .mobile-menu nav small{margin:0;font:10px var(--mono);color:#91a9c7;direction:ltr}
body[data-page] .mobile-menu nav svg{width:21px;height:21px;color:#afc9e9;transition:transform .2s}
body[data-page] .mobile-menu nav a:hover{background:#c0dcff0b;color:#fff}
body[data-page] .mobile-menu nav a:hover svg{transform:translate(2px,-2px)}
body[data-page] .menu-foot{display:flex;justify-content:space-between;gap:20px;align-items:center}
body[data-page] .menu-resume,body[data-page] .menu-language{font-size:12px;color:#c4d8f0;min-height:44px;display:flex;align-items:center}
body[data-page] .mobile-menu :focus-visible{outline:2px solid #bcdafa;outline-offset:3px}
@keyframes menu-arrive{from{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:780px){body[data-page] .nav-end{gap:14px}body[data-page] .mobile-menu{inset:12px 12px auto auto;width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:22px;border-radius:22px}body[data-page] .mobile-menu nav a{font-size:27px;padding-block:16px}body[data-page] .menu-intro{padding-top:18px}body[data-page] .mobile-menu nav{margin-top:20px}}
@media(prefers-reduced-motion:reduce){body[data-page] .mobile-menu[open]{animation:none}}
html[data-reduced=true] body[data-page] .mobile-menu[open]{animation:none}
@media print{body[data-page] .mobile-menu,body[data-page] .menu-toggle{display:none!important}}
