/* 
   3D Infinite Universe Portfolio Style Sheet
   Architecture: Obsidan-to-Midnight-Blue Cosmic Space HUD 
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  /* Color Palette Tokens */
  --space-obsidian: #04060a;
  --space-midnight: #090d16;
  --neon-orange: #ff7f50;
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff00ff;
  --neon-green: #39ff14;
  --neon-yellow: #ffd700;
  
  /* Glassmorphism Tokens */
  --hud-bg: rgba(9, 13, 22, 0.75);
  --hud-border: rgba(0, 240, 255, 0.15);
  --hud-border-glow: rgba(0, 240, 255, 0.05);
  --hud-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(0, 240, 255, 0.05);
  
  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  
  /* Transitions */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: var(--font-body);
  background-color: var(--space-obsidian);
  color: #e2e8f0;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  /* Prevent text selection highlight on double clicking interactive areas */
  user-select: none;
  -webkit-user-select: none;
}

/* Deep Space Backdrop & Nebulae */
.nebula-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: floatNebula 35s infinite alternate ease-in-out;
  pointer-events: none;
}

.nebula-cobalt {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 50, 255, 0.4) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-duration: 40s;
}

.nebula-magenta {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 0, 180, 0.3) 0%, transparent 70%);
  bottom: -15%;
  right: -10%;
  animation-duration: 45s;
}

.nebula-gold {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 180, 0, 0.25) 0%, transparent 70%);
  top: 35%;
  left: 35%;
  animation-duration: 32s;
}

@keyframes floatNebula {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 40px) scale(1.1); }
  100% { transform: translate(-60px, 90px) scale(0.95); }
}

/* Universe Canvas styling */
#universeCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: grab;
  transition: filter 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#universeCanvas:active {
  cursor: grabbing;
}



/* Header Panel styling */
header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem;
  width: 100%;
  pointer-events: none;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
  cursor: pointer;
}

.stellar-core-icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stellar-dot {
  width: 6px;
  height: 6px;
  background-color: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan);
}

.stellar-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px dashed var(--neon-cyan);
  border-radius: 50%;
  animation: spinIcon 10s infinite linear;
}

@keyframes spinIcon {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 40%, var(--neon-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: auto;
}

/* Interactive HUD buttons */
.hud-btn {
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  box-shadow: var(--hud-shadow);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.hud-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25), inset 0 0 15px rgba(0, 240, 255, 0.1);
  transform: translateY(-2px);
}

.hud-btn:active {
  transform: translateY(0);
}

.esc-orbit-btn {
  opacity: 0;
  transform: scale(0.9) translateY(-10px);
  pointer-events: none;
  border-color: var(--neon-orange);
  color: var(--neon-orange);
}

.esc-orbit-btn.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.esc-orbit-btn:hover {
  border-color: var(--neon-orange);
  color: var(--neon-orange);
  box-shadow: 0 0 15px rgba(255, 127, 80, 0.25), inset 0 0 15px rgba(255, 127, 80, 0.1);
}

.sound-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.icon-audio {
  width: 18px;
  height: 18px;
  transition: var(--transition-fast);
}

.sound-btn.mute .volume-waves {
  display: none;
}

.sound-btn.active-sound {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2), inset 0 0 10px rgba(0, 240, 255, 0.05);
}

/* Dynamic coordinates HUD */
.hud-coordinates {
  position: absolute;
  top: 90px;
  left: 3rem;
  z-index: 10;
  display: flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  color: #64748b;
  background: rgba(4, 6, 10, 0.6);
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.coord-label {
  color: #475569;
}

.coord-val {
  color: #94a3b8;
  font-weight: bold;
}

.text-green {
  color: var(--neon-green) !important;
}

.text-orange {
  color: var(--neon-orange) !important;
}

.coord-divider {
  color: #334155;
}

/* Star Travel Instructions overlay */
.hud-instructions {
  position: absolute;
  bottom: 8.5%;
  left: 3rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #64748b;
  background: rgba(4, 6, 10, 0.4);
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: opacity 0.5s ease;
}

.hud-instructions.hidden {
  opacity: 0;
}

.instruction-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bullet {
  color: var(--neon-cyan);
}

/* Space HUD Glassmorphic overlays sheets styling */
.hud-overlay-container {
  position: absolute;
  top: 50%;
  right: 4rem;
  transform: translateY(-50%) translateX(50px);
  width: 440px;
  z-index: 50;
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  box-shadow: var(--hud-shadow);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  /* Explicitly allow selection/copy inside HUD sheet panels */
  user-select: text;
  -webkit-user-select: text;
}

.hud-overlay-container.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-50%) translateX(0);
}

