/* --- THEME: STARLIGHT & ROCK (GLOBAL) --- */
:root {
  /* Brand Colors (Plotly-Standard) */
  --brand-blue: #636EFA;
  --brand-purple: #AB63FA;
  --brand-teal: #00CC96;
  --brand-orange: #EF553B;
  
  /* Core Palette */
  --neon-white: #f8fafc;
  --neon-soft: rgba(226, 232, 240, 0.5);
  --deep-space: #020617;
  --rock-dark: #1e293b;
  --rock-light: #475569;
  
  /* Glassmorphism */
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(15, 23, 42, 0.85);
}

* { box-sizing:border-box; margin: 0; padding: 0; }
html, body { height:100%; overflow: hidden; background: var(--deep-space); color: var(--neon-white); font-family: 'Outfit', sans-serif; letter-spacing: 0.5px; }

/* BACKGROUND */
canvas#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* --- PLANET TEXTURES --- */
.earth-surface {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4ade80 0%, #059669 25%, #0369a1 50%, #0f172a 85%, #020617 100%);
  box-shadow: inset 10px 10px 60px rgba(255,255,255,0.15), inset -20px -20px 80px rgba(0,0,0,0.95), 0 0 40px rgba(14, 165, 233, 0.15);
  border: none; position: relative; cursor: pointer; transition: opacity 0.5s ease;
}

