/* iPrimeTech Global Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #0B1F3A;
  --secondary: #155EEF;
  --accent: #18C3B2;
  --bg-light: #FFFFFF;
  --bg-dark: #081220;
  --text-light: #111827;
  --text-dark: #F8FAFC;
  --light-gray: #F8FAFC;
  --border-light: #E5E7EB;
  --border-dark: #1E293B;
  --font-sans: 'Manrope', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none !important; /* Hide default cursor to enable custom cursor */
}

/* Fallback for input, textarea, and select to let system cursor appear if needed, or style it */
input, textarea, select, button, a {
  cursor: none !important;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-light);
  color: var(--text-light);
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Dark Mode Overrides */
body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
body.dark-mode ::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 5px;
}
body.dark-mode ::-webkit-scrollbar-thumb {
  background: #334155;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Custom Cursor */
.custom-cursor {
  width: 8px;
  height: 8px;
  background-color: var(--secondary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
}

.custom-cursor-outline {
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(21, 94, 239, 0.4);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.1s ease-out, width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

/* Hover effects for custom cursor */
.custom-cursor.hovered {
  width: 12px;
  height: 12px;
  background-color: var(--accent);
}

.custom-cursor-outline.hovered {
  width: 60px;
  height: 60px;
  border-color: var(--accent);
  background-color: rgba(24, 195, 178, 0.05);
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: 24px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode .glass-card {
  background: rgba(8, 18, 32, 0.6);
  border: 1px solid rgba(30, 41, 59, 0.6);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--secondary);
  box-shadow: 0 20px 40px -15px rgba(21, 94, 239, 0.15);
}

body.dark-mode .glass-card:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 40px -15px rgba(24, 195, 178, 0.15);
}

/* Header link underline effect */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--secondary);
  transition: width 0.3s ease;
}
body.dark-mode .nav-link::after {
  background-color: var(--accent);
}
.nav-link:hover::after {
  width: 100%;
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 100%);
  z-index: 10000;
  width: 0%;
  pointer-events: none;
}

/* Glowing text and buttons */
.glow-button {
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px 0 rgba(21, 94, 239, 0.4);
}
.glow-button:hover {
  box-shadow: 0 6px 20px 0 rgba(21, 94, 239, 0.6);
  transform: translateY(-1px);
}

.glow-button-accent {
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px 0 rgba(24, 195, 178, 0.4);
}
.glow-button-accent:hover {
  box-shadow: 0 6px 20px 0 rgba(24, 195, 178, 0.6);
  transform: translateY(-1px);
}

/* Particle Canvas Wrapper */
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Marquee scrolling */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

/* Custom Grid Stack Hover Glowing Effect */
.tech-item {
  transition: all 0.3s ease;
}
.tech-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(24, 195, 178, 0.2);
}

/* Chatbot animation */
@keyframes chatSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.chat-window-open {
  animation: chatSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glass panel dashboard for Admin panel */
.admin-sidebar {
  border-right: 1px solid rgba(229, 231, 235, 0.6);
}
body.dark-mode .admin-sidebar {
  border-right: 1px solid rgba(30, 41, 59, 0.6);
}

/* Timeline Custom styles */
.timeline-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--bg-light);
}
body.dark-mode .timeline-dot::after {
  background-color: var(--bg-dark);
}

/* Active navigation classes */
.active-nav-link::after {
  width: 100% !important;
}

/* Ensure no transitions are blocked */
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
