/* ============================================
   IT CODE FOR YOU — Tech Preloader
   ============================================ */

#tech-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(ellipse at center, #0f1629 0%, #050816 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

#tech-preloader.tp-hide {
  opacity: 0;
  pointer-events: none;
}

#tech-preloader canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.tp-center {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
  padding: 24px;
}

.tp-logo {
  display: inline-block;
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  background: linear-gradient(135deg, #4f8fff 0%, #915eff 50%, #00d4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(79, 143, 255, 0.45));
  animation: tp-glitch 2.6s infinite steps(1);
}

.tp-logo .tp-it {
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.tp-tagline {
  margin-top: 14px;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.7);
}

.tp-bar {
  margin: 22px auto 0;
  width: min(220px, 60vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.tp-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f8fff, #915eff, #00d4ff);
  box-shadow: 0 0 12px rgba(79, 143, 255, 0.6);
  animation: tp-fill 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tp-skip {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 3;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(148, 163, 184, 0.8);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.tp-skip:hover {
  color: #fff;
  border-color: rgba(79, 143, 255, 0.5);
  background: rgba(79, 143, 255, 0.08);
}

@keyframes tp-fill {
  0%   { width: 0; }
  60%  { width: 78%; }
  100% { width: 100%; }
}

@keyframes tp-glitch {
  0%, 92%, 100% {
    transform: translate(0, 0);
    filter: drop-shadow(0 0 18px rgba(79, 143, 255, 0.45));
  }
  93% { transform: translate(-1px, 0); filter: drop-shadow(2px 0 0 rgba(255, 107, 157, 0.7)) drop-shadow(-2px 0 0 rgba(0, 212, 255, 0.7)); }
  95% { transform: translate(1px, 0); }
  97% { transform: translate(0, 1px); }
}

/* Reduced motion fallback — static logo, no canvas animation */
@media (prefers-reduced-motion: reduce) {
  .tp-logo { animation: none; }
  .tp-bar-fill { animation: tp-fill 0.8s linear forwards; }
  #tech-preloader canvas { display: none; }
}

body.tp-loading { overflow: hidden; }
