@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/plus-jakarta-sans-400.ttf") format("truetype");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/plus-jakarta-sans-700.ttf") format("truetype");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/plus-jakarta-sans-800.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --color-background: #1e1e1e;
  --color-cream: #f5f5dd;
  --color-red: #da1f26;
  --color-ink: #1a1a1a;
  --color-white: #fff;
  --font-family: "Plus Jakarta Sans", sans-serif;
  --page-width: 390px;
  --link-width: 320px;
  --section-gap: 15px;
  --link-radius: 5px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-cream);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-cream);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: var(--link-radius);
  background: var(--color-cream);
  color: var(--color-ink);
  font-weight: 700;
}

.skip-link:focus {
  transform: none;
}

.linktree {
  position: relative;
  isolation: isolate;
  width: min(100%, var(--page-width));
  min-height: 800px;
  min-height: max(800px, 100svh);
  margin-inline: auto;
  padding-bottom: 69px;
  overflow: hidden;
  background: var(--color-background);
}

.light-trails {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.light-trail {
  position: absolute;
  display: grid;
  width: 517.445px;
  height: 416.061px;
  place-items: center;
}

.light-trail img {
  display: block;
  width: 450.689px;
  height: 300.497px;
  transform: rotate(-16.49deg);
  object-fit: cover;
}

.light-trail--top-left {
  top: -50px;
  left: calc(50% - 335px);
}

.light-trail--top-right {
  top: -50px;
  left: calc(50% - 168px);
}

.light-trail--top-right img {
  transform: rotate(-163.51deg) scaleY(-1);
}

.light-trail--bottom {
  bottom: -199.061px;
  left: calc(50% - 270px);
}

.profile-header {
  position: relative;
  height: 235px;
}

.banner {
  position: absolute;
  top: 0;
  left: calc(50% - 197px);
  display: block;
  width: 392px;
  height: 201px;
  object-fit: cover;
}

.profile-logo {
  position: absolute;
  top: 154px;
  left: calc(50% - 37px);
  display: block;
  width: 74px;
  height: 81px;
  border-radius: 10px;
  box-shadow: 0 4px 4px rgb(0 0 0 / 25%);
  object-fit: cover;
}

.profile {
  margin-top: var(--section-gap);
  text-align: center;
}

.profile h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 30px;
}

.profile p {
  margin: 0;
  font-size: 16px;
  line-height: 19px;
}

.social-links {
  display: flex;
  width: max-content;
  height: 32px;
  gap: 28px;
  margin: var(--section-gap) auto 0;
}

.social-link {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  place-items: center;
  touch-action: manipulation;
}

.social-link::before {
  position: absolute;
  inset: -6px;
  content: "";
}

.social-link img,
.link-button > img {
  display: block;
  flex: none;
}

.main-links {
  display: flex;
  flex-direction: column;
  width: min(var(--link-width), calc(100% - 32px));
  gap: var(--section-gap);
  margin: var(--section-gap) auto 0;
  scroll-margin-top: 20px;
}

.link-button {
  position: relative;
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 20px;
  padding: 0 20.5px;
  border: 0;
  border-radius: var(--link-radius);
  background: var(--color-white);
  color: var(--color-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 19px;
  text-decoration: none;
  touch-action: manipulation;
  box-shadow: inset 0 0 0 0.5px var(--color-ink);
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, color 150ms ease;
}

.link-button > span:last-child {
  white-space: nowrap;
}

.link-button:is(:active, :focus-visible) {
  background: var(--color-red);
  color: var(--color-white);
  box-shadow: 0 4px 2px rgb(0 0 0 / 25%);
}

.link-button:is(:active, :focus-visible) > img {
  filter: brightness(0) invert(1);
}

.download-icon {
  position: relative;
  flex: none;
  width: 35px;
  height: 35px;
  overflow: hidden;
}

.download-icon img {
  position: absolute;
  top: -7.5px;
  left: -7px;
  display: block;
  filter: grayscale(1) invert(1) contrast(10);
}

.link-button:is(:active, :focus-visible) .download-icon img {
  filter: none;
}

.social-notice {
  position: fixed;
  z-index: 5;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 20px;
  width: max-content;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding: 12px 16px;
  border: 1px solid var(--color-cream);
  border-radius: var(--link-radius);
  background: var(--color-background);
  color: var(--color-cream);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 4px 20px rgb(0 0 0 / 30%);
}

.social-notice:empty {
  display: none;
}

@media (hover: hover) {
  .link-button:hover {
    transform: translateY(-2px);
    background: var(--color-red);
    color: var(--color-white);
    box-shadow: 0 5px 12px rgb(0 0 0 / 25%);
  }

  .link-button:hover > img {
    filter: brightness(0) invert(1);
  }

  .link-button:hover .download-icon img {
    filter: none;
  }

  .social-link:hover {
    opacity: 0.8;
  }
}

@media (max-width: 359px) {
  .link-button {
    gap: 12px;
    padding-inline: 14px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link-button {
    transition: none;
  }
}
