/* Glitch Effect untuk Arynz - Ukuran Besar (H3) */
.glitch-main {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  color: var(--text-main);
  position: relative;
  letter-spacing: -1px;
  display: none;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  z-index: 2;
  margin: 0;
  line-height: 1.1;
  animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch-main.active {
  display: inline-block;
}

/* Pseudo elements untuk glitch effect */
.glitch-main::before,
.glitch-main::after {
  content: attr(data-text);
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.8;
  top: 0;
  left: 0;
}

.glitch-main::before {
  animation: glitch-anim 5s infinite linear alternate-reverse;
  color: #ff0055;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 58%);
  left: 2px;
  top: 2px;
}

.glitch-main::after {
  animation: glitch-anim2 5s infinite linear alternate-reverse;
  color: #00f2ff;
  clip-path: polygon(0 60%, 100% 50%, 100% 100%, 0 100%);
  left: -2px;
  top: -2px;
}

/* Glitch layers */
.glitch-layers {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.layer {
  position: absolute;
  top: 0;
  left: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  display: none;
}

.layer.red {
  color: #ff0055;
  text-shadow: 2px 0 #ff0055;
  animation: glitch-layer-red 5s infinite;
}

.layer.blue {
  color: #00f2ff;
  text-shadow: -2px 0 #00f2ff;
  animation: glitch-layer-blue 5s infinite;
}

.layer.green {
  color: #00ff41;
  text-shadow: 0 2px #00ff41;
  animation: glitch-layer-green 5s infinite;
}

@keyframes glitch-skew {
  0% { transform: skew(0deg); }
  10% { transform: skew(-2deg); }
  20% { transform: skew(2deg); }
  30% { transform: skew(-1deg); }
  40% { transform: skew(1deg); }
  50% { transform: skew(0deg); }
  60% { transform: skew(-1deg); }
  70% { transform: skew(1deg); }
  80% { transform: skew(-2deg); }
  90% { transform: skew(2deg); }
  100% { transform: skew(0deg); }
}

@keyframes glitch-anim {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: -2px 0 #ff0055, 2px 2px #00f2ff;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 58%);
  }
  20%, 24%, 55% {
    text-shadow: 2px 2px #ff0055, -2px -2px #00f2ff;
    clip-path: polygon(0 0, 100% 0, 100% 0%, 0 0%);
  }
}

@keyframes glitch-anim2 {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 2px 0 #00f2ff;
    clip-path: polygon(0 60%, 100% 50%, 100% 100%, 0 100%);
  }
  20%, 24%, 55% {
    text-shadow: -2px 0 #ff0055;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 0%);
  }
}

@keyframes glitch-layer-red {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 60%);
  }
  20%, 24%, 55% {
    clip-path: polygon(0 0, 100% 0, 100% 0%, 0 0%);
  }
}

@keyframes glitch-layer-blue {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    clip-path: polygon(0 60%, 100% 50%, 100% 100%, 0 100%);
  }
  20%, 24%, 55% {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 0%);
  }
}

@keyframes glitch-layer-green {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    clip-path: polygon(0 50%, 100% 40%, 100% 60%, 0 70%);
  }
  20%, 24%, 55% {
    clip-path: polygon(0 0%, 100% 0%, 100% 30%, 0 20%);
  }
}

/* Kontainer glitch untuk Arynz */
.glitch-container {
  position: relative;
  display: inline-block;
  width: auto;
  white-space: nowrap;
  z-index: 5;
  text-align: left;
  will-change: transform;
}

.aka {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 0.95rem !important;
  color: var(--text-dim) !important;
  text-transform: lowercase !important;
  margin-bottom: 0.25rem !important;
  letter-spacing: 0.6px !important;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .glitch-main,
  .glitch-main::before,
  .glitch-main::after,
  .layer {
    animation: none !important;
  }
}
