@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");

/* === GENERAL === */
body {
  margin: 0;
  padding: 0;
  font-family: "Share Tech Mono", monospace;
  background-color: #0d0d0d;
  color: #f0f;
  font-style: bold;
  overflow: hidden;
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 20px;
  right: 70px;
  background: transparent;
  display: flex;
  gap: 25px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInNavbar 1.2s ease forwards;
}

@keyframes fadeInNavbar {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar a {
  color: #f0f;
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid #f0f;
  border-radius: 5px;
  text-shadow: 0 0 5px #f0f, 0 0 10px #f0f;
  transition: 0.3s;
  font-size: 1.1em;
  position: relative;
  overflow: hidden;
}

/* Neon hover ripple */
.navbar a::after {
  content: "";
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #f0f, transparent);
  transition: left 0.4s;
  opacity: 0.5;
}
.navbar a:hover::after {
  left: 100%;
}

.navbar a:hover {
  color: #0d0d0d;
  background: #f0f;
  box-shadow: 0 0 20px #f0f, 0 0 40px #f0f;
  animation: glitch-navbar 0.3s infinite;
}

@keyframes glitch-navbar {
  0% {
    text-shadow: 2px 0 #f0f, -2px 0 #0ff;
  }
  25% {
    text-shadow: -2px 0 #f0f, 2px 0 #0ff;
  }
  50% {
    text-shadow: 2px 0 #f0f, -2px 0 #0ff;
  }
  75% {
    text-shadow: -2px 0 #f0f, 2px 0 #0ff;
  }
  100% {
    text-shadow: 2px 0 #f0f, -2px 0 #0ff;
  }
}

/* === MATRIX BACKGROUND === */
canvas#matrix {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1; /* behind everything */
}

/* === OVERLAY CONTENT === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: idleMotion 6s ease-in-out infinite;
}

@keyframes idleMotion {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(1px, -1px);
  }
}

/* === GLITCH TITLE === */
h1 {
  font-size: 3em;
  color: #0ff;
  margin: 0 0 10px 0;
  position: relative;
  animation: glitch 1s infinite;
  background: linear-gradient(90deg, #0ff, #f0f, #0ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200%;
  animation: glowShift 3s linear infinite, glitch 1s infinite;
}

@keyframes glowShift {
  0% {
    background-position: 0%;
  }
  100% {
    background-position: 200%;
  }
}

@keyframes glitch {
  0% {
    text-shadow: 2px 0 #0ff, -2px 0 #f0f;
  }
  20% {
    text-shadow: -2px 0 #0ff, 2px 0 #f0f;
  }
  40% {
    text-shadow: 2px 0 #0ff, -2px 0 #f0f;
  }
  60% {
    text-shadow: -2px 0 #0ff, 2px 0 #f0f;
  }
  80% {
    text-shadow: 2px 0 #0ff, -2px 0 #f0f;
  }
  100% {
    text-shadow: -2px 0 #0ff, 2px 0 #f0f;
  }
}

p {
  font-size: 1.2em;
  margin: 0 0 25px 0;
  text-shadow: 0 0 5px #f0f, 0 0 10px #f0f;
}

/* === CURSOR === */
.cursor {
  display: inline-block;
  background-color: #0ff;
  width: 10px;
  height: 1em;
  animation: blink 1s step-start infinite;
  vertical-align: bottom;
}

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

/* === BUTTONS === */
.buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.buttons a {
  color: #f0f;
  text-decoration: none;
  padding: 10px 25px;
  border: 1px solid #f0f;
  border-radius: 5px;
  text-shadow: 0 0 5px #f0f, 0 0 10px #f0f;
  transition: 0.3s;
  position: relative;
  animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 10px #0ff;
  }
  50% {
    box-shadow: 0 0 25px #f0f, 0 0 50px #f0f;
  }
}

.buttons a:hover {
  color: #0d0d0d;
  background: #f0f;
  box-shadow: 0 0 25px #f0f, 0 0 60px #f0f;
  animation: glitch-button 0.3s infinite;
}

@keyframes glitch-button {
  0% {
    text-shadow: 2px 0 #f0f, -2px 0 #0ff;
  }
  25% {
    text-shadow: -2px 0 #f0f, 2px 0 #0ff;
  }
  50% {
    text-shadow: 2px 0 #f0f, -2px 0 #0ff;
  }
  75% {
    text-shadow: -2px 0 #f0f, 2px 0 #0ff;
  }
  100% {
    text-shadow: 2px 0 #f0f, -2px 0 #0ff;
  }
}

/* === SCANLINES === */
.scanlines {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
    rgba(0, 255, 255, 0.03) 50%,
    transparent 50%
  );
  background-size: 100% 4px;
  z-index: 3;
  mix-blend-mode: overlay;
  animation: scan 0.5s infinite linear;
}

@keyframes scan {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 4px;
  }
}

/* === DIGITAL NOISE LAYER === */
.digital-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 2px
  );
  animation: noiseMove 0.2s infinite linear;
  z-index: 4;
  pointer-events: none;
}

@keyframes noiseMove {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(2px);
  }
}
