@import url('https://unpkg.com/normalize.css') layer(normalize);

@layer normalize, base, demo;

@layer demo {
  :root {
    --accent: hsl(10 20% 30%);
    --island-margin: 20px;
    --island-height: 40px;
    --island-width: 200px;
    --avatar-size: calc(var(--island-width) * 0.65);
    --avatar-position: calc(
      var(--island-height) + (var(--island-margin) * 1.25)
    );
    --header-margin: 0.5rem;
    --header-height: calc(
      var(--island-margin) + var(--avatar-position) + var(--avatar-size) + 1lh +
        var(--header-margin)
    );
    --header-font: 3rem;
  }

  .loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.loading-button {
  border: none;
  position: relative;
  width: 200px;
  height: 73px;
  padding: 0;
  z-index: 2;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='868' width='2500' viewBox='0 0 726 252.17'%3E%3Cpath d='M483.92 0S481.38 24.71 466 40.11c-11.74 11.74-24.09 12.66-40.26 15.07-9.42 1.41-29.7 3.77-34.81-.79-2.37-2.11-3-21-3.22-27.62-.21-6.92-1.36-16.52-2.82-18-.75 3.06-2.49 11.53-3.09 13.61S378.49 34.3 378 36a85.13 85.13 0 0 0-30.09 0c-.46-1.67-3.17-11.48-3.77-13.56s-2.34-10.55-3.09-13.61c-1.45 1.45-2.61 11.05-2.82 18-.21 6.67-.84 25.51-3.22 27.62-5.11 4.56-25.38 2.2-34.8.79-16.16-2.47-28.51-3.39-40.21-15.13C244.57 24.71 242 0 242 0H0s69.52 22.74 97.52 68.59c16.56 27.11 14.14 58.49 9.92 74.73C170 140 221.46 140 273 158.57c69.23 24.93 83.2 76.19 90 93.6 6.77-17.41 20.75-68.67 90-93.6 51.54-18.56 103-18.59 165.56-15.25-4.21-16.24-6.63-47.62 9.93-74.73C656.43 22.74 726 0 726 0z'/%3E%3C/svg%3E") no-repeat 50% 50%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='868' width='2500' viewBox='0 0 726 252.17'%3E%3Cpath d='M483.92 0S481.38 24.71 466 40.11c-11.74 11.74-24.09 12.66-40.26 15.07-9.42 1.41-29.7 3.77-34.81-.79-2.37-2.11-3-21-3.22-27.62-.21-6.92-1.36-16.52-2.82-18-.75 3.06-2.49 11.53-3.09 13.61S378.49 34.3 378 36a85.13 85.13 0 0 0-30.09 0c-.46-1.67-3.17-11.48-3.77-13.56s-2.34-10.55-3.09-13.61c-1.45 1.45-2.61 11.05-2.82 18-.21 6.67-.84 25.51-3.22 27.62-5.11 4.56-25.38 2.2-34.8.79-16.16-2.47-28.51-3.39-40.21-15.13C244.57 24.71 242 0 242 0H0s69.52 22.74 97.52 68.59c16.56 27.11 14.14 58.49 9.92 74.73C170 140 221.46 140 273 158.57c69.23 24.93 83.2 76.19 90 93.6 6.77-17.41 20.75-68.67 90-93.6 51.54-18.56 103-18.59 165.56-15.25-4.21-16.24-6.63-47.62 9.93-74.73C656.43 22.74 726 0 726 0z'/%3E%3C/svg%3E") no-repeat 50% 50%;
  -webkit-mask-size: 100%;
  cursor: pointer;
  background-color: transparent;
}

.loading-button:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: 0px 0 0 0 white;
  transition: all 2s ease;
}

.loading-button.show:after {
  box-shadow: 0px -13px 56px 12px #ffffffa6;
}

.loading-button span {
  position: absolute;
  width: 100%;
  font-size: 15px;
  font-weight: 100;
  left: 50%;
  top: 39%;
  letter-spacing: 3px;
  text-align: center;
  transform: translate(-50%,-50%);
  color: black;
  transition: all 2s ease;
}

.loading-button.show span {
  color: white;
}

.loading-button:before {
  content: '';
  position: absolute;
  width: 0;
  height: 100%;
  background-color: black;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: all 1s ease;
}

