*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #060818;
  color: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(139, 92, 246, 0.4);
  color: #fff;
}

:focus-visible {
  outline: 2px solid #8B5CF6;
  outline-offset: 2px;
  border-radius: 4px;
}

.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 29px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 12px 48px rgba(139, 92, 246, 0.15), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  border: none;
  border-radius: 50px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}

.btn-primary .arrow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover .arrow {
  transform: translateX(6px);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-glass::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%) rotate(45deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glass:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.1);
}

.btn-glass:hover::before {
  transform: translateX(100%) rotate(45deg);
}

.gradient-text {
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status-pulse {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.nav-link {
  position: relative;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #CFCFEA;
  transition: color 0.3s ease;
  padding: 4px 0;
  background: none;
  border: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #8B5CF6;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
  color: #8B5CF6;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: #8B5CF6;
}

.nav-link.active::after {
  width: 100%;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.stat-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.stat-item:hover {
  transform: translateY(-4px);
}

.floating-icon {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.floating-icon:hover {
  transform: scale(1.15) !important;
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
}

.floating-icon .tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 14px;
  background: rgba(13, 16, 38, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 12px;
  color: #CFCFEA;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.floating-icon:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: #8B5CF6;
  border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.stat-value {
  font-variant-numeric: tabular-nums;
}

#main-nav.scrolled {
  background: rgba(6, 8, 24, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#mobile-menu.open {
  max-height: 400px !important;
  opacity: 1 !important;
}

.glass-card.visible {
  animation: cardFadeIn 0.6s ease-out both;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0; }
}

@keyframes scrollWheel {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(2deg); }
  75% { transform: translateY(6px) rotate(-1deg); }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(100px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

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

@keyframes neon-trail {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

@keyframes glass-blob {
  0%, 100% { border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; }
  50% { border-radius: 30% 60% 70% 40%/50% 60% 30% 60%; }
}

@keyframes particle-drift {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(var(--drift-x), var(--drift-y)) rotate(360deg); opacity: 0; }
}

@keyframes ripple {
  from { transform: scale(0); opacity: 1; }
  to { transform: scale(4); opacity: 0; }
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #060818;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(139,92,246,0.1);
  border-top-color: #8B5CF6;
  border-right-color: #EC4899;
  animation: loaderSpin 0.8s linear infinite;
}

.loader-text {
  margin-top: 24px;
  font-size: 14px;
  color: #CFCFEA;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

@media (pointer: fine) {
  #cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #8B5CF6;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
  }
  #cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(139,92,246,0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99997;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
  }
  #cursor-dot.hovering,
  #cursor-ring.hovering {
    transform: translate(-50%, -50%) scale(1.6);
  }
  #cursor-ring.hovering {
    width: 60px;
    height: 60px;
    border-color: rgba(139,92,246,0.6);
    background: rgba(139,92,246,0.08);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.about-image-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3/4;
  border-radius: 30px;
  overflow: hidden;
}

.about-image-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(236,72,153,0.2));
  z-index: 1;
}

.about-image-container::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 32px;
  background: linear-gradient(135deg, #8B5CF6, #EC4899, #4F9DFF);
  z-index: -1;
  opacity: 0.4;
}

.about-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  font-weight: 700;
  color: rgba(255,255,255,0.15);
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(236,72,153,0.1));
  position: relative;
}

.skill-capsule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #CFCFEA;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  white-space: nowrap;
}

.skill-capsule:hover {
  background: rgba(139,92,246,0.1);
  border-color: rgba(139,92,246,0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139,92,246,0.15);
}

.skill-capsule .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.tool-item:hover {
  background: rgba(139,92,246,0.06);
  border-color: rgba(139,92,246,0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(139,92,246,0.1);
}

.tool-item .tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.tool-item .tool-label {
  font-size: 13px;
  color: #CFCFEA;
  font-weight: 500;
  text-align: center;
}

.exp-item {
  position: relative;
  padding-left: 60px;
  padding-bottom: 40px;
}

.exp-item:last-child {
  padding-bottom: 0;
}

.exp-dot {
  position: absolute;
  left: 16px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  border: 3px solid #060818;
  box-shadow: 0 0 20px rgba(139,92,246,0.3);
}

.testimonial-card {
  flex: 0 0 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 30px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  border-color: rgba(139,92,246,0.2);
}

.testimonial-card .quote-icon {
  color: rgba(139,92,246,0.3);
  font-size: 48px;
  line-height: 1;
  font-family: Georgia, serif;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dot.active {
  background: #8B5CF6;
  box-shadow: 0 0 12px rgba(139,92,246,0.4);
  width: 30px;
  border-radius: 5px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 18px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
  background: rgba(139,92,246,0.04);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.form-group .error-msg {
  font-size: 12px;
  color: #EF4444;
  margin-top: 6px;
  display: none;
}

.form-group .error-msg.show {
  display: block;
}

.form-group .floating-label {
  position: absolute;
  left: 20px;
  top: 18px;
  color: #A0A4C0;
  font-size: 15px;
  pointer-events: none;
  transition: all 0.3s ease;
}

.form-group input:focus ~ .floating-label,
.form-group textarea:focus ~ .floating-label,
.form-group input:not(:placeholder-shown) ~ .floating-label,
.form-group textarea:not(:placeholder-shown) ~ .floating-label {
  top: -10px;
  left: 14px;
  font-size: 11px;
  color: #8B5CF6;
  background: #060818;
  padding: 0 6px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: transparent;
}

#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(139,92,246,0.4);
}

.footer-link {
  color: #A0A4C0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #8B5CF6;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #CFCFEA;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.social-icon:hover {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.3);
  color: #8B5CF6;
  transform: translateY(-3px);
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, rgba(236,72,153,0.06) 40%, transparent 70%);
  pointer-events: none;
}

.portfolio-card {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139,92,246,0.3);
  box-shadow: 0 20px 60px rgba(139,92,246,0.15);
}

.portfolio-card .thumb {
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: rgba(255,255,255,0.1);
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(236,72,153,0.05));
  position: relative;
  overflow: hidden;
}

.portfolio-card .thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,8,24,0.6), transparent);
}

.portfolio-card .tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.testimonials-container {
  overflow: hidden;
  position: relative;
}

.testimonials-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .glass-card, .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    scale: 1 !important;
  }
  .glass-card.visible { animation: none !important; }
  #custom-cursor, #cursor-dot, #cursor-ring { display: none !important; }
  #loading-screen { display: none !important; }
}

.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(139,92,246,0.2), rgba(236,72,153,0.2), transparent);
  margin: 0;
}

.service-detail {
  padding: 40px;
  border-radius: 28px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
}

.service-detail:hover {
  border-color: rgba(139,92,246,0.2);
  background: rgba(139,92,246,0.03);
}

.service-detail .icon-box {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#bg-layers {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
