body {
    font-family: EB Garamond, serif;
    width: 50%;
    padding: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

h1 {
    font-size: 2em;
    font-weight: normal;
}

h2 {
    font-size: 1.5em;
    font-weight: normal;
    margin-top: 0;
}

p {
    font-size: 1.25em;
    font-weight: normal;
}

a {
    color: blue;
    text-decoration: none;
    font-size: 1.25em;
    font-weight: normal;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;   /* anchored bottom-left */
    background-size: 0% 2px;       /* 0 width, 2px thick */
    transition: background-size 0.25s ease;
}

a:visited {
    color: blue;
}

a:hover {
    background-size: 100% 2px;
}

a:active {
    color: red;
}

.topnav {
    background-color:white;
    display: flex;
    flex-wrap: wrap;          /* lets links wrap on narrow screens */
    justify-content: space-between;
    align-items: center;
    position: sticky;         /* stays at the top while scrolling */
    top: 0;
    z-index: 100;
}
  
.topnav .links {
    display: flex;
    gap: 1.25em;
  }

.topnav .links a:visited {
    a:visited {
    color: blue;
}

.topnav .links a:hover {
    background-size: 100% 2px;
}

.topnav .links a:active {
    color: red;
}
}