/* Base styling */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  transition: background 0.5s, color 0.5s;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.5) 0%, rgba(16, 10, 92, 0.9) 70%, rgba(0, 0, 0, 1) 100%),
              linear-gradient(270deg, #ff5f6d, #ffc371, #47cf73, #00c6ff, #845ec2);
  background-size: 1200% 1200%;
  animation: rainbow 20s ease infinite;
  color: #ffffff;
  overflow-x: hidden;
}

/* Light Mode */
body.light-mode {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, rgba(245, 245, 245, 0.9) 70%, rgba(230, 230, 230, 1) 100%),
    linear-gradient(270deg, #fdfcdc, #d4fc79, #96e6a1, #8ec5fc, #e0c3fc);
  background-size: 1200% 1200%;
  background-blend-mode: overlay;
  animation: rainbow 20s ease infinite;
  color: #003366;
}

/* Vignette effect */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0,0,0,0) 30%, rgba(0,0,0,0.4) 100%);
  z-index: 0;
}

/* Header and nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  z-index: 1;
  position: relative;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #ffffff;
}

body.light-mode .logo {
  color: #003366;
}

nav a {
  color: #ffffff;
  margin: 0 12px;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

body.light-mode nav a,
body.light-mode #toggleMode {
  color: #003366;
}

#toggleMode {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 50px 20px;
  z-index: 1;
  position: relative;
}

.hero img {
  animation: fadeIn 2s ease-in-out;
  border-radius: 50%;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border: 5px solid #ffffff;
}

.intro h1 {
  margin-top: 20px;
  font-size: 36px;
  font-weight: bold;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 1s forwards 0.5s;
}

.intro h1 span {
  color: #ff5f6d;
}

.intro p {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 1s forwards;
}

.intro p:nth-child(2) { animation-delay: 0.7s; }
.intro p:nth-child(3) { animation-delay: 0.9s; }
.intro p:nth-child(4) { animation-delay: 1.1s; }

.social-icons a {
  margin: 0 8px;
  font-size: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 1s forwards;
}

.social-icons a:nth-child(1) { animation-delay: 1.3s; }
.social-icons a:nth-child(2) { animation-delay: 1.5s; }
.social-icons a:nth-child(3) { animation-delay: 1.7s; }
.social-icons a:nth-child(4) { animation-delay: 1.9s; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero img {
    width: 150px;
    height: 150px;
  }

  .intro h1 {
    font-size: 28px;
  }

  .social-icons a {
    font-size: 20px;
  }

  header {
    flex-direction: column;
    gap: 10px;
  }
}