.moon-surface {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #e2e8f0 0%, #94a3b8 30%, #64748b 60%, #1e293b 90%, #020617 100%);
  box-shadow: inset 2px 2px 10px rgba(255,255,255,0.3), 0 0 15px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #0f172a !important; text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}
.moon-surface:hover { transform: scale(1.15); box-shadow: 0 0 25px rgba(255, 255, 255, 0.3); z-index: 50; }

.sun-surface {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff7ed 0%, #fcd34d 20%, #f59e0b 50%, #ea580c 85%, #7c2d12 100%);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.8), 0 0 60px rgba(251, 191, 36, 0.6), 0 0 100px rgba(245, 158, 11, 0.3);
  cursor: pointer; transition: transform 0.3s; animation: pulseSun 4s ease-in-out infinite;
  color: #451a03; font-family: 'Orbitron', sans-serif; font-size: 0.85rem; font-weight: 900; text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}
.sun-surface:hover { transform: scale(1.15); box-shadow: 0 0 80px rgba(251, 191, 36, 0.9); }
@keyframes pulseSun { 0%,100%{ box-shadow: 0 0 60px rgba(251, 191, 36, 0.6); } 50%{ box-shadow: 0 0 90px rgba(251, 191, 36, 0.8); } }

/* --- MAIN LAYOUT --- */
.wheel { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(60vw, 500px); height: min(60vw, 500px); z-index: 10; }
.satellite { position: absolute; width: 90px; height: 90px; z-index: 20; display: flex; justify-content: center; align-items: center; text-align: center; font-family: 'Orbitron', sans-serif; font-size: 0.65rem; font-weight: 800; text-transform: uppercase; }

/* POSITIONING */
.pos-left { top: 50%; left: -110px; transform: translateY(-50%); }
.pos-right { top: 50%; right: -110px; transform: translateY(-50%); }
.pos-bottom { bottom: -110px; left: 50%; transform: translateX(-50%); }
 
.portfolio-orbit { position: fixed; top: 8%; right: 8%; width: 120px; height: 120px; z-index: 100; display: flex; justify-content: center; align-items: center; }

/* --- CENTER TEXT --- */
.center-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 80%; height: 80%; display: flex; flex-direction: column; justify-content: center; align-items: center; pointer-events: none; text-align: center; z-index: 30; }
#ccTitle { margin: 0 0 10px 0; font-family: 'Orbitron', sans-serif; font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 900; letter-spacing: 2px; color: #ffffff; text-shadow: 0 4px 15px rgba(0,0,0,0.6); }
#ccText { color: #f1f5f9; font-size: clamp(0.7rem, 1.2vh, 1.0rem); line-height: 1.5; font-weight: 400; text-wrap: balance; width: 100%; max-width: 420px; text-shadow: 0 2px 5px rgba(0,0,0,0.9); overflow: hidden; padding: 0 10px; }
#ccText b { color: #86efac; font-weight: 700; display: block; margin-bottom: 6px; font-size: 1.1em; letter-spacing: 1px; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 6px; display: inline-block; }
#ccText ul { text-align: left; padding-left: 15px; margin-top: 5px; font-size: 0.9em; }
#ccText li { margin-bottom: 4px; }


/* ========================================= */
/* SATELLITE HANGAR STYLES */
/* ========================================= */
 
.hangar-overlay {
  position: fixed; inset: 0; z-index: 500; background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(10px); display: none; opacity: 0; transition: opacity 0.5s ease;
  flex-direction: column; justify-content: center; align-items: center;
}
 
.hangar-grid {
  position: absolute; inset: 0; 
  background-image: 
    linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  perspective: 1000px; transform: scale(1.2); opacity: 0.2; pointer-events: none;
}

.hangar-title {
  font-family: 'Orbitron', sans-serif; font-size: 2rem; color: var(--brand-blue);
  text-shadow: 0 0 15px var(--brand-blue); margin-bottom: 60px; z-index: 10; letter-spacing: 3px;
  text-align: center;
}

.satellite-belt {
  display: flex; gap: 60px; z-index: 10; perspective: 1000px; flex-wrap: wrap; justify-content: center;
}

/* --- SATELLITE OBJECT DESIGN --- */
.satellite-unit {
  position: relative; width: 140px; height: 140px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.satellite-unit:hover { transform: translateY(-15px) scale(1.1); }
.satellite-unit:hover .sat-body { box-shadow: 0 0 30px var(--glow-color); border-color: #fff; }
.satellite-unit:hover .sat-wing { background: rgba(255,255,255,0.9); box-shadow: 0 0 20px var(--glow-color); }
.satellite-unit:hover .sat-label { color: #fff; text-shadow: 0 0 10px #fff; opacity: 1; transform: translateY(10px); }

.sat-body {
  width: 60px; height: 60px; background: #0f172a; border: 2px solid var(--neon-color);
  border-radius: 12px; display: grid; place-items: center; z-index: 2;
  box-shadow: 0 0 15px var(--glow-color), inset 0 0 10px var(--glow-color);
  transition: all 0.3s ease; position: relative;
}
.sat-body i { font-size: 1.5rem; color: #fff; }

.sat-wing {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 35px; height: 50px; background: rgba(255,255,255,0.1);
  border: 1px solid var(--neon-color); z-index: 1;
  transition: all 0.3s ease;
}
.sat-wing.left { left: -20px; border-radius: 4px 0 0 4px; border-right: none; }
.sat-wing.right { right: -20px; border-radius: 0 4px 4px 0; border-left: none; }
 
.sat-wing::after {
  content:''; position: absolute; inset: 0;
  background: linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 100% 25%;
}

.sat-label {
  margin-top: 25px; font-family: 'Share Tech Mono', monospace; font-size: 0.9rem;
  color: var(--neon-color); letter-spacing: 1px; opacity: 0.7;
  transition: all 0.3s ease; text-align: center;
}

/* --- APP CONTAINERS --- */
.app-frame {
  display: none; position: fixed; inset: 0; z-index: 2000; background: #000;
  animation: zoomIn 0.5s ease-out;
}
@keyframes zoomIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- BUTTON: TOP CENTER POSITIONED --- */
.close-hangar {
  position: absolute;
  top: 15px; 
  left: 50%;  /* Center Horizontal */
  transform: translateX(-50%); /* Center Alignment */
  right: auto;
  
  background: rgba(15, 23, 42, 0.4); 
  border: 1px solid var(--glass-border);
  color: var(--brand-blue);
  padding: 8px 16px;
  border-radius: 30px; 
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 1px;
  cursor: pointer;
  z-index: 3000;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.close-hangar:hover {
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  border-color: var(--brand-blue);
  box-shadow: 0 0 15px rgba(99, 110, 250, 0.4);
}

.close-hangar i { font-size: 0.8rem; }

/* --- SATELLITE SCANNING ANIMATION (LOADER) --- */
.iframe-wrapper { position: relative; width: 100%; height: 100%; background: #000; }

.iframe-loader {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; height: 2px;
    background: var(--brand-blue);
    box-shadow: 0 0 15px var(--brand-blue), 0 0 30px var(--brand-blue);
    animation: scanner 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes scanner {
    0% { transform: translate(-50%, -100px) scaleX(0.5); opacity: 0; }
    50% { opacity: 1; transform: translate(-50%, 0) scaleX(1); }
    100% { transform: translate(-50%, 100px) scaleX(0.5); opacity: 0; }
}

.loading-text {
    position: absolute; top: calc(50% + 20px); left: 50%;
    transform: translateX(-50%);
    font-family: 'Share Tech Mono', monospace;
    color: var(--brand-blue);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    text-shadow: 0 0 5px var(--brand-blue);
    animation: pulseText 2s infinite;
}
@keyframes pulseText { 0%,100%{opacity:0.6} 50%{opacity:1} }


@media (max-width: 980px){ 
  .wheel { width: 85vw; height: 85vw; } 
  .satellite { width: 65px; height: 65px; font-size: 0.5rem; }
  .pos-left { left: -35px; } .pos-right { right: -35px; }
  .pos-bottom { bottom: -35px; }
  .portfolio-orbit { top: 20px; right: 20px; width: 80px; height: 80px; font-size: 0.6rem; }
  #ccTitle { font-size: 1.5rem; margin-bottom: 5px; }
  #ccText { font-size: 0.7rem; line-height: 1.2; padding: 0 15px; }
  #ccText b { font-size: 0.9rem; margin-bottom: 4px; }
  .satellite-belt { gap: 40px; }
  .hangar-title { font-size: 1.5rem; }
}
