* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0a0e1a; color: #e8eaf0; font-family: 'Segoe UI', system-ui, sans-serif; overflow: hidden; height: 100vh; }

#canvas-container { position: fixed; inset: 0; }

#hud-top {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 18px 32px; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(10,14,26,0.95) 0%, transparent 100%);
  z-index: 10; pointer-events: none;
}
#hud-name { font-size: 15px; font-weight: 600; letter-spacing: 0.08em; color: #a8b4d0; text-transform: uppercase; }
#hud-title { font-size: 12px; color: #5c6a8a; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 2px; }
#hud-contact { font-size: 12px; color: #5c6a8a; text-align: right; line-height: 1.6; pointer-events: all; }
#hud-contact a { color: #6ea8e8; text-decoration: none; }
#hud-contact a:hover { color: #94c4ff; }

#info-panel {
  position: fixed; top: 50%; left: 32px; transform: translateY(-50%);
  width: 340px; z-index: 10;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#info-panel.hidden { opacity: 0; transform: translateY(calc(-50% + 20px)); pointer-events: none; }
#panel-eyebrow { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #4a7ab5; margin-bottom: 8px; }
#panel-heading { font-size: 28px; font-weight: 700; line-height: 1.2; color: #dce6f5; margin-bottom: 14px; }
#panel-body { font-size: 13px; line-height: 1.75; color: #8a9bbf; max-height: 55vh; overflow-y: auto; padding-right: 8px; }
#panel-body::-webkit-scrollbar { width: 3px; }
#panel-body::-webkit-scrollbar-thumb { background: #2a3a5a; border-radius: 2px; }

.panel-section { margin-bottom: 18px; }
.panel-section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: #4a7ab5; margin-bottom: 8px; border-bottom: 1px solid #1a2440; padding-bottom: 5px; }
.job { margin-bottom: 14px; }
.job-title { font-size: 13px; font-weight: 600; color: #b8d0f0; }
.job-company { font-size: 12px; color: #6a82aa; margin-bottom: 4px; }
.job-bullets { list-style: none; }
.job-bullets li { position: relative; padding-left: 14px; margin-bottom: 4px; font-size: 12px; color: #7a90b8; }
.job-bullets li::before { content: '›'; position: absolute; left: 0; color: #4a7ab5; }
.skill-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag { background: #141e30; border: 1px solid #1e2e48; border-radius: 4px; padding: 3px 9px; font-size: 11px; color: #7a98c8; }
.cert-item { font-size: 12px; color: #7a90b8; margin-bottom: 5px; padding-left: 14px; position: relative; }
.cert-item::before { content: '✦'; position: absolute; left: 0; color: #3a6aa0; font-size: 8px; top: 2px; }

#nav-bar {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 20;
  background: rgba(10,14,26,0.85); border: 1px solid #1a2440;
  border-radius: 40px; padding: 8px 12px;
  backdrop-filter: blur(12px);
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center;
  background: transparent; border: 1px solid transparent;
  border-radius: 28px; padding: 8px 18px; cursor: pointer;
  transition: all 0.25s ease; color: #5c6a8a;
  font-size: 11px; font-family: inherit; letter-spacing: 0.08em;
  text-transform: uppercase; gap: 4px; min-width: 72px;
}
.nav-btn .nav-icon { font-size: 16px; }
.nav-btn:hover { background: #141e30; color: #94b8e8; border-color: #1e3050; }
.nav-btn.active { background: #0d1e3a; color: #6ea8e8; border-color: #2a4a7a; }

#speech-bubble {
  position: fixed; bottom: 110px; right: 32px;
  background: rgba(13, 20, 40, 0.92); border: 1px solid #1e3050;
  border-radius: 12px 12px 2px 12px; padding: 12px 16px;
  max-width: 240px; z-index: 15;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(10px);
}
#speech-bubble.hidden { opacity: 0; pointer-events: none; }
#speech-text { font-size: 12px; color: #8aadda; line-height: 1.6; }

#section-dots {
  position: fixed; right: 24px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 10;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: #1a2a40; border: 1px solid #2a3a5a; cursor: pointer; transition: all 0.3s; }
.dot.active { background: #4a7ab5; border-color: #6a9ad5; transform: scale(1.4); }
.dot:hover { background: #2a4a70; }

#hint {
  position: fixed; bottom: 95px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: #2a3a5a; letter-spacing: 0.12em; text-transform: uppercase;
  transition: opacity 1s ease; white-space: nowrap;
}

#proximity-label {
  position: fixed; top: 50%; right: 32px; transform: translateY(-50%);
  text-align: right; z-index: 10; pointer-events: none;
  transition: opacity 0.4s ease;
}
#proximity-label.hidden { opacity: 0; }
#prox-section { font-size: 10px; color: #4a7ab5; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 4px; }
#prox-arrow { font-size: 22px; color: #2a5a9a; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:0.4;transform:scale(1)} 50%{opacity:1;transform:scale(1.2)} }

#loading {
  position: fixed; inset: 0; background: #0a0e1a;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 100; transition: opacity 0.8s ease;
}
#loading.fade { opacity: 0; pointer-events: none; }
.load-name { font-size: 32px; font-weight: 700; color: #3a5a8a; letter-spacing: 0.05em; margin-bottom: 8px; }
.load-sub { font-size: 12px; color: #2a3a5a; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 40px; }
.load-bar-wrap { width: 200px; height: 2px; background: #1a2440; border-radius: 2px; overflow: hidden; }
.load-bar { height: 100%; background: linear-gradient(90deg, #2a4a7a, #4a8aca); width: 0%; transition: width 0.3s ease; border-radius: 2px; }

/* ── JOYSTICK ───────────────────────────────────────────────────────────────── */
#joystick-zone {
  display: none;
  position: fixed; bottom: 100px; left: 24px;
  width: 110px; height: 110px; z-index: 30;
  touch-action: none;
}
#joystick-base {
  width: 110px; height: 110px; border-radius: 50%;
  background: rgba(30,50,90,0.55); border: 2px solid rgba(80,140,220,0.4);
  position: relative;
}
#joystick-knob {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(80,140,220,0.75); border: 2px solid rgba(120,180,255,0.6);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: background 0.1s;
}

@media (max-width: 700px) {
  #info-panel { left: 16px; width: calc(100vw - 32px); top: auto; bottom: 120px; transform: none; max-height: 38vh; }
  #info-panel.hidden { transform: translateY(20px); }
  #hud-contact { display: none; }
  #hud-name { font-size: 12px; }
  #hud-title { font-size: 10px; }
  #speech-bubble { right: 16px; bottom: 110px; max-width: 180px; }
  #section-dots { display: none; }
  #proximity-label { display: none; }
  #nav-bar { padding: 6px 8px; gap: 4px; }
  .nav-btn { padding: 6px 10px; font-size: 9px; min-width: 50px; }
  .nav-btn .nav-icon { font-size: 13px; }
  #hint { display: none; }
  #joystick-zone { display: block; }
}