.hud-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.hud-close-btn svg {
  width: 18px;
  height: 18px;
}

.hud-close-btn:hover {
  color: var(--neon-orange);
  transform: scale(1.1) rotate(90deg);
}

.hud-sheet {
  display: none;
  flex-direction: column;
  gap: 1.2rem;
}

.hud-sheet.active {
  display: flex;
}

.sheet-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.tech-id {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: var(--neon-cyan);
}

.sheet-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-top: 4px;
}

.sheet-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Cyber Tabs */
.sheet-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  border-color: var(--hud-border);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.05);
}

.sheet-tab-content {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.sheet-tab-content.active {
  display: flex;
}

.log-entry {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-entry h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: #475569;
}

.log-entry p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
}

/* Technical tables */
.cyber-table {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  padding: 8px 12px;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.table-row:last-child {
  border-bottom: none;
}

.table-row.row-head {
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  color: #64748b;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

/* VibeSafe log table */
#hud-vibesafe .table-row {
  grid-template-columns: 1.8fr 1fr 1fr;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

.metric-lbl {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Cyber Code Viewer */
.code-viewer {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.code-head {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #64748b;
}

.code-viewer pre {
  padding: 12px;
  background: rgba(4, 6, 10, 0.4);
  overflow-x: auto;
}

.code-viewer code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: #94a3b8;
}

/* Prompt scanner simulation */
.prompt-checker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checker-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #64748b;
  letter-spacing: 1px;
}

.checker-input-wrapper {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(4, 6, 10, 0.5);
  overflow: hidden;
}

.checker-input-wrapper textarea {
  width: 100%;
  height: 90px;
  background: transparent;
  border: none;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
  resize: none;
  outline: none;
}

.scan-code-btn {
  width: 100%;
  justify-content: center;
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.terminal-log {
  background: #000;
  border: 1px solid #111;
  padding: 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.4;
  color: #475569;
  min-height: 48px;
}

/* TinyFish badge showcase */
.tf-badge-showcase {
  display: flex;
  align-items: center;
  gap: 18px;
}

.badge-holo-frame {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border: 2px solid var(--neon-cyan);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
  background: #fff;
}

.hud-badge-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.holo-glint {
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  animation: holoSweep 6s infinite;
}

@keyframes holoSweep {
  0% { left: -150%; }
  25% { left: 150%; }
  100% { left: 150%; }
}

.badge-details h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.badge-details p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #94a3b8;
  margin-top: 4px;
}

.sponsors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sponsor-tag {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #cbd5e1;
}

/* Skills tag groups */
.skills-category {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skills-category h5 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #64748b;
  letter-spacing: 1px;
}

.skills-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.15);
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.font-light .skill-tag {
  border-color: rgba(255, 0, 255, 0.15);
  background: rgba(255, 0, 255, 0.03);
  color: #cbd5e1;
}

/* Cosmic Footer */
footer {
  position: relative;
  z-index: 10;
  padding: 2rem 3rem;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.footer-copyright {
  font-size: 0.8rem;
  color: #475569;
}

.social-dock {
  display: flex;
  gap: 12px;
  pointer-events: auto;
}

.social-link {
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  color: #cbd5e1;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--hud-shadow);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2), inset 0 0 10px rgba(0, 240, 255, 0.05);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* Responsive Overrides */
@media (max-width: 900px) {
  header, footer {
    padding: 1.5rem 2rem;
  }
  
  .hud-coordinates {
    left: 2rem;
  }
  
  .hud-overlay-container {
    right: 2rem;
    width: 380px;
  }
}

@media (max-width: 768px) {
  .hud-coordinates {
    display: none; /* Hide telemetry coordinates clutter on tablet/mobile */
  }
  
  .hud-instructions {
    left: 50%;
    transform: translateX(-50%);
    bottom: 140px;
    width: max-content;
    max-width: 90%;
    padding: 8px 12px;
  }

  .hud-overlay-container {
    top: auto;
    bottom: 145px; /* Stay clear of space dock at bottom */
    right: auto;
    left: 50%;
    transform: translate(-50%, 40px);
    width: 90%;
    max-height: 42vh;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  
  .hud-overlay-container.active {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@media (max-width: 500px) {
  header {
    padding: 1.2rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .logo-text {
    font-size: 1.05rem;
    letter-spacing: 1px;
  }
  
  footer {
    flex-direction: column-reverse;
    gap: 0.8rem;
    align-items: center;
    padding: 1rem;
  }

  .footer-copyright {
    font-size: 0.72rem;
  }
}

/* BOTTOM PLANET NAVIGATION DOCK STYLING */
.space-dock-container {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
  display: flex;
  justify-content: center;
  width: max-content;
}

.space-dock {
  display: flex;
  gap: 10px;
  background: rgba(9, 13, 22, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.15);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 10px 24px;
  border-radius: 999px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 240, 255, 0.05);
  align-items: center;
  pointer-events: auto;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.space-dock:hover {
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 15px 40px rgba(0, 240, 255, 0.1), inset 0 0 20px rgba(0, 240, 255, 0.08);
}

.dock-item {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 80px;
}

.dock-planet-sphere {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

/* Specific planet colors/glows in the dock */
.sphere-omniprocure {
  background: radial-gradient(circle at 30% 30%, #ffb37e, #ff7f50);
  box-shadow: 0 0 8px rgba(255, 127, 80, 0.6);
}
.sphere-vibesafe {
  background: radial-gradient(circle at 30% 30%, #e0ffff, #00f0ff);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}
.sphere-tracer {
  background: radial-gradient(circle at 30% 30%, #ff80ff, #ff00ff);
  box-shadow: 0 0 8px rgba(255, 0, 255, 0.6);
}
.sphere-projects {
  background: radial-gradient(circle at 30% 30%, #fff5ad, #ffd700);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}
.sphere-tinyfish {
  background: radial-gradient(circle at 30% 30%, #ff9e9e, #ff3e3e);
  box-shadow: 0 0 8px rgba(255, 62, 62, 0.6);
}
.sphere-skills {
  background: radial-gradient(circle at 30% 30%, #a2ff80, #39ff14);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}

.dock-planet-name {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #64748b;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

/* Hover and Active State interactions */
.dock-item:hover {
  transform: translateY(-4px) scale(1.05);
}

.dock-item:hover .dock-planet-sphere {
  transform: rotate(360deg) scale(1.25);
}

.dock-item:hover .dock-planet-name {
  color: #fff;
}

.dock-item.active {
  transform: translateY(-4px) scale(1.05);
}

.dock-item.active .dock-planet-sphere {
  transform: scale(1.35);
  box-shadow: 0 0 15px currentColor;
}

.dock-item.active .dock-planet-name {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

@media (max-width: 768px) {
  .space-dock-container {
    bottom: 15px;
    width: 95%;
  }
  .space-dock {
    padding: 6px 14px;
    gap: 2px;
    max-width: 100%;
    justify-content: center;
  }
  .dock-item {
    min-width: unset;
    padding: 6px;
  }
}

@media (max-width: 480px) {
  .dock-planet-name {
    display: none; /* Hide labels under 480px width, showing only glowing planets */
  }
  .space-dock {
    gap: 14px;
    padding: 8px 18px;
  }
  .dock-item {
    padding: 4px;
  }
}

/* CINEMATIC TIME WARP SCREEN VISUALS */
body.warp-active #universeCanvas {
  filter: blur(6px) saturate(1.8) contrast(1.1);
  transform: scale(1.05);
}


