<h3 class="hover-1">Hover Me</h3>
<h3 class="hover-1 alt">Hover Me</h3>
.hover-1 {
  --h: 1.2em;   
  
  line-height: var(--h);
  color: #0000;
  text-shadow: 
    0 calc(-1*var(--_t,0em)) #000, 
    0 calc(var(--h) - var(--_t,0em)) #1095c1;
  overflow: hidden;
  transition: .3s;
}
.alt {
  text-shadow: 
    0 var(--_t,0em) #000, 
    0 calc(var(--_t,0em) - var(--h)) #1095c1;
}
.hover-1:hover {
  --_t: var(--h);
}


body {
  height: 100vh;
  margin: 0;
  display: grid;
  gap: 20px;
  place-content: center;
  align-items: center;
}
h3 {
  font-family: system-ui, sans-serif;
  font-size: 3rem;
  margin:0;
  cursor: pointer;
  padding: 0 .1em;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.