/* Futuristic HUD Dashboard Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Share+Tech+Mono&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-pure-black: #020202;
  --bg-card: rgba(10, 12, 18, 0.7);
  --bg-card-hover: rgba(16, 20, 30, 0.85);
  
  --accent-cyan: #22d3ee;
  --accent-cyan-rgb: 34, 211, 238;
  --accent-blue: #3b82f6;
  --accent-blue-rgb: 59, 130, 246;
  --accent-purple: #a855f7;
  
  --text-white: #ffffff;
  --text-gray: #94a3b8;
  --text-gray-muted: #475569;
  
  --border-hud: rgba(255, 255, 255, 0.08);
  --border-hud-active: rgba(34, 211, 238, 0.4);
  
  --font-hud: 'Share Tech Mono', monospace;
  --font-display: 'Orbitron', sans-serif;
  --font-sans: 'Inter', sans-serif;
}

/* Light Mode Override (Theme Toggle Support) */
body.light-theme {
  --bg-pure-black: #fafafa;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(245, 245, 245, 0.95);
  --border-hud: rgba(0, 0, 0, 0.08);
  --border-hud-active: rgba(59, 130, 246, 0.5);
  --text-white: #0f172a;
  --text-gray: #475569;
  --text-gray-muted: #94a3b8;
}

/* Film Grain Overlay */
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 9999;
}

body.light-theme .film-grain {
  opacity: 0.015;
}

/* Blueprint Grid Background */
.blueprint-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(34, 211, 238, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 211, 238, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: -2;
}

body.light-theme .blueprint-grid {
  background-image: 
    linear-gradient(to right, rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
}

/* Custom Reset & Scrollbar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-pure-black);
  color: var(--text-white);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: transparent !important;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-pure-black);
}
::-webkit-scrollbar-thumb {
  background: var(--border-hud);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* HUD Panel Brackets */
.hud-panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-hud);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hud-panel::before, .hud-panel::after,
.hud-panel-corner::before, .hud-panel-corner::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--border-hud);
  border-style: solid;
  pointer-events: none;
  transition: border-color 0.3s ease;
}

/* Corner placements for HUD panels */
.hud-panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.hud-panel::after { top: -1px; right: -1px; border-width: 2px 2px 0 0; }

.hud-panel-corner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: inherit;
}
.hud-panel-corner::before { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.hud-panel-corner::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* HUD Hover State Glimmer */
.hud-panel:hover {
  border-color: var(--border-hud-active);
  box-shadow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.15);
}
.hud-panel:hover::before, .hud-panel:hover::after,
.hud-panel:hover .hud-panel-corner::before, .hud-panel:hover .hud-panel-corner::after {
  border-color: var(--accent-cyan);
}

/* Neon Digital Divider line */
.hud-divider-beam {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  position: relative;
  overflow: hidden;
}
.hud-divider-beam::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: data-beam-swipe 3s infinite linear;
}

@keyframes data-beam-swipe {
  0% { left: -50%; }
  100% { left: 150%; }
}

/* Grayscale Image Scanline Effect */
.portrait-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) opacity(0.6);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.portrait-container:hover .portrait-img {
  filter: grayscale(0%) opacity(0.85);
  transform: scale(1.03);
}

.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.25) 50%
  );
  background-size: 100% 4px;
  z-index: 2;
  pointer-events: none;
}

.scanline-pulse {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(to bottom, transparent, var(--accent-cyan), transparent);
  opacity: 0.3;
  animation: scan-pulse 6s infinite linear;
  z-index: 3;
  pointer-events: none;
}

@keyframes scan-pulse {
  0% { top: -10%; }
  100% { top: 110%; }
}

/* Floating Technology Dock Grid */
.tech-dock-item {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-hud);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tech-dock-item:hover {
  background: rgba(34, 211, 238, 0.08);
  border-color: var(--accent-cyan);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(34, 211, 238, 0.15);
}

.tech-tooltip {
  position: absolute;
  bottom: 75px;
  background: rgba(8, 10, 15, 0.95);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 4px 10px;
  font-family: var(--font-hud);
  font-size: 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.25);
}

.tech-dock-item:hover .tech-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Hologram Canvas */
.canvas-container-3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

#holo-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.5s ease;
}

/* Typography styles */
.font-hud {
  font-family: var(--font-hud);
}
.font-display {
  font-family: var(--font-display);
}

/* HUD System Boot Loader Screen */
#boot-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #020202;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.boot-box {
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.boot-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.boot-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: width 0.08s ease-out;
}

/* Animated Neon Subtitle indicator */
.pulse-indicator {
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse-hud 1.5s infinite;
}

body.light-theme .pulse-indicator {
  background: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
}

@keyframes pulse-hud {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

/* Timeline Custom Connectors */
.experience-timeline::before {
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue), transparent);
}

/* Transmission complete futuristic toast */
.transmission-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1.5rem;
  background: rgba(10, 12, 18, 0.95);
  border: 1px solid var(--accent-cyan);
  border-radius: 8px;
  z-index: 10000;
  box-shadow: 0 0 25px rgba(34, 211, 238, 0.25);
  font-family: var(--font-hud);
  animation: slide-in-hud 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slide-in-hud {
  from { transform: translateY(100px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Sticky Experience Card Setup */
.sticky-experience-wrapper {
  position: sticky;
  top: 100px;
}

@media (max-width: 1024px) {
  .sticky-experience-wrapper {
    position: static;
  }
}

/* Resume Preview Portal Frame */
.resume-iframe-wrapper {
  width: 100%;
  height: 680px;
  overflow: hidden;
  background: #020202;
  border-radius: 6px;
}

.resume-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}
