@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Reset and Core Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulse-slow {
  0%, 100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(1.1);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes float-blob {
  0%, 100% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

.floating {
  animation: float 5s ease-in-out infinite;
}

.spin-slow {
  animation: spin-slow 20s linear infinite;
}

html {
  scroll-behavior: smooth;
  cursor: none; /* Hide default cursor for custom cursor experience */
}

/* Theme Variables */
[data-theme="light"] {
  --bg: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --card: rgba(255, 255, 255, 0.7);
  --card-hover: rgba(255, 255, 255, 0.9);
  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.16);
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.15);
  --btn-bg: #3b82f6;
  --btn-text: #ffffff;
  --grid-dot: rgba(15, 23, 42, 0.04);
  --blob-1: rgba(59, 130, 246, 0.15);
  --blob-2: rgba(139, 92, 246, 0.15);
  --glow-intensity: 0.1;
}

[data-theme="dark"] {
  --bg: #090d16;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --card: rgba(17, 24, 39, 0.6);
  --card-hover: rgba(31, 41, 55, 0.75);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.15);
  --primary: #60a5fa;
  --primary-glow: rgba(96, 165, 250, 0.25);
  --btn-bg: #2563eb;
  --btn-text: #ffffff;
  --grid-dot: rgba(255, 255, 255, 0.03);
  --blob-1: rgba(37, 99, 235, 0.22);
  --blob-2: rgba(147, 51, 234, 0.22);
  --glow-intensity: 0.45;
}

body {
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Plus Jakarta Sans", sans-serif;
  overflow-x: hidden;
}

/* Background Grids and Blobs */
.grid-bg {
  background-image: radial-gradient(var(--grid-dot) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: plus-lighter;
}

.blob-blue {
  background: var(--blob-1);
  animation: float-blob 12s ease-in-out infinite;
}

.blob-purple {
  background: var(--blob-2);
  animation: float-blob 16s ease-in-out infinite alternate;
}

/* Typography Gradient */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6 10%, #a855f7 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Glassmorphism Section Card */
.section-card {
  background-color: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-card:hover {
  background-color: var(--card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.btn-primary > * {
  position: relative;
  z-index: 10;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::before {
  opacity: 1;
}

/* Specific Skill Neon Hover Glows */
.skill-html:hover {
  border-color: rgba(249, 115, 22, 0.6);
  box-shadow: 0 12px 24px -6px rgba(249, 115, 22, calc(var(--glow-intensity) * 0.7));
}
.skill-css:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 12px 24px -6px rgba(59, 130, 246, calc(var(--glow-intensity) * 0.7));
}
.skill-js:hover {
  border-color: rgba(234, 179, 8, 0.6);
  box-shadow: 0 12px 24px -6px rgba(234, 179, 8, calc(var(--glow-intensity) * 0.7));
}
.skill-react:hover {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 12px 24px -6px rgba(6, 182, 212, calc(var(--glow-intensity) * 0.7));
}
.skill-node:hover {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 12px 24px -6px rgba(34, 197, 94, calc(var(--glow-intensity) * 0.7));
}
.skill-mongo:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 12px 24px -6px rgba(16, 185, 129, calc(var(--glow-intensity) * 0.7));
}
.skill-git:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 12px 24px -6px rgba(239, 68, 68, calc(var(--glow-intensity) * 0.7));
}
.skill-tailwind:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 12px 24px -6px rgba(56, 189, 248, calc(var(--glow-intensity) * 0.7));
}
.skill-java:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 12px 24px -6px rgba(245, 158, 11, calc(var(--glow-intensity) * 0.7));
}
.skill-php:hover {
  border-color: rgba(124, 58, 237, 0.6);
  box-shadow: 0 12px 24px -6px rgba(124, 58, 237, calc(var(--glow-intensity) * 0.7));
}
.skill-python:hover {
  border-color: rgba(234, 179, 8, 0.6);
  box-shadow: 0 12px 24px -6px rgba(234, 179, 8, calc(var(--glow-intensity) * 0.7));
}
.skill-figma:hover {
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 12px 24px -6px rgba(236, 72, 153, calc(var(--glow-intensity) * 0.7));
}
.skill-bootstrap:hover {
  border-color: rgba(109, 40, 217, 0.6);
  box-shadow: 0 12px 24px -6px rgba(109, 40, 217, calc(var(--glow-intensity) * 0.7));
}

/* Custom Interactive Cursor */
.custom-cursor {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
  mix-blend-mode: difference;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10000;
  transition: transform 0.1s;
}

/* Expanding Cursor on Interactive Elements */
.custom-cursor-hover {
  width: 50px;
  height: 50px;
  background-color: rgba(59, 130, 246, 0.15);
  border-color: transparent;
}

/* Scroll To Top Button */
#scrollTopBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: none;
  background: var(--btn-bg);
  color: var(--btn-text);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  z-index: 50;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#scrollTopBtn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Mobile Menu Animation */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.3s ease, 
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.show {
  max-height: 400px;
  opacity: 1;
  transform: translateY(0);
}

/* Toggle Buttons (Education & Experience) */
.toggle-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.toggle-buttons button {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 28px;
  font-size: 1rem;
  border-radius: 9999px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-buttons button:hover {
  border-color: var(--primary);
  color: var(--text);
}

.toggle-buttons button.active {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

/* Timeline Styling */
.timeline {
  position: relative;
  max-width: 900px;
  margin: auto;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 2px;
  background: linear-gradient(180deg, #3b82f6 0%, #a855f7 100%);
  top: 10px;
  bottom: 10px;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 15px 30px;
  position: relative;
  width: 50%;
  z-index: 10;
}

.timeline-item::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 28px;
  background-color: var(--bg);
  border: 3px solid #3b82f6;
  border-radius: 50%;
  z-index: 20;
  transition: all 0.3s ease;
}

.timeline-item:hover::after {
  background-color: #a855f7;
  border-color: #ffffff;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.left {
  left: 0;
}
.right {
  left: 50%;
}

.left::after {
  left: auto;
  right: -8px;
}
.right::after {
  left: -8px;
  right: auto;
}

.timeline-item-content {
  background-color: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  position: relative;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item-content:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.timeline-item h3 {
  color: var(--text);
}

.timeline-item p.time-range {
  color: var(--primary);
  font-weight: 600;
}

.timeline-item p.desc-text {
  color: var(--text-muted);
}

/* Scroll Reveal Classes */
.reveal-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scrollbar Customization */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #a855f7);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #60a5fa, #c084fc);
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.modal-close-btn:hover {
  transform: scale(1.1);
  color: #ef4444;
}

/* Timeline Responsive Adjustment */
@media screen and (max-width: 768px) {
  html {
    cursor: auto; /* Fallback to standard cursor on touch devices */
  }
  .custom-cursor, .custom-cursor-dot {
    display: none !important;
  }
  
  .timeline::after {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 45px;
    padding-right: 15px;
    margin-bottom: 20px;
    left: 0 !important;
  }

  .timeline-item::after {
    left: 11px;
    right: auto;
  }
}
