/* Base Styles */
:root {
  --blue-light: #4bb6ff;
  --blue-dark: #020b14;
  --blue-darker: #01070d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: monospace, Arial, sans-serif;
  background-color: var(--blue-dark);
  color: #fff;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
  /* Prevents horizontal scroll from animations */
}

/* Navbar */
header {
  background: var(--blue-darker);
  padding: 1rem 1.5rem;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.navbar {
  display: flex;
  justify-content: center; /* Centralize items in the navbar */
  align-items: center;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}

.logo {
  font-weight: bold;
  display: flex;
  align-items: center;
  font-family: "Orbitron", sans-serif;
  font-size: 1.5rem;
  color: var(--blue-light);
  position: absolute; /* Position the logo absolutely */
  left: 1.5rem; /* Align to the left */
}

.logo img {
  width: 30px;
  margin-right: 8px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  z-index: 5; /* Ensure links are on top of other elements */
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s, text-decoration 0.3s;
}

.nav-links a:hover {
  color: var(--blue-light);
  text-decoration: underline;
}

.hamburger {
  display: none;
  /* Hidden on desktop */
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 20;
}

.nav-actions {
  display: flex;
  align-items: center;
  position: absolute;
  right: 1.5rem;
}

/* Hero Section */
.reSolve {
  color: #aaa;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.9rem;
  position-anchor: top left;
}

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(2, 11, 20, 0.7);
  z-index: 0;
}

.hero-content {
  text-align: center;
  color: #fff;
  z-index: 1;
  padding: 2rem;
}

.hero-logo {
  width: 100px;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
  transition: filter 0.5s ease-in-out;
}

/* Animation for the hero logo */
.logo-glow-active {
  animation: logo-glow 1.5s infinite alternate;
}

@keyframes logo-glow {
  from {
    filter: drop-shadow(0 0 5px var(--blue-light))
      drop-shadow(0 0 10px var(--blue-light));
  }

  to {
    filter: drop-shadow(0 0 20px var(--blue-light))
      drop-shadow(0 0 40px var(--blue-light));
  }
}

