@font-face {
  font-family: 'Froyo';
  src: url('assets/fonts/froyo.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #fff;
  --fg: #000;
  --muted: #6f6f6f;
  --arrow: #3f3f3f;
  --youtube: #c63f3f;
  --discord: #5865f2;
  --projets: #767a82;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Froyo', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.dots-bg {
  position: fixed;
  top: 0;
  right: 0;
  width: 52vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.14) 14%,
    rgba(0, 0, 0, 0.45) 36%,
    rgba(0, 0, 0, 0.85) 68%,
    #000 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.14) 14%,
    rgba(0, 0, 0, 0.45) 36%,
    rgba(0, 0, 0, 0.85) 68%,
    #000 100%
  );
}

.dots-parallax {
  position: absolute;
  inset: -36px;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dots-float {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 11s ease-in-out infinite;
}

.dots {
  width: 744px;
  height: 1052px;
  flex-shrink: 0;
  opacity: 0.92;
  user-select: none;
  transform: scaleX(-1) scale(var(--scale, 1.35));
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-10px, -10px, 0); }
  50% { transform: translate3d(6px, -14px, 0); }
  75% { transform: translate3d(10px, -5px, 0); }
}

.container {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 clamp(1.5rem, 6vw, 4rem) 0 clamp(2rem, 9.5vw, 12rem);
}

.content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: translateY(-2vh);
}

.title {
  display: inline-flex;
  align-items: baseline;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  user-select: none;
  white-space: nowrap;
}

.prefix {
  font-size: clamp(1.4rem, 3.05vw, 3.85rem);
  color: var(--muted);
  margin-right: 0.12em;
}

.name {
  font-size: clamp(2.9rem, 6.4vw, 8.1rem);
  color: var(--fg);
}

.letter,
.space {
  display: inline-block;
}

.letter {
  transform-origin: center bottom;
}

.title.bouncing .letter {
  animation: bounce 2.6s cubic-bezier(0.36, 0, 0.2, 1) infinite;
  animation-delay: var(--d, 0s);
}

@keyframes bounce {
  0%, 44%, 100% { transform: translateY(0) scale(1, 1); }
  7% { transform: translateY(2px) scale(1.07, 0.91); }
  19% { transform: translateY(-0.26em) scale(0.95, 1.07); }
  29% { transform: translateY(0) scale(1.05, 0.94); }
  37% { transform: translateY(-0.08em) scale(0.98, 1.02); }
}

.menu {
  position: relative;
  margin-top: clamp(2.2rem, 6.2vh, 5.2rem);
  margin-left: clamp(2.4rem, 9.6vw, 11.8rem);
}

.menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(0.65rem, 1.85vh, 1.55rem);
}

.menu li {
  display: flex;
  align-items: center;
}

.material-icons.arrow {
  position: absolute;
  left: -1.15em;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.45rem, 2.75vw, 3.4rem);
  line-height: 1;
  color: var(--arrow);
  pointer-events: none;
  user-select: none;
  transform: translate3d(0, var(--y, 0px), 0);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

.material-icons.arrow.active {
  transform: translate3d(0.14em, var(--y, 0px), 0);
}

.arrow[data-color="youtube"] { color: var(--youtube); }
.arrow[data-color="discord"] { color: var(--discord); }
.arrow[data-color="projets"] { color: var(--projets); }

.link {
  display: inline-block;
  font-size: clamp(1.15rem, 2.25vw, 2.85rem);
  line-height: 1.15;
  color: var(--fg);
  text-decoration: none;
  padding: 0.08em 0.2em 0.12em 0;
  transition: color 0.2s ease;
  outline: none;
}

.link.youtube:hover,
.link.youtube:focus-visible {
  color: var(--youtube);
}

.link.discord:hover,
.link.discord:focus-visible {
  color: var(--discord);
}

.link.projets:hover,
.link.projets:focus-visible {
  color: var(--projets);
}

.subtitle {
  margin-top: clamp(1rem, 2.4vh, 2rem);
  font-size: clamp(1rem, 1.55vw, 1.75rem);
  color: var(--muted);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: clamp(2rem, 5vh, 4rem);
  font-size: clamp(1.05rem, 1.9vw, 2.2rem);
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s ease;
  outline: none;
}

.back:hover,
.back:focus-visible {
  color: var(--projets);
}

.back-arrow {
  font-size: 1.25em;
  color: var(--arrow);
  transition: transform 0.2s ease;
}

.back:hover .back-arrow,
.back:focus-visible .back-arrow {
  transform: translateX(-0.18em);
}

@media (max-width: 820px) {
  .dots-bg {
    width: 68vw;
    opacity: 0.6;
  }

  .container {
    padding-left: clamp(1.5rem, 8vw, 3rem);
  }

  .prefix {
    font-size: clamp(1.3rem, 5.2vw, 2.2rem);
  }

  .name {
    font-size: clamp(2.8rem, 11vw, 4.8rem);
  }

  .menu {
    margin-left: clamp(1.8rem, 10vw, 4rem);
  }

  .link {
    font-size: clamp(1.25rem, 5vw, 2rem);
  }

  .material-icons.arrow {
    font-size: clamp(1.55rem, 6.2vw, 2.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dots-float {
    animation: none;
  }

  .dots-parallax {
    transition: none;
  }
}
