/* Base link styles */
a {
  color: #2563eb;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease-in-out;
}

/* Subtle underline effect */
a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-in-out;
}

/* Hover states */
a:hover {
  color: #1d4ed8;
}

a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Focus states for accessibility */
a:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
  border-radius: 2px;
}

a:focus:not(:focus-visible) {
  outline: none;
}

/* Visited state */
a:visited {
  color: #7c3aed;
}

/* Active state */
a:active {
  color: #1e40af;
  transform: translateY(1px);
}

/* External link indicator */
a[href^="http"]::before {
  content: '↗';
  display: inline-block;
  margin-right: 4px;
  font-size: 0.8em;
}

/* Different styling for navigation links */
nav a {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

nav a:hover {
  background-color: #eff6ff;
}

/* Button-style links */
a.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #2563eb;
  color: white;
  border-radius: 6px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

a.button:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

a.button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}