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

@keyframes crt-off {
  0% {
    transform: scale(1, 1);
    filter: brightness(1);
  }
  40% {
    transform: scale(1, 0.005);
    filter: brightness(2);
  }
  100% {
    transform: scale(0, 0);
    filter: brightness(5);
  }
}

@keyframes glitch-red {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-1px, 1px);
  }
  40% {
    transform: translate(-1px, -1px);
  }
  60% {
    transform: translate(1px, 1px);
  }
  80% {
    transform: translate(1px, -1px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes log-spotlight {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 157, 244, 0);
  }
  35% {
    box-shadow: 0 0 28px 4px rgba(37, 157, 244, 0.5);
  }
  100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 16px rgba(37, 157, 244, 0.25);
  }
}

@keyframes fade-slide-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-slide-left {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoom-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.cursor-blink {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background-color: #259df4;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

.shutdown-active {
  animation: crt-off 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  overflow: hidden;
  background: white !important;
}

.glitch-text {
  animation: glitch-red 1.6s steps(2, end) infinite;
  text-shadow: 2px 0 red, -2px 0 blue;
}

.scanlines {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.1)
  );
  background-size: 100% 4px;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

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

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #222;
}

::-webkit-scrollbar-thumb:hover {
  background: #259df4;
}

.glow-text {
  text-shadow: 0 0 10px rgba(37, 157, 244, 0.4);
}

.text-dim {
  color: #666666;
}

.log-panel {
  display: none;
}

.log-panel.is-open {
  display: block;
  animation: fade-slide-down 0.45s ease-out both;
}

.log-panel.is-spotlight {
  animation: fade-slide-down 0.45s ease-out both, log-spotlight 1.2s ease-out forwards;
}

.log-panel .log-line {
  animation: fade-slide-left 0.35s ease-out both;
}

.process-row.is-dimmed {
  opacity: 0.4;
  transition: opacity 0.35s ease;
}

.process-row {
  transition: opacity 0.35s ease, background-color 0.2s ease;
}

.lang-switch a.active {
  color: #259df4;
}

.lang-switch a:not(.active) {
  color: #8b8b8b;
}

.lang-switch a:not(.active):hover {
  color: #e0e0e0;
}

.nav-chevron {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.nav-link.is-active .nav-chevron,
.nav-link:hover .nav-chevron {
  opacity: 1;
}

.form-success {
  animation: zoom-in 0.45s ease-out both;
}

.status-running {
  color: #4ade80;
}

.status-compiling {
  color: #facc15;
}

.status-archived {
  color: #8b8b8b;
}

.skill-chip {
  transition: border-color 0.2s ease, color 0.2s ease;
}

.skill-chip:hover {
  border-color: rgba(37, 157, 244, 0.5);
}

.tag-chip {
  transition: border-color 0.2s ease, color 0.2s ease;
  cursor: crosshair;
}

.tag-chip:hover {
  border-color: #259df4;
  color: #259df4;
}

/* Mobile top nav: no ugly scrollbar */
.nav-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .nav-scroll {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

.nav-link {
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.nav-link.is-active {
  background: rgba(37, 157, 244, 0.08);
}

@media (max-width: 1023px) {
  .nav-link.is-active {
    border-bottom: 1px solid #259df4;
    border-radius: 0;
  }
}

/* Section enter */
.section-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

.hero-enter {
  animation: fade-slide-down 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

