/* Typing effect cursor */
.typing-cursor {
  color: #22ff22;
  animation: blink-cursor 0.9s steps(1) infinite;
}
@keyframes blink-cursor {
  0%,
  60% {
    opacity: 1;
  }
  61%,
  100% {
    opacity: 0;
  }
}
/* Explosion effect for Buy Me a Coffee widget */

.explosion-particle {
  position: absolute;
  pointer-events: none;
  opacity: 0.92;
  z-index: 9999;
  font-weight: bold;
  color: #111;
  text-shadow: 0 0 6px #ffb300, 0 0 16px #ff9800, 0 0 24px #ff5722,
    0 2px 8px #ffb300;
  will-change: transform, opacity;
  animation: explosion-move 1.4s cubic-bezier(0.2, 0.7, 0.4, 1.1) forwards;
}

.explosion-dollar {
  font-family: "Inter", "Arial", sans-serif;
  filter: drop-shadow(0 0 2px #ff9800);
}

@keyframes explosion-move {
  0% {
    opacity: 1;
    filter: brightness(1.2) drop-shadow(0 0 12px #ffb300)
      drop-shadow(0 0 24px #ff9800);
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  60% {
    opacity: 0.85;
    filter: brightness(1.1) drop-shadow(0 0 8px #ff9800)
      drop-shadow(0 0 16px #ff5722);
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(1.25) rotate(10deg);
  }
  100% {
    opacity: 0;
    filter: brightness(0.7);
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0.7) rotate(30deg);
  }
}
/* ===== Circle Portal Effect for About Photo ===== */
.portal-photo-wrapper {
  position: relative;
  display: inline-block;
}
/* Portal main glow */
.portal-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 204px;
  height: 204px;
  background: radial-gradient(
    circle at 60% 40%,
    #a259ff 0%,
    #6a11cb 60%,
    #1b0036 100%
  );
  border-radius: 50%;
  filter: blur(18px) brightness(1.2);
  z-index: 1;
  opacity: 0.7;
  animation: portalPulse 2.5s infinite alternate, portalSpin 6s linear infinite;
  overflow: visible;
}
.portal-effect::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.18) 10%,
    rgba(255, 255, 255, 0.03) 60%,
    rgba(255, 255, 255, 0.18) 90%
  );
  opacity: 0.7;
  filter: blur(2px);
  z-index: 2;
  animation: portalReflection 2.5s linear infinite;
}
.portal-effect::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.02) 60%,
    rgba(255, 255, 255, 0.12) 100%
  );
  opacity: 0.5;
  filter: blur(1.5px);
  z-index: 3;
  animation: portalReflectionSweep 3.5s linear infinite;
}
@media (min-width: 768px) {
  .portal-effect {
    width: 252px;
    height: 252px;
  }
}
@keyframes portalSpin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes portalReflection {
  0% {
    opacity: 0.7;
    filter: blur(2px);
  }
  50% {
    opacity: 1;
    filter: blur(3.5px);
  }
  100% {
    opacity: 0.7;
    filter: blur(2px);
  }
}
@keyframes portalReflectionSweep {
  0% {
    opacity: 0.5;
    background-position: 0% 50%;
  }
  50% {
    opacity: 0.8;
    background-position: 100% 50%;
  }
  100% {
    opacity: 0.5;
    background-position: 0% 50%;
  }
}
@media (min-width: 768px) {
  .portal-effect {
    width: 210px;
    height: 210px;
  }
}
@keyframes portalPulse {
  0% {
    filter: blur(18px) brightness(1.2);
    opacity: 0.7;
    box-shadow: 0 0 32px 8px #a259ff44, 0 0 0 0 #6a11cb22;
  }
  50% {
    filter: blur(24px) brightness(1.4);
    opacity: 1;
    box-shadow: 0 0 48px 16px #a259ff66, 0 0 32px 8px #6a11cb44;
  }
  100% {
    filter: blur(18px) brightness(1.2);
    opacity: 0.7;
    box-shadow: 0 0 32px 8px #a259ff44, 0 0 0 0 #6a11cb22;
  }
}
/* Fire effect for github link */
/* Fire effect for github link and hero button */
.fire-link {
  position: relative;
  display: inline-block;
  color: #a259ff;
  transition: color 0.2s;
  z-index: 1;
}
.fire-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 6px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #ffb347 0%,
    #ff6961 25%,
    #4fc3f7 50%,
    #a259ff 75%,
    #43ea7f 100%
  );
  background-size: 300% 100%;
  opacity: 0;
  filter: blur(2px) brightness(1.2);
  border-radius: 50%;
  transition: opacity 0.2s;
  z-index: -1;
  animation: fire-gradient-move 2s linear infinite;
}
.fire-link:hover {
  color: #ffb347;
  text-shadow: 0 0 8px #ffb347, 0 0 16px #ff6961;
}
.fire-link:hover::after {
  opacity: 1;
  animation: fire-flicker 0.25s infinite alternate;
}
@keyframes fire-flicker {
  0% {
    transform: scaleY(1) translateY(0);
    filter: blur(2px) brightness(1.2);
  }
  30% {
    transform: scaleY(1.2) translateY(-2px) scaleX(1.05);
    filter: blur(3px) brightness(1.4);
  }
  60% {
    transform: scaleY(0.9) translateY(1px) scaleX(0.97);
    filter: blur(1.5px) brightness(1.1);
  }
  100% {
    transform: scaleY(1.1) translateY(-1px) scaleX(1.03);
    filter: blur(2.5px) brightness(1.3);
  }
}
@keyframes fire-gradient-move {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
/* Extra contrast for experience card */
.experience-contrast-card {
  background: rgba(10, 10, 20, 0.92);
  border-radius: 1rem;
  box-shadow: 0 4px 32px 0 rgba(0, 0, 0, 0.45);
  padding: 2rem 1.5rem;
  color: #fff;
}
.experience-contrast-card h3,
.experience-contrast-card p,
.experience-contrast-card ul,
.experience-contrast-card li,
.experience-contrast-card strong,
.experience-contrast-card code {
  color: #fff !important;
  text-shadow: 0 2px 8px #000;
}
.experience-contrast-card .text-purple-300,
.experience-contrast-card .text-purple-400,
.experience-contrast-card .text-xs {
  color: #e0c3fc !important;
}
.experience-contrast-card ul {
  background: none;
}
/* White shadow for main section titles */
#about h2,
#skills h2,
#soft-skills h2,
#projects h2,
#experience h2,
#education h2 {
  text-shadow: 0 2px 12px #fff, 0 0px 2px #fff;
}
/* Improve contrast for section titles and card text on galaxy background */
.galaxy-bg-wrapper h2,
.galaxy-bg-wrapper .gradient-text {
  color: #fff !important;
  text-shadow: 0 2px 12px #000, 0 0px 2px #4a00e0;
}

