.linkedin-popup {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: clamp(1rem, 3vw, 1.6rem);
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.linkedin-popup[hidden] {
  display: none;
}

.linkedin-popup.is-open {
  opacity: 1;
  pointer-events: none;
}

.linkedin-popup-card {
  position: relative;
  width: min(100%, 23.5rem);
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 16px 42px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  transform: translateY(14px) scale(0.985);
  transition: transform 0.24s ease;
}

.linkedin-popup.is-open .linkedin-popup-card {
  transform: translateY(0) scale(1);
}

.linkedin-popup-cover {
  position: relative;
  height: 5.75rem;
  overflow: hidden;
  background: #0a66c2;
}

.linkedin-popup-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.linkedin-popup-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 1.28rem;
  line-height: 1;
  cursor: pointer;
}

.linkedin-popup-close span {
  transform: translateY(-1px);
}

.linkedin-popup-body {
  position: relative;
  padding: 3rem 1rem 1rem;
  color: rgba(0, 0, 0, 0.9);
  font-family: "Inter Tight", Arial, sans-serif;
}

.linkedin-popup-logo {
  position: absolute;
  top: -2.45rem;
  left: 1rem;
  width: 4.75rem;
  height: 4.75rem;
  border: 3px solid #ffffff;
  border-radius: 8px;
  background: #ffffff;
  object-fit: cover;
  object-position: left center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.linkedin-popup-copy {
  display: grid;
  gap: 0.48rem;
}

.linkedin-popup-kicker {
  margin: 0;
  color: #0a66c2;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.linkedin-popup-copy h2 {
  margin: 0;
  color: rgba(0, 0, 0, 0.9);
  font-family: "Inter Tight", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.2;
}

.linkedin-popup-copy p:not(.linkedin-popup-kicker) {
  max-width: 44ch;
  margin: 0;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.82rem;
  line-height: 1.48;
}

.linkedin-popup-actions {
  display: flex;
  align-items: center;
  margin-top: 0.9rem;
}

.linkedin-follow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.52rem;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  background: #0a66c2;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.linkedin-follow-button:hover,
.linkedin-follow-button:focus-visible {
  background: #004182;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.18);
}

.linkedin-follow-mark {
  display: inline-grid;
  place-items: center;
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 3px;
  background: #ffffff;
  color: #0a66c2;
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .linkedin-popup,
  .linkedin-popup-card {
    transition: none;
  }
}

@media (max-width: 520px) {
  .linkedin-popup {
    justify-content: center;
  }

  .linkedin-popup-card {
    border-radius: 8px;
  }
}
