/* ==========================================================================
   ULTRA-MINIMALIST STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;700&display=swap');

:root {
  --bg-color: #FFFFFF; 
  --text-primary: #000000; 
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Roboto Mono', monospace;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   SKY ANIMATION
   ========================================================================== */
.sky-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.sun, .moon {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  will-change: top, left;
}

@media (max-width: 768px) {
  .sun {
    width: 50px;
    height: 50px;
    box-shadow: 0 0 40px #FFD700;
  }
  .moon {
    width: 45px;
    height: 45px;
    box-shadow: 0 0 30px #EAEAEA, inset -8px -8px 0 0 #D0D0D0;
  }
}

.sun {
  width: 80px;
  height: 80px;
  background: #FFD700;
  box-shadow: 0 0 60px #FFD700;
}

.moon {
  width: 70px;
  height: 70px;
  background: #EAEAEA;
  box-shadow: 0 0 50px #EAEAEA, inset -10px -10px 0 0 #D0D0D0;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.main-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-section {
  width: 100%;
  max-width: 1000px;
  padding: 0 5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-size: clamp(3.5rem, 8vw, 6rem);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-name-container {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  cursor: pointer;
}

.char-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
  font-weight: 700;
}

.char-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.typing-container {
  min-height: clamp(2rem, 5vw, 3rem);
  display: flex;
  align-items: center;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.5vw, 1.75rem);
  font-weight: 400;
}

.cursor {
  display: inline-block;
  font-weight: 700;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Sparkle Effect */
.sparkle-hover {
  position: relative;
  display: inline-block;
  cursor: crosshair;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.sparkle-hover:hover {
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.sparkle-hover::before,
.sparkle-hover::after,
.sparkle-hover .sparkle::before,
.sparkle-hover .sparkle::after {
  content: '✦';
  position: absolute;
  color: #FFD700;
  opacity: 0;
  font-size: 14px;
  pointer-events: none;
  z-index: 10;
}

.sparkle-hover .sparkle::after {
  content: '✧';
}

/* Star 1 */
.sparkle-hover:hover::before {
  animation: pop-sparkle 1s ease-in-out infinite;
  top: -5px; left: 10%;
}

/* Star 2 */
.sparkle-hover:hover::after {
  content: '✧';
  animation: pop-sparkle-2 1.2s ease-in-out infinite 0.2s;
  bottom: -5px; right: 10%;
}

/* Star 3 */
.sparkle-hover:hover .s1::before {
  animation: pop-sparkle-3 0.9s ease-in-out infinite 0.4s;
  top: 15px; left: -10px;
  font-size: 18px;
}

/* Star 4 */
.sparkle-hover:hover .s2::before {
  animation: pop-sparkle-4 1.1s ease-in-out infinite 0.1s;
  top: -15px; left: 50%;
  content: '✧';
  font-size: 12px;
}

/* Star 5 */
.sparkle-hover:hover .s3::before {
  animation: pop-sparkle 1.3s ease-in-out infinite 0.5s;
  bottom: -15px; left: 30%;
  font-size: 16px;
}

@keyframes pop-sparkle {
  0% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0deg); }
  30% { opacity: 1; transform: translate(-10px, -15px) scale(1) rotate(45deg); color: #FFC107; }
  100% { opacity: 0; transform: translate(-15px, -25px) scale(0) rotate(90deg); color: #FFD700; }
}

@keyframes pop-sparkle-2 {
  0% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0deg); }
  30% { opacity: 1; transform: translate(15px, -10px) scale(1.2) rotate(45deg); color: #FFF3E0; }
  100% { opacity: 0; transform: translate(25px, -15px) scale(0) rotate(90deg); color: #FFD700; }
}

@keyframes pop-sparkle-3 {
  0% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0deg); }
  30% { opacity: 1; transform: translate(-15px, 10px) scale(0.9) rotate(45deg); color: #FFB300; }
  100% { opacity: 0; transform: translate(-25px, 15px) scale(0) rotate(90deg); color: #FFD700; }
}

@keyframes pop-sparkle-4 {
  0% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0deg); }
  30% { opacity: 1; transform: translate(10px, -20px) scale(1.5) rotate(45deg); color: #FFE082; }
  100% { opacity: 0; transform: translate(15px, -30px) scale(0) rotate(90deg); color: #FFD700; }
}

/* Jelly Profile Image */
.jelly-profile {
  position: absolute;
  left: 100%;
  margin-left: 0.2em;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 1.2em;
  height: 1.2em;
  object-fit: cover;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.jelly-profile.visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  animation: jelly-bounce 3s infinite alternate ease-in-out 0.5s;
}

@keyframes jelly-bounce {
  0% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: translateY(-50%) scale(1);
  }
  33% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: translateY(-55%) scale(1.05);
  }
  66% {
    border-radius: 30% 70% 50% 50% / 50% 40% 60% 40%;
    transform: translateY(-45%) scale(0.95);
  }
  100% {
    border-radius: 50% 50% 40% 60% / 40% 60% 50% 50%;
    transform: translateY(-50%) scale(1.02);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-title {
    position: relative;
    padding-top: 1.5em; /* Make room above 'Hi,' */
  }
  .hero-name-container {
    position: static;
  }
  .jelly-profile {
    top: 0;
    left: 0;
    margin-left: 0;
    transform: translateY(0) scale(0);
  }
  .jelly-profile.visible {
    transform: translateY(0) scale(1);
    animation: jelly-bounce-mobile 3s infinite alternate ease-in-out 0.5s;
  }
}

@keyframes jelly-bounce-mobile {
  0% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: translateY(0) scale(1);
  }
  33% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: translateY(-5%) scale(1.05);
  }
  66% {
    border-radius: 30% 70% 50% 50% / 50% 40% 60% 40%;
    transform: translateY(5%) scale(0.95);
  }
  100% {
    border-radius: 50% 50% 40% 60% / 40% 60% 50% 50%;
    transform: translateY(0) scale(1.02);
  }
}
