2026-10-14 12:37:48 +05:30
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > Cosmos — Private Infrastructure</ title >
< meta name = "description" content = "Self-hosted infrastructure that answers to you alone. Private code, infinite storage, zero compromises." >
< link rel = "icon" href = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="6" fill="%23eef3f8"/><ellipse cx="16" cy="16" rx="14" ry="5.5" fill="none" stroke="%238fd9ff" stroke-width="1.5" transform="rotate(-24 16 16)"/></svg>' >
< link rel = "preconnect" href = "https://fonts.googleapis.com" >
< link rel = "preconnect" href = "https://fonts.gstatic.com" crossorigin >
< link href = "https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@1&family=JetBrains+Mono:wght@300;400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel = "stylesheet" >
< style >
/* ─────────────────────────────── FOUNDATION ─────────────────────────────── */
: root {
--bg : #020308 ;
--ink : #eef3f8 ;
--dim : rgba ( 226 , 234 , 242 , .55 );
--faint : rgba ( 226 , 234 , 242 , .3 );
--line : rgba ( 226 , 234 , 242 , .08 );
--ok : #43e5a0 ;
--mono : 'JetBrains Mono' , ui-monospace , monospace ;
--disp : 'Space Grotesk' , sans-serif ;
--serif : 'Instrument Serif' , serif ;
--pad : clamp ( 24 px , 5 vw , 84 px );
--ez : cubic-bezier ( .16 , 1 , .3 , 1 );
}
*,* :: before ,* :: after { box-sizing : border-box ; margin : 0 ; padding : 0 }
html { scroll-behavior : smooth }
body {
font-family : var ( -- disp );
background : var ( -- bg ); color : var ( -- ink );
overflow-x : hidden ; -webkit- font-smoothing : antialiased ;
animation : bootIn 1.1 s ease both ;
}
@ keyframes bootIn { from { opacity : 0 } to { opacity : 1 }}
:: selection { background : rgba ( 255 , 171 , 77 , .28 )}
:: -webkit-scrollbar { width : 10 px }
:: -webkit-scrollbar-track { background : var ( -- bg )}
:: -webkit-scrollbar-thumb { background : #141b28 ; border : 3 px solid var ( -- bg ); border-radius : 6 px }
a : focus-visible , button : focus-visible { outline : 1 px solid rgba ( 238 , 243 , 248 , .55 ); outline-offset : 4 px ; border-radius : 4 px }
/* ─── DEPTH LAYERS ─── */
# sky { position : fixed ; inset : 0 ; z-index : 0 ; pointer-events : none }
. grain {
position : fixed ; inset : -8 % ; z-index : 2 ; pointer-events : none ; opacity : .05 ;
background-image : url ( "data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E" );
background-size : 180 px 180 px ;
animation : grain .9 s steps ( 3 ) infinite ;
}
@ keyframes grain { 0 %, 100 % { transform : translate ( 0 , 0 )} 33 % { transform : translate ( -1.4 % , 1 % )} 66 % { transform : translate ( 1 % , -1.4 % )}}
. vig { position : fixed ; inset : 0 ; z-index : 2 ; pointer-events : none ;
background : radial-gradient ( ellipse at 50 % 42 % , transparent 55 % , rgba ( 1 , 2 , 8 , .55 ) 100 % )}
/* ─── CUSTOM CURSOR ─── */
. cur { position : fixed ; top : 0 ; left : 0 ; z-index : 300 ; pointer-events : none ; opacity : 0 ; transition : opacity .3 s }
body . cur-vis . cur { opacity : 1 }
# curDot { width : 4 px ; height : 4 px ; margin : -2 px 0 0 -2 px ; border-radius : 50 % ; background : var ( -- ink )}
# curRing { width : 34 px ; height : 34 px ; margin : -17 px 0 0 -17 px ; border-radius : 50 % ;
border : 1 px solid rgba ( 238 , 243 , 248 , .4 ); display : flex ; align-items : center ; justify-content : center ;
transition : width .3 s var ( -- ez ), height .3 s var ( -- ez ), margin .3 s var ( -- ez ), border-color .3 s , background .3 s }
# curRing span { font-family : var ( -- mono ); font-size : 7.5 px ; letter-spacing : .28 em ; text-indent : .28 em ; color : var ( -- ink ); opacity : 0 ; transition : opacity .25 s }
# curRing . act { width : 52 px ; height : 52 px ; margin : -26 px 0 0 -26 px ; border-color : rgba ( 238 , 243 , 248 , .75 )}
# curRing . drag { width : 68 px ; height : 68 px ; margin : -34 px 0 0 -34 px ; border-color : rgba ( 143 , 216 , 255 , .85 ); background : rgba ( 143 , 216 , 255 , .05 )}
# curRing . drag span { opacity : .9 }
body . has-cur , body . has-cur a , body . has-cur button , body . has-cur canvas { cursor : none }
/* ─── NAV ─── */
nav {
position : fixed ; top : 0 ; left : 0 ; right : 0 ; z-index : 100 ; height : 68 px ;
display : flex ; align-items : center ; justify-content : space-between ;
padding : 0 var ( -- pad );
background : rgba ( 2 , 3 , 8 , .42 );
backdrop-filter : blur ( 18 px ) saturate ( 140 % ); -webkit- backdrop-filter : blur ( 18 px ) saturate ( 140 % );
border-bottom : 1 px solid rgba ( 226 , 234 , 242 , .05 );
transition : background .4 s , border-color .4 s ;
animation : navIn 1.1 s .05 s var ( -- ez ) both ;
}
@ keyframes navIn { from { opacity : 0 ; transform : translateY ( -10 px )} to { opacity : 1 ; transform : none }}
nav . scrolled { background : rgba ( 2 , 3 , 8 , .84 ); border-bottom-color : rgba ( 226 , 234 , 242 , .09 )}
. logo { display : flex ; align-items : center ; gap : 11 px ; text-decoration : none ; color : var ( -- ink ); font-size : 16.5 px ; font-weight : 600 ; letter-spacing : -.02 em }
. mark { width : 30 px ; height : 30 px ; flex : none ; animation : markSpin 16 s linear infinite }
@ keyframes markSpin { to { transform : rotate ( 360 deg )}}
. nav-links { display : flex ; gap : 38 px }
. nav-links a { position : relative ; text-decoration : none ; color : var ( -- dim ); font-size : 13.5 px ; font-weight : 500 ; letter-spacing : .01 em ; padding : 4 px 0 ; transition : color .25 s }
. nav-links a i { font-style : normal ; font-family : var ( -- mono ); font-size : 8.5 px ; color : rgba ( 226 , 234 , 242 , .3 ); margin-right : 7 px ; vertical-align : 2 px ; letter-spacing : .1 em }
. nav-links a :: after { content : '' ; position : absolute ; left : 0 ; bottom : -2 px ; height : 1 px ; width : 100 % ; background : var ( -- ink ); transform : scaleX ( 0 ); transform-origin : left ; transition : transform .45 s var ( -- ez )}
. nav-links a : hover { color : #fff }
. nav-links a : hover :: after { transform : scaleX ( 1 )}
. nav-right { display : flex ; align-items : center ; gap : 20 px }
. nav-status { display : flex ; align-items : center ; gap : 8 px ; font-family : var ( -- mono ); font-size : 9.5 px ; letter-spacing : .24 em ; color : rgba ( 110 , 225 , 175 , .75 )}
. nav-status i , . ft-status i , . live i { width : 5 px ; height : 5 px ; border-radius : 50 % ; background : var ( -- ok ); box-shadow : 0 0 8 px var ( -- ok ); animation : dotPulse 2.4 s ease infinite ; flex : none }
@ keyframes dotPulse { 0 %, 100 % { opacity : 1 } 50 % { opacity : .35 }}
. nav-btn { font-size : 13 px ; font-weight : 600 ; color : var ( -- ink ); text-decoration : none ; padding : 9 px 20 px ; border-radius : 9 px ;
border : 1 px solid rgba ( 226 , 234 , 242 , .14 ); background : rgba ( 226 , 234 , 242 , .03 )}
. nav-btn : hover { background : rgba ( 226 , 234 , 242 , .09 ); border-color : rgba ( 226 , 234 , 242 , .32 )}
/* magnetic elements */
. mag { will-change : transform ; transition : transform .45 s var ( -- ez ), background .3 s , border-color .3 s , color .3 s , box-shadow .4 s }
/* burger + mobile menu */
. burger { display : none ; width : 42 px ; height : 42 px ; flex-direction : column ; justify-content : center ; align-items : center ; gap : 6 px ; background : none ; border : 0 ; padding : 0 }
. burger span { display : block ; width : 20 px ; height : 1.5 px ; background : var ( -- ink ); transition : transform .35 s var ( -- ez )}
body . m-open . burger span : first-child { transform : translateY ( 3.75 px ) rotate ( 45 deg )}
body . m-open . burger span : last-child { transform : translateY ( -3.75 px ) rotate ( -45 deg )}
. mmenu { position : fixed ; inset : 0 ; z-index : 90 ; background : rgba ( 2 , 3 , 8 , .9 );
backdrop-filter : blur ( 22 px ); -webkit- backdrop-filter : blur ( 22 px );
display : flex ; flex-direction : column ; justify-content : center ; gap : 6 px ;
padding : 0 clamp ( 28 px , 8 vw , 60 px );
opacity : 0 ; visibility : hidden ; transition : opacity .4 s var ( -- ez ), visibility .4 s }
body . m-open . mmenu { opacity : 1 ; visibility : visible }
. mmenu a { display : flex ; align-items : baseline ; gap : 16 px ; text-decoration : none ; color : var ( -- ink );
font-size : clamp ( 36 px , 9 vw , 52 px ); font-weight : 600 ; letter-spacing : -.03 em ; padding : 14 px 0 ;
border-bottom : 1 px solid var ( -- line ); transform : translateY ( 26 px ); opacity : 0 ;
transition : transform .6 s var ( -- ez ), opacity .6 s }
. mmenu a i { font-style : normal ; font-family : var ( -- mono ); font-size : 11 px ; color : rgba ( 226 , 234 , 242 , .3 ); letter-spacing : .2 em }
body . m-open . mmenu a { transform : none ; opacity : 1 }
body . m-open . mmenu a : nth-child ( 1 ) { transition-delay : .08 s }
body . m-open . mmenu a : nth-child ( 2 ) { transition-delay : .16 s }
body . m-open . mmenu a : nth-child ( 3 ) { transition-delay : .24 s }
/* ─── HERO ─── */
. hero { position : relative ; z-index : 10 ; min-height : 100 vh ; min-height : 100 svh ;
display : flex ; align-items : center ; justify-content : center ; text-align : center ;
padding : 120 px var ( -- pad ) 110 px }
. hero-inner { display : flex ; flex-direction : column ; align-items : center }
. hud { position : absolute ; z-index : 5 ; font-family : var ( -- mono ); font-size : 9.5 px ; letter-spacing : .16 em ;
color : rgba ( 226 , 234 , 242 , .32 ); text-transform : uppercase ; line-height : 2.1 ; pointer-events : none }
. hud-bl { left : var ( -- pad ); bottom : 30 px ; display : flex ; flex-direction : column ; text-align : left }
. hud-br { right : var ( -- pad ); bottom : 30 px ; display : flex ; align-items : center ; gap : 10 px }
. hud-br em { font-style : normal ; color : rgba ( 226 , 234 , 242 , .16 )}
. hud-r { right : calc ( var ( -- pad ) / 2.6 ); top : 50 % ; transform : translateY ( -50 % );
writing-mode : vertical - rl ; letter-spacing : .36 em ; font-size : 8.5 px ; color : rgba ( 226 , 234 , 242 , .16 )}
. hero-tag { display : inline-flex ; align-items : center ; gap : 9 px ; padding : 7 px 16 px ; border-radius : 99 px ;
border : 1 px solid rgba ( 143 , 216 , 255 , .18 ); background : rgba ( 143 , 216 , 255 , .04 );
font-family : var ( -- mono ); font-size : 9.5 px ; letter-spacing : .2 em ; color : rgba ( 170 , 220 , 250 , .82 );
margin-bottom : 44 px ; animation : softUp .9 s .12 s var ( -- ez ) both }
. tag-dot { width : 5 px ; height : 5 px ; border-radius : 50 % ; background : #8fd9ff ; box-shadow : 0 0 10 px #8fd9ff ; animation : dotPulse 2.6 s ease infinite }
. hero-title { font-size : clamp ( 56 px , 10.8 vw , 158 px ); font-weight : 600 ; letter-spacing : -.045 em ; line-height : .97 ;
margin-bottom : 34 px ; text-shadow : 0 0 90 px rgba ( 230 , 240 , 255 , .06 )}
. hero-title em { font-family : var ( -- serif ); font-style : italic ; font-weight : 400 ; font-size : 1.04 em ; letter-spacing : -.015 em }
. msk { display : block ; overflow : hidden ; will-change : transform }
. msk-in { display : inline-block ; will-change : transform }
. hero . msk-in { animation : mskUp 1.15 s var ( -- ez ) both }
. hero . d1 { animation-delay : .28 s }. hero . d2 { animation-delay : .42 s }. hero . d3 { animation-delay : .56 s }
@ keyframes mskUp { from { transform : translateY ( 118 % )} to { transform : none }}
@ keyframes softUp { from { opacity : 0 ; transform : translateY ( 26 px ); filter : blur ( 6 px )} to { opacity : 1 ; transform : none ; filter : blur ( 0 )}}
. hero-sub { max-width : 470 px ; font-size : clamp ( 15 px , 1.7 vw , 17 px ); line-height : 1.8 ; color : var ( -- dim ); margin-bottom : 50 px ; animation : softUp .9 s .68 s var ( -- ez ) both }
. hero-actions { display : flex ; gap : 13 px ; flex-wrap : wrap ; justify-content : center ; animation : softUp .9 s .82 s var ( -- ez ) both }
. btn { display : inline-flex ; align-items : center ; gap : 10 px ; padding : 14 px 28 px ; border-radius : 11 px ;
font-size : 14.5 px ; font-weight : 600 ; letter-spacing : -.01 em ; text-decoration : none }
. btn svg { transition : transform .3 s var ( -- ez )}
. btn-p { background : #fff ; color : #04060d ; box-shadow : 0 8 px 40 px rgba ( 255 , 255 , 255 , .08 )}
. btn-p : hover { box-shadow : 0 14 px 60 px rgba ( 255 , 255 , 255 , .17 )}
. btn-p : hover svg { transform : translateY ( 2 px )}
. btn-g { border : 1 px solid rgba ( 226 , 234 , 242 , .16 ); color : var ( -- dim ); background : rgba ( 226 , 234 , 242 , .02 )}
. btn-g : hover { color : #fff ; border-color : rgba ( 226 , 234 , 242 , .36 )}
. scroll-cue { position : absolute ; bottom : 26 px ; left : 50 % ; transform : translateX ( -50 % );
display : flex ; flex-direction : column ; align-items : center ; gap : 12 px ; animation : softUp 1 s 1.4 s var ( -- ez ) both }
. scroll-cue > span : first-child { font-family : var ( -- mono ); font-size : 8.5 px ; letter-spacing : .34 em ; color : rgba ( 226 , 234 , 242 , .28 )}
. track { width : 1 px ; height : 54 px ; background : rgba ( 226 , 234 , 242 , .08 ); position : relative ; overflow : hidden ; display : block }
. track i { position : absolute ; left : 0 ; top : -40 % ; width : 100 % ; height : 40 % ; display : block ;
background : linear-gradient ( to bottom , transparent , rgba ( 143 , 216 , 255 , .85 ), transparent );
animation : cueFlow 2.2 s var ( -- ez ) infinite }
@ keyframes cueFlow { to { top : 130 % }}
/* ─── TICKER ─── */
. ticker { position : relative ; z-index : 10 ; overflow : hidden ; border-block : 1 px solid var ( -- line );
padding : 13 px 0 ; background : rgba ( 2 , 3 , 8 , .42 ); backdrop-filter : blur ( 6 px ); -webkit- backdrop-filter : blur ( 6 px )}
. tk { display : flex ; width : max-content ; animation : tick 46 s linear infinite ; will-change : transform }
. ticker : hover . tk { animation-play-state : paused }
. tk-half { display : flex ; align-items : center ; gap : 44 px ; padding-right : 44 px }
. tk-half span { font-family : var ( -- mono ); font-size : 10.5 px ; letter-spacing : .24 em ; white-space : nowrap ;
text-transform : uppercase ; color : rgba ( 226 , 234 , 242 , .36 )}
. tk-half . ts { color : rgba ( 226 , 234 , 242 , .14 )}
@ keyframes tick { to { transform : translateX ( -50 % )}}
/* ─── DIVIDERS ─── */
. divider { position : relative ; z-index : 10 ; height : 1 px ; background : rgba ( 226 , 234 , 242 , .06 ); margin : 0 var ( -- pad ); overflow : visible }
. divider :: after { content : '' ; position : absolute ; top : 0 ; height : 1 px ; width : 110 px ; left : -130 px ; opacity : .8 ;
background : linear-gradient ( 90 deg , transparent , rgba ( 143 , 216 , 255 , .8 ), transparent );
animation : packet 8.5 s linear infinite }
. divider . d-ember :: after { background : linear-gradient ( 90 deg , transparent , rgba ( 255 , 171 , 77 , .75 ), transparent )}
2026-10-14 16:48:17 +05:30
. divider . d-violet :: after { background : linear-gradient ( 90 deg , transparent , rgba ( 168 , 85 , 247 , .85 ), transparent )}
2026-10-14 12:37:48 +05:30
@ keyframes packet { to { left : calc ( 100 % + 130 px )}}
/* ─── MODULE SECTIONS ─── */
. module { position : relative ; z-index : 10 ; padding : clamp ( 90 px , 11 vw , 170 px ) var ( -- pad ); scroll-margin-top : 70 px }
. m-forge { --ac : 255 , 171 , 77 }
. m-oort { --ac : 143 , 216 , 255 }
2026-10-14 16:48:17 +05:30
. m-orbit { --ac : 168 , 85 , 247 }
2026-10-14 12:37:48 +05:30
. module-inner { max-width : 1260 px ; margin : 0 auto ; display : grid ; grid-template-columns : 1.02 fr 1 fr ;
gap : clamp ( 48 px , 7 vw , 110 px ); align-items : center }
. module-inner . flip . m-text { order : 2 }
. module-inner . flip . m-visual { order : 1 }
. m-index { display : inline-flex ; align-items : center ; gap : 12 px ; font-family : var ( -- mono ); font-size : 9.5 px ;
letter-spacing : .3 em ; text-transform : uppercase ; color : rgba ( var ( -- ac ), .7 ); margin-bottom : 22 px }
. m-index :: before { content : '' ; width : 26 px ; height : 1 px ; background : rgba ( var ( -- ac ), .55 )}
. m-name { font-size : clamp ( 58 px , 7.6 vw , 116 px ); font-weight : 600 ; letter-spacing : -.04 em ; line-height : .95 ; margin-bottom : 26 px }
. m-desc { font-size : clamp ( 15 px , 1.6 vw , 16.5 px ); line-height : 1.8 ; color : var ( -- dim ); max-width : 430 px ; margin-bottom : 38 px }
. caps { list-style : none ; border-top : 1 px solid var ( -- line ); margin-bottom : 42 px }
. cap { display : flex ; align-items : center ; gap : 14 px ; padding : 12 px 2 px ; border-bottom : 1 px solid var ( -- line );
font-size : 14 px ; color : rgba ( 226 , 234 , 242 , .58 ); transition : color .3 s }
. cap : hover { color : #fff }
. tick { width : 17 px ; height : 17 px ; flex : none ; border-radius : 5 px ; display : grid ; place-items : center ;
border : 1 px solid rgba ( var ( -- ac ), .32 ); background : rgba ( var ( -- ac ), .07 ); color : rgb ( var ( -- ac ));
transition : box-shadow .3 s , background .3 s }
. cap : hover . tick { background : rgba ( var ( -- ac ), .15 ); box-shadow : 0 0 14 px rgba ( var ( -- ac ), .3 )}
. m-cta { display : inline-flex ; align-items : center ; gap : 12 px ; padding : 15 px 28 px ; border-radius : 12 px ;
font-size : 14.5 px ; font-weight : 600 ; text-decoration : none ; color : rgb ( var ( -- ac ));
background : rgba ( var ( -- ac ), .07 ); border : 1 px solid rgba ( var ( -- ac ), .28 );
box-shadow : inset 0 1 px 0 rgba ( var ( -- ac ), .14 ), 0 0 36 px rgba ( var ( -- ac ), .05 )}
. m-cta : hover { background : rgba ( var ( -- ac ), .13 ); border-color : rgba ( var ( -- ac ), .62 );
box-shadow : inset 0 1 px 0 rgba ( var ( -- ac ), .22 ), 0 16 px 50 px rgba ( var ( -- ac ), .15 ), 0 0 90 px rgba ( var ( -- ac ), .06 )}
. m-cta svg { transition : transform .35 s cubic-bezier ( .2 , .9 , .35 , 1.3 )}
. m-cta : hover svg { transform : translate ( 3 px , -3 px )}
/* staggered cap reveal */
[ data-reveal ] . cap { opacity : 0 ; transform : translateX ( -12 px ); transition : opacity .7 s var ( -- ez ), transform .7 s var ( -- ez ), color .3 s }
[ data-reveal ] . in . cap { opacity : 1 ; transform : none }
[ data-reveal ] . in . cap : nth-child ( 1 ) { transition-delay : .12 s }
[ data-reveal ] . in . cap : nth-child ( 2 ) { transition-delay : .2 s }
[ data-reveal ] . in . cap : nth-child ( 3 ) { transition-delay : .28 s }
[ data-reveal ] . in . cap : nth-child ( 4 ) { transition-delay : .36 s }
/* ─── MODULE VISUALS ─── */
. m-visual { position : relative ; aspect-ratio : 1 / 1 ; width : 100 % ; max-width : 560 px ; margin-inline : auto }
. m-visual canvas { position : absolute ; inset : 0 ; width : 100 % ; height : 100 % ; display : block ; z-index : 1 }
. m-ghost { position : absolute ; top : 50 % ; left : 50 % ; transform : translate ( -50 % , -53 % ); z-index : 0 ;
font-family : var ( -- disp ); font-weight : 700 ; font-size : clamp ( 130 px , 15 vw , 230 px ); line-height : 1 ;
color : rgba ( var ( -- ac ), .07 ); pointer-events : none ; user-select : none }
@ supports ( -webkit-text-stroke : 1px red ) {
. m-ghost { color : transparent ; -webkit- text-stroke : 1.3 px rgba ( var ( -- ac ), .16 )}
}
2026-10-14 16:48:17 +05:30
. m-oort canvas , . m-orbit canvas { touch-action : pan-y }
body : not ( . has-cur ) . m-oort canvas , body : not ( . has-cur ) . m-orbit canvas { cursor : grab }
body : not ( . has-cur ) . grabbing . m-oort canvas , body : not ( . has-cur ) . grabbing . m-orbit canvas { cursor : grabbing }
2026-10-14 12:37:48 +05:30
/* glass panels */
. glass { position : absolute ; z-index : 5 ; background : rgba ( 5 , 9 , 18 , .72 );
border : 1 px solid rgba ( 226 , 234 , 242 , .09 ); border-radius : 13 px ;
backdrop-filter : blur ( 16 px ); -webkit- backdrop-filter : blur ( 16 px );
box-shadow : 0 26 px 70 px rgba ( 0 , 0 , 4 , .55 )}
. term { left : max ( -3.5 % , -26 px ); bottom : 5 % ; padding : 15 px 18 px 17 px ; min-width : 296 px ; overflow : hidden }
. term-head { display : flex ; justify-content : space-between ; align-items : center ; margin-bottom : 10 px ;
font-family : var ( -- mono ); font-size : 8.5 px ; letter-spacing : .22 em ; text-transform : uppercase ; color : rgba ( 226 , 234 , 242 , .32 )}
. term-head . th-r { color : rgba ( 255 , 171 , 77 , .55 )}
. term pre { font-family : var ( -- mono ); font-size : 11.5 px ; line-height : 2 ; color : rgba ( 226 , 234 , 242 , .5 );
white-space : pre-wrap ; min-height : 92 px ; margin : 0 }
. term pre :: after { content : '▊' ; color : rgba ( 255 , 171 , 77 , .9 ); animation : blink 1.06 s steps ( 1 ) infinite }
@ keyframes blink { 50 % { opacity : 0 }}
. t-tp { color : #ffab4d }. t-tw { color : #eef3f8 }. t-tc { color : rgba ( 196 , 210 , 224 , .52 )}
. t-ta { color : #8fd9ff }. t-to { color : #7ee2a8 }
. term :: after { content : '' ; position : absolute ; left : 0 ; right : 0 ; height : 1 px ; pointer-events : none ;
background : rgba ( 255 , 171 , 77 , .22 ); animation : sweep 5.5 s linear infinite }
@ keyframes sweep { 0 % { top : 0 ; opacity : 0 } 8 % { opacity : 1 } 88 % { opacity : 1 } 100 % { top : 100 % ; opacity : 0 }}
. stat { right : max ( -3.5 % , -26 px ); top : 4 % ; padding : 16 px 18 px 14 px ; min-width : 214 px }
2026-10-14 16:48:17 +05:30
. m-orbit . stat { left : max ( -3.5 % , -26 px ); bottom : 5 % ; top : auto ; right : auto ; min-width : 236 px }
2026-10-14 12:37:48 +05:30
. srow { display : flex ; align-items : baseline ; gap : 10 px ; padding : 5.5 px 0 }
. srow span { font-family : var ( -- mono ); font-size : 9 px ; letter-spacing : .18 em ; text-transform : uppercase ; color : rgba ( 226 , 234 , 242 , .34 )}
. srow b { font-family : var ( -- mono ); font-size : 14 px ; font-weight : 500 ; color : #cfeafc ; margin-left : auto }
. srow em { font-style : normal ; font-family : var ( -- mono ); font-size : 9 px ; color : rgba ( 143 , 216 , 255 , .55 ); letter-spacing : .08 em }
2026-10-14 16:48:17 +05:30
. m-orbit . srow b { color : #f1f5f9 }
. m-orbit . srow em { color : rgba ( 168 , 85 , 247 , .85 )}
2026-10-14 12:37:48 +05:30
. bars { display : flex ; gap : 3 px ; height : 22 px ; align-items : flex-end ; margin-top : 12 px }
. bars i { width : 3 px ; border-radius : 1 px ; background : rgba ( 143 , 216 , 255 , .55 );
animation : bar 1 s ease-in-out infinite alternate ; transform-origin : bottom }
2026-10-14 16:48:17 +05:30
. m-orbit . bars i { background : linear-gradient ( to top , rgba ( 168 , 85 , 247 , .65 ), rgba ( 56 , 189 , 248 , .85 ))}
2026-10-14 12:37:48 +05:30
@ keyframes bar { from { transform : scaleY ( .12 )} to { transform : scaleY ( 1 )}}
/* ─── FOOTER ─── */
footer { position : relative ; z-index : 10 ; border-top : 1 px solid var ( -- line );
padding : 32 px var ( -- pad ); display : flex ; align-items : center ; justify-content : space-between ; gap : 22 px ; flex-wrap : wrap }
. ft-logo { display : flex ; align-items : center ; gap : 9 px ; text-decoration : none ; color : var ( -- ink ); font-weight : 600 ; font-size : 15 px ; letter-spacing : -.02 em }
. ft-logo . mark { width : 20 px ; height : 20 px }
. ft-l p { font-family : var ( -- mono ); font-size : 9.5 px ; letter-spacing : .16 em ; color : rgba ( 226 , 234 , 242 , .26 ); margin-top : 7 px ; text-transform : uppercase }
. ft-m { display : flex ; flex-direction : column ; gap : 5 px ; font-family : var ( -- mono ); font-size : 9.5 px ;
letter-spacing : .16 em ; color : rgba ( 226 , 234 , 242 , .26 ); text-align : center ; text-transform : uppercase }
. ft-status { display : flex ; align-items : center ; gap : 8 px ; font-family : var ( -- mono ); font-size : 10 px ;
letter-spacing : .18 em ; color : rgba ( 110 , 225 , 175 , .7 ); text-transform : uppercase }
/* ─── SCROLL REVEAL ─── */
[ data-reveal ] { opacity : 0 ; transform : translateY ( 34 px ); transition : opacity 1 s var ( -- ez ), transform 1 s var ( -- ez )}
[ data-reveal ] . in { opacity : 1 ; transform : none }
. module . msk-in { transform : translateY ( 118 % ); transition : transform 1.15 s var ( -- ez )}
. module . in . msk-in { transform : none }
/* ─── RESPONSIVE ─── */
@ media ( max-width : 1000px ) {. hud-r { display : none }}
@ media ( max-width : 820px ) {
. nav-links , . nav-status { display : none }
. burger { display : flex }
. hud-bl , . hud-br { display : none }
. module-inner { grid-template-columns : 1 fr ; gap : 56 px }
. module-inner . m-visual { order : -1 !important }
. m-visual { max-width : 420 px }
. glass { position : static ; margin : 16 px auto 0 ; width : fit-content ; max-width : 100 % }
. module { padding : 90 px var ( -- pad )}
footer { flex-direction : column ; text-align : center }
}
@ media ( max-width : 480px ) {
. hero-actions { flex-direction : column ; width : 100 % }
. btn { justify-content : center }
}
@ media ( prefers-reduced-motion : reduce ) {
*,* :: before ,* :: after { animation-duration : .01 ms !important ; animation-iteration-count : 1 !important ; transition-duration : .01 ms !important }
. msk-in { transform : none !important }
[ data-reveal ] { opacity : 1 !important ; transform : none !important }
}
</ style >
</ head >
< body >
< canvas id = "sky" aria-hidden = "true" ></ canvas >
< div class = "grain" aria-hidden = "true" ></ div >
< div class = "vig" aria-hidden = "true" ></ div >
< div class = "cur" id = "curDot" aria-hidden = "true" ></ div >
< div class = "cur" id = "curRing" aria-hidden = "true" >< span > DRAG</ span ></ div >
<!-- NAV -->
< nav id = "nav" >
< a class = "logo" href = "/" aria-label = "Cosmos — home" >
< svg class = "mark" viewBox = "0 0 34 34" aria-hidden = "true" >
< ellipse cx = "17" cy = "17" rx = "14.5" ry = "6" fill = "none" stroke = "rgba(238,243,248,.55)" stroke-width = "1" transform = "rotate(-24 17 17)" />
< circle cx = "17" cy = "17" r = "4.4" fill = "#eef3f8" />
< circle cx = "27.4" cy = "12.2" r = "1.8" fill = "#8fd9ff" />
</ svg >
< span > Cosmos</ span >
</ a >
< div class = "nav-links" >
< a href = "/git" >< i > 01</ i > Forge</ a >
< a href = "/oort" >< i > 02</ i > Oort</ a >
2026-10-14 16:16:22 +05:30
< a href = "/orbit" >< i > 03</ i > Orbit</ a >
2026-10-14 12:37:48 +05:30
</ div >
< div class = "nav-right" >
< span class = "nav-status" >< i ></ i > NOMINAL</ span >
< a class = "nav-btn mag" href = "/oort/login" > Sign In</ a >
< button class = "burger" id = "burger" aria-label = "Open menu" >< span ></ span >< span ></ span ></ button >
</ div >
</ nav >
<!-- MOBILE MENU -->
< div class = "mmenu" id = "mmenu" >
< a href = "/git" >< i > 01</ i > Forge</ a >
< a href = "/oort" >< i > 02</ i > Oort</ a >
2026-10-14 16:16:22 +05:30
< a href = "/orbit" >< i > 03</ i > Orbit</ a >
2026-10-14 12:37:48 +05:30
< a href = "/oort/login" >< i > →</ i > Sign In</ a >
</ div >
<!-- HERO -->
< section class = "hero" >
< div class = "hud hud-bl" >
< span id = "hudRa" > RA 00h 00m 00s</ span >
< span id = "hudDec" > DEC +00° 00′ 00″</ span >
</ div >
< div class = "hud hud-br" >
< span class = "live" >< i ></ i ></ span >
< span id = "hudUtc" > 00:00:00 UTC</ span >
< em > ·</ em >
< span > ALL SYSTEMS NOMINAL</ span >
</ div >
< div class = "hud hud-r" > ORBITAL PLATFORM — INCLINATION 27.4° — SUN-SYNCHRONOUS</ div >
< div class = "hero-inner" >
< div class = "hero-tag" >
< span class = "tag-dot" ></ span >
< span id = "tagScr" data-scr > PRIVATE INFRASTRUCTURE · SYSTEM v2.0</ span >
</ div >
< h1 class = "hero-title" >
< span class = "msk" >< span class = "msk-in d1" > Built for</ span ></ span >
< span class = "msk" >< span class = "msk-in d2" >< em > the void.</ em ></ span ></ span >
< span class = "msk" >< span class = "msk-in d3" > Your cosmos.</ span ></ span >
</ h1 >
< p class = "hero-sub" > Self-hosted infrastructure that answers to you alone. Private code, infinite storage, zero compromises.</ p >
< div class = "hero-actions" >
< a class = "btn btn-p mag" href = "#modules" >
Explore Modules
< svg width = "13" height = "13" fill = "none" stroke = "currentColor" stroke-width = "2.5" viewBox = "0 0 24 24" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M19 14l-7 7m0 0l-7-7m7 7V3" /></ svg >
</ a >
< a class = "btn btn-g mag" href = "/oort/login" > Open Console</ a >
</ div >
</ div >
< div class = "scroll-cue" >
< span > SCROLL</ span >
< span class = "track" >< i ></ i ></ span >
</ div >
</ section >
<!-- TICKER -->
< div class = "ticker" aria-hidden = "true" >
< div class = "tk" >
< div class = "tk-half" >
< span > Private by design</ span >< span class = "ts" > //</ span >
< span > Self-hosted core</ span >< span class = "ts" > //</ span >
< span > S3-compatible API</ span >< span class = "ts" > //</ span >
< span > Zero third-party exposure</ span >< span class = "ts" > //</ span >
< span > 99.99% uptime</ span >< span class = "ts" > //</ span >
< span > SSH & HTTPS access</ span >< span class = "ts" > //</ span >
< span > End-to-end isolation</ span >< span class = "ts" > //</ span >
< span > Versioned object storage</ span >< span class = "ts" > //</ span >
</ div >
< div class = "tk-half" >
< span > Private by design</ span >< span class = "ts" > //</ span >
< span > Self-hosted core</ span >< span class = "ts" > //</ span >
< span > S3-compatible API</ span >< span class = "ts" > //</ span >
< span > Zero third-party exposure</ span >< span class = "ts" > //</ span >
< span > 99.99% uptime</ span >< span class = "ts" > //</ span >
< span > SSH & HTTPS access</ span >< span class = "ts" > //</ span >
< span > End-to-end isolation</ span >< span class = "ts" > //</ span >
< span > Versioned object storage</ span >< span class = "ts" > //</ span >
</ div >
</ div >
</ div >
<!-- FORGE MODULE -->
< section id = "modules" class = "module m-forge" >
< div class = "module-inner" >
< div class = "m-text" data-reveal >
< p class = "m-index" data-scr > MODULE 01 · SOURCE CONTROL</ p >
< h2 class = "m-name" >< span class = "msk" >< span class = "msk-in" > Forge</ span ></ span ></ h2 >
< p class = "m-desc" > Self-hosted Git infrastructure engineered for teams that can't afford exposure. Full isolation, zero third-party dependency.</ p >
< ul class = "caps" >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > Branch protection & merge request workflows</ li >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > SSH & HTTPS access with team ACL</ li >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > Webhook integrations & CI pipeline support</ li >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > Private repos — no external data exposure</ li >
</ ul >
< a href = "/git" class = "m-cta mag" >
Access Forge
< svg width = "15" height = "15" fill = "none" stroke = "currentColor" stroke-width = "2" viewBox = "0 0 24 24" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M7 17L17 7M17 7H7M17 7v10" /></ svg >
</ a >
</ div >
< div class = "m-visual" data-reveal >
< span class = "m-ghost" aria-hidden = "true" > 01</ span >
< canvas id = "forgeCv" aria-hidden = "true" ></ canvas >
< div class = "glass term" >
< div class = "term-head" >< span > forge · deploy log</ span >< span class = "th-r" > TTY-01</ span ></ div >
< pre id = "termBody" ></ pre >
</ div >
</ div >
</ div >
</ section >
< div class = "divider d-ember" ></ div >
<!-- OORT MODULE -->
< section class = "module m-oort" >
< div class = "module-inner flip" >
< div class = "m-text" data-reveal >
< p class = "m-index" data-scr > MODULE 02 · OBJECT STORAGE</ p >
< h2 class = "m-name" >< span class = "msk" >< span class = "msk-in" > Oort</ span ></ span ></ h2 >
2026-10-14 13:21:33 +05:30
< p class = "m-desc" > S3-compatible object storage at warp speed. Buckets, versioning, real-time analytics, custom domains — all under your sky.</ p >
2026-10-14 12:37:48 +05:30
< ul class = "caps" >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > S3-compatible API — AWS SDK drop-in</ li >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > Bucket versioning & object lifecycle</ li >
2026-10-14 13:21:33 +05:30
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > High-throughput MinIO S3 storage engine</ li >
2026-10-14 12:37:48 +05:30
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > Custom domains with real-time analytics</ li >
</ ul >
< a href = "/oort" class = "m-cta mag" >
Enter Oort
< svg width = "15" height = "15" fill = "none" stroke = "currentColor" stroke-width = "2" viewBox = "0 0 24 24" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M7 17L17 7M17 7H7M17 7v10" /></ svg >
</ a >
</ div >
< div class = "m-visual" data-reveal data-cursor = "drag" >
< span class = "m-ghost" aria-hidden = "true" > 02</ span >
< canvas id = "oortCv" aria-hidden = "true" ></ canvas >
< div class = "glass stat" >
< div class = "srow" >< span > throughput</ span >< b id = "stRps" > 32,418</ b >< em > req/s</ em ></ div >
< div class = "srow" >< span > cache latency</ span >< b id = "stLat" > 3.68</ b >< em > ms</ em ></ div >
< div class = "srow" >< span > uptime</ span >< b > 99.99</ b >< em > %</ em ></ div >
< div class = "bars" id = "bars" ></ div >
</ div >
</ div >
</ div >
</ section >
2026-10-14 16:48:17 +05:30
< div class = "divider d-violet" ></ div >
2026-10-14 16:16:22 +05:30
<!-- ORBIT MODULE -->
< section class = "module m-orbit" >
< div class = "module-inner" >
< div class = "m-text" data-reveal >
< p class = "m-index" data-scr > MODULE 03 · APPLICATION PLATFORM</ p >
< h2 class = "m-name" >< span class = "msk" >< span class = "msk-in" > Orbit</ span ></ span ></ h2 >
< p class = "m-desc" > Self-hosted application platform & container runtime. 1-click deploy from Forge Git, smart zero-config buildpacks, dynamic reverse proxying, and live telemetry.</ p >
< ul class = "caps" >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > 1-Click deployment directly from Forge Git repositories</ li >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > Zero-config detection for Node.js, Go, Python & Dockerfile</ li >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > Live streaming build logs & container telemetry (CPU/RAM)</ li >
< li class = "cap" >< span class = "tick" >< svg width = "9" height = "9" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M5 13l4 4L19 7" /></ svg ></ span > Dynamic internal reverse proxy & port isolation (:4100– :4999)</ li >
</ ul >
< a href = "/orbit" class = "m-cta mag" >
Launch Orbit
< svg width = "15" height = "15" fill = "none" stroke = "currentColor" stroke-width = "2" viewBox = "0 0 24 24" >< path stroke-linecap = "round" stroke-linejoin = "round" d = "M7 17L17 7M17 7H7M17 7v10" /></ svg >
</ a >
</ div >
2026-10-14 16:48:17 +05:30
< div class = "m-visual" data-reveal data-cursor = "drag" >
2026-10-14 16:16:22 +05:30
< span class = "m-ghost" aria-hidden = "true" > 03</ span >
2026-10-14 16:48:17 +05:30
< canvas id = "orbitCv" aria-hidden = "true" ></ canvas >
< div class = "glass stat" >
2026-10-14 16:16:22 +05:30
< div class = "srow" >< span > container engine</ span >< b > Docker</ b >< em > v1.45</ em ></ div >
2026-10-14 16:48:17 +05:30
< div class = "srow" >< span > active runtime</ span >< b id = "orbPorts" > :4100</ b >< em > proxy</ em ></ div >
< div class = "srow" >< span > orchestrator</ span >< b id = "orbHealth" > Healthy</ b >< em > 100%</ em ></ div >
< div class = "bars" id = "orbitBars" ></ div >
2026-10-14 16:16:22 +05:30
</ div >
</ div >
</ div >
</ section >
2026-10-14 12:37:48 +05:30
<!-- FOOTER -->
< footer data-reveal >
< div class = "ft-l" >
< a class = "ft-logo" href = "/" >
< svg class = "mark" viewBox = "0 0 34 34" aria-hidden = "true" >
< ellipse cx = "17" cy = "17" rx = "14.5" ry = "6" fill = "none" stroke = "rgba(238,243,248,.55)" stroke-width = "1" transform = "rotate(-24 17 17)" />
< circle cx = "17" cy = "17" r = "4.4" fill = "#eef3f8" />
< circle cx = "27.4" cy = "12.2" r = "1.8" fill = "#8fd9ff" />
</ svg >
Cosmos
</ a >
< p > Self-hosted & private. No third parties, no exceptions.</ p >
</ div >
< div class = "ft-m" >
< span > 51.4778° N · 0.0015° W</ span >
< span id = "ftUp" > SESSION T+00:00:00</ span >
</ div >
< div class = "ft-r" >< span class = "ft-status" >< i ></ i > All systems nominal</ span ></ div >
</ footer >
< noscript >< style > [ data-reveal ] { opacity : 1 !important ; transform : none !important }. msk-in { transform : none !important }</ style ></ noscript >
< script >
(()=>{ 'use strict' ;
/* ═══════════════ helpers ═══════════════ */
const $ = s => document . querySelector ( s ), $$ = s =>[... document . querySelectorAll ( s )];
const TAU = Math . PI * 2 ;
const clamp = ( v , a , b )=> v < a ? a : v > b ? b : v ;
const rand = ( a = 1 , b )=> b === undefined ? Math . random () * a : a + Math . random () * ( b - a );
const mod = ( v , m )=>(( v % m ) + m ) % m ;
const p2 = n => String ( n ). padStart ( 2 , '0' );
const mk = ( w , h )=>{ const c = document . createElement ( 'canvas' ); c . width = w ; c . height = h ; return c ;};
const RM = matchMedia ( '(prefers-reduced-motion: reduce)' ). matches ;
const FINE = matchMedia ( '(pointer: fine)' ). matches ;
const DPR = Math . min ( 2 , devicePixelRatio || 1 );
/* deterministic value noise + fbm (for procedural textures) */
function h2 ( ix , iy , s ){ let h = Math . imul ( ix , 374761393 ) ^ Math . imul ( iy , 668265263 ) ^ Math . imul ( s , 974711 );
h = Math . imul ( h ^ h >>> 13 , 1274126177 ); return (( h ^ h >>> 16 ) >>> 0 ) / 4294967296 ;}
function vn ( x , y , s ){ const ix = Math . floor ( x ), iy = Math . floor ( y ), fx = x - ix , fy = y - iy ,
u = fx * fx * ( 3 - 2 * fx ), v = fy * fy * ( 3 - 2 * fy ),
a = h2 ( ix , iy , s ), b = h2 ( ix + 1 , iy , s ), c = h2 ( ix , iy + 1 , s ), d = h2 ( ix + 1 , iy + 1 , s );
return a + ( b - a ) * u + ( c - a ) * v + ( a - b - c + d ) * u * v ;}
function fbm ( x , y , oct , s ){ let a = 1 , sum = 0 , n = 0 ; for ( let o = 0 ; o < oct ; o ++ ){ sum += a * vn ( x , y , s + o * 131 ); n += a ; a *= . 5 ; x *= 2 ; y *= 2 ;} return sum / n ;}
/* shared smoothed mouse (normalized + raw px) */
const mouse = { x : . 5 , y : . 5 , sx : . 5 , sy : . 5 , px : innerWidth / 2 , py : innerHeight / 2 };
let scr = 0 ;
/* ═══════════════ SKY — nebula · stars · meteors · comets ═══════════════ */
const scv = $ ( '#sky' ), sctx = scv . getContext ( '2d' );
let SW = 0 , SH = 0 , nebTex = null , stars = [], meteors = [], comets = [], nextMet = 2600 , nextCom = 9000 ;
function skyResize (){
SW = innerWidth ; SH = innerHeight ;
scv . width = SW * DPR ; scv . height = SH * DPR ;
scv . style . width = SW + 'px' ; scv . style . height = SH + 'px' ;
sctx . setTransform ( DPR , 0 , 0 , DPR , 0 , 0 );
}
function buildStars (){
stars = [];
const n = Math . round ( clamp ( SW * SH / 2300 , 260 , 950 ));
for ( let i = 0 ; i < n ; i ++ ){
const r = Math . pow ( Math . random (), 2.3 ) * 1.9 + . 28 ;
const roll = Math . random ();
const c = roll < . 6 ? [ 255 , 255 , 255 ] : roll < . 78 ? [ 201 , 215 , 255 ] : roll < . 92 ? [ 255 , 238 , 220 ] : [ 255 , 208 , 176 ];
stars . push ({ x : Math . random (), y : Math . random (), r , p : . 012 + ( r / 2.2 ) * . 06 ,
a : . 2 + Math . random () * . 7 , tw : Math . random () * TAU , ts : . 4 + Math . random () * 1.9 , c });
}
}
function makeNebula (){
const w = 460 , h = 260 , c = mk ( w , h ), g = c . getContext ( '2d' ), im = g . createImageData ( w , h ), d = im . data ;
const nx = . 749 , ny =- . 663 ; /* milky-way band axis */
for ( let y = 0 ; y < h ; y ++ ) for ( let x = 0 ; x < w ; x ++ ){
const i = ( y * w + x ) * 4 ;
const dist = ( x / w - . 18 ) * nx + ( y / h - . 86 ) * ny ;
const band = Math . exp ( - Math . pow ( dist / . 16 , 2 ));
const n1 = fbm ( x * . 012 , y * . 012 , 5 , 7 );
const m = fbm ( x * . 022 , y * . 022 , 3 , 44 );
let cl = clamp (( n1 - . 42 ) / . 36 , 0 , 1 ); cl = cl * cl * ( 3 - 2 * cl );
const den = Math . min ( 1 , cl * (. 3 + band * . 85 ));
const warm = m * m * m , core = clamp (( den - . 55 ) / . 45 , 0 , 1 );
d [ i ] = 20 + m * 24 + warm * 52 + core * 12 ;
d [ i + 1 ] = 34 + m * 30 + warm * 20 + core * 46 ;
d [ i + 2 ] = 74 + m * 44 + warm * 8 + core * 64 ;
d [ i + 3 ] = Math . min ( 255 , den * 210 );
}
g . putImageData ( im , 0 , 0 ); return c ;
}
function nebDraw ( s , al , dx , dy , rot ){
const w = nebTex . width * s , h = nebTex . height * s ;
sctx . save (); sctx . globalAlpha = al ; sctx . translate ( SW / 2 + dx , SH / 2 + dy );
if ( rot ) sctx . rotate ( rot );
sctx . drawImage ( nebTex , - w / 2 , - h / 2 , w , h ); sctx . restore ();
}
function drawFarPlanet (){
const px = SW * . 84 - ( mouse . sx - . 5 ) * 30 , py = SH * . 16 - scr * . 06 - ( mouse . sy - . 5 ) * 18 ;
const r = Math . min ( SW , SH ) * . 065 ;
let g = sctx . createRadialGradient ( px - r * . 3 , py - r * . 35 , r * . 1 , px , py , r );
g . addColorStop ( 0 , 'rgba(50,68,100,.17)' ); g . addColorStop (. 7 , 'rgba(22,34,60,.08)' ); g . addColorStop ( 1 , 'rgba(10,16,34,0)' );
sctx . fillStyle = g ; sctx . beginPath (); sctx . arc ( px , py , r , 0 , TAU ); sctx . fill ();
sctx . strokeStyle = 'rgba(190,212,240,.15)' ; sctx . lineWidth = 1 ;
sctx . beginPath (); sctx . arc ( px , py , r - . 5 , Math . PI * 1.02 , Math . PI * 1.48 ); sctx . stroke ();
sctx . save (); sctx . translate ( px , py ); sctx . rotate ( - . 44 ); sctx . scale ( 1 ,. 3 );
for ( let i = 0 ; i < 2 ; i ++ ){ sctx . beginPath (); sctx . arc ( 0 , 0 , r * ( 1.55 + i * . 35 ), 0 , TAU );
sctx . strokeStyle = `rgba(150,180,225, ${ . 075 - i * . 03 } )` ; sctx . lineWidth = 5 + i * 4 ; sctx . stroke ();}
sctx . restore ();
}
function spawnMeteor (){
const ang = . 5 + Math . random () * . 7 , dir = Math . random () < . 5 ? 1 :- 1 ;
meteors . push ({ x : rand ( - . 05 , 1.05 ) * SW , y : rand ( - . 05 ,. 45 ) * SH ,
dx : Math . cos ( ang ) * dir , dy : Math . sin ( ang ),
sp : rand ( 430 , 820 ), dur : rand (. 8 , 1.35 ), life : 0 , len : rand ( 60 , 150 )});
}
function spawnComet (){
const fromR = Math . random () < . 55 ;
comets . push ({ x : fromR ? SW + 170 :- 170 , y : rand (. 05 ,. 6 ) * SH ,
vx : ( fromR ?- 1 : 1 ) * rand ( 48 , 105 ), vy : rand ( - 22 , 34 ),
a : 0 , ph : 0 , core : rand ( 1.5 , 2.6 ), tail : []});
}
function drawMeteors ( dt ){
sctx . globalCompositeOperation = 'lighter' ;
for ( let i = meteors . length - 1 ; i >= 0 ; i -- ){ const m = meteors [ i ];
m . life += dt ; const f = m . life / m . dur ;
if ( f >= 1 ){ meteors . splice ( i , 1 ); continue ;}
const a = Math . sin ( Math . PI * f ) * . 9 ;
const hx = m . x + m . dx * m . sp * m . life , hy = m . y + m . dy * m . sp * m . life ;
const tx = hx - m . dx * m . len , ty = hy - m . dy * m . len ;
const g = sctx . createLinearGradient ( tx , ty , hx , hy );
g . addColorStop ( 0 , 'rgba(180,205,255,0)' ); g . addColorStop ( 1 , `rgba(220,235,255, ${ a } )` );
sctx . strokeStyle = g ; sctx . lineWidth = 1.4 ;
sctx . beginPath (); sctx . moveTo ( tx , ty ); sctx . lineTo ( hx , hy ); sctx . stroke ();
sctx . fillStyle = `rgba(255,255,255, ${ a } )` ;
sctx . beginPath (); sctx . arc ( hx , hy , 1.1 , 0 , TAU ); sctx . fill ();}
sctx . globalCompositeOperation = 'source-over' ;
}
function drawComets ( dt ){
sctx . globalCompositeOperation = 'lighter' ;
for ( let i = comets . length - 1 ; i >= 0 ; i -- ){ const c = comets [ i ];
if ( c . ph === 0 ){ c . a = Math . min ( 1 , c . a + dt * . 5 ); if ( c . a >= 1 ) c . ph = 1 ;}
else if ( c . ph === 1 ){ if ( c . x <- 260 || c . x > SW + 260 || c . y <- 260 || c . y > SH + 260 ) c . ph = 2 ;}
else { c . a = Math . max ( 0 , c . a - dt * . 35 ); if ( c . a <= 0 ){ comets . splice ( i , 1 ); continue ;}}
c . x += c . vx * dt ; c . y += c . vy * dt ;
c . tail . push ({ x : c . x , y : c . y }); if ( c . tail . length > 130 ) c . tail . shift ();
const n = c . tail . length ;
for ( let j = 0 ; j < n - 1 ; j ++ ){ const f = j / n , a = f * f * c . a * . 55 ;
sctx . strokeStyle = `rgba(168,216,255, ${ a } )` ; sctx . lineWidth = Math . max (. 3 , f * c . core * 2.6 );
sctx . beginPath (); sctx . moveTo ( c . tail [ j ]. x , c . tail [ j ]. y ); sctx . lineTo ( c . tail [ j + 1 ]. x , c . tail [ j + 1 ]. y ); sctx . stroke ();
if ( f > . 6 ){ sctx . strokeStyle = `rgba(255,255,255, ${ ( f - . 6 ) / . 4 * c . a * . 35 } )` ;
sctx . lineWidth = Math . max (. 2 , f * c . core * . 5 );
sctx . beginPath (); sctx . moveTo ( c . tail [ j ]. x , c . tail [ j ]. y ); sctx . lineTo ( c . tail [ j + 1 ]. x , c . tail [ j + 1 ]. y ); sctx . stroke ();}}
const g = sctx . createRadialGradient ( c . x , c . y , 0 , c . x , c . y , c . core * 7 );
g . addColorStop ( 0 , `rgba(255,255,255, ${ c . a } )` );
g . addColorStop (. 3 , `rgba(178,226,255, ${ c . a * . 7 } )` ); g . addColorStop ( 1 , 'rgba(0,0,0,0)' );
sctx . fillStyle = g ; sctx . beginPath (); sctx . arc ( c . x , c . y , c . core * 7 , 0 , TAU ); sctx . fill ();
sctx . fillStyle = `rgba(244,251,255, ${ c . a } )` ;
sctx . beginPath (); sctx . arc ( c . x , c . y , c . core , 0 , TAU ); sctx . fill ();}
sctx . globalCompositeOperation = 'source-over' ;
}
function skyFrame ( t , dt ){
sctx . clearRect ( 0 , 0 , SW , SH );
const ox = mouse . sx - . 5 , oy = mouse . sy - . 5 ;
/* nebula — two drifting depth layers */
sctx . globalCompositeOperation = 'screen' ;
const s0 = Math . max ( SW / nebTex . width , SH / nebTex . height );
nebDraw ( s0 * 1.85 ,. 34 , - ox * 34 + Math . sin ( t * . 00005 ) * 40 , - oy * 20 + Math . cos ( t * . 00004 ) * 24 , 0 );
nebDraw ( s0 * 3.2 ,. 24 , - ox * 80 + Math . cos ( t * . 00004 ) * 34 , - oy * 46 + Math . sin ( t * . 00006 ) * 26 ,. 55 );
sctx . globalCompositeOperation = 'source-over' ;
drawFarPlanet ();
/* stars — twinkle, diffraction spikes on bright ones */
const ts = t / 1000 ;
for ( const s of stars ){
const sx = mod ( s . x * SW - ox * s . p * 240 , SW );
const sy = mod ( s . y * SH - scr * s . p * . 55 - oy * s . p * 150 , SH );
const a = s . a * (. 68 + . 32 * Math . sin ( ts * s . ts + s . tw ));
sctx . fillStyle = `rgba( ${ s . c [ 0 ] } , ${ s . c [ 1 ] } , ${ s . c [ 2 ] } , ${ a } )` ;
sctx . beginPath (); sctx . arc ( sx , sy , s . r , 0 , TAU ); sctx . fill ();
if ( s . r > 1.42 ){
sctx . strokeStyle = `rgba( ${ s . c [ 0 ] } , ${ s . c [ 1 ] } , ${ s . c [ 2 ] } , ${ a * . 3 } )` ; sctx . lineWidth = . 6 ;
const L = s . r * 5.2 ;
sctx . beginPath (); sctx . moveTo ( sx - L , sy ); sctx . lineTo ( sx + L , sy );
sctx . moveTo ( sx , sy - L ); sctx . lineTo ( sx , sy + L ); sctx . stroke ();
const g = sctx . createRadialGradient ( sx , sy , 0 , sx , sy , s . r * 3.4 );
g . addColorStop ( 0 , `rgba( ${ s . c [ 0 ] } , ${ s . c [ 1 ] } , ${ s . c [ 2 ] } , ${ a * . 28 } )` ); g . addColorStop ( 1 , 'rgba(0,0,0,0)' );
sctx . fillStyle = g ; sctx . beginPath (); sctx . arc ( sx , sy , s . r * 3.4 , 0 , TAU ); sctx . fill ();
}
}
if ( ! RM ){
if ( t > nextMet ){ spawnMeteor (); if ( Math . random () < . 4 ) spawnMeteor (); nextMet = t + 3600 + Math . random () * 5200 ;}
if ( t > nextCom ){ spawnComet (); nextCom = t + 20000 + Math . random () * 17000 ;}
}
drawMeteors ( dt ); drawComets ( dt );
}
/* ═══════════════ FORGE — volcanic planet, live surface ═══════════════ */
const fcv = $ ( '#forgeCv' ), fctx = fcv . getContext ( '2d' ), fbox = fcv . parentElement ;
let fW = 0 , fH = 0 , fR = 0 , fCX = 0 , fCY = 0 , fVis = false , fInit = false , fRot = 0 , fMaps = null , fEmbers = [];
const fl = { x :- . 62 , y :- . 55 }, flT = { x :- . 62 , y :- . 55 }, fp = { x : 0 , y : 0 }, fpT = { x : 0 , y : 0 };
const FTILT =- . 5 , FSQ = . 24 ;
function forgeResize (){
const s = fbox . clientWidth ; if ( ! s ) return ;
fW = s ; fH = s ;
fcv . width = s * DPR ; fcv . height = s * DPR ; fcv . style . width = s + 'px' ; fcv . style . height = s + 'px' ;
fctx . setTransform ( DPR , 0 , 0 , DPR , 0 , 0 );
fR = s * . 205 ; fCX = s * . 5 ; fCY = s * . 53 ;
}
function makeForgeMaps (){
/* procedural basalt surface + emissive lava-crack layer (seamless, double-width) */
const TW = 480 , TH = 240 ;
const s1 = mk ( TW , TH ), g1 = mk ( TW , TH );
const sc = s1 . getContext ( '2d' ), gc = g1 . getContext ( '2d' );
const si = sc . createImageData ( TW , TH ), gi = gc . createImageData ( TW , TH );
const sd = si . data , gd = gi . data ;
for ( let y = 0 ; y < TH ; y ++ ) for ( let x = 0 ; x < TW ; x ++ ){
const i = ( y * TW + x ) * 4 ;
const t = fbm ( x * . 013 , y * . 013 , 4 , 11 );
const mar = fbm ( x * . 008 , y * . 008 , 3 , 29 );
let r = 34 + t * 80 , g = 22 + t * 50 , b = 15 + t * 32 ;
if ( mar < . 44 ){ const d = (. 44 - mar ) * 1.6 ; r *= 1 - d * . 45 ; g *= 1 - d * . 45 ; b *= 1 - d * . 45 ;}
sd [ i ] = r ; sd [ i + 1 ] = g ; sd [ i + 2 ] = b ; sd [ i + 3 ] = 255 ;
const rv = fbm ( x * . 05 , y * . 05 , 4 , 53 );
const ridge = 1 - Math . abs ( rv * 2 - 1 );
const patch = fbm ( x * . 01 , y * . 01 , 3 , 71 );
if ( ridge > . 955 && patch > . 42 ){
const k = Math . pow (( ridge - . 955 ) / . 045 , 1.6 );
gd [ i ] = 255 ; gd [ i + 1 ] = 110 + k * 115 ; gd [ i + 2 ] = 35 + k * 90 ; gd [ i + 3 ] = Math . min ( 255 , k * 250 );
}
}
sc . putImageData ( si , 0 , 0 ); gc . putImageData ( gi , 0 , 0 );
const surf = mk ( TW * 2 , TH ), glow = mk ( TW * 2 , TH );
const sx1 = surf . getContext ( '2d' ); sx1 . drawImage ( s1 , 0 , 0 ); sx1 . drawImage ( s1 , TW , 0 );
const gx1 = glow . getContext ( '2d' ); gx1 . drawImage ( g1 , 0 , 0 ); gx1 . drawImage ( g1 , TW , 0 );
return { surf , glow };
}
function emberNew ( bottom ){
return { x : rand ( - 1.45 , 1.45 ), y : bottom ? rand ( 1.05 , 1.9 ) : rand ( - 1.6 , 1.9 ),
vy : rand (. 09 ,. 22 ), sw : rand (. 8 , 2.4 ), ph : rand ( 0 , TAU ), r : rand (. 55 , 1.6 ), a : rand (. 2 ,. 6 ), fs : rand ( 2 , 5 )};
}
function forgeInit (){
fMaps = makeForgeMaps ();
fEmbers = []; for ( let i = 0 ; i < 26 ; i ++ ) fEmbers . push ( emberNew ( false ));
fInit = true ;
}
function fSphere ( tex ){
/* classic column-slice sphere mapping → convincing rotation */
const N = Math . round ( clamp ( fR * 1.7 , 96 , 220 )), step = 2 * fR / N , tw = tex . width , th = tex . height ;
for ( let i = 0 ; i < N ; i ++ ){
const xa =- fR + i * step , xb = xa + step , xm = ( xa + xb ) / 2 ;
const h = 2 * Math . sqrt ( Math . max ( 0 , fR * fR - xm * xm ));
let u0 = Math . asin ( clamp ( xa / fR , - 1 , 1 )) / Math . PI + . 5 + fRot ;
let u1 = Math . asin ( clamp ( xb / fR , - 1 , 1 )) / Math . PI + . 5 + fRot ;
u0 -= Math . floor ( u0 ); if ( u1 < u0 ) u1 += 1 ;
fctx . drawImage ( tex , u0 * tw , 0 , Math . max ( 1 ,( u1 - u0 ) * tw ), th , fCX + xa - . 4 , fCY - h / 2 , step + . 8 , h );
}
}
function fRing ( r , style , w , a0 , a1 ){
fctx . save (); fctx . translate ( fCX , fCY ); fctx . rotate ( FTILT ); fctx . scale ( 1 , FSQ );
fctx . beginPath (); fctx . arc ( 0 , 0 , r , a0 , a1 );
fctx . strokeStyle = style ; fctx . lineWidth = w / FSQ ; fctx . stroke (); fctx . restore ();
}
function fMoonAt ( ang , mr ){
const lx = Math . cos ( ang ) * mr , ly = Math . sin ( ang ) * mr , ct = Math . cos ( FTILT ), st = Math . sin ( FTILT );
return { x : fCX + lx * ct - ly * FSQ * st , y : fCY + lx * st + ly * FSQ * ct , behind : ly < 0 };
}
function fDrawMoon ( p , r ){
fctx . globalCompositeOperation = 'lighter' ;
let g = fctx . createRadialGradient ( p . x , p . y , 0 , p . x , p . y , r * 4 );
g . addColorStop ( 0 , 'rgba(255,190,120,.45)' ); g . addColorStop ( 1 , 'rgba(255,190,120,0)' );
fctx . fillStyle = g ; fctx . beginPath (); fctx . arc ( p . x , p . y , r * 4 , 0 , TAU ); fctx . fill ();
fctx . globalCompositeOperation = 'source-over' ;
g = fctx . createRadialGradient ( p . x - r * . 3 , p . y - r * . 3 , 0 , p . x , p . y , r );
g . addColorStop ( 0 , '#ffe7c2' ); g . addColorStop (. 6 , '#8a5a34' ); g . addColorStop ( 1 , '#241509' );
fctx . fillStyle = g ; fctx . beginPath (); fctx . arc ( p . x , p . y , r , 0 , TAU ); fctx . fill ();
}
function forgeFrame ( t , dt ){
if ( ! fInit ) forgeInit ();
fRot += dt * . 02 ;
fl . x += ( flT . x - fl . x ) * . 05 ; fl . y += ( flT . y - fl . y ) * . 05 ;
fp . x += ( fpT . x - fp . x ) * . 07 ; fp . y += ( fpT . y - fp . y ) * . 07 ;
fctx . clearRect ( 0 , 0 , fW , fH );
fctx . save (); fctx . translate ( fp . x , fp . y );
const r1 = fR * 1.66 , r2 = fR * 2.18 ;
/* rings — far half */
fRing ( r1 , 'rgba(255,171,77,.15)' , 1.1 , Math . PI , TAU );
fRing ( r1 , 'rgba(255,171,77,.05)' , 6 , Math . PI , TAU );
fRing ( r2 , 'rgba(255,171,77,.06)' , 1 , Math . PI , TAU );
const mAng = t * . 00024 , mp = fMoonAt ( mAng , r1 * . 985 ), ms = Math . max ( 3 , fR * . 048 );
if ( mp . behind ) fDrawMoon ( mp , ms );
/* planet — rotating surface, mouse-driven terminator, night-side lava glow */
fctx . save (); fctx . beginPath (); fctx . arc ( fCX , fCY , fR , 0 , TAU ); fctx . clip ();
fSphere ( fMaps . surf );
const lx = fCX + fl . x * fR , ly = fCY + fl . y * fR ;
const sh = fctx . createRadialGradient ( lx , ly , fR * . 12 , lx , ly , fR * 2.3 );
sh . addColorStop ( 0 , 'rgba(0,0,0,0)' ); sh . addColorStop (. 5 , 'rgba(5,3,2,.03)' );
sh . addColorStop (. 66 , 'rgba(5,3,2,.5)' ); sh . addColorStop (. 82 , 'rgba(3,1,0,.86)' ); sh . addColorStop ( 1 , 'rgba(2,1,0,.97)' );
fctx . fillStyle = sh ; fctx . fillRect ( fCX - fR , fCY - fR , fR * 2 , fR * 2 );
fctx . globalCompositeOperation = 'lighter' ;
fSphere ( fMaps . glow );
fctx . globalCompositeOperation = 'source-over' ;
fctx . restore ();
/* atmosphere rim */
const atm = fctx . createRadialGradient ( fCX , fCY , fR * . 84 , fCX , fCY , fR * 1.18 );
atm . addColorStop ( 0 , 'rgba(255,150,60,0)' ); atm . addColorStop (. 5 , 'rgba(255,150,60,.13)' ); atm . addColorStop ( 1 , 'rgba(255,150,60,0)' );
fctx . fillStyle = atm ; fctx . beginPath (); fctx . arc ( fCX , fCY , fR * 1.18 , 0 , TAU ); fctx . fill ();
/* rings — near half crosses in front of the planet */
fRing ( r1 , 'rgba(255,180,92,.35)' , 1.1 , 0 , Math . PI );
fRing ( r1 , 'rgba(255,171,77,.06)' , 6 , 0 , Math . PI );
fRing ( r2 , 'rgba(255,171,77,.11)' , 1 , 0 , Math . PI );
if ( ! mp . behind ) fDrawMoon ( mp , ms );
/* rising embers */
fctx . globalCompositeOperation = 'lighter' ;
const ts = t / 1000 ;
for ( const e of fEmbers ){
e . y -= e . vy * dt ; if ( e . y <- 1.7 ) Object . assign ( e , emberNew ( true ));
const flk = . 55 + . 45 * Math . sin ( ts * e . fs + e . ph );
fctx . fillStyle = `rgba(255,158,84, ${ ( e . a * flk ). toFixed ( 3 ) } )` ;
fctx . beginPath (); fctx . arc ( fCX + e . x * fR + Math . sin ( ts * e . sw + e . ph ) * 9 , fCY + e . y * fR , e . r , 0 , TAU ); fctx . fill ();
}
fctx . globalCompositeOperation = 'source-over' ;
fctx . restore ();
}
/* forge interactivity — the light source follows your pointer */
fbox . addEventListener ( 'pointermove' , e =>{
const r = fbox . getBoundingClientRect ();
const dx = e . clientX - ( r . left + r . width / 2 ), dy = e . clientY - ( r . top + r . height * . 53 );
const d = Math . hypot ( dx , dy ) || 1 ;
flT . x = dx / d ; flT . y = dy / d ;
fpT . x = clamp ( dx * . 03 , - 9 , 9 ); fpT . y = clamp ( dy * . 03 , - 8 , 8 );
});
fbox . addEventListener ( 'pointerleave' ,()=>{ flT . x =- . 62 ; flT . y =- . 55 ; fpT . x = 0 ; fpT . y = 0 ;});
/* ═══════════════ OORT — draggable 3D ring system ═══════════════ */
const ocv = $ ( '#oortCv' ), octx = ocv . getContext ( '2d' ), obox = ocv . parentElement ;
let oW = 0 , oH = 0 , oR = 0 , oCX = 0 , oCY = 0 , oVis = false , oInit = false ;
let yaw = . 55 , pitch = . 5 , pitchT = . 5 , yawV = . 0024 , oDrag = false , olx = 0 , oly = 0 ;
let ringP = [], sats = [], pings = [], nextPing = 2500 ;
function oortResize (){
const s = obox . clientWidth ; if ( ! s ) return ;
oW = s ; oH = s ;
ocv . width = s * DPR ; ocv . height = s * DPR ; ocv . style . width = s + 'px' ; ocv . style . height = s + 'px' ;
octx . setTransform ( DPR , 0 , 0 , DPR , 0 , 0 );
oR = s * . 175 ; oCX = s * . 5 ; oCY = s * . 5 ;
}
function oortBuild (){
ringP = [];
for ( let i = 0 ; i < 980 ; i ++ ){
let rr ; do { rr = 1.34 + Math . pow ( Math . random (),. 9 ) * . 72 ;} while ( rr > 1.60 && rr < 1.70 ); /* Cassini-like gap */
ringP . push ({ rr , a : Math . random () * TAU ,
w : . 8 / Math . pow ( rr , 1.5 ) * (. 94 + Math . random () * . 12 ), /* Keplerian speeds: inner rings orbit faster */
y : ( Math . random () + Math . random () - 1 ) * . 024 ,
sz : Math . random () < . 06 ? 1.5 + Math . random () * . 7 : . 5 + Math . random () * . 75 ,
b : . 3 + Math . random () * . 7 , c : Math . random ()});
}
/* shepherd moon sits inside the gap; inner moon is retrograde */
sats = [{ rm : 1.65 , inc :- . 22 , w : . 4 , a : 0 , s : 3.2 },{ rm : 1.14 , inc : . 55 , w :- . 8 , a : 2.4 , s : 2.3 }];
}
ocv . addEventListener ( 'pointerdown' , e =>{
oDrag = true ; olx = e . clientX ; oly = e . clientY ;
try { ocv . setPointerCapture ( e . pointerId );} catch ( _ ){}
document . body . classList . add ( 'grabbing' );
});
ocv . addEventListener ( 'pointermove' , e =>{
if ( ! oDrag ) return ;
const dx = e . clientX - olx , dy = e . clientY - oly ; olx = e . clientX ; oly = e . clientY ;
yaw += dx * . 0056 ; yawV = dx * . 0056 ;
pitchT = clamp ( pitchT + dy * . 0035 , - . 5 , 1.2 );
});
[ 'pointerup' , 'pointercancel' ]. forEach ( ev => ocv . addEventListener ( ev ,()=>{
oDrag = false ; document . body . classList . remove ( 'grabbing' );
}));
function oortFrame ( t , dt ){
if ( ! oInit ){ oortBuild (); oInit = true ;}
if ( ! oDrag ){ if ( ! RM ) yawV += ( 0.0024 - yawV ) * . 02 ; else yawV *= . 9 ; yaw += yawV ;}
pitch += ( pitchT - pitch ) * . 09 ;
const cyw = Math . cos ( yaw ), syw = Math . sin ( yaw ), cp = Math . cos ( pitch ), sp = Math . sin ( pitch );
const P = ( x , y , z )=>{
const x1 = x * cyw + z * syw , z1 =- x * syw + z * cyw ;
const y2 = y * cp - z1 * sp , z2 = y * sp + z1 * cp ;
const pr = 900 / ( 900 + z2 );
return { x : oCX + x1 * pr , y : oCY + y2 * pr , z : z2 , pr };
};
octx . clearRect ( 0 , 0 , oW , oH );
for ( const p of ringP ) p . a += p . w * dt ;
for ( const m of sats ) m . a += m . w * dt ;
const drawParts = front =>{
for ( const p of ringP ){
const q = P ( Math . cos ( p . a ) * p . rr * oR , p . y * oR , Math . sin ( p . a ) * p . rr * oR );
if ( front ? q . z > 0 : q . z <= 0 ) continue ;
if ( q . z > 0 ){ const dx = q . x - oCX , dy = q . y - oCY ; if ( dx * dx + dy * dy < oR * oR * . 96 ) continue ;}
let al = p . b * clamp (( q . pr - . 78 ) * 1.9 ,. 22 , 1 );
if ( p . sz > 1.4 ) al *= . 65 + . 35 * Math . sin ( t * . 004 + p . a * 9 );
octx . fillStyle = `rgba( ${ 215 + p . c * 40 | 0 } , ${ 230 + p . c * 22 | 0 } ,255, ${ al . toFixed ( 3 ) } )` ;
octx . beginPath (); octx . arc ( q . x , q . y , p . sz * q . pr , 0 , TAU ); octx . fill ();
}
};
drawParts ( false ); /* far particles */
/* planet halo */
octx . globalCompositeOperation = 'screen' ;
let g = octx . createRadialGradient ( oCX , oCY , oR * . 5 , oCX , oCY , oR * 2.05 );
g . addColorStop ( 0 , 'rgba(96,178,232,.17)' ); g . addColorStop ( 1 , 'rgba(96,178,232,0)' );
octx . fillStyle = g ; octx . beginPath (); octx . arc ( oCX , oCY , oR * 2.05 , 0 , TAU ); octx . fill ();
octx . globalCompositeOperation = 'source-over' ;
/* icy body with limb darkening */
g = octx . createRadialGradient ( oCX - oR * . 42 , oCY - oR * . 45 , oR * . 08 , oCX , oCY , oR );
g . addColorStop ( 0 , 'rgba(218,237,249,.97)' ); g . addColorStop (. 34 , 'rgba(150,192,216,.95)' );
g . addColorStop (. 64 , 'rgba(66,110,143,.96)' ); g . addColorStop (. 86 , 'rgba(26,54,82,.99)' ); g . addColorStop ( 1 , 'rgba(8,17,30,1)' );
octx . fillStyle = g ; octx . beginPath (); octx . arc ( oCX , oCY , oR , 0 , TAU ); octx . fill ();
/* fresnel rim */
octx . globalCompositeOperation = 'screen' ;
g = octx . createRadialGradient ( oCX , oCY , oR * . 86 , oCX , oCY , oR * 1.14 );
g . addColorStop ( 0 , 'rgba(150,215,255,0)' ); g . addColorStop (. 5 , 'rgba(150,215,255,.32)' ); g . addColorStop ( 1 , 'rgba(150,215,255,0)' );
octx . fillStyle = g ; octx . beginPath (); octx . arc ( oCX , oCY , oR * 1.14 , 0 , TAU ); octx . fill ();
octx . globalCompositeOperation = 'source-over' ;
/* sunlit crescent */
octx . save (); octx . strokeStyle = 'rgba(226,245,255,.5)' ; octx . lineWidth = 1.2 ;
octx . shadowColor = 'rgba(160,220,255,.9)' ; octx . shadowBlur = 6 ;
octx . beginPath (); octx . arc ( oCX , oCY , oR - . 9 , Math . PI * 1.03 , Math . PI * 1.47 ); octx . stroke (); octx . restore ();
/* shepherd orbit path */
octx . strokeStyle = 'rgba(143,216,255,.12)' ; octx . lineWidth = 1 ; octx . beginPath ();
{ const m = sats [ 0 ], rm = m . rm * oR ; let pen = false ;
for ( let k = 0 ; k <= 72 ; k ++ ){ const a = k / 72 * TAU , ca = Math . cos ( a ), sa = Math . sin ( a );
const q = P ( ca * rm , - sa * rm * Math . sin ( m . inc ), sa * rm * Math . cos ( m . inc ));
const dx = q . x - oCX , dy = q . y - oCY ;
if ( q . z > 0 && dx * dx + dy * dy < oR * oR ){ pen = false ; continue ;}
if ( ! pen ){ octx . moveTo ( q . x , q . y ); pen = true ;} else octx . lineTo ( q . x , q . y );}}
octx . stroke ();
/* radar pings expanding through the ring plane */
if ( ! RM && t > nextPing ){ pings . push ({ t0 : t }); nextPing = t + 4200 + Math . random () * 2800 ;}
for ( let i = pings . length - 1 ; i >= 0 ; i -- ){
const f = ( t - pings [ i ]. t0 ) / 2500 ;
if ( f >= 1 ){ pings . splice ( i , 1 ); continue ;}
const rp = ( 1.04 + f * 1.16 ) * oR ;
octx . strokeStyle = `rgba(150,220,255, ${ (( 1 - f ) * . 32 ). toFixed ( 3 ) } )` ;
octx . lineWidth = 1 ; octx . beginPath (); let pen = false ;
for ( let k = 0 ; k <= 48 ; k ++ ){ const a = k / 48 * TAU ;
const q = P ( Math . cos ( a ) * rp , 0 , Math . sin ( a ) * rp );
const dx = q . x - oCX , dy = q . y - oCY ;
if ( q . z > 0 && dx * dx + dy * dy < oR * oR ){ pen = false ; continue ;}
if ( ! pen ){ octx . moveTo ( q . x , q . y ); pen = true ;} else octx . lineTo ( q . x , q . y );}
octx . stroke ();
}
/* satellites */
for ( const m of sats ){
const rm = m . rm * oR , ca = Math . cos ( m . a ), sa = Math . sin ( m . a );
const q = P ( ca * rm , - sa * rm * Math . sin ( m . inc ), sa * rm * Math . cos ( m . inc ));
if ( q . z > 0 ){ const dx = q . x - oCX , dy = q . y - oCY ; if ( dx * dx + dy * dy < oR * oR * . 93 ) continue ;}
const r = m . s * q . pr , cl = clamp (( q . pr - . 78 ) * 1.9 ,. 35 , 1 );
octx . globalCompositeOperation = 'lighter' ;
g = octx . createRadialGradient ( q . x , q . y , 0 , q . x , q . y , r * 5 );
g . addColorStop ( 0 , `rgba(170,225,255, ${ (. 5 * cl ). toFixed ( 3 ) } )` ); g . addColorStop ( 1 , 'rgba(170,225,255,0)' );
octx . fillStyle = g ; octx . beginPath (); octx . arc ( q . x , q . y , r * 5 , 0 , TAU ); octx . fill ();
octx . globalCompositeOperation = 'source-over' ;
g = octx . createRadialGradient ( q . x - r * . 35 , q . y - r * . 35 , 0 , q . x , q . y , r );
g . addColorStop ( 0 , 'rgba(240,250,255,.98)' ); g . addColorStop (. 55 , 'rgba(150,195,220,.95)' ); g . addColorStop ( 1 , 'rgba(40,70,100,.95)' );
octx . fillStyle = g ; octx . beginPath (); octx . arc ( q . x , q . y , r , 0 , TAU ); octx . fill ();
}
drawParts ( true ); /* near particles */
}
2026-10-14 16:48:17 +05:30
/* ═══════════════ ORBIT — draggable 3D multi-ring reactor system ═══════════════ */
const orbCv = $ ( '#orbitCv' ), orbCtx = orbCv ? orbCv . getContext ( '2d' ) : null , orbBox = orbCv ? orbCv . parentElement : null ;
let orbW = 0 , orbH = 0 , orbR = 0 , orbCX = 0 , orbCY = 0 , orbVis = false , orbInit = false ;
let orbYaw = . 48 , orbPitch = . 42 , orbPitchT = . 42 , orbYawV = . 0028 , orbDrag = false , orbLx = 0 , orbLy = 0 ;
let orbRings = [], orbNodes = [], orbPulses = [], orbDust = [], nextOrbPulse = 1800 ;
function orbitResize (){
if ( ! orbBox ||! orbCv ) return ;
const s = orbBox . clientWidth ; if ( ! s ) return ;
orbW = s ; orbH = s ;
orbCv . width = s * DPR ; orbCv . height = s * DPR ;
orbCv . style . width = s + 'px' ; orbCv . style . height = s + 'px' ;
orbCtx . setTransform ( DPR , 0 , 0 , DPR , 0 , 0 );
orbR = s * . 175 ; orbCX = s * . 5 ; orbCY = s * . 5 ;
}
function orbitBuild (){
orbRings = [
{ r : 1.18 , incX : . 35 , incY : . 25 , rotSpeed : . 55 , a : 0 , color : 'rgba(56,189,248,' , segs : 64 },
{ r : 1.62 , incX :- . 48 , incY : . 38 , rotSpeed :- . 42 , a : 1.2 , color : 'rgba(168,85,247,' , segs : 72 },
{ r : 2.08 , incX : . 22 , incY :- . 52 , rotSpeed : . 28 , a : 2.5 , color : 'rgba(14,165,233,' , segs : 80 }
];
orbNodes = [
{ ring : 0 , a : . 2 , w : . 55 , sz : 5.5 , label : 'WEB' , port : ':4100' , color : [ 56 , 189 , 248 ]},
{ ring : 0 , a : 3.3 , w : . 55 , sz : 5.0 , label : 'API' , port : ':4101' , color : [ 16 , 185 , 129 ]},
{ ring : 1 , a : 1.5 , w :- . 42 , sz : 6.0 , label : 'SVC' , port : ':4102' , color : [ 168 , 85 , 247 ]},
{ ring : 1 , a : 4.7 , w :- . 42 , sz : 4.8 , label : 'AUTH' , port : ':4103' , color : [ 245 , 158 , 11 ]},
{ ring : 2 , a : . 8 , w : . 28 , sz : 5.2 , label : 'DATA' , port : ':4104' , color : [ 14 , 165 , 233 ]},
{ ring : 2 , a : 3.9 , w : . 28 , sz : 5.6 , label : 'CRON' , port : ':4105' , color : [ 16 , 185 , 129 ]}
];
orbDust = [];
for ( let i = 0 ; i < 180 ; i ++ ){
const rr = . 75 + Math . random () * 1.55 ;
orbDust . push ({
rr ,
a : Math . random () * TAU ,
w : (. 7 / Math . pow ( rr , 1.4 )) * (. 85 + Math . random () * . 3 ),
y : ( Math . random () - 0.5 ) * . 35 ,
sz : Math . random () < . 1 ? 1.4 + Math . random () * . 8 : . 6 + Math . random () * . 6 ,
al : . 25 + Math . random () * . 65 ,
isPurple : Math . random () > . 5
});
}
}
if ( orbCv ){
orbCv . addEventListener ( 'pointerdown' , e =>{
orbDrag = true ; orbLx = e . clientX ; orbLy = e . clientY ;
try { orbCv . setPointerCapture ( e . pointerId );} catch ( _ ){}
document . body . classList . add ( 'grabbing' );
});
orbCv . addEventListener ( 'pointermove' , e =>{
if ( ! orbDrag ) return ;
const dx = e . clientX - orbLx , dy = e . clientY - orbLy ;
orbLx = e . clientX ; orbLy = e . clientY ;
orbYaw += dx * . 0056 ; orbYawV = dx * . 0056 ;
orbPitchT = clamp ( orbPitchT + dy * . 0035 , - . 6 , 1.2 );
});
[ 'pointerup' , 'pointercancel' ]. forEach ( ev => orbCv . addEventListener ( ev ,()=>{
orbDrag = false ; document . body . classList . remove ( 'grabbing' );
}));
}
function orbitFrame ( t , dt ){
if ( ! orbInit ){ orbitBuild (); orbInit = true ;}
if ( ! orbDrag ){
if ( ! RM ) orbYawV += (. 0028 - orbYawV ) * . 02 ;
else orbYawV *= . 9 ;
orbYaw += orbYawV ;
}
orbPitch += ( orbPitchT - orbPitch ) * . 09 ;
const cyw = Math . cos ( orbYaw ), syw = Math . sin ( orbYaw );
const cp = Math . cos ( orbPitch ), sp = Math . sin ( orbPitch );
const P = ( x , y , z )=>{
const x1 = x * cyw + z * syw , z1 =- x * syw + z * cyw ;
const y2 = y * cp - z1 * sp , z2 = y * sp + z1 * cp ;
const pr = 900 / ( 900 + z2 );
return { x : orbCX + x1 * pr , y : orbCY + y2 * pr , z : z2 , pr };
};
const ringPt = ( ring , angle )=>{
const rad = ring . r * orbR ;
const rx = Math . cos ( angle ) * rad ;
const ry = 0 ;
const rz = Math . sin ( angle ) * rad ;
const cx = Math . cos ( ring . incX ), sx = Math . sin ( ring . incX );
const y1 = ry * cx - rz * sx , z1 = ry * sx + rz * cx ;
const cy = Math . cos ( ring . incY ), sy = Math . sin ( ring . incY );
const x2 = rx * cy + z1 * sy , z2 =- rx * sy + z1 * cy ;
return P ( x2 , y1 , z2 );
};
orbCtx . clearRect ( 0 , 0 , orbW , orbH );
for ( const r of orbRings ) r . a += r . rotSpeed * dt ;
for ( const n of orbNodes ) n . a += n . w * dt ;
for ( const d of orbDust ) d . a += d . w * dt ;
/* Far dust */
for ( const d of orbDust ){
const q = P ( Math . cos ( d . a ) * d . rr * orbR , d . y * orbR , Math . sin ( d . a ) * d . rr * orbR );
if ( q . z > 0 ) continue ;
const al = d . al * clamp (( q . pr - . 75 ) * 1.8 ,. 2 , 1 );
orbCtx . fillStyle = d . isPurple ? `rgba(168,85,247, ${ al . toFixed ( 3 ) } )` : `rgba(56,189,248, ${ al . toFixed ( 3 ) } )` ;
orbCtx . beginPath (); orbCtx . arc ( q . x , q . y , d . sz * q . pr , 0 , TAU ); orbCtx . fill ();
}
/* Far ring segments */
for ( const ring of orbRings ){
orbCtx . lineWidth = 1.1 ;
for ( let k = 0 ; k < ring . segs ; k ++ ){
const a1 = ( k / ring . segs ) * TAU ;
const a2 = (( k + 1 ) / ring . segs ) * TAU ;
const q1 = ringPt ( ring , a1 );
const q2 = ringPt ( ring , a2 );
if ( q1 . z <= 0 || q2 . z <= 0 ){
const alpha = clamp (( q1 . pr - . 72 ) * 1.5 ,. 1 ,. 45 );
orbCtx . strokeStyle = ring . color + alpha . toFixed ( 3 ) + ')' ;
orbCtx . beginPath (); orbCtx . moveTo ( q1 . x , q1 . y ); orbCtx . lineTo ( q2 . x , q2 . y ); orbCtx . stroke ();
}
}
}
/* Central Quantum Engine Core / Docker Host */
const corePulse = . 5 + . 5 * Math . sin ( t * . 003 );
orbCtx . globalCompositeOperation = 'screen' ;
let cg = orbCtx . createRadialGradient ( orbCX , orbCY , orbR * . 2 , orbCX , orbCY , orbR * 1.7 );
cg . addColorStop ( 0 , `rgba(56,189,248, ${ (. 25 + corePulse * . 15 ). toFixed ( 3 ) } )` );
cg . addColorStop (. 5 , `rgba(168,85,247, ${ (. 12 + corePulse * . 08 ). toFixed ( 3 ) } )` );
cg . addColorStop ( 1 , 'rgba(0,0,0,0)' );
orbCtx . fillStyle = cg ; orbCtx . beginPath (); orbCtx . arc ( orbCX , orbCY , orbR * 1.7 , 0 , TAU ); orbCtx . fill ();
orbCtx . globalCompositeOperation = 'source-over' ;
cg = orbCtx . createRadialGradient ( orbCX - orbR * . 35 , orbCY - orbR * . 35 , orbR * . 05 , orbCX , orbCY , orbR * . 85 );
cg . addColorStop ( 0 , '#e0f2fe' );
cg . addColorStop (. 3 , '#38bdf8' );
cg . addColorStop (. 65 , '#6366f1' );
cg . addColorStop (. 9 , '#1e1b4b' );
cg . addColorStop ( 1 , '#05070d' );
orbCtx . fillStyle = cg ; orbCtx . beginPath (); orbCtx . arc ( orbCX , orbCY , orbR * . 85 , 0 , TAU ); orbCtx . fill ();
/* Rotating Core Hex Brackets */
orbCtx . save ();
orbCtx . translate ( orbCX , orbCY );
orbCtx . rotate ( t * . 0008 );
orbCtx . strokeStyle = 'rgba(56,189,248,.7)' ;
orbCtx . lineWidth = 1.4 ;
orbCtx . beginPath ();
for ( let i = 0 ; i < 6 ; i ++ ){
const ang = ( i / 6 ) * TAU ;
const hx = Math . cos ( ang ) * orbR * . 62 ;
const hy = Math . sin ( ang ) * orbR * . 62 ;
if ( i === 0 ) orbCtx . moveTo ( hx , hy ); else orbCtx . lineTo ( hx , hy );
}
orbCtx . closePath (); orbCtx . stroke ();
orbCtx . restore ();
/* Central Core Badge */
orbCtx . save ();
orbCtx . font = `700 ${ ( orbR * . 36 ) | 0 } px var(--font-disp, monospace)` ;
orbCtx . textAlign = 'center' ; orbCtx . textBaseline = 'middle' ;
orbCtx . fillStyle = '#ffffff' ;
orbCtx . shadowColor = 'rgba(56,189,248,.9)' ; orbCtx . shadowBlur = 10 ;
orbCtx . fillText ( '⬡' , orbCX , orbCY - 1 );
orbCtx . restore ();
/* Core Shockwave Radar Pings */
if ( ! RM && t > nextOrbPulse ){
orbPulses . push ({ t0 : t });
nextOrbPulse = t + 3200 + Math . random () * 2200 ;
}
for ( let i = orbPulses . length - 1 ; i >= 0 ; i -- ){
const f = ( t - orbPulses [ i ]. t0 ) / 2200 ;
if ( f >= 1 ){ orbPulses . splice ( i , 1 ); continue ;}
const prp = (. 85 + f * 1.4 ) * orbR ;
const alp = (( 1 - f ) * . 45 ). toFixed ( 3 );
orbCtx . strokeStyle = `rgba(56,189,248, ${ alp } )` ;
orbCtx . lineWidth = 1.5 ;
orbCtx . beginPath ();
orbCtx . arc ( orbCX , orbCY , prp , 0 , TAU );
orbCtx . stroke ();
}
/* Near Ring Segments */
for ( const ring of orbRings ){
orbCtx . lineWidth = 1.3 ;
for ( let k = 0 ; k < ring . segs ; k ++ ){
const a1 = ( k / ring . segs ) * TAU ;
const a2 = (( k + 1 ) / ring . segs ) * TAU ;
const q1 = ringPt ( ring , a1 );
const q2 = ringPt ( ring , a2 );
if ( q1 . z > 0 && q2 . z > 0 ){
const alpha = clamp (( q1 . pr - . 72 ) * 2.2 ,. 25 ,. 95 );
orbCtx . strokeStyle = ring . color + alpha . toFixed ( 3 ) + ')' ;
orbCtx . beginPath (); orbCtx . moveTo ( q1 . x , q1 . y ); orbCtx . lineTo ( q2 . x , q2 . y ); orbCtx . stroke ();
}
}
}
/* Container Nodes & Laser Beams */
const renderedNodes = orbNodes . map ( n =>{
const ring = orbRings [ n . ring ];
const pos = ringPt ( ring , n . a );
return {... n , pos };
}). sort (( a , b )=> a . pos . z - b . pos . z );
for ( const node of renderedNodes ){
const q = node . pos ;
const r = node . sz * q . pr ;
const [ cr , cg , cb ] = node . color ;
const cl = clamp (( q . pr - . 75 ) * 1.9 ,. 35 , 1 );
if ( q . z > 0 || Math . abs ( q . z ) < orbR * . 8 ){
const laserGrad = orbCtx . createLinearGradient ( orbCX , orbCY , q . x , q . y );
laserGrad . addColorStop ( 0 , `rgba(56,189,248, ${ (. 12 * cl ). toFixed ( 3 ) } )` );
laserGrad . addColorStop (. 7 , `rgba( ${ cr } , ${ cg } , ${ cb } , ${ (. 35 * cl ). toFixed ( 3 ) } )` );
laserGrad . addColorStop ( 1 , `rgba( ${ cr } , ${ cg } , ${ cb } , ${ (. 85 * cl ). toFixed ( 3 ) } )` );
orbCtx . strokeStyle = laserGrad ;
orbCtx . lineWidth = 1.2 ;
orbCtx . beginPath ();
orbCtx . moveTo ( orbCX , orbCY );
orbCtx . lineTo ( q . x , q . y );
orbCtx . stroke ();
const pktPos = ( t * . 0018 + node . a ) % 1 ;
const px = orbCX + ( q . x - orbCX ) * pktPos ;
const py = orbCY + ( q . y - orbCY ) * pktPos ;
orbCtx . fillStyle = '#fff' ;
orbCtx . beginPath ();
orbCtx . arc ( px , py , 1.8 * q . pr , 0 , TAU );
orbCtx . fill ();
}
orbCtx . globalCompositeOperation = 'lighter' ;
let g = orbCtx . createRadialGradient ( q . x , q . y , 0 , q . x , q . y , r * 4.5 );
g . addColorStop ( 0 , `rgba( ${ cr } , ${ cg } , ${ cb } , ${ (. 6 * cl ). toFixed ( 3 ) } )` );
g . addColorStop ( 1 , `rgba( ${ cr } , ${ cg } , ${ cb } ,0)` );
orbCtx . fillStyle = g ;
orbCtx . beginPath (); orbCtx . arc ( q . x , q . y , r * 4.5 , 0 , TAU ); orbCtx . fill ();
orbCtx . globalCompositeOperation = 'source-over' ;
g = orbCtx . createRadialGradient ( q . x - r * . 3 , q . y - r * . 3 , 0 , q . x , q . y , r );
g . addColorStop ( 0 , '#ffffff' );
g . addColorStop (. 45 , `rgb( ${ cr } , ${ cg } , ${ cb } )` );
g . addColorStop ( 1 , '#05070d' );
orbCtx . fillStyle = g ;
orbCtx . beginPath (); orbCtx . arc ( q . x , q . y , r , 0 , TAU ); orbCtx . fill ();
orbCtx . strokeStyle = `rgba(255,255,255, ${ (. 8 * cl ). toFixed ( 2 ) } )` ;
orbCtx . lineWidth = 1 ;
orbCtx . stroke ();
if ( q . z >- orbR * . 4 ){
orbCtx . save ();
orbCtx . font = `600 ${ Math . max ( 9 ,( 10 * q . pr ) | 0 ) } px var(--font-mono, monospace)` ;
orbCtx . textAlign = 'left' ;
orbCtx . textBaseline = 'middle' ;
orbCtx . fillStyle = `rgba(241,245,249, ${ (. 9 * cl ). toFixed ( 2 ) } )` ;
orbCtx . fillText ( ` ${ node . label } ${ node . port } ` , q . x + r + 6 , q . y );
orbCtx . restore ();
}
}
/* Near dust */
for ( const d of orbDust ){
const q = P ( Math . cos ( d . a ) * d . rr * orbR , d . y * orbR , Math . sin ( d . a ) * d . rr * orbR );
if ( q . z <= 0 ) continue ;
const al = d . al * clamp (( q . pr - . 75 ) * 2.2 ,. 35 , 1 );
orbCtx . fillStyle = d . isPurple ? `rgba(192,132,252, ${ al . toFixed ( 3 ) } )` : `rgba(125,211,252, ${ al . toFixed ( 3 ) } )` ;
orbCtx . beginPath (); orbCtx . arc ( q . x , q . y , d . sz * q . pr , 0 , TAU ); orbCtx . fill ();
}
}
2026-10-14 12:37:48 +05:30
/* ═══════════════ UI — cursor · reveals · scramble · telemetry ═══════════════ */
let curDot = null , curRing = null , curShown = false , crx = innerWidth / 2 , cry = innerHeight / 2 ;
if ( FINE &&! RM ){ curDot = $ ( '#curDot' ); curRing = $ ( '#curRing' ); document . body . classList . add ( 'has-cur' );}
addEventListener ( 'mousemove' , e =>{
mouse . px = e . clientX ; mouse . py = e . clientY ;
mouse . x = e . clientX / innerWidth ; mouse . y = e . clientY / innerHeight ;
if ( curRing &&! curShown ){ curShown = true ; document . body . classList . add ( 'cur-vis' ); crx = mouse . px ; cry = mouse . py ;}
if ( curRing ){
const el = e . target instanceof Element ? e . target : null ;
curRing . classList . toggle ( 'act' , !! ( el && el . closest ( 'a,button' )));
curRing . classList . toggle ( 'drag' , !! ( el && el . closest ( '[data-cursor="drag"]' )));
}
},{ passive : true });
document . addEventListener ( 'mouseleave' ,()=>{ document . body . classList . remove ( 'cur-vis' ); curShown = false ;});
/* nav state + scroll cache */
const nav = $ ( '#nav' );
addEventListener ( 'scroll' ,()=>{ scr = scrollY ; nav . classList . toggle ( 'scrolled' , scr > 40 );},{ passive : true });
/* mobile menu */
$ ( '#burger' ). addEventListener ( 'click' ,()=> document . body . classList . toggle ( 'm-open' ));
$$ ( '#mmenu a' ). forEach ( a => a . addEventListener ( 'click' ,()=> document . body . classList . remove ( 'm-open' )));
/* text scramble decode */
const SCR_CH = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<>/\\[]·' ;
function scramble ( el ){
const target = el . dataset . txt ;
if ( RM ){ el . textContent = target ; return ;}
let f = 0 ; const total = Math . max ( 16 , target . length * 1.15 );
const iv = setInterval (()=>{
f ++ ; const done = Math . floor ( target . length * f / total ); let s = '' ;
for ( let i = 0 ; i < target . length ; i ++ ){
const ch = target [ i ];
s += i < done ? ch : ( ch === ' ' ? ' ' : SCR_CH [( Math . random () * SCR_CH . length ) | 0 ]);
}
el . textContent = s ;
if ( f >= total ){ el . textContent = target ; clearInterval ( iv );}
}, 26 );
}
$$ ( '[data-scr]' ). forEach ( el =>{ el . dataset . txt = el . textContent ;});
/* scroll reveal */
const rio = new IntersectionObserver ( es =>{ for ( const en of es ){
if ( ! en . isIntersecting ) continue ;
en . target . classList . add ( 'in' );
en . target . querySelectorAll ( '[data-scr]' ). forEach ( scramble );
rio . unobserve ( en . target );
}},{ threshold : . 15 , rootMargin : '0px 0px -7% 0px' });
$$ ( '[data-reveal]' ). forEach ( el => rio . observe ( el ));
setTimeout (()=> scramble ( $ ( '#tagScr' )), 350 );
/* canvas visibility gating (perf) */
const vio = new IntersectionObserver ( es =>{ for ( const en of es ){
if ( en . target === fbox ) fVis = en . isIntersecting ;
if ( en . target === obox ) oVis = en . isIntersecting ;
2026-10-14 16:48:17 +05:30
if ( orbBox && en . target === orbBox ) orbVis = en . isIntersecting ;
2026-10-14 12:37:48 +05:30
}},{ rootMargin : '80px' });
2026-10-14 16:48:17 +05:30
vio . observe ( fbox ); vio . observe ( obox ); if ( orbBox ) vio . observe ( orbBox );
2026-10-14 12:37:48 +05:30
/* magnetic buttons */
if ( FINE &&! RM ) $$ ( '.mag' ). forEach ( b =>{
b . addEventListener ( 'pointermove' , e =>{
const r = b . getBoundingClientRect ();
b . style . transform = `translate( ${ ( e . clientX - r . left - r . width / 2 ) * . 16 } px, ${ ( e . clientY - r . top - r . height / 2 ) * . 22 } px)` ;
});
b . addEventListener ( 'pointerleave' ,()=>{ b . style . transform = '' ;});
});
/* forge terminal — self-typing deploy log */
const termBody = $ ( '#termBody' );
const TSCRIPT = [
[[ 'cosmos:~$ ' , 'tp' ],[ 'git push origin main' , 'tw' ]],
[[ '» ' , 'tc' ],[ 'compressing objects ' , 'tc' ],[ '100%' , 'ta' ]],
[[ '» ' , 'tc' ],[ 'integrity verified' , 'tc' ]],
[[ '» ' , 'tc' ],[ 'deployed → ' , 'tc' ],[ 'forge.internal' , 'to' ]],
];
let tli = 0 , tsi = 0 , tci = 0 , tel = null ;
function typeStep (){
if ( RM ){ termBody . innerHTML = TSCRIPT . map ( l => l . map ( s => `<span class="t- ${ s [ 1 ] } "> ${ s [ 0 ] } </span>` ). join ( '' )). join ( '<br>' ); return ;}
if ( tli >= TSCRIPT . length ){ setTimeout (()=>{ termBody . textContent = '' ; tli = 0 ; tsi = 0 ; tci = 0 ; typeStep ();}, 3400 ); return ;}
const line = TSCRIPT [ tli ];
if ( tsi >= line . length ){ termBody . appendChild ( document . createElement ( 'br' )); tli ++ ; tsi = 0 ; tci = 0 ; setTimeout ( typeStep , 340 ); return ;}
const seg = line [ tsi ];
if ( tci === 0 ){ tel = document . createElement ( 'span' ); tel . className = 't-' + seg [ 1 ]; termBody . appendChild ( tel );}
tel . textContent = seg [ 0 ]. slice ( 0 , ++ tci );
if ( tci >= seg [ 0 ]. length ){ tsi ++ ; tci = 0 ;}
setTimeout ( typeStep , 22 + Math . random () * 34 );
}
setTimeout ( typeStep , 900 );
/* oort stats — live jitter + telemetry bars */
const stRps = $ ( '#stRps' ), stLat = $ ( '#stLat' );
setInterval (()=>{
if ( RM ) return ;
stLat . textContent = ( 3.2 + Math . random () * . 95 ). toFixed ( 2 );
stRps . textContent = ( 32000 + (( Math . random () * 880 ) | 0 ) - 440 ). toLocaleString ( 'en-US' );
}, 1500 );
const bars = $ ( '#bars' );
for ( let i = 0 ; i < 14 ; i ++ ){
const b = document . createElement ( 'i' );
b . style . height = ( 5 + Math . random () * 17 ) + 'px' ;
b . style . animationDuration = (. 7 + Math . random () * . 9 ) + 's' ;
b . style . animationDelay = ( - Math . random () * 2 ). toFixed ( 2 ) + 's' ;
bars . appendChild ( b );
}
2026-10-14 16:48:17 +05:30
/* orbit stats — live jitter + telemetry bars */
const orbPorts = $ ( '#orbPorts' );
if ( orbPorts ){
const portsList = [ ':4100' , ':4102' , ':4105' , ':4280' , ':4310' , ':4450' ];
setInterval (()=>{
if ( RM ) return ;
orbPorts . textContent = portsList [( Math . random () * portsList . length ) | 0 ];
}, 2200 );
}
const orbitBars = $ ( '#orbitBars' );
if ( orbitBars ){
for ( let i = 0 ; i < 14 ; i ++ ){
const b = document . createElement ( 'i' );
b . style . height = ( 5 + Math . random () * 17 ) + 'px' ;
b . style . animationDuration = (. 6 + Math . random () * . 8 ) + 's' ;
b . style . animationDelay = ( - Math . random () * 2 ). toFixed ( 2 ) + 's' ;
orbitBars . appendChild ( b );
}
}
2026-10-14 12:37:48 +05:30
/* HUD telemetry — UTC clock, pointer RA/DEC, session uptime */
const hudRa = $ ( '#hudRa' ), hudDec = $ ( '#hudDec' ), hudUtc = $ ( '#hudUtc' ), ftUp = $ ( '#ftUp' );
const t0 = Date . now ();
setInterval (()=>{
const s = (( Date . now () - t0 ) / 1000 ) | 0 ;
ftUp . textContent = `SESSION T+ ${ p2 ( s / 3600 | 0 ) } : ${ p2 (( s / 60 | 0 ) % 60 ) } : ${ p2 ( s % 60 ) } ` ;
}, 1000 );
const lineEls = $$ ( '.hero-title .msk' );
let fc = 0 ;
function uiFrame ( t ){
if ( curDot ){
curDot . style . transform = `translate( ${ mouse . px } px, ${ mouse . py } px)` ;
crx += ( mouse . px - crx ) * . 18 ; cry += ( mouse . py - cry ) * . 18 ;
curRing . style . transform = `translate( ${ crx } px, ${ cry } px)` ;
}
if ( ! RM && scr < innerHeight && lineEls . length ){
const ox = mouse . sx - . 5 , oy = mouse . sy - . 5 , K = [ 16 , 26 , 10 ];
lineEls . forEach (( el , i )=>{ el . style . transform = `translate3d( ${ ox * K [ i ] } px, ${ oy * K [ i ] * . 45 } px,0)` ;});
}
if (( fc ++% 12 ) === 0 ){
const d = new Date ();
hudUtc . textContent = ` ${ p2 ( d . getUTCHours ()) } : ${ p2 ( d . getUTCMinutes ()) } : ${ p2 ( d . getUTCSeconds ()) } UTC` ;
const ra = mouse . sx * 24 , dec = (. 5 - mouse . sy ) * 168 ;
const ad = Math . abs ( dec );
hudRa . textContent = `RA ${ p2 ( ra | 0 ) } h ${ p2 (( ra * 60 | 0 ) % 60 ) } m ${ p2 (( ra * 3600 | 0 ) % 60 ) } s` ;
hudDec . textContent = `DEC ${ dec < 0 ? '− ' : '+' }${ p2 ( ad | 0 ) } ° ${ p2 (( ad * 60 | 0 ) % 60 ) } ′ ${ p2 (( ad * 3600 | 0 ) % 60 ) } ″` ;
}
}
/* ═══════════════ BOOT + MAIN LOOP ═══════════════ */
skyResize (); buildStars (); nebTex = makeNebula ();
addEventListener ( 'resize' ,()=>{ skyResize (); buildStars ();});
new ResizeObserver ( forgeResize ). observe ( fbox );
new ResizeObserver ( oortResize ). observe ( obox );
2026-10-14 16:48:17 +05:30
if ( orbBox ) new ResizeObserver ( orbitResize ). observe ( orbBox );
forgeResize (); oortResize (); if ( orbBox ) orbitResize ();
2026-10-14 12:37:48 +05:30
/* pre-bake forge textures during idle time so scrolling never hitches */
const warm = ()=>{ if ( ! fInit ) forgeInit ();};
if ( 'requestIdleCallback' in window ) requestIdleCallback ( warm ,{ timeout : 2500 }); else setTimeout ( warm , 1800 );
let lastT = performance . now ();
function loop ( t ){
const dt = RM ? 0 : Math . min (. 05 ,( t - lastT ) / 1000 ) || . 016 ;
lastT = t ;
mouse . sx += ( mouse . x - mouse . sx ) * . 06 ;
mouse . sy += ( mouse . y - mouse . sy ) * . 06 ;
const tt = RM ? 2000 : t ;
skyFrame ( tt , dt );
if ( fVis ) forgeFrame ( tt , dt );
if ( oVis ) oortFrame ( tt , dt );
2026-10-14 16:48:17 +05:30
if ( orbVis ) orbitFrame ( tt , dt );
2026-10-14 12:37:48 +05:30
uiFrame ( t );
requestAnimationFrame ( loop );
}
requestAnimationFrame ( loop );
})();
</ script >
</ body >
</ html >