.galaxy-bg-wrapper .glass-card {
  background: rgba(10, 10, 20, 0.82);
  color: #f3f3f3;
  border: 1.5px solid rgba(138, 99, 210, 0.18);
}

.galaxy-bg-wrapper .glass-card h3 {
  color: #fff;
  text-shadow: 0 2px 8px #000, 0 0px 2px #8e2de2;
}

.galaxy-bg-wrapper .glass-card p,
.galaxy-bg-wrapper .glass-card ul,
.galaxy-bg-wrapper .glass-card li {
  color: #e0e0e0;
  text-shadow: 0 1px 4px #000;
}

/* Galaxy background for all sections after hero */
.galaxy-bg-wrapper {
  background: url("../assets/images/galaxy_background_purple.png") center top
    no-repeat;
  background-size: cover;
  width: 100%;
  min-height: 100%;
  position: relative;
  z-index: 0;
}

/* Hidden Eyes on Menu Bar - new SVG style */
.menu-stars {
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
header:hover .menu-stars {
  opacity: 1;
  pointer-events: auto;
}
.star-styled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px #fbbf24);
  transition: transform 0.3s, filter 0.3s;
}
.star-styled:hover {
  transform: scale(1.18) rotate(-8deg);
  filter: drop-shadow(0 0 16px #fff);
}
/* Hidden Eyes on Menu Bar */
.menu-eyes {
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
header:hover .menu-eyes {
  opacity: 1;
  pointer-events: auto;
}
.menu-eyes .fa-eye {
  color: #8e2de2;
  font-size: 1.25rem;
  filter: drop-shadow(0 0 2px #4a00e0);
  transition: transform 0.3s;
}
.menu-eyes .fa-eye:hover {
  transform: scale(1.2) rotate(-10deg);
  color: #fff;
}
/* Matrix Rain Canvas Overlay */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
  display: none;
  background: transparent;
}
/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Animation Classes */
.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}
.delay-200 {
  animation-delay: 0.2s;
}
.delay-300 {
  animation-delay: 0.3s;
}
.delay-400 {
  animation-delay: 0.4s;
}
.delay-500 {
  animation-delay: 0.5s;
}
.delay-600 {
  animation-delay: 0.6s;
}
.delay-700 {
  animation-delay: 0.7s;
}
.delay-800 {
  animation-delay: 0.8s;
}
.delay-900 {
  animation-delay: 0.9s;
}
.delay-1000 {
  animation-delay: 1s;
}

/* Newsletter Popup Styles */
#newsletterPopup {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#newsletterPopup.show {
  opacity: 1;
  visibility: visible;
}