.hero h1 {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(4rem, 8vw, 8rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 80%;
  letter-spacing: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.hero .blue {
  color: var(--blue-light);
  text-shadow: 0 0 15px rgba(75, 182, 255, 0.6);
}

.hero .moon {
  color: #fff;
  font-weight: bold;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

@keyframes h1Blink {
  0%,
  100% {
    color: var(--blue-light);
    text-shadow: 0 0 15px rgba(75, 182, 255, 0.6);
  }

  50% {
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
  }
}

.hero h1.color-swap-active .blue {
  animation: h1Blink 1.5s infinite;
}

.hero h1.color-swap-active .moon {
  animation: h1Blink 1.5s infinite reverse;
}

.hero p {
  margin-top: 1rem;
  font-size: 1.2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Typing cursor animation */
.typing-cursor,
.typing-cursor-about {
  animation: blink 0.7s infinite;
}

/* Firefly animation */
.firefly-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.firefly {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #ffec8b;
  border-radius: 50%;
  box-shadow: 0 0 5px #ffec8b, 0 0 10px #ffec8b, 0 0 15px #ffec8b;
  opacity: 0;
  animation: firefly-animation 20s linear infinite;
}

.firefly:nth-child(1) {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.firefly:nth-child(2) {
  top: 40%;
  left: 60%;
  animation-delay: 5s;
}

.firefly:nth-child(3) {
  top: 70%;
  left: 80%;
  animation-delay: 10s;
}

.firefly:nth-child(4) {
  top: 80%;
  left: 30%;
  animation-delay: 15s;
}

.firefly:nth-child(5) {
  top: 25%;
  left: 5%;
  animation-delay: 2s;
}

.firefly:nth-child(6) {
  top: 55%;
  left: 90%;
  animation-delay: 7s;
}

.firefly:nth-child(7) {
  top: 15%;
  left: 75%;
  animation-delay: 12s;
}

.firefly:nth-child(8) {
  top: 95%;
  left: 45%;
  animation-delay: 17s;
}

.firefly:nth-child(9) {
  top: 5%;
  left: 50%;
  animation-delay: 3s;
}

.firefly:nth-child(10) {
  top: 65%;
  left: 15%;
  animation-delay: 8s;
}

.firefly:nth-child(11) {
  top: 30%;
  left: 95%;
  animation-delay: 13s;
}

.firefly:nth-child(12) {
  top: 85%;
  left: 5%;
  animation-delay: 18s;
}

@keyframes firefly-animation {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }

  10% {
    transform: translate(20px, -50px);
    opacity: 1;
  }

  20% {
    transform: translate(50px, -20px);
    opacity: 0.8;
  }

  30% {
    transform: translate(100px, 30px);
    opacity: 1;
  }

  40% {
    transform: translate(150px, -40px);
    opacity: 0.6;
  }

  50% {
    transform: translate(200px, 50px);
    opacity: 0;
  }

  100% {
    transform: translate(0, 0);
    opacity: 0;
  }
}

/* Rain effect */
.rain-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.rain-drop {
  position: absolute;
  background: rgba(175, 215, 255, 0.4);
  width: 2px;
  height: 20px;
  animation: rain-fall 2s linear infinite;
  transform: translateY(-100vh);
}

.rain-drop:nth-child(1) {
  left: 10%;
  animation-delay: 0.5s;
  animation-duration: 2.2s;
}

.rain-drop:nth-child(2) {
  left: 30%;
  animation-delay: 1.2s;
  animation-duration: 1.8s;
}

.rain-drop:nth-child(3) {
  left: 50%;
  animation-delay: 0.1s;
  animation-duration: 2.5s;
}

.rain-drop:nth-child(4) {
  left: 70%;
  animation-delay: 1.8s;
  animation-duration: 2.1s;
}

.rain-drop:nth-child(5) {
  left: 90%;
  animation-delay: 0.8s;
  animation-duration: 1.9s;
}

.rain-drop:nth-child(6) {
  left: 25%;
  animation-delay: 1.5s;
  animation-duration: 2.3s;
}

.rain-drop:nth-child(7) {
  left: 65%;
  animation-delay: 0.4s;
  animation-duration: 1.7s;
}

.rain-drop:nth-child(8) {
  left: 85%;
  animation-delay: 0.9s;
  animation-duration: 2s;
}

@keyframes rain-fall {
  from {
    transform: translateY(-100vh);
  }

  to {
    transform: translateY(100vh);
  }
}

/* About Section */
.about {
  padding: 0rem 2rem 0rem 2rem;
  background-color: var(--blue-dark);
}

.about-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.about-icon {
  width: 120px;
  animation: rotate 4s linear infinite;
  filter: drop-shadow(0 0 10px var(--blue-light))
    drop-shadow(0 0 20px var(--blue-light));
}

.about-text h2 {
  margin-bottom: 1rem;
  color: var(--blue-light);
}

.about-paragraphs p {
  margin-bottom: 1rem;
}

.about-text h2 span,
.about-paragraphs p span {
  display: inline-block;
}

.typing-cursor-about {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--blue-light);
  vertical-align: middle;
}

/* Logos Section */
.Logos {
  padding: 0rem 3rem 2rem;
  text-align: center;
  overflow: hidden; /* Hide overflow for the animation */
  position: relative;
  width: 100%;
}

.logo-grid {
  display: flex;
  justify-content: flex-start; /* Align logos to the left */
  align-items: center;
  /* Use a much larger width to prevent jumps */
  width: max-content;
  animation: logo-scroll 30s linear infinite; /* Animate the whole grid */
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  gap: 2rem; /* Maintain gap between logos */
}

.logo-item {
  flex-shrink: 0;
  width: 150px;
}

.logo-item img {
  width: 100%;
  height: auto;
  filter: grayscale(100%) opacity(50%);
  transition: filter 0.3s ease;
}

.logo-item img:hover {
  filter: grayscale(0%) opacity(100%);
}

@keyframes logo-scroll {
  0% {
    /* Start with the grid off-screen to the right, using calc to prevent a jump */
    transform: translateX(100vw) translateY(-50%);
  }

  100% {
    /* Move the grid completely off-screen to the left */
    transform: translateX(calc(-100% - 2rem)) translateY(-50%);
  }
}

/* Team Section */
.team {
  padding: 1rem 2rem;
  text-align: center;
}

.team h2 {
  margin-bottom: 2rem;
  color: var(--blue-light);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  color: #000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

.team-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s ease-in-out;
}

.team-card:hover img {
  filter: grayscale(0%);
}

.team-info {
  padding: 1rem;
}

.team-info .name {
  font-weight: bold;
}

.team-info .role {
  color: #666;
  font-size: 0.9rem;
}

/* Action Links Section */
/* Floating Action Buttons Container */
.action-buttons-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.action-buttons {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.action-buttons li {
  display: inline-block;
}

.action-buttons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  padding: 0.5rem;
}

.action-buttons a:hover {
  background: var(--blue-light);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 20px rgba(75, 182, 255, 0.4);
}

.action-buttons img {
  width: 100%;
  height: auto;
  filter: invert(1);
  transition: filter 0.3s ease;
}

.action-buttons a:hover img {
  filter: none;
}

/* Specific styling for colored icons on hover */
.action-buttons a[href*="youtube.com"]:hover {
  background-color: #ff0000;
  border-color: #ff0000;
}

.action-buttons a[href*="github.com"]:hover {
  background-color: #171515;
  border-color: #171515;
}

.action-buttons a[href*="x.com"]:hover {
  background-color: #000;
  border-color: #000;
}

/* Footer */
footer {
  background: var(--blue-darker);
  padding: 2rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #aaa;
  text-align: center;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links h3 {
  color: var(--blue-light);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: var(--blue-light);
}

.footer-links a i {
  font-size: 1rem;
  width: 20px;
}

.copyright {
  margin-top: 1rem;
  opacity: 0.8;
}

/* Toggle Button */
#themeToggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  margin-right: 1rem;
  transition: transform 0.2s;
  color: #fff;
}

#themeToggle:hover {
  transform: scale(1.2);
}

/* Light Mode */
body.light {
  background: #f7f7f7;
  color: #111;
}

body.light header,
body.light footer {
  background: #ffffff;
  color: #333;
  border-top: 1px solid #ddd;
  border-bottom: none;
}

body.light .nav-links a {
  color: #111;
}

body.light .nav-links a:hover {
  color: #0077ff;
}

body.light .team-card {
  background: #fff;
  color: #111;
}

body.light .hero .moon {
  color: #111;
}

body.light #themeToggle {
  color: #111;
}

body.light .footer-links a {
  color: #111;
}

body.light .footer-links a:hover {
  color: #0077ff;
}

body.light .footer-links h3 {
  color: #0077ff;
}

/* Mobile Viewports */
@media (max-width: 768px) {
  .navbar {
    justify-content: space-between;
  }
  .logo {
    position: static;
    left: auto;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--blue-darker);
    position: absolute;
    top: 60px;
    right: 0;
    padding: 1rem;
    border-radius: 8px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    /* Reset flex-grow for mobile */
    flex-grow: unset;
    justify-content: flex-start;
  }

  .nav-links.active {
    display: flex;
    transform: translateX(0);
  }

  .hamburger {
    display: block;
    /* Hamburger is visible on mobile */
  }

  .nav-actions {
    position: static;
    right: auto;
  }
}

/* Mobile H1 stacking for "Blue Moon" */
@media (max-width: 600px) {
  .hero h1 {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* General Animations */
@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}
