:root {
  --bg-color: #0a0a1a;
  --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #10101a 100%);
  --text-color: rgba(255, 255, 255, 0.85);
  --icon-color: rgba(255, 255, 255, 0.7);
  --accent-purple: #5e35b1;
  --accent-blue: #1e88e5;
  --card-bg: rgba(26, 26, 46, 0.6);
  --card-hover-bg: linear-gradient(135deg, rgba(94, 53, 177, 0.3) 0%, rgba(30, 136, 229, 0.3) 100%);
  --border-color: rgba(255, 255, 255, 0.1);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-color);
  min-height: 100vh;
  margin: 0;
  padding: 2rem; /* Add some padding to make it feel less cramped */
  overflow-x: hidden;
  position: relative;
  font-size: 110%; /* Increase base font size */
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 40% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 50%);
  z-index: -2;
  animation: colorShift 10s ease-in-out infinite alternate;
}

@keyframes colorShift {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border-color);
  transition: all 0.4s ease;
  box-shadow: 0 0 25px rgba(94, 53, 177, 0.4);
}

.profile-pic:hover {
  transform: scale(1.08);
  border: 4px solid transparent;
  background: linear-gradient(45deg, var(--accent-purple), var(--accent-blue)) padding-box,
              linear-gradient(45deg, var(--accent-purple), var(--accent-blue)) border-box;
  box-shadow: 0 0 35px rgba(94, 53, 177, 0.7),
              0 0 70px rgba(30, 136, 229, 0.5);
}

.link-card, .box {
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(139, 92, 246, 0.4), 
    rgba(59, 130, 246, 0.4), 
    transparent
  );
  transition: left 0.6s ease;
  z-index: 1;
}

.link-card:hover, .box:hover {
  transform: translateY(-8px) scale(1.02);
  background: var(--card-hover-bg);
  border: 1px solid var(--accent-purple);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.link-card:hover::before {
  left: 100%;
}

.icon {
  color: var(--icon-color);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
}

.link-card:hover .icon {
  transform: scale(1.2) rotate(5deg);
  color: #fff;
  text-shadow: 0 0 8px var(--accent-purple);
}

.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, 
    rgba(139, 92, 246, 0.2) 0%, 
    rgba(59, 130, 246, 0.1) 30%,
    rgba(236, 72, 153, 0.1) 60%,
    transparent 100%
  );
  animation: float 20s infinite linear;
}

@keyframes float {
  0% {
      transform: translateY(0) rotate(0deg);
      opacity: 1;
  }
  100% {
      transform: translateY(-1000px) rotate(720deg);
      opacity: 0;
  }
}

.info-box {
  background: linear-gradient(135deg, 
    rgba(139, 92, 246, 0.1) 0%, 
    rgba(59, 130, 246, 0.1) 100%
  );
  backdrop-filter: blur(10px);
  border-left: 4px solid transparent;
  border-image: linear-gradient(45deg, var(--accent-purple), var(--accent-blue)) 1;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
}

.social-icons a {
  transition: all 0.4s ease;
  position: relative;
}

.social-icons a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, 
    rgba(139, 92, 246, 0.3) 0%, 
    rgba(59, 130, 246, 0.3) 100%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: -1;
}

.social-icons a:hover {
  transform: translateY(-5px) scale(1.2);
  color: rgba(255, 255, 255, 1);
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.8));
}

.social-icons a:hover::before {
  width: 150%;
  height: 150%;
}

/* Generate random circles for background */
.generate-circles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.pulsating-box {
  animation: glowWave 4s infinite;
}

@keyframes glowWave {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px 20px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.border-trace::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px; /* match your card radius */
  box-sizing: border-box;
  pointer-events: none;

  /* Gradient border using a mask trick */
  border: 3px solid transparent;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(209, 77, 77, 0.224), rgba(255, 255, 255, 0.8));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 3px; /* same as border thickness */

  /* Animation */
  clip-path: inset(0 100% 0 0); /* start hidden */
  animation: drawBorder 10s linear infinite; /* slower: 10s */
}

@keyframes drawBorder {
  0% {
    clip-path: inset(0 100% 0 0); /* hidden */
  }
  25% {
    clip-path: inset(0 0 0 0); /* fully visible */
  }
  50% {
    clip-path: inset(100% 0 0 0); /* start hiding from top */
  }
  75% {
    clip-path: inset(0 0 0 100%); /* hide from right */
  }
  100% {
    clip-path: inset(0 100% 0 0); /* back to hidden */
  }
}