:root {
  --neon: #25ff78;
  --neon-soft: #8affb4;
  --neon-gradient: linear-gradient(135deg, #020b07 0%, #061812 48%, #02100a 100%);
  --glassy-green: linear-gradient(to bottom, rgba(16, 42, 29, 0.96) 0%, rgba(6, 21, 14, 0.97) 100%);
  --glassy-border: 1px solid rgba(76, 255, 136, 0.3);
  --glassy-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

/* Deep Dark Green Technology Theme Section Backgrounds */
#about {
  background: linear-gradient(135deg, #020b07 0%, #061812 48%, #02100a 100%);
  color: #dffff0;
}

#stack {
  background: linear-gradient(135deg, #020b07 0%, #061812 48%, #02100a 100%);
  color: #dffff0;
}

#projects {
  background: linear-gradient(135deg, #020b07 0%, #061812 48%, #02100a 100%);
  color: #dffff0;
}

/* Transparent on purpose: .bg-svg-stage sits behind #contact + <footer> and is
   the only background layer, so the SVG runs continuously across both. */
#contact {
  color: #dffff0;
}

.bg-svg-stage {
  position: absolute;
  inset: -48px 0 0 0;
  z-index: 0;
  opacity: 1;
  background-image:
    linear-gradient(to bottom,
      rgba(6, 21, 14, 0.18) 0%,
      rgba(2, 11, 7, 0.05) 45%,
      rgba(2, 11, 7, 0.3) 100%),
    url("../img/background.svg"),
    linear-gradient(135deg, #020b07 0%, #061812 48%, #02100a 100%);
  background-size: 100% 100%, cover, 100% 100%;
  background-position: center, center, center;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Glassy Dark Green Card Styles */
.glassy-green-card {
  background: linear-gradient(to bottom, rgba(16, 42, 29, 0.96) 0%, rgba(6, 21, 14, 0.97) 100%);
  border: 1px solid rgba(76, 255, 136, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.035;
  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");
}

::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: #020b07;
}

::-webkit-scrollbar-thumb {
  background: #122a1e;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #25ff7855;
}

::-moz-selection {
  background: rgba(37, 255, 120, 0.3);
}

.nav-link.active {
  color: #fff;
  background: rgba(37, 255, 120, 0.07);
  box-shadow: inset 0 -2px 0 0 var(--neon);
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(37, 255, 120, 0.25);
  background: rgba(37, 255, 120, 0.07);
  padding: 0.2rem 0.65rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: #c9ffe0;
  transition: all 0.25s ease;
}

.tag:hover {
  border-color: rgba(37, 255, 120, 0.6);
  transform: translateY(-1px);
}

.tag-green {
  border-color: rgba(138, 255, 180, 0.28);
  background: rgba(138, 255, 180, 0.07);
  color: #d6ffe8;
}

.tag-green:hover {
  border-color: rgba(138, 255, 180, 0.65);
}

.tag-blue {
  border-color: rgba(57, 255, 130, 0.28);
  background: rgba(57, 255, 130, 0.07);
  color: #c9ffe0;
}

.tag-blue:hover {
  border-color: rgba(57, 255, 130, 0.65);
}

#navbar.scrolled {
  background: rgba(2, 11, 7, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: #122a1e;
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

.animate-blink {
  animation: blink 1.1s step-end infinite;
}

@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

.animate-scroll-dot {
  animation: scroll-dot 1.8s ease-in-out infinite;
}

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

.marquee {
  display: inline-block;
  animation: marquee 32s linear infinite;
}

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

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}

.float-slow {
  animation: float-slow 7s ease-in-out infinite;
}

@keyframes loop-draw {
  0% { stroke-dasharray: 420; stroke-dashoffset: 420; opacity: 0.4; }
  50% { stroke-dasharray: 420; stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dasharray: 420; stroke-dashoffset: -420; opacity: 0.4; }
}

.loop-draw {
  stroke-dasharray: 420;
  animation: loop-draw 4.5s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 255, 120, 0.06), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

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

.skill-bar {
  width: 0;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(37, 255, 120, 0.12);
}

/* Sticky stacking sections handled by Tailwind classes */


@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }

  .marquee,
  .float-slow,
  .loop-draw,
  .animate-blink,
  .animate-scroll-dot {
    animation: none !important;
  }

  * {
    scroll-behavior: auto !important;
  }
}

@keyframes bounce-x {
  0%, 100% {
    transform: translateX(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateX(25%);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

.animate-bounce-x {
  animation: bounce-x 1s infinite;
}
