/* 
======================================================
   MODERN 3D PORTFOLIO THEME - PREMIUM DARK EDITION
   Designed for High-End Visual Impact
======================================================
*/

:root {
  /* Core Palette - Deep Space & Neon */
  --bg-core: #050510;
  /* Darker glass for better readability */
  --bg-glass: rgba(15, 15, 30, 0.85);
  --bg-glass-hover: rgba(25, 25, 45, 0.95);

  --primary: #00f2ff;
  /* Cyber Cyan */
  --primary-glow: rgba(0, 242, 255, 0.4);

  --secondary: #7000ff;
  /* Electric Purple */
  --secondary-glow: rgba(112, 0, 255, 0.4);

  --text-main: #ffffff;
  --text-muted: #b0b0c0;
  /* Lighter grey for better visibility */

  --border-light: rgba(255, 255, 255, 0.1);
  /* Subtle border */
  --border-highlight: rgba(255, 255, 255, 0.3);

  --card-radius: 20px;
  --transition-smooth: all 0.3s ease-out;
}

/* Base Setup */
body {
  background-color: var(--bg-core) !important;
  color: var(--text-main);
  font-family: 'Heebo', sans-serif;
  overflow-x: hidden;
  /* Gentle gradient mesh overlay */
  background-image:
    radial-gradient(circle at 10% 20%, rgba(112, 0, 255, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(0, 242, 255, 0.1) 0%, transparent 20%);
  background-attachment: fixed;
}

/* 3D Container Settings */
.container,
.container-xxl {
  position: relative;
  z-index: 2;
  /* Put content above background effects */
  perspective: 1000px;
  padding-top: 30px;
  padding-bottom: 30px;
}

/* Spinner */
/* Spinner */
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .5s;
  z-index: 99999;
  background-color: var(--bg-core) !important;
}

#spinner.show {
  transition: opacity .5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/* 
======================================================
   REUSABLE GLASSMORPHISM CARDS (The "Ice" Look)
======================================================
*/
/* The Profile Card & Content Cards */
.sticky-lg-top>div,
.service-item,
.bg-secondary,
.testimonial-item {
  background: var(--bg-glass) !important;
  /* Stronger blur for premium feel */
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);

  border: 1px solid var(--border-light);
  border-radius: var(--card-radius);

  /* Soft Elevation */
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  transition: var(--transition-smooth);
  overflow: hidden;
  position: relative;
  z-index: 10;
}

/* Remove default Bootstrap secondary bg */
.bg-secondary {
  background: var(--bg-glass) !important;
}

/* Smooth sticky sidebar transition */
.sticky-lg-top {
  z-index: 100;
  transition: top 0.3s ease;
}

/* Hover Effects: Lift & Glow */
.service-item:hover,
.bg-secondary:hover:not(.sticky-lg-top > div) {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 0 30px var(--primary-glow), inset 0 0 20px rgba(0, 242, 255, 0.1);
}

/* Profile Card Specifics */
/* Profile Card Specifics */
.sticky-lg-top>div {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  overflow-x: hidden !important;
  /* Prevent horizontal scrollbar on hover */
  /* Maintain shadow if needed, or just leave empty if it inherits */
}

.sticky-lg-top img {
  border-radius: 50%;
  border: 3px solid var(--secondary);
  box-shadow: 0 0 20px var(--secondary-glow);
  transition: var(--transition-smooth);
}

.sticky-lg-top img:hover {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--primary);
  box-shadow: 0 0 40px var(--primary-glow);
}

/* 
======================================================
   TYPOGRAPHY & ACCENTS
======================================================
*/
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Service Box Premium Styling */
.service-item {
  padding: 35px 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.service-item i {
  font-size: 3rem;
  margin-bottom: 25px;
  background: -webkit-linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px var(--primary-glow));
  transition: transform 0.3s ease;
  width: fit-content;
}

.service-item:hover i {
  transform: scale(1.15) translateZ(20px);
  filter: drop-shadow(0 0 20px var(--primary));
}

