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

body {
  font-family: sans-serif;
  overflow: hidden; /* disable vertical scroll */
  background: black; /* fallback */
}

a {
  text-decoration: none;
}

/* Horizontal container */
.horizontal-container {
  display: flex;
  position: relative;
  height: 100vh;
  width: max-content;
  will-change: transform;
}

/* Panels */
.panel {
  min-width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-size: 2.5rem;
  color: white;
  position: relative;
}

.work, .after-work {
  flex-direction: row;
}

.project {
  width: 60%;
  height: 60%;
  margin: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  background: rgba(255,255,255,0.2);
}

/* Background layer */
.page-background {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  height: 100vh;
  z-index: -1;
}

.page-background img {
  height: 100vh; /* full viewport height */
  width: auto;   /* maintain aspect ratio */
}

/* Hamburger menu button */
.menu-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 35px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 20;
}

.menu-btn span {
  display: block;
  height: 4px;
  width: 100%;
  background-color: darkred;
  border-radius: 2px;
}

/* Hover: replace the hamburger with an image */
.menu-btn:hover {
  background: url("images/chairbk.png") no-repeat center center;
  background-size: contain;
}

.menu-btn:hover span {
  display: none;
}

/* Speech bubble */
.speech-bubble {
  background: yellow;
  color: black;
  padding: 8px 12px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  position: relative;
  margin-bottom: 10px; /* default spacing from content */
  text-align: center;
  max-width: 15vw;
  font-size: 1rem;
  line-height: 1.5;
}

/* Bubble tail pointing downward */
.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px; /* tail below bubble */
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: yellow transparent transparent transparent;
}

/* Bubble 1 positioning */
.bubble-1 {
  position: absolute;
  top: 20%;      /* % from top of the panel */
  left: 40%;     /* % from left */
}

/* Bubble 2 positioning with letter image below */
.bubble-2 {
  position: absolute;
  bottom: 30%;              /* vertical position */
  left: 10%;                /* horizontal position */
  display: flex;
  flex-direction: column;   /* stack bubble above letter image */
  align-items: center;
  z-index: 5;
  pointer-events: auto;
}

.bubble-2 .speech-bubble {
  margin-bottom: 70px;     /* space between bubble and letter image */
}

.bubble-2 .speech-bubble {
  animation: bubbleBounce 1.2s ease-in-out infinite;
}

.bubble-2 .letter-image {
  width: 8vw;               /* size of letter image */
  height: auto;
  cursor: pointer;
}

/* Bubble 0 positioning with letter image below */
.bubble-0 {
  position: absolute;
  bottom: 20%;              /* vertical position */
  left: 50%;                /* horizontal position */
  display: flex;
  flex-direction: column;   /* stack bubble above letter image */
  align-items: center;
  z-index: 5;
  pointer-events: auto;
  text-align: center;
}

.bubble-0 .speech-bubble {
  margin-bottom: 100px;     /* space between bubble and letter image */
}

.bubble-0 .key-image {
  width: 8vw;               /* size of image */
  height: auto;
  cursor: pointer;
}

/* Bubble 3 positioning */
.bubble-3 {
  font-weight: 800;
  position: absolute;
  top: 50%;      /* % from top of the panel */
  left: 0%;     /* % from left */
}

/* Bubble 4 positioning */
.bubble-4 {
  font-weight: 800;
  position: absolute;
  top: 30%;      /* % from top of the panel */
  left: 25%;     /* % from left */
}

/* Bubble 5 positioning */
.bubble-5 {
  font-weight: 800;
  position: absolute;
  bottom: 30%;      /* % from top of the panel */
  left: 40%;     /* % from left */
}

/* Bubble 6 positioning */
.bubble-6 {
  font-weight: 800;
  position: absolute;
  top: 30%;      /* % from top of the panel */
  right: 20%;     /* % from left */
}

/* Bubble 7 positioning */
.bubble-7 {
  font-weight: 800;
  position: absolute;
  bottom: 45%;      /* % from top of the panel */
  left: 40%;     /* % from left */
}

/* Bubble 8 positioning */
.bubble-8 {
  font-weight: 800;
  position: absolute;
  top: 10%;      /* % from top of the panel */
  left: 20%;     /* % from left */
}

/* Bubble 9 positioning */
.bubble-9 {
  font-weight: 800;
  position: absolute;
  bottom: 60%;      /* % from top of the panel */
  right: 40%;     /* % from left */
}

/* Bubble 12 positioning with letter image below */
.bubble-12 {
  position: absolute;
  bottom: 30%;              /* vertical position */
  left: 20%;                /* horizontal position */
  display: flex;
  flex-direction: column;   /* stack bubble above letter image */
  align-items: center;
  z-index: 5;
  pointer-events: auto;
}

/* Reduce margin between bubble and image */
.bubble-12 .speech-bubble {
  margin-bottom: 10px;      /* smaller gap */
  animation: bubbleBounce 1.2s ease-in-out infinite;
}

/* Shrink the letter image if needed */
.bubble-12 .snail-image {
  width: 8vw;               /* smaller size */
  height: auto;
  cursor: pointer;
}

@keyframes bubbleBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.hover-box {
  position: relative;
  display: inline-block;
}

.tooltip {
  position: absolute;
  bottom: 0%;   /* above the image */
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: black;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Show message on hover */
.hover-box:hover .tooltip {
  opacity: 1;
}

@media (max-width: 800px) {
  /* Panels fill screen */
  .panel {
    min-width: 100vw;
    height: 100vh;
    font-size: 1.5rem; /* smaller desktop font scale down slightly */
  }

  /* Make speech bubbles bigger */
  .speech-bubble {
    max-width: 70vw; /* wider bubble for mobile */
    padding: 12px 16px; /* more space inside */
    font-size: 1.2rem; /* increase text size */
    line-height: 1.6; /* improve readability */
    border-radius: 20px; /* slightly bigger rounded corners */
  }

  /* Adjust bubble tails proportionally */
  .speech-bubble::after {
    border-width: 12px 12px 0 12px;
    bottom: -12px;
  }

  /* Adjust hover-box images for touch */
  .hover-box img {
    width: 15vw; /* bigger images */
    min-width: 100px;
  }

  /* Panel layout: allow vertical stacking if needed */
  .work, .after-work {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}
.bubble-2 .speech-bubble,
.bubble-0 .speech-bubble,
.bubble-12 .speech-bubble {
  margin-bottom: 120px; /* increase spacing for touch interaction */
}




