/*
 * Reusable GitHub creator banner.
 * Copy this file and the .github-brand element to any static app.
 */

.github-brand {
  --github-ink: #0d1117;
  --github-surface: #161b22;
  --github-border: rgb(240 246 252 / 18%);
  --github-accent: #8b5cf6;
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 15px 18px;
  overflow: hidden;
  border: 1px solid var(--github-border);
  border-radius: 18px;
  color: #f0f6fc;
  background:
    radial-gradient(circle at 82% -40%, rgb(99 102 241 / 55%), transparent 45%),
    radial-gradient(circle at 16% 160%, rgb(139 92 246 / 30%), transparent 38%),
    linear-gradient(120deg, var(--github-ink), var(--github-surface));
  box-shadow:
    0 14px 35px rgb(13 17 23 / 18%),
    inset 0 1px 0 rgb(255 255 255 / 7%);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.github-brand::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
  background-size: 22px 22px;
  content: "";
  mask-image: linear-gradient(90deg, #000, transparent 75%);
}

.github-brand::after {
  position: absolute;
  z-index: -1;
  top: -120%;
  left: -20%;
  width: 25%;
  height: 340%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 8%), transparent);
  content: "";
  transform: rotate(18deg);
  transition: left 500ms ease;
}

.github-brand:hover {
  border-color: rgb(167 139 250 / 55%);
  box-shadow:
    0 18px 44px rgb(13 17 23 / 25%),
    0 0 0 1px rgb(139 92 246 / 15%),
    inset 0 1px 0 rgb(255 255 255 / 10%);
  transform: translateY(-2px);
}

.github-brand:hover::after {
  left: 112%;
}

.github-brand__identity,
.github-brand__action {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.github-brand__profile-link {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
}

.github-brand__identity {
  min-width: 0;
  gap: 13px;
}

.github-brand__profile-link:focus-visible {
  outline: 3px solid rgb(139 92 246 / 45%);
  outline-offset: -3px;
}

.github-brand__action:focus-visible {
  outline: 3px solid rgb(139 92 246 / 45%);
  outline-offset: 3px;
}

.github-brand__mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 14px;
  background: rgb(255 255 255 / 8%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
}

.github-brand__mark svg {
  width: 27px;
  fill: currentcolor;
}

.github-brand__copy {
  display: grid;
  gap: 2px;
}

.github-brand__eyebrow {
  color: #8c959f;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.github-brand__copy strong {
  overflow: hidden;
  font-size: 1.08rem;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-brand__links {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.github-brand__action {
  flex: 0 0 auto;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 999px;
  color: #c9d1d9;
  background: rgb(255 255 255 / 6%);
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.github-brand__action:hover {
  border-color: rgb(255 255 255 / 24%);
  color: #fff;
  background: rgb(255 255 255 / 11%);
}

.github-brand__action svg {
  width: 16px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 180ms ease;
}

.github-brand__action:hover svg {
  transform: translateX(2px);
}

.github-brand__repository {
  color: #fff;
  background: rgb(139 92 246 / 32%);
}

.github-brand__glow {
  position: absolute;
  z-index: -1;
  right: 18%;
  bottom: -52px;
  width: 150px;
  height: 80px;
  border-radius: 50%;
  background: var(--github-accent);
  filter: blur(58px);
  opacity: 0.35;
  pointer-events: none;
}

@media (max-width: 560px) {
  .github-brand {
    min-height: 72px;
    gap: 12px;
    padding: 12px;
    border-radius: 15px;
  }

  .github-brand__mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
  }

  .github-brand__action {
    padding: 8px;
  }

  .github-brand__links {
    gap: 5px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .github-brand,
  .github-brand::after,
  .github-brand__action svg {
    transition: none;
  }
}
