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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #000;
  color: #fff;
}

/* ========== Splash Screen ========== */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  opacity: 1;
  visibility: visible;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
  z-index: 51;
}

.splash-title {
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: bold;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  /* replaced pulse animation with modern floating animation */
  animation: floatText 3s ease-in-out infinite;
}

.splash-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
  /* replaced pulse animation with modern floating animation */
  animation: floatText 3s ease-in-out infinite;
  animation-delay: 0.2s;
}

.splash-hint {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  animation: bounce 1.5s ease-in-out infinite;
}

/* ========== Main Site ========== */
.main-site {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease 0.5s, visibility 0.5s ease 0.5s;
}

.main-site.active {
  opacity: 1;
  visibility: visible;
}

/* Add rain background animation to main site */
.main-site::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.background-rain {
  z-index: 2;
  /* ensure rain is visible and renders properly on main site */
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ========== Discord Widget ========== */
.discord-widget {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 30;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(0.5rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  padding: 1rem;
  max-width: 20rem;
  transition: all 1s ease;
  transform: translateX(150%);
  opacity: 0;
}

.discord-widget.show {
  transform: translateX(0);
  opacity: 1;
}

.discord-loading,
.discord-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.discord-icon {
  width: 2rem;
  height: 2rem;
  background: #5865f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: white;
}

.discord-icon svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discord-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ========== Decorative Elements ========== */
.decorative-elements {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.corner-decoration {
  position: absolute;
  width: 3rem;
  height: 3rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.8s ease;
  opacity: 0;
  transform: scale(0.75);
}

.corner-decoration.show {
  opacity: 1;
  transform: scale(1);
}

.corner-decoration.top-left {
  top: 2rem;
  left: 2rem;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  border-right: none;
  border-bottom: none;
  transition-delay: 0s;
}

.corner-decoration.top-right {
  top: 2rem;
  right: 2rem;
  border-right: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  border-left: none;
  border-bottom: none;
  transition-delay: 0.2s;
}

.corner-decoration.bottom-left {
  bottom: 2rem;
  left: 2rem;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  border-right: none;
  border-top: none;
  transition-delay: 0.4s;
}

.corner-decoration.bottom-right {
  bottom: 2rem;
  right: 2rem;
  border-right: 2px solid rgba(255, 255, 255, 0.2);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  border-left: none;
  border-top: none;
  transition-delay: 0.6s;
}

.floating-dot {
  position: absolute;
  width: 0.25rem;
  height: 0.25rem;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  opacity: 0;
  transition: opacity 1s ease;
}

.floating-dot.show {
  opacity: 1;
}

.dot-1 {
  top: 25%;
  left: 25%;
  transition-delay: 0.8s;
  animation-delay: 0s;
}

.dot-2 {
  top: 75%;
  right: 25%;
  transition-delay: 1s;
  animation-delay: 1s;
}

.dot-3 {
  top: 33%;
  right: 33%;
  transition-delay: 1.2s;
  animation-delay: 2s;
}

/* ========== Rain Animation ========== */
.rain-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.rain-drop {
  position: absolute;
  width: 2px;
  height: 10px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
  opacity: 0.6;
}

/* Rain animation */
@keyframes rainFall {
  0% {
    transform: translateY(-10vh);
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

.rain-drop {
  animation: rainFall linear forwards;
}

/* ========== Main Content ========== */
.main-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.main-display {
  min-height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leet-text {
  font-size: clamp(2rem, 8vw, 8rem);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.leet-text:hover {
  transform: scale(1.1);
}

.main-heading {
  font-size: clamp(2rem, 8vw, 8rem);
  font-weight: bold;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  transition: all 1s ease;
  transform: translateY(2rem);
  opacity: 0;
  /* added floating animation on the main heading text */
  animation: floatTextIn 0.8s ease-out forwards;
  /* Set text color to white */
  color: #ffffff;
}

.main-heading.show {
  transform: translateY(0);
  opacity: 1;
  /* continuous subtle float animation for modern effect */
  animation: floatTextLoop 4s ease-in-out infinite;
}

/* ========== Skill Badges ========== */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 0 1rem;
  transition: all 0.8s ease;
  transform: translateY(2rem);
  opacity: 0;
}

.skills-container.show {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.3s;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  backdrop-filter: blur(0.5rem);
  border: 1px solid rgba(255, 255, 255, 0.6);
  cursor: default;
  transition: all 0.3s ease;
  /* Changed text color from #1a1a1a to white */
  color: #ffffff;
  font-weight: 500;
  opacity: 0;
  transform: translateY(1.25rem);
}

.skill-badge.show {
  opacity: 1;
  transform: translateY(0);
}

.skill-badge:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

.skill-badge svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke-width: 2.5;
  /* Changed SVG color from #1a1a1a to white */
  color: #ffffff;
  flex-shrink: 0;
}

/* ========== Contact Button ========== */
.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.4);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  backdrop-filter: blur(0.5rem);
  /* Changed text color from #1a1a1a to white */
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.8s ease;
  transform: translateY(2rem);
  opacity: 0;
  margin-bottom: 1.5rem;
}

.contact-button.show {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.7s;
}

.contact-button:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.05);
}

.contact-button svg {
  width: 1.25rem;
  height: 1.25rem;
  /* Changed SVG color from #1a1a1a to white */
  color: #ffffff;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.contact-button:hover svg {
  transform: rotate(12deg);
}

/* ========== Final 1337 ========== */
.final-leet {
  font-size: 1.5rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.8);
  cursor: default;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(2rem);
}

