@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

body, html {
  height: 100%;
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  /*background-image: url('https://source.unsplash.com/featured/?cyberpunk,city');*/
  background-image: url('../img/city2.webp');
  background-size: cover;
  background-position: top;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.2);
}

.title {
  font-size: 3.5rem;
  margin-bottom: 0.2em;
  color: #0ff;
}

.subtitle {
  font-size: 1.5rem;
  margin-bottom: 1em;
  color: #0ff;
}

.links {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
}

.link {
  text-decoration: none;
  font-size: 1.25rem;
  /*color: #f0f;*/
  color: rgb(252, 255, 74);
  transition: color 0.3s;
  position: relative;
}

.link::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #f0f;
  visibility: hidden;
  transform: scaleX(0);
  transition: all 0.3s;
}

.link:hover {
  /*color: #0ff;*/
  color: rgb(216, 79, 250);
}

.link:hover::before {
  visibility: visible;
  transform: scaleX(1);
}

.button-links {
  display: flex;
  gap: 1em;
}

.mike-links {
  font-size: 1.25rem;
  background-color: rgba(255, 0, 255, 0.5);
  padding: 0.5em 1em;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.mike-links:hover {
  background-color: rgba(255, 0, 255, 0.7);
}

@media (max-width: 768px) {
  .links, .button-links {
    flex-direction: column;
    gap: 0.5em;
  }
}

/* Adds first, more dramatic glitch effect to the Threat Hunter & DevSecOps Enthusiast p tag*/
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #0ff;
  background-color: #000;
  overflow: hidden;
  animation: glitch 2s infinite linear alternate-reverse;
}

.glitch::after {
  color: #f0f;
  animation-delay: 0.5s;
}

@keyframes glitch {
  0% {
    clip-path: inset(0 0 100% 0);
  }
  20% {
    clip-path: inset(0 0 90% 0);
  }
  40% {
    clip-path: inset(0 0 80% 0);
  }
  60% {
    clip-path: inset(0 0 70% 0);
  }
  80% {
    clip-path: inset(0 0 60% 0);
  }
  100% {
    clip-path: inset(0 0 50% 0);
  }
}
.stack {
  display: grid;
  grid-template-columns: 1fr;
}

.stack span {
  font-weight: bold;
  grid-row-start: 1;
  grid-column-start: 1;
  font-size: 1.5rem;
  --stack-height: calc(100% / var(--stacks) - 1px);
  --inverse-index: calc(calc(var(--stacks) - 1) - var(--index));
  --clip-top: calc(var(--stack-height) * var(--index));
  --clip-bottom: calc(var(--stack-height) * var(--inverse-index));
  clip-path: inset(var(--clip-top) 0 var(--clip-bottom) 0);
  animation: stack 340ms cubic-bezier(.46,.29,0,1.24) 1 backwards calc(var(--index) * 120ms), glitch 2s ease infinite 2s alternate-reverse;
}

.stack span:nth-child(odd) { --glitch-translate: 8px; }
.stack span:nth-child(even) { --glitch-translate: -8px; }

@keyframes stack {
  0% {
    opacity: 0;
    transform: translateX(-50%);
    text-shadow: -2px 3px 0 red, 2px -3px 0 blue;
  };
  60% {
    opacity: 0.5;
    transform: translateX(50%);
  }
  80% {
    transform: none;
    opacity: 1;
    text-shadow: 2px -3px 0 red, -2px 3px 0 blue;
  }
  100% {
    text-shadow: none;
  }
}

@keyframes glitch {
  0% {
    text-shadow: -2px 3px 0 red, 2px -3px 0 blue;
    transform: translate(var(--glitch-translate));
  }
  2% {
    text-shadow: 2px -3px 0 red, -2px 3px 0 blue;
  }
  4%, 100% {  text-shadow: none; transform: none; }
}
/* Adds second glitch effect to the ElatedManiac H1 tag*/
h1{
  animation: glitch2 1s linear infinite;
}

@keyframes glitch2{
  2%,64%{
    transform: translate(2px,0) skew(0deg);
  }
  4%,60%{
    transform: translate(-2px,0) skew(0deg);
  }
  62%{
    transform: translate(0,0) skew(5deg); 
  }
}

h1:before,
h1:after{
  content: attr(title);
  position: absolute;
  left: 0;
}

h1:before{
  animation: glitchTop2 1s linear infinite;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

@keyframes glitchTop2{
  2%,64%{
    transform: translate(2px,-2px);
  }
  4%,60%{
    transform: translate(-2px,2px);
  }
  62%{
    transform: translate(13px,-1px) skew(-13deg); 
  }
}

h1:after{
  animation: glitchBotom2 1.5s linear infinite;
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
  -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitchBotom2{
  2%,64%{
    transform: translate(-2px,0);
  }
  4%,60%{
    transform: translate(-2px,0);
  }
  62%{
    transform: translate(-22px,5px) skew(21deg); 
  }
}
