.author-card {
  float: right;
  padding: 1rem 1.5rem 1rem 1.5rem;
}

.author-contact-card {
  background: #f9f9f94d;
  border: 1px solid #ccc;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
}

.author-contact-card .contact-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.author-contact-card .contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Base button styling */
.author-contact-card .contact-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #555;
  transition: transform 0.2s ease, background 0.25s ease, color 0.25s ease, z-index 0s linear 0.25s;
  position: relative;
  cursor: pointer;
  z-index: 1;
}

.author-contact-card .contact-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: fill 0.25s ease;
}

/* Hover brand colors */
.contact-btn.website:hover   { color: #648e4c; }
.contact-btn.email:hover     { color: #dd4b39; }
.contact-btn.instagram:hover { color: #E1306C; }
.contact-btn.facebook:hover  { color: #1877F2; }
.contact-btn.x-twitter:hover { color: #000; }
.contact-btn.linkedin:hover  { color: #0077B5; }

.author-contact-card .contact-btn:hover {
  transform: scale(1.1);
  background: #fff;
  position: relative;
  z-index: 20;
  transition: transform 0.2s ease, background 0.25s ease, color 0.25s ease, z-index 0s linear 0s;
}

/* Tooltip bubble */
.author-contact-card .contact-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--global-palette-btn-bg);
  color: var(--global-palette-btn);
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 30;
}

/* Tooltip arrow */
.author-contact-card .contact-btn[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #222 transparent transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 25;
}

/* Hover/focus state */
.author-contact-card .contact-btn:hover::after,
.author-contact-card .contact-btn:hover::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

@media screen and (max-width: 768px) {
    .author-card {
      padding: 0 0 1.5rem 0;
    }
}