#popupContent {
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#newsletterPopup.show #popupContent {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#closePopup {
  transition: transform 0.2s ease;
}

#closePopup:hover {
  transform: rotate(90deg);
}

#popupNewsletterForm input {
  transition: all 0.3s ease;
}

#popupNewsletterForm input:focus {
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.5);
}

/* Prevent scrolling when popup is open */
body.popup-open {
  overflow: hidden;
  padding-right: 15px; /* Prevent content shift when scrollbar disappears */
}

/* Initial state for animated elements */
[class*="animate-"] {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Apply Inter font globally */
body {
  font-family: "Inter", sans-serif;
  background-color: #0a0a0a;
  /* Very dark background */
  color: #e0e0e0;
  /* Light grey text */
}

/* Custom scrollbar for a more futuristic feel (optional) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #4a00e0;
  /* Accent color */
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #8e2de2;
  /* Lighter accent on hover */
}

/* Subtle gradient text effect for headers */
.gradient-text {
  background: linear-gradient(90deg, #8e2de2, #4a00e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Skill badge styles */
.skill-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.03);
  color: #d1c4ff;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.875rem;
  border: 1px solid rgba(138, 99, 210, 0.12);
}

/* Slightly stronger CTA contrast on dark backgrounds */
.btn-primary {
  box-shadow: 0 6px 20px rgba(74, 0, 224, 0.35);
}
.btn-secondary {
  border-color: rgba(138, 99, 210, 0.28);
}

/* Glassmorphism effect for cards */
.glass-card {
  background: rgba(26, 26, 26, 0.6);
  /* Semi-transparent dark background */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Subtle border */
  border-radius: 1rem;
  /* Rounded corners */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0);
  will-change: transform, box-shadow;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(142, 45, 226, 0.1) 0%,
    rgba(74, 0, 224, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.glass-card:hover {
  transform: translateY(-5px) translateZ(0);
  box-shadow: 0 15px 30px rgba(74, 0, 224, 0.25);
  /* Accent color shadow on hover */
}

.glass-card:hover::before {
  opacity: 1;
}

/* Add a subtle scale effect on hover */
.glass-card:active {
  transform: translateY(-2px) scale(0.99) translateZ(0);
  transition: transform 0.1s ease;
}

/* Add a subtle pulse animation to call-to-action elements */
@keyframes subtlePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.cta-pulse {
  animation: subtlePulse 2s infinite ease-in-out;
}

/* Add a subtle hover effect to all interactive elements */
button,
a,
[role="button"],
input[type="submit"],
.btn-primary,
.btn-secondary {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
}

button:hover,
a:hover,
[role="button"]:hover,
input[type="submit"]:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px) translateZ(0);
}

