* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0a;
  color: #e5e5e5;
  overflow-x: hidden;
}

/* Noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll Progress */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #a3e635, #65a30d, #a3e635);
  z-index: 9999;
  width: 0%;
  transition: width 0.05s linear;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-ring {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(163, 230, 53, 0.1);
  border-top-color: #a3e635;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Custom Cursor - desktop only */
.cursor-outer {
  width: 20px;
  height: 20px;
  border: 2px solid #a3e635;
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  transition: width 0.3s, height 0.3s, border-color 0.3s, background 0.3s;
  transform: translate(-50%, -50%);
}
.cursor-outer.hover {
  width: 50px;
  height: 50px;
  background: rgba(163, 230, 53, 0.06);
  border-color: #84cc16;
}
.cursor-dot {
  width: 5px;
  height: 5px;
  background: #a3e635;
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
}
@media (max-width: 768px) {
  .cursor-outer, .cursor-dot { display: none !important; }
}

/* Text Reveal */
.text-reveal {
  overflow: hidden;
  display: inline-block;
}
.text-reveal span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.text-reveal.visible span {
  transform: translateY(0);
}

/* Stagger Animation */
.stagger-in > * {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-in.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-in.visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger-in.visible > *:nth-child(3) { transition-delay: 0.16s; }
.stagger-in.visible > *:nth-child(4) { transition-delay: 0.24s; }
.stagger-in.visible > *:nth-child(5) { transition-delay: 0.3s; }
.stagger-in.visible > *:nth-child(6) { transition-delay: 0.36s; }
.stagger-in.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Section Reveal */
.section-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gradient Animated Text */
.gradient-text {
  background: linear-gradient(90deg, #a3e635, #84cc16, #bef264, #a3e635);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gShift 4s ease infinite;
}
@keyframes gShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Magnetic Button Background Slide */
.mag-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mag-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(163, 230, 53, 0.12);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: inherit;
}
.mag-btn:hover::before {
  transform: translateY(0);
}

/* Marquee Track */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 35s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Glow Card Effect */
.glow-card {
  position: relative;
  overflow: hidden;
}
.glow-card::before {
  content: '';
  position: absolute;
  top: var(--my, 50%);
  left: var(--mx, 50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(163, 230, 53, 0.1), transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.glow-card:hover::before {
  opacity: 1;
}

/* Image Reveal Scale */
.img-reveal {
  overflow: hidden;
  border-radius: 1.5rem;
}
.img-reveal img {
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-reveal:hover img {
  transform: scale(1.07);
}

/* Floating Badges */
@keyframes floatB {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}
.float-b {
  animation: floatB 4s ease-in-out infinite;
}

/* Pulse Animation Dot */
.pulse-dot {
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #a3e635;
  transform: translate(-50%, -50%);
  animation: pD 2s ease-out infinite;
  opacity: 0;
}
@keyframes pD {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* Line Scale Drawing */
.line-draw {
  height: 1px;
  background: linear-gradient(90deg, transparent, #a3e635, transparent);
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.line-draw.visible {
  transform: scaleX(1);
}

/* Custom Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #a3e635;
  border-radius: 3px;
}

/* Navbar Scrolled State */
#navbar {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#navbar.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Off-canvas Menu */
.mob-menu {
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mob-menu.open {
  transform: translateX(0);
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 24px;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(163, 230, 53, 0.2);
  color: white;
  border-radius: 16px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  backdrop-filter: blur(12px);
  max-width: 360px;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Fade In Up Utility Class */
.fiu {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fiu.show {
  opacity: 1;
  transform: translateY(0);
}