.service-item h5 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text-main);
  position: relative;
  padding-bottom: 15px;
}

.service-item h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary-glow);
  transition: width 0.3s ease;
}

.service-item:hover h5::after {
  width: 60px;
}

.service-item p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.text-primary {
  color: var(--primary) !important;
  text-shadow: 0 0 15px var(--primary-glow);
}

.title {
  position: relative;
  display: inline-block;
  /* Ensure width fits text */
  margin-bottom: 30px;
  /* Ensure space for the line */
}

.title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  height: 4px;
  width: 100%;
  /* Matches text width */
  min-width: 80px;
  /* Minimum accented line */
  border-radius: 4px;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* 
======================================================
   BUTTONS (Neon Style)
======================================================
*/
.btn {
  border-radius: 50px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--primary);
  z-index: -1;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  color: #000;
  /* Contrast text on hover */
  box-shadow: 0 0 40px var(--primary-glow);
}

.btn-primary:hover::before {
  width: 100%;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  box-shadow: 0 0 20px var(--secondary-glow);
}

/* 
======================================================
   SKILLS & PROGRESS
======================================================
*/
.progress {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: visible;
  height: 8px;
}

.progress-bar {
  border-radius: 10px;
  position: relative;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 15px var(--primary-glow);
}

.progress-bar::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -6px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff;
}

/* 
======================================================
   INPUTS & FORMS (Glass + Glow)
======================================================
*/
.form-floating>label {
  color: #b0b0c0 !important;
  /* Lighter gray for visibility */
  padding-left: 20px;
}

.form-control {
  background: rgba(255, 255, 255, 0.12) !important;
  /* Lighter background */
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff !important;
  font-weight: 500;
  padding: 15px;
  /* Removed backdrop-filter to prevent text blur issues */
  transition: var(--transition-smooth);
}

/* Fix for Double Text: Hide the native placeholder so only the Floating Label shows */
.form-control::placeholder {
  color: transparent !important;
  opacity: 0;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(0, 242, 255, 0.25);
  color: #ffffff;
}

/* Floating label adjustments */
.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
  color: var(--primary) !important;
  opacity: 1;
  font-weight: 600;
  text-shadow: 0 0 8px var(--primary-glow);
  background: transparent;
  /* Ensure label bg is transparent */
}

/* 
======================================================
   PORTFOLIO ITEMS (3D Hover)
======================================================
*/
.portfolio-item {
  perspective: 1000px;
}

.portfolio-item img {
  border-radius: 16px;
  transition: var(--transition-smooth);
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-btn {
  border-radius: 16px;
}

/* 
======================================================
   SCROLLBAR (Matrix Style)
======================================================
*/
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-core);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* 
======================================================
   MOBILE ADAPTATIONS
======================================================
*/
@media (max-width: 991px) {
  .sticky-lg-top {
    position: relative !important;
    height: auto !important;
    background: transparent !important;
    margin-bottom: 30px;
  }
}

/* 
======================================================
   BACK TO TOP BUTTON
======================================================
*/
.back-to-top {
  position: fixed;
  display: none;
  /* Controlled by JS */
  right: 30px;
  /* Moved to Right side */
  bottom: 30px;
  z-index: 99;
  width: 50px;
  height: 50px;
  text-align: center;
  line-height: 50px;
  /* Centers icon vertically */
  background: var(--primary);
  color: #000;
  border-radius: 50%;
  box-shadow: 0 0 20px var(--primary-glow);
  transition: var(--transition-smooth);
  /* Pulse animation for attention */
  animation: pulse-glow 2s infinite;
  text-decoration: none;
}

.back-to-top:hover {
  background: var(--secondary);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 0 30px var(--secondary-glow);
}

.back-to-top i {
  font-size: 24px;
  line-height: 50px;
  /* Ensures exact center */
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(0, 242, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 242, 255, 0);
  }
}