.loading-button.show:before {
  width: 100%;
}

  header {
    position: sticky;
    top: calc(var(--header-height) * -0.65);
    height: var(--header-height);
    width: 100%;
    font-size: var(--header-font);
    animation: block both linear;
    animation-timeline: scroll(root);
    transform-origin: 50% 0;
    animation-range: 0 calc(var(--header-height) * 0.65);
    z-index: 2;
  }
  [data-debug='true'] header {
    outline: 4px dashed red;
  }
  @keyframes block {
    to {
      background: canvas;
      box-shadow: 0 0 20px 5px hsl(0 0% 0% / 0.25);
    }
  }

  .island__container {
    width: var(--island-width);
    height: var(--island-height);
    border-radius: var(--island-height);
    position: fixed;
    top: 20px;
    left: 50%;
    translate: -50% -0%;
    background: black;
  }

  .island__bar {
    width: var(--island-width);
    height: var(--island-height);
    border-radius: var(--island-height);
    background: black;
    position: absolute;
    top: 0%;
    left: 50%;
    translate: -50% 0%;
  }
  .island {
    filter: url(#fancy-goo);
    cursor: pointer;
  }

  .island__bar::after {
    content: '';
    position: absolute;
    left: 0%;
    top: 0%;
    height: 100%;
    aspect-ratio: 1;
    z-index: 2;
    background: radial-gradient(red calc(30% - 1px), transparent 30%);
    border-radius: 50%;
  }

  .avatar {
    width: var(--avatar-size);
    aspect-ratio: 1;
    border-radius: 50%;
    background: black;
    position: fixed;
    left: 50%;
    top: var(--avatar-position);
    translate: -50% 0;
  }

  body {
    background-color: rgb(255, 255, 255);
  }

main {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center; 
  flex-direction: column;
}

  h1 {
    margin: 0;
    position: fixed;
    font-size: 3rem;
    top: calc(var(--header-height) + var(--header-margin));
    translate: -50% -100%;
    left: 50%;
    white-space: nowrap;
    animation: scale both linear;
    animation-timeline: scroll(root);
    transform-origin: 50% 0;
    animation-range: 0 calc(var(--header-height) * 0.65);
  }

  .avatar {
    overflow: hidden;
    animation: shrink both linear;
    animation-timeline: scroll(root);
    animation-range: 0 calc(var(--header-height) * 0.65);
    transform-origin: 50% 0;
  }

  .avatar img {
    width: 100%;
    height: 100%;
    cursor: none;
    border-radius: 50%;
    object-fit: cover;
    animation: fade both linear;
    animation-timeline: scroll(root);
    animation-range: 0 calc(var(--header-height) * 0.425);
  }

  @keyframes shrink {
    to {
      translate: -50% calc(var(--avatar-position) * -1);
      scale: 0.3;
    }
  }
  @keyframes scale {
    to {
      translate: -50%
        calc(
          (
              (var(--header-height) + var(--header-margin)) -
                var(--avatar-position)
            ) * -1
        );
      scale: 0.4;
    }
  }
  @keyframes fade {
    to {
      filter: blur(10px);
      opacity: 0;
    }
  }

  ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0;
    margin: 0;
    width: 50ch;
    max-width: calc(100vw - 2rem);
  }
  li {
    width: 100%;
  }

  .context {
    padding-inline: 1rem;
    display: flex;
    gap: 1rem;
  }

  li :is(a) {
    width: 100%;
    height: 50px;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 6px;
    padding-inline: 1rem;
    border: 2px solid #000000;
    background: #fff;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

    &:is(:focus-visible, :hover) {
      --intent: 1;
    }

    &::after {
      content: '';
      position: absolute;
      inset: 0;
      background: hsl(0 0% 0% / 0.2);
      opacity: var(--intent, 0);
      transition: opacity 0.2s;
      pointer-events: none;
    }
  }

  li svg {
    width: 24px;
  }
}

li img {
  width: 24px;
  height: 24px;
  object-fit: cover;
}

li a {
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

@layer base {
  *,
  *:after,
  *:before {
    box-sizing: border-box;
  }

  body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    font-family: 'SF Pro Text', 'SF Pro Icons', 'AOS Icons', 'Helvetica Neue',
      Helvetica, Arial, sans-serif, system-ui;
  }


  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}

.island__bar {
  position: relative;
}

.glitch {
  animation: glitch 0.5s;
}

@keyframes glitch {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-5px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
  100% {
    transform: translateX(0);
  }
}

.author {
  text-align: center;
  font-size: 20px;
  margin-bottom: 20px;
  letter-spacing: 2px;
}
