/* resume-css.css */

/* Reset and Basic Styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: black;
  overflow: hidden; /* Prevent scrollbars during animations */
  font-family: Helvetica, sans-serif;
  color: white;
}

/* Initial Overlay */
#initial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 25; /* Above all other elements */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 3s ease-out;
}

#initial-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Fade out text class for the initial paragraph */
.fade-out-text {
  opacity: 0;
  transition: opacity 3s ease-out;
}

/* Initial Content */
.initial-content {
  text-align: center;
  color: white;
}

.initial-paragraph {
  margin-top: 20px;
  font-size: 1.5em;
  animation: fadeInText 4s ease-in-out;
}

/* Optional Animations for Initial Content */
@keyframes floatImage {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@keyframes fadeInText {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Star Container */
#star-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Allow clicks to pass through initially */
  z-index: 0; /* Ensure it's behind other elements */
  overflow: hidden; /* Hide stars when they move off-screen */
}

/* Star Styles */
.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0; /* Start invisible for fade-in */
  /* Animate upward continuously */
  animation: floatUp 240s linear infinite, fadeIn 30s linear infinite;
  pointer-events: auto; /* Enable hover and click on stars */
  cursor: pointer;
  /* Default size for star */
  width: 2px;
  height: 2px;
}

/* Different Sizes for Stars */
.star.small {
  width: 2px;
  height: 2px;
}

.star.medium {
  width: 3px;
  height: 3px;
}

.star.large {
  width: 4px;
  height: 4px;
}

/* Float Up Animation:
   Each star moves upward by 200vh from its initial position.
   When the animation loops, the star resets to its original position. */
@keyframes floatUp {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-200vh);
  }
}

/* Fade In Animation for Stars */
@keyframes fadeIn {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* Zoomed Star Class */
.star.zoomed {
  transform: scale(100); /* Scale up significantly */
  filter: brightness(5); /* Increase brightness for a glowing effect */
  box-shadow: 0 0 20px white, 0 0 40px white, 0 0 60px white; /* Enhanced glow */
  z-index: 10; /* Bring the zoomed star above all other elements */
  transition: transform 3s ease-in-out, filter 3s ease-in-out, box-shadow 3s ease-in-out;
  opacity: 1; /* Ensure the star remains fully opaque */
}

/* Overlay for Fade Effect */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  opacity: 0;
  transition: opacity 3s ease-in-out; /* Slower fade transitions */
  z-index: 5; /* Positioned above star-container but below zoomed star */
  pointer-events: none; /* Initially non-interactive */
}

#overlay.active {
  pointer-events: auto; /* Allows overlay to capture click events if needed */
}

/* Content Container */
#inform {
  position: absolute;
  font-family: Helvetica, sans-serif;
  font-weight: lighter;
  color: rgb(209, 209, 209);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  z-index: 15;
  max-width: 70%;
  max-height: 80vh; /* Added max-height */
  overflow-y: auto; /* Ensures scrollability */
  overflow-x: hidden; /* Prevent horizontal scroll */
  word-wrap: break-word; /* Prevent word overflow */
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.1); /* Slightly visible background */
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 2s ease-in-out, visibility 2s ease-in-out;
}

#inform::-webkit-scrollbar {
  width: 8px;
}

#inform::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

#inform::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

#inform.hidden {
  opacity: 0;
  visibility: hidden;
}

#inform.visible {
  opacity: 1;
  visibility: visible;
}

/* Popup Window */
#popup-window {
  position: fixed;
  bottom: -200px; /* Start off-screen */
  left: 20px; /* Distance from the left edge */
  width: 250px; /* Width of the popup */
  background-color: rgba(17, 16, 20, 0.95); /* Semi-transparent dark background */
  border: 1px solid #060607;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 20; /* Above all other elements */
  opacity: 0; /* Initially transparent */
  visibility: hidden; /* Initially hidden */
  transition: opacity 0.5s ease-in-out, bottom 0.5s ease-in-out; /* Smooth transitions */
}

#popup-window.visible {
  bottom: 20px; /* Position on-screen */
  opacity: 1; /* Fully opaque */
  visibility: visible;
}

/* Fade-out class for popup */
#popup-window.fade-out-popup {
  bottom: -200px;
  opacity: 0;
}

/* Popup Content */
.popup-content {
  padding: 15px;
  text-align: center;
}

.popup-image {
  width: 80px; /* Adjust as needed */
  height: 80px; /* Adjust as needed */
  object-fit: cover;
  border-radius: 50%; /* Make the image circular */
  margin-bottom: 10px;
}

.popup-paragraph {
  font-size: 0.9em;
  color: #b6b6b6;
  margin: 0;
}

#popup-window .close-button {
  position: absolute;
  top: 5px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.2em;
  color: #000000;
  cursor: pointer;
  z-index: 100;
}

#popup-window .close-button:hover {
  color: #333;
}

/* Animated Heading */
.animated-heading {
  display: inline-block;
  white-space: nowrap;
  text-transform: uppercase;
  font-family: Verdana, sans-serif;
  font-size: 3em;
  font-weight: 700;
  text-shadow: 1px 1px 1px #919191,
               1px 2px 1px #919191,
               1px 3px 1px #919191,
               1px 4px 1px #919191,
               1px 5px 1px #919191,
               1px 6px 1px #919191,
               1px 7px 1px #919191,
               1px 8px 1px #919191,
               1px 9px 1px #919191,
               1px 10px 1px #919191,
               1px 18px 6px rgba(16,16,16,0.4),
               1px 22px 10px rgba(16,16,16,0.2),
               1px 25px 35px rgba(16,16,16,0.2),
               1px 30px 60px rgba(16,16,16,0.4);
}

.animated-heading span {
  display: inline-block;
  transition: transform 0.3s ease;
  cursor: pointer;
}

/* On hover, simply apply a transform (the colors are set inline) */
.animated-heading span:hover {
  transform: translateY(-10px) scale(1.2);
}

/* Responsive Design Adjustments (Optional) */
@media (max-width: 768px) {
  .animated-heading {
    font-size: 2em;
  }

  .initial-image {
    width: 100px;
    height: 100px;
  }

  .initial-paragraph {
    font-size: 1.2em;
  }

  #popup-window {
    width: 200px;
  }
}
