/* ==========================================================================
   1. GLOBAL CANVAS & 3D STARFIELD ENGINE
   ========================================================================== */
body {
  background-color: #020408; 
  color: #00ffcc; 
  font-family: 'Courier Prime', 'Courier New', monospace;
  margin: 0;
  padding: 20px; 
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Setup the 3D viewport canvas */
.galaxy-container {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -2; 
  perspective: 400px; 
  overflow: hidden;
  background: radial-gradient(circle at center, #06122c 0%, #020408 85%);
  transform-style: preserve-3d;
}

.star-layer {
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background-repeat: repeat;
  transform-style: preserve-3d;
}

.layer-1 {
  background-image: radial-gradient(circle, #fff 1.5px, transparent 1.5px);
  background-size: 250px 250px;
  animation: warpDrive 14s linear infinite;
}
.layer-2 {
  background-image: radial-gradient(circle, #00ffcc 1px, transparent 1px);
  background-size: 180px 180px;
  animation: warpDrive 9s linear infinite;
  animation-delay: -3s;
}
.layer-3 {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.4) 2px, transparent 2px);
  background-size: 320px 320px;
  animation: warpDrive 6s linear infinite;
  animation-delay: -1.5s;
}

@keyframes warpDrive {
  0% { transform: translateZ(-300px) rotate(0deg); opacity: 0; }
  15% { opacity: 0.6; }
  90% { opacity: 0.9; }
  100% { transform: translateZ(300px) rotate(10deg); opacity: 0; }
}

/* ==========================================================================
   2. CELESTIAL BACKGROUND OBJECTS
   ========================================================================== */
.space-object {
  position: absolute;
  border-radius: 50%;
  transform-style: preserve-3d;
}

.planet-alpha {
  width: 180px; height: 180px; top: 15%; left: 5%;
  background: radial-gradient(circle at 30% 30%, #0044ff 0%, #03143c 60%, #000000 100%);
  box-shadow: 0 0 25px rgba(0, 68, 255, 0.4);
  animation: flyPastLeft 22s linear infinite;
}
.moon-satellite {
  position: absolute; width: 25px; height: 25px; top: 40%; left: 40%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #aaaaaa 0%, #333333 80%);
  animation: moonOrbit 6s ease-in-out infinite;
}
.planet-beta {
  width: 110px; height: 110px; top: 55%; right: 10%;
  background: radial-gradient(circle at 40% 40%, #ff3300 0%, #4a0a00 70%, #000000 100%);
  box-shadow: 0 0 20px rgba(255, 51, 0, 0.3);
  animation: flyPastRight 16s linear infinite;
  animation-delay: -5s; 
}
.cosmic-nova {
  width: 80px; height: 80px; top: 20%; right: 25%;
  background: radial-gradient(circle, #ffffff 0%, #ff00ff 30%, #ff6600 60%, transparent 100%);
  animation: flyPastRight 12s linear infinite;
  animation-delay: -2s;
}
.black-hole {
  width: 70px; height: 70px; top: 60%; left: 20%;
  background: #000000;
  box-shadow: 0 0 30px #000, 0 0 10px #ff00ff;
  animation: flyPastLeft 28s linear infinite;
  animation-delay: -8s;
}
.accretion-disk {
  position: absolute; width: 220%; height: 60%; top: 20%; left: -60%;
  border-radius: 50%; border: 4px solid #ffaa00; border-top-color: #ff00ff;
  box-shadow: 0 0 15px #ff5500; transform: rotateX(70deg) rotateY(10deg);
  animation: spin 3s linear infinite;
}

@keyframes flyPastLeft {
  0% { transform: translate3d(-100px, -50px, -400px); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translate3d(-400px, 150px, 350px); opacity: 0; }
}
@keyframes flyPastRight {
  0% { transform: translate3d(100px, 50px, -400px); opacity: 0; }
  15% { opacity: 0.9; }
  85% { opacity: 0.9; }
  100% { transform: translate3d(500px, -150px, 350px); opacity: 0; }
}
@keyframes moonOrbit {
  0% { transform: translateX(-140px) translateZ(-1px) scale(0.9); z-index: -1; }
  50% { transform: translateX(140px) translateZ(1px) scale(1.2); z-index: 1; }
  100% { transform: translateX(-140px) translateZ(-1px) scale(0.9); z-index: -1; }
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ==========================================================================
   3. FLIGHT SHIP PATROL & BLUE ION TRAIL GENERATOR
   ========================================================================== */
.starship-vessel {
  position: absolute;
  width: 60px;
  height: 40px;
  z-index: 4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'><path d='M90,30 L50,15 L30,20 L10,12 L15,30 L10,48 L30,40 L50,45 Z' fill='%231f2d4d' stroke='%2300ffcc' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  animation: orbitFlightPath 20s ease-in-out infinite;
}

.blue-trail {
  position: absolute;
  left: -90px; top: 14px; width: 95px; height: 12px;
  background: linear-gradient(to right, transparent, rgba(0, 102, 255, 0.2), #00ffcc);
  clip-path: polygon(0 50%, 100% 0, 100% 100%); 
  filter: blur(1px);
  animation: trailFlicker 0.1s linear infinite;
  transform-origin: right center;
}

@keyframes orbitFlightPath {
  0% { top: 80%; left: -10%; transform: rotate(15deg) scale(0.7); }
  25% { top: 25%; left: 30%; transform: rotate(-10deg) scale(0.9); }
  50% { top: 40%; left: 75%; transform: rotate(20deg) scale(0.6); }
  75% { top: 70%; left: 40%; transform: rotate(-25deg) scale(1.1); }
  100% { top: 15%; left: 110%; transform: rotate(5deg) scale(0.7); }
}

@keyframes trailFlicker {
  0%, 100% { transform: scaleY(1); opacity: 0.85; }
  50% { transform: scaleY(1.3) skewY(2deg); opacity: 1; }
}

/* ==========================================================================
   4. RETRO INTERFACE NAVIGATION BAR
   ========================================================================== */
header {
  background: rgba(11, 15, 25, 0.85);
  border: 3px double #00ffcc;       
  margin-top: 0;                     
  margin-bottom: 25px;               
  position: relative;
  z-index: 10;
  width: auto;
  max-width: 100%;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: space-around;
  padding: 12px;                     
  margin: 0;
}

nav a {
  color: #00ffcc;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 1px;               
  white-space: nowrap;               
}

nav a:hover, nav a.active {
  background-color: #00ffcc;
  color: #020408; 
}

/* ==========================================================================
   5. CENTRAL COMMAND CONSOLE CONTEXT PANEL
   ========================================================================== */
main {
  width: 100%;
  box-sizing: border-box;
}

.content-container {
  max-width: 900px;                  
  margin: 0 auto;
  background: rgba(8, 12, 20, 0.88); 
  border: 2px solid #00ffcc;
  box-shadow: 0 0 25px rgba(0, 255, 204, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 5;
}

.terminal-header {
  background: #00ffcc; color: #020408; padding: 6px 12px;
  display: flex; justify-content: space-between; font-weight: bold; font-size: 0.9rem;
}

.terminal-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Core layout axis leveling */
  text-align: center;  
}

.crt-scanlines {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
  background-size: 100% 4px; z-index: 5; pointer-events: none;
}

/* ==========================================================================
   6. INNER SITE TYPOGRAPHY & CONSOLE TEXT LOGIC
   ========================================================================== */
h1 { 
  font-size: 1.8rem; 
  color: #ffffff; 
  margin-top: 0; 
  text-align: center;
  text-shadow: 0 0 8px #00ffcc; 
  width: 100%;
}

h2 { 
  font-size: 1.2rem; 
  color: #ffcc00; 
  margin-bottom: 20px; 
  text-align: center;
  width: 100%;
}

p { 
  line-height: 1.6; 
  font-size: 1.05rem; 
  color: #e6ffff; 
  text-align: center; 
  max-width: 750px;   
  margin-left: auto;
  margin-right: auto;
}

.query-text {
  font-family: 'Courier Prime', 'Courier New', monospace;
  color: #ffcc00; 
  text-align: center;
  width: 100%;
  margin: 10px auto 30px auto;
  letter-spacing: 2px;
  font-weight: bold;
}

.profile-section { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center;
  gap: 20px; 
  margin-bottom: 35px; 
  width: 100%;
}

/* ==========================================================================
   7. PHOTO IMAGE FRAMES (MAX CONTAINER FIT)
   ========================================================================== */
.normal-image-frame {
  border: 3px solid #00ffcc; 
  background: #111; 
  padding: 6px;
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.2); 
  box-sizing: border-box;
  display: block;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%; /* Expands to completely match inner panel width */
  margin: 0 auto 20px auto;
}

.normal-image-frame img { 
  width: 100%; 
  height: auto;       
  display: block; 
  object-fit: cover; 
}

.profile-section .normal-image-frame {
  max-width: 350px; /* Scaling bounds limit on profile layout */
}

/* ==========================================================================
   8. PROJECTS ARCHIVE VERTICAL STACK LAYOUT
   ========================================================================== */
.projects-container { 
  display: flex; 
  flex-direction: column; 
  gap: 50px; 
  width: 100%; 
  align-items: center; 
}

.project-card { 
  width: 100%; 
  border-bottom: 1px dashed rgba(0, 255, 204, 0.3); 
  padding-bottom: 40px; 
  display: flex;
  flex-direction: column;
  align-items: center; 
  text-align: center; 
}

.project-card:last-child { border-bottom: none; padding-bottom: 0; }

/* ==========================================================================
   9. RESPONSIVE MEDIA BREAKPOINTS
   ========================================================================== */
@media (max-width: 768px) {
  nav ul { flex-direction: column; align-items: center; gap: 12px; padding: 15px 0; }
  nav a { display: block; width: 100%; text-align: center; padding: 8px 0; }
  .profile-section .normal-image-frame { max-width: 100%; }
}