button:active,
a:active,
[role="button"]:active,
input[type="submit"]:active,
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(1px) translateZ(0);
  transition: transform 0.1s ease;
}

/* Button Styling */
.btn-primary {
  background: linear-gradient(90deg, #8e2de2, #4a00e0);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(74, 0, 224, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(74, 0, 224, 0.5);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid #4a00e0;
  color: #e0e0e0;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: rgba(74, 0, 224, 0.1);
  color: #fff;
}

/* Mobile Navigation Menu Styles (can be expanded) */
/* Navigation Link Hover Effects */
nav a {
  position: relative;
  padding: 0.5rem 0.75rem;
  margin: 0 0.25rem;
  overflow: hidden;
  border-radius: 0.375rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop navigation links */
@media (min-width: 768px) {
  nav a::after {
    content: "";
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8e2de2, #4a00e0);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
  }

  nav a:hover::after {
    width: calc(100% - 1.5rem);
  }
}

/* Mobile navigation links */
#mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  margin: 0.25rem 0;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

#mobile-menu a:hover {
  background: rgba(138, 99, 210, 0.1);
  padding-left: 1.25rem;
  color: #fff;
}

#mobile-menu a::after {
  display: none;
}

/* Mobile Navigation Menu Styles */
#mobile-menu {
  display: none; /* Hidden by default */
  background-color: rgba(10, 10, 10, 0.98); /* Dark background for menu */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

#mobile-menu.active {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

/* Confetti Styles */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  opacity: 0; /* Start invisible, animation will handle fade in/out */
  animation: fall 3s ease-out forwards;
  z-index: 10000; /* Ensure confetti is on top of other elements */
}

@keyframes fall {
  0% {
    opacity: 1;
    transform: translateY(0vh) translateX(var(--initial-x-offset, 0px))
      rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh)
      translateX(calc(var(--initial-x-offset, 0px) + var(--drift-x, 0px)))
      rotate(720deg);
  }
}
/* AI Chat Window Styles */
#ai-chat-window.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Custom scrollbar for chat messages (optional, but nice) */
#ai-chat-messages::-webkit-scrollbar {
  width: 6px;
}

#ai-chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

#ai-chat-messages::-webkit-scrollbar-thumb {
  background: #4a00e0; /* Accent color */
  border-radius: 3px;
}

#ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #8e2de2; /* Lighter accent on hover */
}

.chat-message {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  max-width: 80%;
  word-wrap: break-word;
}

.chat-message.user {
  background-color: #4a00e0; /* Accent color for user */
  color: white;
  margin-left: auto; /* Align to the right */
}

.chat-message.ai {
  background-color: #2d3748; /* Tailwind gray-700 */
  color: #e0e0e0;
  margin-right: auto; /* Align to the left */
}

/* Matrix-green typing styles (JS-driven) */
@keyframes matrixBlink {
  0%,
  100% {
    border-color: transparent;
  }
  50% {
    border-color: #39ff14;
  }
}

.typing-subtitle {
  display: inline-block;
  white-space: nowrap;
  color: #39ff14; /* Matrix green */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono",
    "Courier New", monospace;
  border-right: 2px solid #39ff14; /* caret */
  padding-right: 4px;
  min-width: 1ch; /* ensure caret visible when empty */
}

.typing-subtitle.caret-blink {
  animation: matrixBlink 1s steps(1) infinite;
}

#cursor-ball {
  position: fixed;
  top: 0;
  left: 0;
  width: 30vw;
  height: 30vw;
  border-radius: 50%;
  background: radial-gradient(
    circle at 60% 40%,
    #a259ff 0%,
    #6a11cb 60%,
    #1b0036 100%
  );
  filter: blur(60px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
  z-index: 10;
  mix-blend-mode: lighten;
  opacity: 0.15;
}
