*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Space Mono', monospace;
  --font-size: max(16px, 16px + 16 * (100vw - 1920px) / 1920);
  font-size: var(--font-size);
  --delay: 0.3s;
  color: #fff;
  background-color: #000;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Light / Dark Mode Color Adaptations */
canvas.bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: #000;
}

.glint {
  fill: #000;
}

@media (prefers-color-scheme: light) {
  html, body {
    color: #000;
    background-color: #fff;
  }
  canvas.bg {
    background: #fff;
  }
  .glint {
    fill: #fff;
  }
}

/* Base Keyframe Animations */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes appear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes drawStroke {
  0% {
    stroke-dashoffset: 350;
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.03); opacity: 1; }
}

/* Layout Hierarchy */
.body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  transition: opacity 0.2s ease-out;
}

.body.hide {
  opacity: 0;
  pointer-events: none;
}

.body--inner {
  margin-right: 15vw;
}

@media (max-width: 600px) {
  .body--inner {
    margin-right: 0;
    padding: 0 1.5rem;
  }
}

/* Mysterious Eye Mascot Styling */
.mascot-container {
  width: 338.55px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: 0.5s ease-out fadeIn;
  cursor: pointer;
  position: relative;
}

#mystic-eye {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 1px currentColor);
}

.draw-line {
  stroke-dasharray: 350;
  stroke-dashoffset: 0;
  animation: 1.2s cubic-bezier(0.16, 1, 0.3, 1) drawStroke forwards;
}

/* Eye pupil transition */
#eye-pupil-group {
  transition: transform 0.08s ease-out;
  transform-origin: 0 0;
}

.mascot-container:hover #mystic-eye {
  animation: pulseGlow 2.5s ease-in-out infinite;
}

/* Info & Content Typography */
.info {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  opacity: 0;
  animation: 0.4s ease-out appear forwards;
  animation-delay: var(--delay);
}

h1 {
  margin: 0;
  font-size: 2em;
  font-weight: 400;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
  font-size: 1em;
  opacity: 0.85;
}

.separator {
  opacity: 0.3;
  width: 100%;
  height: 1px;
  margin: var(--font-size) 0;
  background: linear-gradient(90deg, currentColor, transparent);
}

/* Interactive Underlined Links */
.link {
  opacity: 0;
  animation: 0.4s ease-out appear forwards;
  animation-delay: var(--delay);
}

a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  position: relative;
}

a::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

a:hover::after {
  transform: scaleX(1);
  transform-origin: 0% 50%;
}

/* Fullscreen Explosion Click Animation */
@keyframes copy-transition {
  0% {
    opacity: 0;
    transform: none;
  }
  10% {
    opacity: 1;
    transform: none;
  }
  75% {
    opacity: 1;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(2);
  }
  100% {
    opacity: 0;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(5);
  }
}

.copy-transition {
  position: fixed !important;
  pointer-events: none;
  z-index: 100;
  color: inherit;
  font-size: calc(var(--font-size) * 1.5);
  font-weight: 700;
  letter-spacing: 0.05em;
  animation: 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards copy-transition;
}

/* --- My Stuff Interactive Dropdown --- */
.my-stuff-container {
  position: relative;
}

.my-stuff-line {
  position: absolute;
  top: 50%;
  left: 100%;
  height: 2px;
  background: currentColor;
  width: 0;
  margin-left: 15px;
  transform: translateY(-50%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.my-stuff-line.active {
  width: 80px;
}

.my-stuff-dropdown {
  position: absolute;
  top: 50%;
  left: calc(100% + 115px);
  transform: translateY(-50%) translateX(20px);
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  white-space: nowrap;
}

.my-stuff-dropdown.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.my-stuff-dropdown .link {
  opacity: 1;
  animation: none;
}

@media (max-width: 600px) {
  .my-stuff-line {
    top: 100%;
    left: 20px;
    width: 2px !important;
    height: 0;
    margin-left: 0;
    margin-top: 10px;
    transform: none;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .my-stuff-line.active {
    height: 30px !important;
    width: 2px !important;
  }
  
  .my-stuff-dropdown {
    top: calc(100% + 50px);
    left: 30px;
    transform: translateY(-20px) translateX(0);
  }
}
