/* ===== BASE & RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #7c3aed #0a0a0f;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0a0a0f;
}
::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 3px;
}

body {
  background: #0a0a0f;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

/* ===== THREE.JS CANVAS ===== */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== NAVIGATION ===== */
.nav-glass {
  background: rgba(20, 20, 32, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(124, 58, 237, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #6b7280;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-link:hover {
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.1);
}

.nav-link.active {
  color: #fff;
  background: rgba(124, 58, 237, 0.25);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

/* ===== SIDEBAR PROFILE CARD ===== */
.sidebar-card {
  background: linear-gradient(165deg, rgba(30, 30, 46, 0.9) 0%, rgba(20, 20, 32, 0.95) 100%);
  border: 1px solid rgba(124, 58, 237, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 10;
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(124, 58, 237, 0.3) 0%, transparent 50%);
  z-index: -1;
  opacity: 0.5;
}

/* Profile Image */
.profile-image-wrapper {
  position: relative;
  border: 2px solid rgba(124, 58, 237, 0.2);
}

.profile-glow {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.35) 0%, transparent 70%);
  z-index: 0;
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Profile image - replace placeholder */
.profile-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 10;
}

/* Social Icons */
.social-icon {
  transition: all 0.3s ease;
}
.social-icon:hover {
  transform: translateY(-3px);
  color: #7c3aed !important;
}

/* Let's Talk Button */
.lets-talk-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  transition: all 0.3s ease;
}
.lets-talk-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* ===== SECTION ANIMATIONS ===== */
.section-animate {
  position: relative;
  z-index: 10;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Staggered children animation */
.reveal-child {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ===== PROJECT CARDS ===== */
.project-card {
  background: rgba(30, 30, 46, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(124, 58, 237, 0.1);
}

.project-card .h-52 {
  transition: all 0.4s ease;
  overflow: hidden;
}

.project-card:hover .h-52 {
  filter: brightness(1.1);
}

/* ===== TOOL CARDS ===== */
.tool-card {
  background: rgba(30, 30, 46, 0.5);
  border: 1px solid rgba(124, 58, 237, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover {
  background: rgba(42, 42, 58, 0.7);
  border-color: rgba(124, 58, 237, 0.2);
  transform: translateX(5px);
}

/* ===== TESTIMONIAL SLIDER ===== */
.slider-btn {
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #a78bfa;
  transition: all 0.3s ease;
  cursor: pointer;
}

.slider-btn:hover {
  background: #7c3aed;
  color: white;
  transform: scale(1.1);
}

.testimonial-card {
  background: rgba(30, 30, 46, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.1);
}

/* ===== MARQUEE ===== */
.marquee-container {
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.marquee-track {
  animation: marquee 20s linear infinite;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== BLOG CARDS ===== */
.blog-card {
  background: rgba(30, 30, 46, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ===== FAQ ACCORDION ===== */
.faq-item {
  background: rgba(30, 30, 46, 0.5);
  border: 1px solid rgba(124, 58, 237, 0.08);
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(124, 58, 237, 0.2);
}

.faq-item.active {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(42, 42, 58, 0.5);
}

.faq-question {
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #7c3aed;
}

.faq-answer {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== COLLABORATE CARD ===== */
.collaborate-card {
  background: linear-gradient(165deg, rgba(42, 42, 58, 0.7) 0%, rgba(30, 30, 46, 0.8) 100%);
  border: 1px solid rgba(124, 58, 237, 0.15);
  transition: all 0.3s ease;
}

.collaborate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top right, rgba(124, 58, 237, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.collaborate-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.1);
}

/* ===== STAT COUNTER ANIMATION ===== */
.stat-item {
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, transparent);
  transition: width 0.6s ease;
}

.stat-item:hover::after {
  width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1023px) {
  .sidebar-card {
    position: relative !important;
    top: auto !important;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 2.5rem !important;
  }
  h2 {
    font-size: 2rem !important;
  }
  .profile-image-wrapper {
    width: 10rem;
    height: 12rem;
  }
}

/* ===== LOADING ANIMATION ===== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0f;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7c3aed;
  margin: 0 6px;
  animation: loaderBounce 0.6s ease-in-out infinite alternate;
}

.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loaderBounce {
  to { transform: translateY(-12px); opacity: 0.3; }
}

/* ===== SMOOTH ENTRANCE FOR MAIN CONTENT ===== */
main section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

main section.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children within sections */
main section.in-view .project-card,
main section.in-view .tool-card,
main section.in-view .blog-card,
main section.in-view .faq-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

main section.in-view .project-card:nth-child(1),
main section.in-view .tool-card:nth-child(1),
main section.in-view .blog-card:nth-child(1),
main section.in-view .faq-item:nth-child(1) { animation-delay: 0.1s; }

main section.in-view .project-card:nth-child(2),
main section.in-view .tool-card:nth-child(2),
main section.in-view .blog-card:nth-child(2),
main section.in-view .faq-item:nth-child(2) { animation-delay: 0.2s; }

main section.in-view .project-card:nth-child(3),
main section.in-view .tool-card:nth-child(3),
main section.in-view .blog-card:nth-child(3),
main section.in-view .faq-item:nth-child(3) { animation-delay: 0.3s; }

main section.in-view .project-card:nth-child(4),
main section.in-view .tool-card:nth-child(4),
main section.in-view .blog-card:nth-child(4),
main section.in-view .faq-item:nth-child(4) { animation-delay: 0.4s; }

main section.in-view .project-card:nth-child(5),
main section.in-view .tool-card:nth-child(5) { animation-delay: 0.5s; }

main section.in-view .tool-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CURSOR GLOW (OPTIONAL DESKTOP EFFECT) ===== */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: left 0.3s ease, top 0.3s ease;
}