.final-leet.show {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.9s;
}

.final-leet:hover {
  color: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

/* ========== Footer ========== */
.footer {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  transition: all 0.8s ease;
  transition-delay: 1s;
}

.footer.show {
  opacity: 1;
}

.footer-text {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.footer:hover .footer-text {
  color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

/* ========== Animations ========== */
/* added new floating animation for entrance */
@keyframes floatTextIn {
  0% {
    transform: translateY(2rem) scale(0.95);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* added continuous subtle floating animation */
@keyframes floatTextLoop {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.75rem);
  }
}

/* initial floating animation for splash screen */
@keyframes floatText {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-1rem) scale(1.02);
    opacity: 0.95;
  }
}

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

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.5rem);
  }
}

@keyframes starSparkle {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0);
  }
}

/* ========== Star Sparkle ========== */
.star-sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 20;
  font-size: 1.5rem;
  animation: starSparkle 1s ease-out forwards;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  /* improved mobile padding and spacing */
  html,
  body {
    overflow-x: hidden;
  }

  /* reduce corner decoration size and padding on mobile */
  .corner-decoration {
    width: 2rem;
    height: 2rem;
    top: 1rem !important;
    right: 1rem !important;
    bottom: 1rem !important;
    left: 1rem !important;
  }

  .corner-decoration.top-left {
    top: 1rem !important;
    left: 1rem !important;
  }

  .corner-decoration.top-right {
    top: 1rem !important;
    right: 1rem !important;
  }

  .corner-decoration.bottom-left {
    bottom: 1rem !important;
    left: 1rem !important;
  }

  .corner-decoration.bottom-right {
    bottom: 1rem !important;
    right: 1rem !important;
  }

  /* improve discord widget mobile positioning and sizing */
  .discord-widget {
    top: 0.5rem;
    right: 0.5rem;
    left: auto;
    max-width: 85vw;
    min-width: 280px;
    padding: 0.75rem;
    font-size: 0.75rem;
  }

  .discord-content {
    gap: 0.5rem;
  }

  .discord-icon {
    width: 2.5rem !important;
    height: 2.5rem !important;
    min-width: 2.5rem;
  }

  /* improve skill badges for mobile */
  .skills-container {
    gap: 0.5rem;
    padding: 0 0.75rem;
    margin: 1rem 0;
    flex-wrap: wrap;
  }

  .skill-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
    gap: 0.35rem;
  }

  .skill-badge svg {
    width: 1rem;
    height: 1rem;
  }

  /* improve contact button for mobile */
  .contact-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    gap: 0.5rem;
    width: 90%;
    max-width: 400px;
    margin: 1rem auto;
  }

  .contact-button svg {
    width: 1rem;
    height: 1rem;
  }

  /* improve main content spacing */
  .main-content {
    padding: 1rem;
  }

  .main-display {
    min-height: 5rem;
    padding: 0 1rem;
  }

  /* improve splash screen for mobile */
  .splash-title {
    font-size: clamp(2rem, 8vw, 5rem);
    margin-bottom: 1rem;
  }

  .splash-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .splash-hint {
    font-size: 0.8rem;
  }

  /* improve footer mobile padding */
  .footer {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    transform: translateX(0);
    text-align: center;
    width: auto;
  }

  .footer-text {
    font-size: 0.875rem;
  }

  /* increase main heading font size on mobile */
  .main-heading {
    font-size: clamp(2rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
  }

  /* reduce rain drops on mobile for better performance */
  .rain-drop {
    width: 1px;
    height: 8px;
  }

  /* adjust floating dots visibility on mobile */
  .floating-dot {
    width: 0.2rem;
    height: 0.2rem;
  }

  /* improve final leet text sizing */
  .final-leet {
    font-size: 1.25rem;
  }

  .leet-text {
    font-size: clamp(1.5rem, 6vw, 4rem);
  }
}

@media (max-width: 480px) {
  /* extra small screen optimizations */
  .splash-title {
    font-size: clamp(1.75rem, 7vw, 4rem);
  }

  /* increase main heading for extra small screens */
  .main-heading {
    font-size: clamp(1.75rem, 7vw, 4rem);
  }

  .discord-widget {
    max-width: 90vw;
    min-width: 260px;
    padding: 0.6rem;
  }

  .contact-button {
    width: 95%;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .skill-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.65rem;
  }

  .skills-container {
    gap: 0.4rem;
    padding: 0 0.5rem;
  }

  .footer {
    bottom: 0.75rem;
  }

  .footer-text {
    font-size: 0.75rem;
  }
}
