/* ════════════════════════════════════
   CREATIVE PRELOADER
════════════════════════════════════ */

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #050505; /* Deep dark background */
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-logo {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-top: 2px solid var(--accent); /* Uses your portfolio's accent color */
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-initials {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
  animation: pulse 2s ease-in-out infinite;
}

.loader-bar {
  width: 120px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.loader-progress {
  position: absolute;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: loading-bar 2s cubic-bezier(0.23, 1, 0.32, 1) infinite;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes loading-bar {
  0% { left: -100%; }
  50% { left: 0; }
  100% { left: 100%; }
}
