@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.5s;
}

.delay-2 {
  animation-delay: 1s;
}

body {
  margin: 0;
  background-color: #000000;
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.4) 100%);
  z-index: -1;
  pointer-events: none;
}

.edu-title {
  text-align: center;
  font-size: 2.8rem;
  color: #e50914;
  padding: 40px 10px 10px;
  background-color: transparent;
}

.edu-section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.edu-card {
  display: flex;
  flex-direction: row;
  max-width: 95%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.edu-card:hover {
  border-color: rgba(229, 9, 20, 0.5);
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.3);
}

.edu-img-side {
  flex: 1;
  overflow: hidden;
}

.edu-img-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edu-text-side {
  flex: 1;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
}

.edu-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

.edu-text-side h2 {
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 10px;
}

.edu-degree,
.edu-dates,
.edu-courses,
.edu-cgpa {
  margin: 8px 0;
  color: #dddddd;
  font-size: 1rem;
}

.edu-courses strong,
.edu-cgpa strong {
  color: #ffffff;
}

/* Footer Nav Buttons */
footer {
  background-color: transparent;
  padding: 10px 0;
  text-align: right;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e50914;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(229, 9, 20, 0.5);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

.next-btn::after {
  content: " →";
}

/* Floating Home Button */
.home-float-btn {
  position: fixed;
  top: 40px;
  right: 40px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e50914;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  z-index: 1000;
  transition: all 0.3s ease;
}

.home-float-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(229, 9, 20, 0.5);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

/* ================= MOBILE RESPONSIVE ================= */

@media (max-width: 1024px) {
  .edu-title {
    font-size: 2rem;
  }

  .edu-section {
    padding: 20px;
  }

  .edu-card {
    flex-direction: column;   /* KEY FIX */
  }

  .edu-img-side {
    width: 100%;
    height: 250px;
  }

  .edu-img-side img {
    height: 100%;
    object-fit: cover;
  }

  .edu-text-side {
    padding: 30px 20px;
    text-align: center;
  }

  .edu-logo {
    margin: 0 auto 20px;
  }

  .edu-text-side h2 {
    font-size: 1.4rem;
  }

  .edu-degree,
  .edu-dates,
  .edu-courses,
  .edu-cgpa {
    font-size: 0.95rem;
  }
}
