/* ==========================================================================
   CINEMATIC INTRO LOADER STYLE SHEET
   ========================================================================== */

/* Full screen overlay with solid pure black background */
.intro-loader-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999; /* Higher than any portfolio element to cover completely */
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 1;
  visibility: visible;
}

/* Central Content Container */
.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 460px;
  padding: 24px;
  text-align: center;
  box-sizing: border-box;
}

/* SVG Logo Wrapper */
.loader-logo-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-logo-svg {
  width: 100%;
  height: 100%;
  z-index: 2;
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.25));
}

/* SVG G Path outlines */
.logo-path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  stroke-linejoin: round;
}

/* Soft Glow Behind Logo */
.logo-glow {
  position: absolute;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(59, 130, 246, 0) 70%);
  border-radius: 50%;
  z-index: 1;
  opacity: 0;
  transform: scale(0.6);
  filter: blur(20px);
}

/* Title text 'GOWTHAM' */
.loader-title {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.4em;
  margin: 18px 0 14px 0.4em; /* Compensate letter spacing to align center */
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap; /* Ensure name stays on a single line */
}

/* SplitType character styles (Blur-to-Sharp, Fade Up) */
.loader-title .char {
  display: inline-block;
  transform: translateY(20px);
  filter: blur(12px);
  opacity: 0;
}

/* Subtitle layout */
.loader-subtitles {
  height: 55px;
  margin-bottom: 40px;
  overflow: hidden;
}

.loader-subtitle {
  font-size: 1.1rem;
  color: #a1a1aa;
  margin: 0;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(15px);
}

.loader-subtitle-1 {
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #e4e4e7;
}

.loader-subtitle-2 {
  font-size: 0.92rem;
  color: #71717a;
  font-weight: 400;
  margin-top: 4px;
}

/* Loading section */
.loader-progress-wrap {
  width: 100%;
  max-width: 280px;
  opacity: 0;
  transform: translateY(15px);
}

.loader-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.loader-progress-label {
  color: #71717a;
}

.loader-progress-text {
  color: #3b82f6;
  font-variant-numeric: tabular-nums;
}

/* Loading Progress Bar Track */
.loader-progress-bar {
  width: 100%;
  height: 4px;
  background: #18181b;
  border-radius: 9999px;
  overflow: hidden;
}

/* Loading Progress Bar Fill */
.loader-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  border-radius: 9999px;
}

/* ==========================================================================
   SCROLL BLOCK & INTERACTION INHIBITION RULES
   ========================================================================== */

/* Locked body scroll state */
body.intro-active {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Hide existing portfolio elements during intro sequence */
body.intro-active .nav_container,
body.intro-active section,
body.intro-active footer,
body.intro-active #themeToggle {
  opacity: 0;
  visibility: hidden;
}

/* Smooth bypass override when refreshing */
body.intro-skipped .intro-loader-overlay {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

body.intro-skipped .nav_container,
body.intro-skipped section,
body.intro-skipped footer,
body.intro-skipped #themeToggle {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Override existing CSS scroll reveals during loading reveal to avoid conflicts */
body:not(.intro-complete) .scroll-reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Disable initial float animation of hero image during scale-in to prevent stutter */
body:not(.intro-complete) .img_div {
  animation: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN AND ACCESSIBILITY
   ========================================================================== */
@media (max-width: 768px) {
  .loader-logo-wrap {
    width: 110px;
    height: 110px;
    margin-bottom: 22px;
  }
  .loader-title {
    font-size: 2.35rem;
    letter-spacing: 0.35em;
    margin-left: 0.35em;
  }
  .loader-subtitle {
    font-size: 0.98rem;
  }
  .loader-subtitle-2 {
    font-size: 0.85rem;
  }
  .loader-progress-wrap {
    max-width: 240px;
  }
}

/* Accessibility settings for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .logo-path,
  .loader-title .char,
  .loader-subtitle,
  .loader-progress-wrap,
  .logo-glow {
    transition: none !important;
    animation: none !important;
  }
  .loader-title .char {
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }
}
